claude-code-zanii 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -0
- package/dist/chunks/AddWorkspaceDirectory-y_rd6sRl.js +1 -0
- package/dist/chunks/App-DgWSavG1.js +1 -0
- package/dist/chunks/ApproveApiKey-CJKWha-a.js +1 -0
- package/dist/chunks/ApproveApiKey-DTs2ExZH.js +1 -0
- package/dist/chunks/AssistantSessionChooser-BAhVk4id.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-XU_JPh7R.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-DV0Pi7ys.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-6erm_8Fn.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CjBvzB5s.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-ts0XnWwl.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DySPdSqQ.js +1 -0
- package/dist/chunks/CustomSelect-DqZxzBZP.js +1 -0
- package/dist/chunks/DesktopHandoff-5c90JK88.js +1 -0
- package/dist/chunks/DevChannelsDialog-DCMderzu.js +1 -0
- package/dist/chunks/Dialog-Dgg8bqcG.js +1 -0
- package/dist/chunks/DiffDialog-BU765aqh.js +6 -0
- package/dist/chunks/Doctor-B73iDB-d.js +3 -0
- package/dist/chunks/Doctor-CLZDdNRo.js +1 -0
- package/dist/chunks/ExitFlow-DBqn2mUf.js +2 -0
- package/dist/chunks/Feedback-D-JHabwi.js +2 -0
- package/dist/chunks/Grove-D-uQNMMo.js +11 -0
- package/dist/chunks/HybridTransport-B-G4QJcy.js +4 -0
- package/dist/chunks/ITermBackend-KP1vKsRN.js +1 -0
- package/dist/chunks/InProcessTransport-ByBEKxrQ.js +1 -0
- package/dist/chunks/InvalidConfigDialog-CMqiZ5nG.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-CjPCKzVZ.js +1 -0
- package/dist/chunks/ListItem-B6MyhHvM.js +1 -0
- package/dist/chunks/MCPConnectionManager-BJ8PcYPe.js +1 -0
- package/dist/chunks/Message-DNxJ_tMS.js +1 -0
- package/dist/chunks/MessageSelector-D79Ug71B.js +3 -0
- package/dist/chunks/Messages-CtIbkB2M.js +11 -0
- package/dist/chunks/Onboarding-DVrgKrI9.js +1 -0
- package/dist/chunks/OverageCreditUpsell-D_td1ss4.js +1 -0
- package/dist/chunks/PermissionDialog-BCS22yEO.js +1 -0
- package/dist/chunks/PermissionDialog-C5O1fL53.js +1 -0
- package/dist/chunks/PermissionRequestTitle-CtlbBU9t.js +1 -0
- package/dist/chunks/PluginSettings-OPrg-_3N.js +17 -0
- package/dist/chunks/PressEnterToContinue-DmzxIgbZ.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-CcsKj5DK.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-JedFdsxU.js +1 -0
- package/dist/chunks/REPL-ByhyIRnf.js +1 -0
- package/dist/chunks/REPL-Clve-8zC.js +157 -0
- package/dist/chunks/RemoteCallout-BZcabEKb.js +1 -0
- package/dist/chunks/RemoteSessionManager-C2PIFDHt.js +1 -0
- package/dist/chunks/ResumeConversation-D3ZRTFcF.js +1 -0
- package/dist/chunks/SSETransport-DmZWnH0k.js +4 -0
- package/dist/chunks/SearchBox-DQg2Ph0V.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-CLO4nt6N.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BVfBaOOU.js +2 -0
- package/dist/chunks/SentryErrorBoundary-DIaVFad-.js +1 -0
- package/dist/chunks/Settings-rOCxQdS8.js +2 -0
- package/dist/chunks/TeleportProgress-CP8IY6bz.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DMmHgBqo.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-D5wEAW1-.js +1 -0
- package/dist/chunks/ThemePicker-Bgr7yOQB.js +1 -0
- package/dist/chunks/TmuxBackend-BzbtUtP1.js +9 -0
- package/dist/chunks/TrustDialog-BI5U3BQ0.js +1 -0
- package/dist/chunks/TungstenTool-CiQclNwj.js +1 -0
- package/dist/chunks/TungstenTool-kMqy-ifa.js +1 -0
- package/dist/chunks/ValidationErrorsList-DprGtB2w.js +2 -0
- package/dist/chunks/WelcomeV2-C4vfBnIy.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BSoezOCE.js +2 -0
- package/dist/chunks/add-dir-DpOmv6kv.js +1 -0
- package/dist/chunks/agentDisplay-DuYEwOwO.js +1 -0
- package/dist/chunks/agents-BlurXZrF.js +2 -0
- package/dist/chunks/agents-DhZf7ftU.js +103 -0
- package/dist/chunks/ajv-CDrSAj3O.js +8 -0
- package/dist/chunks/analytics-i6X1et4O.js +1 -0
- package/dist/chunks/ant-D9hd_iYy.js +1 -0
- package/dist/chunks/api-CoaOHwDQ.js +4 -0
- package/dist/chunks/api-DvyGR-L7.js +1 -0
- package/dist/chunks/api-YHYC4Zdk.js +1 -0
- package/dist/chunks/artifacts-BMAYdaqh.js +1 -0
- package/dist/chunks/asciicast-DpHRoebc.js +1 -0
- package/dist/chunks/asciicast-HG1EoAQe.js +4 -0
- package/dist/chunks/assistant-D4-qcNT1.js +1 -0
- package/dist/chunks/assistant-DO2ZmZn1.js +1 -0
- package/dist/chunks/assistant-Dd86NmJM.js +1 -0
- package/dist/chunks/attributionHooks-BUmHrLhB.js +1 -0
- package/dist/chunks/attributionTrailer-r2Pbpu2N.js +1 -0
- package/dist/chunks/auth-CF3BGNYT.js +1 -0
- package/dist/chunks/auth-DwWwG43F.js +1 -0
- package/dist/chunks/auth-V_Xk2iea.js +1 -0
- package/dist/chunks/autoMode-DUksX5_i.js +45 -0
- package/dist/chunks/autoModeDenials-0CPO-Jbu.js +1 -0
- package/dist/chunks/autonomy-C5mNhAdz.js +21 -0
- package/dist/chunks/autonomy-CLt1dWaC.js +1 -0
- package/dist/chunks/autonomyPanel-rioFnrQO.js +1 -0
- package/dist/chunks/axios-DPuSPBlH.js +1 -0
- package/dist/chunks/axios-Zh7qGPze.js +12 -0
- package/dist/chunks/backgroundHousekeeping-BGtfqu-J.js +1 -0
- package/dist/chunks/backgroundHousekeeping-BqKZEvy0.js +17 -0
- package/dist/chunks/banner-BGLr3KYQ.js +2 -0
- package/dist/chunks/base64-js-B1tFNiG0.js +1 -0
- package/dist/chunks/bedrockClient-BFzWuhQK.js +15 -0
- package/dist/chunks/bg-B-YgGwLj.js +9 -0
- package/dist/chunks/bg-IU4gG3jc.js +1 -0
- package/dist/chunks/branch-BWY5W7hf.js +3 -0
- package/dist/chunks/break-cache-CY-O23fJ.js +8 -0
- package/dist/chunks/bridge-CqWd70vK.js +2 -0
- package/dist/chunks/bridgeConfig-CWO8AmCY.js +1 -0
- package/dist/chunks/bridgeConfig-D38y9eXn.js +1 -0
- package/dist/chunks/bridgeConfig-EwUq__ct.js +1 -0
- package/dist/chunks/bridgeConfig-GYR-LUiu.js +1 -0
- package/dist/chunks/bridgeEnabled-DKqmLnKO.js +1 -0
- package/dist/chunks/bridgeEnabled-DZIGDtfY.js +1 -0
- package/dist/chunks/bridgeMain-CXVks2ND.js +1 -0
- package/dist/chunks/bridgeMain-D4nsECwJ.js +68 -0
- package/dist/chunks/bridgeMessaging-BUOZU_ba.js +1 -0
- package/dist/chunks/bridgePointer-BpzIEsD_.js +1 -0
- package/dist/chunks/browser-D1vC3BNd.js +1 -0
- package/dist/chunks/btw-CVXJwoXo.js +1 -0
- package/dist/chunks/buddy-BLcvL8lP.js +3 -0
- package/dist/chunks/bundledMode-DQNSSQbt.js +1 -0
- package/dist/chunks/caches-BrfvzKn5.js +1 -0
- package/dist/chunks/caches-CkSv3MfC.js +3 -0
- package/dist/chunks/capacityWake-BWCSatN6.js +1 -0
- package/dist/chunks/changeDetector-DEZU6tum.js +1 -0
- package/dist/chunks/changeDetector-Df7c6U3d.js +1 -0
- package/dist/chunks/channelAllowlist-BApjAS0V.js +1 -0
- package/dist/chunks/channelNotification-BjWwF85R.js +1 -0
- package/dist/chunks/channelNotification-D01YVwNj.js +1 -0
- package/dist/chunks/chokidar-DPwMBcWI.js +1 -0
- package/dist/chunks/chokidar-DkDXNCTz.js +1 -0
- package/dist/chunks/chrome-D7coxEOI.js +1 -0
- package/dist/chunks/chromeNativeHost-CPj9M_4-.js +1 -0
- package/dist/chunks/chunk-DR8-3Aex.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-DZkxcFPS.js +1 -0
- package/dist/chunks/claudeAiLimitsHook-ATshVrOH.js +1 -0
- package/dist/chunks/claudeDesktop-PVa9tWsM.js +1 -0
- package/dist/chunks/cleanup-C-PGmKpV.js +1 -0
- package/dist/chunks/clear-CxGE9Ntr.js +1 -0
- package/dist/chunks/cliLaunch-CMXoY_LO.js +1 -0
- package/dist/chunks/client-BWED8Tbu.js +35 -0
- package/dist/chunks/client-CinDjeSq.js +7 -0
- package/dist/chunks/client-CpXGg9e0.js +1 -0
- package/dist/chunks/color-B3w_VQTn.js +1 -0
- package/dist/chunks/color-convert-BQZnVz_5.js +1 -0
- package/dist/chunks/commands-DFp48zwy.js +1 -0
- package/dist/chunks/commitAttribution-B0cXmbvv.js +2 -0
- package/dist/chunks/commitAttribution-DRSKRoH6.js +1 -0
- package/dist/chunks/common-BX7bn3hg.js +1 -0
- package/dist/chunks/common-Ce3LanTX.js +1 -0
- package/dist/chunks/common-DdLQuE2_.js +1 -0
- package/dist/chunks/common-HfKcqOYK.js +1 -0
- package/dist/chunks/compact-C8ljGMdo.js +3 -0
- package/dist/chunks/companion-mD1jw6xX.js +1 -0
- package/dist/chunks/completionCache-BqQXVTa9.js +1 -0
- package/dist/chunks/completionCache-BtP4vfAi.js +4 -0
- package/dist/chunks/computerUseLock-ADE_PhIK.js +1 -0
- package/dist/chunks/config-CmyaIIOY.js +1 -0
- package/dist/chunks/config-Rl1Y_Dtq.js +1 -0
- package/dist/chunks/connectHeadless-MFABhXpz.js +1 -0
- package/dist/chunks/constants-BM62Vf_X.js +1 -0
- package/dist/chunks/constants-BfXy-5cI.js +1 -0
- package/dist/chunks/context-BeiZkUNq.js +1 -0
- package/dist/chunks/context-noninteractive-CRdF3iv8.js +54 -0
- package/dist/chunks/controlMessageCompat-591iGHUK.js +1 -0
- package/dist/chunks/conversation-BoguXZEI.js +1 -0
- package/dist/chunks/conversation-yhs7tT-g.js +1 -0
- package/dist/chunks/copy-BpeUcqku.js +7 -0
- package/dist/chunks/createSSHSession-B3JOB4TE.js +6 -0
- package/dist/chunks/createSession-BJSnFBGt.js +1 -0
- package/dist/chunks/createSession-CnRHI3RU.js +1 -0
- package/dist/chunks/cron-iqTFGIos.js +1 -0
- package/dist/chunks/cronScheduler-zRXhgEEU.js +6 -0
- package/dist/chunks/cronTasks-CMJldfoP.js +2 -0
- package/dist/chunks/crossProjectResume-DxO6TX30.js +40 -0
- package/dist/chunks/cwd-B2guYBbl.js +1 -0
- package/dist/chunks/cwd-B5bbyUwz.js +1 -0
- package/dist/chunks/cwd-BXiaJzLh.js +1 -0
- package/dist/chunks/daemon-B3v4OoOu.js +2 -0
- package/dist/chunks/dangerousBackend-OmCzoW35.js +1 -0
- package/dist/chunks/datadog-3-Vvz0yz.js +1 -0
- package/dist/chunks/datadog-BQlp3bTs.js +1 -0
- package/dist/chunks/debug-BDBIipC1.js +2 -0
- package/dist/chunks/debug-C7tW7DFW.js +1 -0
- package/dist/chunks/debug-CjIaNjpK.js +5 -0
- package/dist/chunks/debugUtils-Dsg-UHeg.js +1 -0
- package/dist/chunks/defineProperty-CaCI0a5T.js +1 -0
- package/dist/chunks/desktop-C_SS0068.js +1 -0
- package/dist/chunks/detached-B7RNZeyl.js +5 -0
- package/dist/chunks/detect-libc-DFFGDzPC.js +1 -0
- package/dist/chunks/detectRepository-BnTCJAXR.js +1 -0
- package/dist/chunks/detectRepository-Gobn9eFt.js +1 -0
- package/dist/chunks/detection-CN_uLGU2.js +1 -0
- package/dist/chunks/detection-DW6grIlc.js +1 -0
- package/dist/chunks/diff-B8YmRG5T.js +1 -0
- package/dist/chunks/directoryCompletion-J560aATd.js +1 -0
- package/dist/chunks/dist-B1wOprSs.js +29 -0
- package/dist/chunks/dist-DZQOarNX.js +5 -0
- package/dist/chunks/dist-HZfkKiUF.js +20 -0
- package/dist/chunks/dist-es-4xyrZoNc2.js +1 -0
- package/dist/chunks/dist-es-6kjvVbJd.js +1 -0
- package/dist/chunks/dist-es-BJldFHbt.js +3 -0
- package/dist/chunks/dist-es-BM013UFT.js +1 -0
- package/dist/chunks/dist-es-BPPewn1A.js +1 -0
- package/dist/chunks/dist-es-BZGG3Hnm.js +1 -0
- package/dist/chunks/dist-es-BZjJL64k2.js +1 -0
- package/dist/chunks/dist-es-BctcPxLN.js +1 -0
- package/dist/chunks/dist-es-Bf2jR30y.js +1 -0
- package/dist/chunks/dist-es-BgLoR-hQ.js +1 -0
- package/dist/chunks/dist-es-BismPcTW.js +1 -0
- package/dist/chunks/dist-es-BrPzXmSP.js +1 -0
- package/dist/chunks/dist-es-Bu21Wvhs.js +1 -0
- package/dist/chunks/dist-es-BuWNNAXW.js +1 -0
- package/dist/chunks/dist-es-Bz11sFiK2.js +1 -0
- package/dist/chunks/dist-es-C5VplyPL2.js +5 -0
- package/dist/chunks/dist-es-C66BuLgn.js +1 -0
- package/dist/chunks/dist-es-CCIzgNln2.js +1 -0
- package/dist/chunks/dist-es-CLyx7Kge2.js +1 -0
- package/dist/chunks/dist-es-CUbatGdn.js +1 -0
- package/dist/chunks/dist-es-CYe_-TbD.js +1 -0
- package/dist/chunks/dist-es-C_IHUdzL.js +1 -0
- package/dist/chunks/dist-es-Ci_rKlMr.js +1 -0
- package/dist/chunks/dist-es-ClDZBAj7.js +1 -0
- package/dist/chunks/dist-es-Cp--qjOi.js +1 -0
- package/dist/chunks/dist-es-CzE4kW1L.js +9 -0
- package/dist/chunks/dist-es-DUg5w7-v.js +1 -0
- package/dist/chunks/dist-es-Dl0ZRczY.js +1 -0
- package/dist/chunks/dist-es-Do_155z5.js +1 -0
- package/dist/chunks/dist-es-DxIM0jd82.js +1 -0
- package/dist/chunks/dist-es-Fav2oBDs.js +1 -0
- package/dist/chunks/dist-es-TZjwPaGn.js +1 -0
- package/dist/chunks/dist-es-W22ud2el2.js +1 -0
- package/dist/chunks/dist-es-aU8-02YH.js +1 -0
- package/dist/chunks/dist-es-b3yZSGx82.js +1 -0
- package/dist/chunks/dist-es-dIP5JtXz.js +5 -0
- package/dist/chunks/dist-es-mQ4HvnYs2.js +1 -0
- package/dist/chunks/distRoot-CJaacAHy.js +1 -0
- package/dist/chunks/doctor-DLZPF4iY.js +1 -0
- package/dist/chunks/earlyInput-BTI1CSNt.js +2 -0
- package/dist/chunks/earlyInput-BwGtzhhP.js +1 -0
- package/dist/chunks/effort-BaHvpBWr.js +9 -0
- package/dist/chunks/entry-_e-lyRwv.js +14 -0
- package/dist/chunks/env-CesrOJJq.js +1 -0
- package/dist/chunks/envLessBridgeConfig-4oys0_9A.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DJ1Sts3F.js +1 -0
- package/dist/chunks/envUtils-CFG7IQID.js +1 -0
- package/dist/chunks/errorLogSink-Ti4Suoz6.js +2 -0
- package/dist/chunks/escHotkey-CVn_80xM.js +259 -0
- package/dist/chunks/esm-BFnjHW38.js +1 -0
- package/dist/chunks/esm-BQg_LX3V.js +1 -0
- package/dist/chunks/esm-BtC6CMmM.js +1 -0
- package/dist/chunks/esm-BwzC0MQp.js +1 -0
- package/dist/chunks/esm-CFybeQ_Q.js +1 -0
- package/dist/chunks/esm-CK-5CT5X.js +1 -0
- package/dist/chunks/esm-CL1OwlZB.js +1 -0
- package/dist/chunks/esm-CMzgSTAl.js +1 -0
- package/dist/chunks/esm-CPE_H2Lx.js +1 -0
- package/dist/chunks/esm-CcWquv5a.js +10 -0
- package/dist/chunks/esm-CeNEpRZt.js +1 -0
- package/dist/chunks/esm-D7hykoRB.js +1 -0
- package/dist/chunks/esm-DUtcefEV.js +1 -0
- package/dist/chunks/esm-DhrUwJBp.js +1 -0
- package/dist/chunks/esm-Duu1fRQ8.js +1 -0
- package/dist/chunks/esm-Ght2BaU2.js +1 -0
- package/dist/chunks/esm-Q6Yz2GMx.js +56 -0
- package/dist/chunks/esm-WONEiurY.js +13 -0
- package/dist/chunks/event-streams-BumpU1aB.js +1 -0
- package/dist/chunks/eventLoopStallDetector-DxyFdg1h.js +1 -0
- package/dist/chunks/execAsync-ChKxDZ8C.js +1 -0
- package/dist/chunks/execFileNoThrow-DdmR1mBS.js +1 -0
- package/dist/chunks/execSyncWrapper-Ch4TNj8u.js +1 -0
- package/dist/chunks/execa-BMaINL7N.js +34 -0
- package/dist/chunks/executor-C7INr19-.js +1 -0
- package/dist/chunks/executor-Dnf3YYma.js +1604 -0
- package/dist/chunks/exit-BakzsOD0.js +1 -0
- package/dist/chunks/exit-CiDn2tN9.js +2 -0
- package/dist/chunks/export-b-6pqMqz.js +2 -0
- package/dist/chunks/exportRenderer-RxtEIyTm.js +1 -0
- package/dist/chunks/extra-usage-7EPJNjNW.js +1 -0
- package/dist/chunks/extra-usage-ChvuewCq.js +1 -0
- package/dist/chunks/extra-usage-core-BVhLtoDF.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-_Njh6q-q.js +1 -0
- package/dist/chunks/extraUsage-qOBMQB6g.js +1 -0
- package/dist/chunks/extractMemories-CRBVNiG1.js +1 -0
- package/dist/chunks/fast-C4uw_g7o.js +1 -0
- package/dist/chunks/fast-CEaIzaPl.js +1 -0
- package/dist/chunks/featureCheck-B1GSTyhh.js +1 -0
- package/dist/chunks/featureCheck-DKigAPal.js +1 -0
- package/dist/chunks/feedback-Bf3TjjuD.js +1 -0
- package/dist/chunks/figures-fES5sASd.js +1 -0
- package/dist/chunks/fileStateCache-DAsLEZau.js +1 -0
- package/dist/chunks/files-B-m_4X8b.js +2 -0
- package/dist/chunks/findExecutable-D8vJrFnO.js +1 -0
- package/dist/chunks/firstPartyEventLogger-BtrGagNa.js +1 -0
- package/dist/chunks/flushGate-2zqab-Pp.js +1 -0
- package/dist/chunks/foundry-sdk-CtX8C0x3.js +1 -0
- package/dist/chunks/fpsMetrics-ts_jaF3g.js +1 -0
- package/dist/chunks/fuse-ivQ_eRwF.js +1 -0
- package/dist/chunks/gates-CmKoQ0O-.js +1 -0
- package/dist/chunks/gates-_wbPDQ3M.js +1 -0
- package/dist/chunks/gemini-DRx495gn.js +3 -0
- package/dist/chunks/generateRecap-Cv8gd_QF.js +1 -0
- package/dist/chunks/generateSessionName-Dpjg-u_x.js +1 -0
- package/dist/chunks/genericProcessUtils-BFJMxLqn.js +23 -0
- package/dist/chunks/getMachineId-bsd-C9pL9Ajr.js +1 -0
- package/dist/chunks/getMachineId-darwin-Ma4F9rJg.js +2 -0
- package/dist/chunks/getMachineId-linux-C0lXMqsj.js +1 -0
- package/dist/chunks/getMachineId-unsupported-ByHQTXat.js +1 -0
- package/dist/chunks/getMachineId-win-DZsXZmTz.js +1 -0
- package/dist/chunks/git-Bj8Ow4pJ.js +6 -0
- package/dist/chunks/git-Q_b4oZ17.js +1 -0
- package/dist/chunks/githubRepoPathMapping-DGivBX9h.js +1 -0
- package/dist/chunks/goal-BrHEJv8o.js +3 -0
- package/dist/chunks/goalStorage-CsuPOQbk.js +1 -0
- package/dist/chunks/graceful-fs-BuPWC-vB.js +2 -0
- package/dist/chunks/grok-CDkDDaY_.js +1 -0
- package/dist/chunks/growthbook-D3_Cr9n-.js +1 -0
- package/dist/chunks/growthbook-p4aJ_UMv.js +32 -0
- package/dist/chunks/hash-KW-tVnPp.js +1 -0
- package/dist/chunks/heapdump-CloylIZ9.js +5 -0
- package/dist/chunks/help-DpSJlHIc.js +1 -0
- package/dist/chunks/hooks-2pogt8nv.js +79 -0
- package/dist/chunks/hooks-BBODdwnE.js +1 -0
- package/dist/chunks/hostAdapter-B5KTUqhv.js +1 -0
- package/dist/chunks/hostGuard-DyWr2TwE.js +1 -0
- package/dist/chunks/httpAuthSchemes-CgPbtGos.js +13 -0
- package/dist/chunks/ide-CJEcfBZq.js +2 -0
- package/dist/chunks/inboundAttachments-RNpYpRTO.js +1 -0
- package/dist/chunks/index.min-DCDiLq-j.js +1 -0
- package/dist/chunks/initReplBridge-D2E6IM2B.js +1 -0
- package/dist/chunks/initReplBridge-p2uwDBPx.js +1 -0
- package/dist/chunks/insights-DnpZScKs.js +822 -0
- package/dist/chunks/install-D_vTxUlG.js +1 -0
- package/dist/chunks/install-github-app-BK8A7g3i.js +147 -0
- package/dist/chunks/install-slack-app-C47R9VoI.js +1 -0
- package/dist/chunks/instinctParser-DxKdI3JC.js +1 -0
- package/dist/chunks/instrumentation-DkdAJFrZ.js +12 -0
- package/dist/chunks/intl-Pse97ORk.js +1 -0
- package/dist/chunks/isObject-DaxDnPKm.js +1 -0
- package/dist/chunks/isSymbol-D7QeUnS5.js +1 -0
- package/dist/chunks/job-opl00C4l.js +2 -0
- package/dist/chunks/json-bigint-BRRVs1dv.js +8 -0
- package/dist/chunks/jsx-runtime-BTgGEFjL.js +1 -0
- package/dist/chunks/jws-B_ieuaZg.js +3 -0
- package/dist/chunks/jwtUtils-D-tJzoJY.js +1 -0
- package/dist/chunks/keybindings-mRf9VSe8.js +2 -0
- package/dist/chunks/lang-eH4EJErj.js +1 -0
- package/dist/chunks/language-DD9ar6RA.js +1 -0
- package/dist/chunks/language-EZLNdETg.js +1 -0
- package/dist/chunks/launchAgentsPlatform-Cq0_7-IM.js +1 -0
- package/dist/chunks/launchAutofixPr-Bw7aUHUs.js +18 -0
- package/dist/chunks/launchCommand-Bk1Fn-qZ.js +1 -0
- package/dist/chunks/launchLocalMemory-CLBCUgwd.js +3 -0
- package/dist/chunks/launchLocalVault-BfWJWrBg.js +3 -0
- package/dist/chunks/launchMemoryStores-DdnSVSDZ.js +1 -0
- package/dist/chunks/launchOnboarding-ziCEX3GI.js +8 -0
- package/dist/chunks/launchSchedule-G_c7sgmy.js +1 -0
- package/dist/chunks/launchSkillStore-Z1Kd7nCg.js +1 -0
- package/dist/chunks/launchTeleport-Dp9AFbPx.js +3 -0
- package/dist/chunks/launchVault-hwK-Ljek.js +1 -0
- package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
- package/dist/chunks/lib-BHRYgENJ.js +8 -0
- package/dist/chunks/lib-DRyNc7xD.js +2 -0
- package/dist/chunks/lib-Ddq71jM5.js +14 -0
- package/dist/chunks/loadAgentsDir-Bz0FfcVt.js +5620 -0
- package/dist/chunks/loadAgentsDir-CLM0ws7u.js +1 -0
- package/dist/chunks/loadPluginHooks-B5SIS2uo.js +1 -0
- package/dist/chunks/loadSso-RY87rrJO.js +1 -0
- package/dist/chunks/localSearch-BLF6PSv2.js +1 -0
- package/dist/chunks/localSearch-CTycGe3E.js +1 -0
- package/dist/chunks/localSearch-inDahM8I.js +1 -0
- package/dist/chunks/lockfile--gk1HDM6.js +1 -0
- package/dist/chunks/log-B-Nj3Yed.js +1 -0
- package/dist/chunks/log-DVv8YiNo.js +1 -0
- package/dist/chunks/login-BeLvLowc.js +1 -0
- package/dist/chunks/login-DUUOeNoz.js +1 -0
- package/dist/chunks/logoV2Utils-D5SpeZ3C.js +1 -0
- package/dist/chunks/logout-C2QuTBdS.js +1 -0
- package/dist/chunks/magicDocs-CUXKi-Wv.js +57 -0
- package/dist/chunks/main-CFhpWtpC.js +1420 -0
- package/dist/chunks/main-sboa5RKc.js +31 -0
- package/dist/chunks/mappers-DLkk0PZz.js +1 -0
- package/dist/chunks/mcp-C2f6IgAp.js +2 -0
- package/dist/chunks/mcp-Djui9m3_.js +6 -0
- package/dist/chunks/mcp-DvTSxrJ4.js +1 -0
- package/dist/chunks/mcpServer-DMA0bdFC.js +1 -0
- package/dist/chunks/mcpServer-DxEHfW2v.js +1 -0
- package/dist/chunks/memoize-Bg2dXTzV.js +1 -0
- package/dist/chunks/memoize-DNnuA2aU.js +1 -0
- package/dist/chunks/memory-B9io9Zcv.js +1 -0
- package/dist/chunks/mobile-CPnnvkQV.js +2 -0
- package/dist/chunks/modalContext-B1b0Gsro.js +1 -0
- package/dist/chunks/mode-BDgwh_Xb.js +2 -0
- package/dist/chunks/model-B6cpEh-s.js +1 -0
- package/dist/chunks/model-BcunOCC9.js +1 -0
- package/dist/chunks/modelOptions-CHUHQ9WG.js +1 -0
- package/dist/chunks/normalization-cjPqid31.js +1 -0
- package/dist/chunks/oauth-CnBLewrU.js +1 -0
- package/dist/chunks/oauth-DMPGYAoZ.js +1 -0
- package/dist/chunks/observationStore-DVBxrSdI.js +4 -0
- package/dist/chunks/onChangeAppState-M61XDN6V.js +1 -0
- package/dist/chunks/open-CsUNPSNx.js +1 -0
- package/dist/chunks/openai-BHvlYW3m.js +2 -0
- package/dist/chunks/output-style-BtKuBrs4.js +1 -0
- package/dist/chunks/outputStyles-hHuIBkRB.js +84 -0
- package/dist/chunks/overageCreditGrant-BLFT-rF3.js +1 -0
- package/dist/chunks/p-map-C-WNcN6g.js +1 -0
- package/dist/chunks/p-map-CQ2NythB.js +1 -0
- package/dist/chunks/package-9IAs5Qf0.js +1 -0
- package/dist/chunks/panel-27xLZI7c.js +1 -0
- package/dist/chunks/panel-NoDfShEZ.js +1 -0
- package/dist/chunks/panelCall-CEOWVNCM.js +1 -0
- package/dist/chunks/parseConnectUrl-CxU4IX9o.js +1 -0
- package/dist/chunks/parser-DGlAnaNj.js +1 -0
- package/dist/chunks/parser-DGoLe2RS.js +1 -0
- package/dist/chunks/passes-CExcqu66.js +1 -0
- package/dist/chunks/path-uaxlnhva.js +1 -0
- package/dist/chunks/permissions-B3PceQul.js +1 -0
- package/dist/chunks/permissions-DezIL2xF.js +3 -0
- package/dist/chunks/permissions-DnpI8Whh.js +1 -0
- package/dist/chunks/pipeTransport-CB_Wq_Kx.js +1 -0
- package/dist/chunks/plan-cfZBclh9.js +1 -0
- package/dist/chunks/platform-BXz_rgpy.js +2 -0
- package/dist/chunks/plist-DLGDWBD6.js +6 -0
- package/dist/chunks/plugin-CuhENLRs.js +1 -0
- package/dist/chunks/pluginAutoupdate-wTeOXfQe.js +1 -0
- package/dist/chunks/pluginBlocklist-D6pkKfXr.js +1 -0
- package/dist/chunks/pluginCliCommands-DqxdCwsq.js +1 -0
- package/dist/chunks/pluginFlagging-CjH48f-K.js +1 -0
- package/dist/chunks/pluginOperations-DMFYB3pK.js +2 -0
- package/dist/chunks/pluginStartupCheck-BW3_KfZz.js +1 -0
- package/dist/chunks/pluginStartupCheck-Cj2BMjVw.js +1 -0
- package/dist/chunks/plugins-CarsG2v8.js +4 -0
- package/dist/chunks/policyLimits-DFn1vHkN.js +1 -0
- package/dist/chunks/pollConfig-C8nODJY1.js +1 -0
- package/dist/chunks/poller-DXZJ-dUP.js +1 -0
- package/dist/chunks/poor-C7GQ4a5X.js +1 -0
- package/dist/chunks/poorMode-CBe0rfxB.js +1 -0
- package/dist/chunks/poorMode-CbZTudtw.js +1 -0
- package/dist/chunks/postCommitAttribution--vvAWIqD.js +1 -0
- package/dist/chunks/print-CwwtGSbK.js +114 -0
- package/dist/chunks/privacy-settings-Bz8cAVp5.js +11 -0
- package/dist/chunks/privacyLevel-CRCHhztk.js +1 -0
- package/dist/chunks/process-CnhUplBr.js +1 -0
- package/dist/chunks/process-X4vCP9x0.js +1 -0
- package/dist/chunks/processBashCommand-NL0YEUqW.js +3 -0
- package/dist/chunks/processSlashCommand-FPMWElsI.js +6 -0
- package/dist/chunks/processSlashCommand-_oJs6_w8.js +6 -0
- package/dist/chunks/processUserInput-QAJK0XSn.js +1 -0
- package/dist/chunks/projectContext-B21hXj9q.js +1 -0
- package/dist/chunks/projectContext-DbTQHQS3.js +1 -0
- package/dist/chunks/prompt-C6eleu4x.js +1 -0
- package/dist/chunks/prompt-CUdoQXyN.js +1 -0
- package/dist/chunks/prompt-CsBCtw4l.js +228 -0
- package/dist/chunks/prompt-hnIDYhP4.js +54 -0
- package/dist/chunks/promptEditor-CrlVcc17.js +4 -0
- package/dist/chunks/protectedNamespace-Cn4901XG.js +1 -0
- package/dist/chunks/protocolHandler-DM_w7sJ5.js +13 -0
- package/dist/chunks/protocols-CpoQzjyI.js +7 -0
- package/dist/chunks/proxy-9WvtUy8E.js +99 -0
- package/dist/chunks/rate-limit-options-BehQ3MoX.js +1 -0
- package/dist/chunks/rcDebugLog-BbHlIxCm.js +11 -0
- package/dist/chunks/referral-BfAZEIZL.js +1 -0
- package/dist/chunks/refresh-Bl3Miver.js +1 -0
- package/dist/chunks/registerProtocol-BHZ3vZED.js +36 -0
- package/dist/chunks/registerSkillHooks-BR7v5qDA.js +1 -0
- package/dist/chunks/registry-C2igpRd-.js +1 -0
- package/dist/chunks/release-notes-C_Cou6ye.js +4 -0
- package/dist/chunks/releaseNotes-DveQShyB.js +2 -0
- package/dist/chunks/reload-plugins-D-pAUoB5.js +1 -0
- package/dist/chunks/remote-env-C_dBgbgo.js +1 -0
- package/dist/chunks/remoteBridgeCore-BxWhTy1u.js +1 -0
- package/dist/chunks/remoteControlServer-D3OjUlB-.js +3 -0
- package/dist/chunks/rename-f3m0ETSt.js +1 -0
- package/dist/chunks/renderOptions-QZLxGnh_.js +1 -0
- package/dist/chunks/replBridge-qeVmCJOb.js +1 -0
- package/dist/chunks/resume-CM_8p9Iu.js +2 -0
- package/dist/chunks/rewind-0cB7o6fx.js +1 -0
- package/dist/chunks/ripgrep-BEWqxrpl.js +5 -0
- package/dist/chunks/ripgrep-G82m12Ng.js +1 -0
- package/dist/chunks/rollback-CVo2gqgR.js +11 -0
- package/dist/chunks/runtimeObserver-1EdvvoYw.js +1 -0
- package/dist/chunks/runtimeObserver-CX6vepq9.js +10 -0
- package/dist/chunks/sandbox-adapter-DzHfW2tH.js +1 -0
- package/dist/chunks/sandbox-toggle-N6KgmH2T.js +1 -0
- package/dist/chunks/sanitization-CIBpY9KT.js +1 -0
- package/dist/chunks/satisfies-B7ZvBUQP.js +1 -0
- package/dist/chunks/schemas-Bwt-7U5W.js +40 -0
- package/dist/chunks/sdk-Drp69kIx.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor-B9GVkISU.js +1 -0
- package/dist/chunks/searchExtraTools-BphNJsl8.js +1 -0
- package/dist/chunks/semver-BsItM2Z4.js +1 -0
- package/dist/chunks/semver-D3lOjiBN.js +1 -0
- package/dist/chunks/sentry-ySzRCXGd.js +1 -0
- package/dist/chunks/server-C8nMDji6.js +1 -0
- package/dist/chunks/server-XZG51Slr.js +1 -0
- package/dist/chunks/serverBanner-D68EBGzH.js +1 -0
- package/dist/chunks/serverLog-hv2hc5US.js +1 -0
- package/dist/chunks/session-CVoGFb8a.js +2 -0
- package/dist/chunks/sessionDataUploader-BaD1Q7v3.js +1 -0
- package/dist/chunks/sessionDiscovery-D7g66TX6.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-9lPjspRX.js +1 -0
- package/dist/chunks/sessionManager-BhOjMNAP.js +1 -0
- package/dist/chunks/sessionMemory-BA6cdxqP.js +1 -0
- package/dist/chunks/sessionMemory-CtEhIRGF.js +1 -0
- package/dist/chunks/sessionMemoryUtils-D_B92ypa.js +1 -0
- package/dist/chunks/sessionObserver-CESI-uVZ.js +1 -0
- package/dist/chunks/sessionObserver-SpE_eglb.js +20 -0
- package/dist/chunks/sessionRestore-DqsqYK4K.js +1 -0
- package/dist/chunks/sessionState-Dgky34M4.js +1 -0
- package/dist/chunks/sessionStorage-DJb5HKhQ.js +1 -0
- package/dist/chunks/sessionStorage-DSMfHTcg.js +1 -0
- package/dist/chunks/sessionStoragePortable-DyM_hZnp.js +3 -0
- package/dist/chunks/sessionTitle-Bzxk_EW9.js +14 -0
- package/dist/chunks/sessionTracing-DR8O0686.js +12 -0
- package/dist/chunks/setup-BHNS9sBS.js +9 -0
- package/dist/chunks/setup-BafJxZ0F.js +4 -0
- package/dist/chunks/setup-MLNNYLi6.js +1 -0
- package/dist/chunks/shadowedRuleDetection-Ch9gTxfD.js +1 -0
- package/dist/chunks/shellQuote-3s6tV-hK.js +1 -0
- package/dist/chunks/sideQuestion-BBn6XIOD.js +20 -0
- package/dist/chunks/signal-BTxmab6r.js +1 -0
- package/dist/chunks/signin-ChbUAEGq.js +1 -0
- package/dist/chunks/sink-B1qICbRh.js +1 -0
- package/dist/chunks/sink-yBIcxQf1.js +1 -0
- package/dist/chunks/sinks-C7weduDR.js +1 -0
- package/dist/chunks/skill-learning-08nEdOJ2.js +5 -0
- package/dist/chunks/skillGapStore-CuvWGqFb.js +5 -0
- package/dist/chunks/skillGapStore-DmMuDXKO.js +1 -0
- package/dist/chunks/skillGenerator-mEMjcmmm.js +8 -0
- package/dist/chunks/skillLearning-B3a-8Ys3.js +1 -0
- package/dist/chunks/skillLearning-q5T6o0mH.js +1 -0
- package/dist/chunks/skillPanel-BuUMhONI.js +28 -0
- package/dist/chunks/skillSearchPanel-BUEv7Sm9.js +21 -0
- package/dist/chunks/skillUsageTracking-BBTiWOKB.js +1 -0
- package/dist/chunks/skills-DvQuQfDW.js +1 -0
- package/dist/chunks/slashCommandParsing-BkTC3GRb.js +1 -0
- package/dist/chunks/sleep-CC8jykQd.js +1 -0
- package/dist/chunks/slowOperations-niPqC54V.js +1 -0
- package/dist/chunks/sprites-C5X62Vyh.js +1 -0
- package/dist/chunks/src-58uAJYF_.js +6 -0
- package/dist/chunks/src-7Y8fx6gl.js +2 -0
- package/dist/chunks/src-BuserDTl.js +1 -0
- package/dist/chunks/src-CMY4XoRy.js +1 -0
- package/dist/chunks/src-CfeAM1FB.js +1 -0
- package/dist/chunks/src-CxT2FDXy.js +1 -0
- package/dist/chunks/src-CyQf7rVu.js +26 -0
- package/dist/chunks/src-DJLbU8sT.js +1 -0
- package/dist/chunks/src-DJQlyVK6.js +5 -0
- package/dist/chunks/src-DNHWYkls.js +53 -0
- package/dist/chunks/src-DU_g0n_Q.js +1 -0
- package/dist/chunks/src-DhqzQjMg.js +19 -0
- package/dist/chunks/src-Duzv1Znh.js +1 -0
- package/dist/chunks/src-OBx6GAig.js +1 -0
- package/dist/chunks/src-WjnK2Dbo.js +1 -0
- package/dist/chunks/src-hjAMxWFj.js +7 -0
- package/dist/chunks/src-lLwoqdC0.js +9 -0
- package/dist/chunks/src-yRsWbJp_.js +2 -0
- package/dist/chunks/sso-oidc-yfC-A2A2.js +1 -0
- package/dist/chunks/startupProfiler-4P7GdVw6.js +3 -0
- package/dist/chunks/startupProfiler-CipS0otN.js +1 -0
- package/dist/chunks/state-9wSimHaL.js +1 -0
- package/dist/chunks/state-BQkyHx88.js +1 -0
- package/dist/chunks/state-CEAUTY3A.js +1 -0
- package/dist/chunks/state-CUZTq6r0.js +1 -0
- package/dist/chunks/state-U0HNbTx8.js +1 -0
- package/dist/chunks/staticRender-BB3CisKd.js +1 -0
- package/dist/chunks/stats-Dyi2U_mq.js +1 -0
- package/dist/chunks/status-CSL-GMou.js +1 -0
- package/dist/chunks/statusNoticeHelpers-BaXE951d.js +1 -0
- package/dist/chunks/stdio-BuUJYJFs.js +3 -0
- package/dist/chunks/stdio-iX0TTmbp.js +1 -0
- package/dist/chunks/stickers-2CRSckfH.js +1 -0
- package/dist/chunks/store-DdfsZvtr.js +1 -0
- package/dist/chunks/stringUtils-U7kMYMJq.js +4 -0
- package/dist/chunks/sts-CJmdeT7s.js +1 -0
- package/dist/chunks/subprocessEnv-DKTILev5.js +1 -0
- package/dist/chunks/subprocessEnv-WjRguKWf.js +1 -0
- package/dist/chunks/supports-color-DaytqqjM.js +1 -0
- package/dist/chunks/systemPromptSections-BnrxBWdc.js +1 -0
- package/dist/chunks/systemPromptSections-Dk6azdAb.js +1 -0
- package/dist/chunks/systemTheme-C1GNqIfy.js +1 -0
- package/dist/chunks/tag-C4cH016L.js +11 -0
- package/dist/chunks/tasks-CEdUW3RQ.js +1 -0
- package/dist/chunks/teamHelpers-CTA_CtTT.js +1 -0
- package/dist/chunks/teamHelpers-D65qZInv.js +1 -0
- package/dist/chunks/teammate-C-FiRloZ.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DWRG5-Us.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DtgsNj1G.js +1 -0
- package/dist/chunks/teleport-C_UgMy0V.js +1 -0
- package/dist/chunks/templateJobs-CMbS0tuk.js +12 -0
- package/dist/chunks/terminalSetup--jwGVap8.js +33 -0
- package/dist/chunks/terminalSetup-zID-wokH.js +1 -0
- package/dist/chunks/theme-C6XwTpVy.js +1 -0
- package/dist/chunks/thinkback-CVLnmLAT.js +1 -0
- package/dist/chunks/thinkback-MeOOO7gf.js +1 -0
- package/dist/chunks/thinkback-play-D7G260F4.js +1 -0
- package/dist/chunks/tmux-DtYJuTWh.js +1 -0
- package/dist/chunks/toolEventObserver-BtC9xDYY.js +1 -0
- package/dist/chunks/toolEventObserver-MfsHAt8h.js +1 -0
- package/dist/chunks/toolPool-CEi_2xIH.js +1 -0
- package/dist/chunks/toolPool-CdYJcCnc.js +1 -0
- package/dist/chunks/trustedDevice-CjQTGAa4.js +1 -0
- package/dist/chunks/trustedDevice-DADcxAAs.js +1 -0
- package/dist/chunks/tui-B8Ijq4Pk.js +6 -0
- package/dist/chunks/turndown.es-T-Xe93nc.js +69 -0
- package/dist/chunks/types-BVelRhgb.js +17 -0
- package/dist/chunks/types-Bqp3meR4.js +1 -0
- package/dist/chunks/types-CNmINIu3.js +1 -0
- package/dist/chunks/types-DgzOOCDl.js +3 -0
- package/dist/chunks/udsClient-ClY_0CKr.js +1 -0
- package/dist/chunks/ultrareviewCommand-CqvHj9Io.js +3 -0
- package/dist/chunks/undercover-CVCVOSrs.js +1 -0
- package/dist/chunks/undercover-CbxiJO2b.js +31 -0
- package/dist/chunks/up-CBJhVVbd.js +12 -0
- package/dist/chunks/updateCCB-DPPpquAw.js +11 -0
- package/dist/chunks/upgrade-DaaHOvft.js +1 -0
- package/dist/chunks/upgrade-k7ZvAWZ0.js +1 -0
- package/dist/chunks/upload-CEDxwMa1.js +1 -0
- package/dist/chunks/upstreamproxy-BtGJ2LRi.js +11 -0
- package/dist/chunks/usage-CsUSu4fb.js +1 -0
- package/dist/chunks/usage-oABvixCs.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CBce_-hb.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CLYjTZXb.js +1 -0
- package/dist/chunks/useKeybinding-DAQL_dB_.js +1 -0
- package/dist/chunks/useMainLoopModel-QC_H3esG.js +1 -0
- package/dist/chunks/useManageMCPConnections-bf-VfJGD.js +1 -0
- package/dist/chunks/useManagePlugins-CXdYUpit.js +1 -0
- package/dist/chunks/useMergedTools-DERzhQOJ.js +1 -0
- package/dist/chunks/useSearchInput-nqhdILI2.js +1 -0
- package/dist/chunks/useTerminalSize-DzV4aaTi.js +1 -0
- package/dist/chunks/useVoice-CO69xtWC.js +1 -0
- package/dist/chunks/util-C8wqPqv0.js +1 -0
- package/dist/chunks/utils-CDFsSXHr.js +1 -0
- package/dist/chunks/utils-ZO5TryVH.js +1 -0
- package/dist/chunks/v4-DLhvDPkt.js +1 -0
- package/dist/chunks/validatePlugin-C4cd71Yz.js +1 -0
- package/dist/chunks/vertex-sdk-CC3U26o7.js +9 -0
- package/dist/chunks/vim-BNiQx5Vf.js +1 -0
- package/dist/chunks/voice-BCbnJzYL.js +8 -0
- package/dist/chunks/voice-BJyz9KZO.js +8 -0
- package/dist/chunks/voice-CP2ULpju.js +2 -0
- package/dist/chunks/voiceModeEnabled-C-pa8B3Q.js +1 -0
- package/dist/chunks/voiceModeEnabled-CMtRN2pa.js +1 -0
- package/dist/chunks/voiceStreamSTT-31b2u0rj.js +1 -0
- package/dist/chunks/voiceStreamSTT-Fkhm6Ftg.js +1 -0
- package/dist/chunks/voiceStreamSTT-sI-hg-aP.js +1 -0
- package/dist/chunks/web-tools-CLmlPgLk.js +1 -0
- package/dist/chunks/which-C0ex-06E.js +1 -0
- package/dist/chunks/windowsPaths-C5TNvKYu.js +1 -0
- package/dist/chunks/windowsPaths-Kue_7s52.js +1 -0
- package/dist/chunks/workSecret-Dh5Ayceu.js +1 -0
- package/dist/chunks/workerRegistry-B5iWYqpK.js +1 -0
- package/dist/chunks/worktree-BypJA0GB.js +1 -0
- package/dist/chunks/worktreeModeEnabled-DPTdK3JV.js +1 -0
- package/dist/chunks/worktreeModeEnabled-Dtrcn7eD.js +1 -0
- package/dist/chunks/wrapper-BDPb4PTV.js +6 -0
- package/dist/chunks/wrapper-DRTs77RK.js +1 -0
- package/dist/chunks/xdg-BaVL-FHd.js +1 -0
- package/dist/chunks/xml-E8VMPwdJ.js +1 -0
- package/dist/chunks/zod-B_P2Eo_D.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/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/package.json +233 -0
- package/scripts/postinstall.cjs +389 -0
- package/scripts/run-parallel.mjs +10 -0
- package/scripts/setup-chrome-mcp.mjs +70 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./memoize-DNnuA2aU.js";import{l as a,s as o}from"./envUtils-CFG7IQID.js";import{n as s,t as c}from"./defineProperty-CaCI0a5T.js";import{Cn as l,Ln as u,Xn as d,wn as f}from"./schemas-Bwt-7U5W.js";import{t as p}from"./v4-DLhvDPkt.js";import{t as m}from"./ajv-CDrSAj3O.js";import{Ht as ee,Xt as te,Y as ne,it as re,n as ie}from"./state-CUZTq6r0.js";import{Ac as ae,Dc as oe,Fc as se,Jr as ce,Oc as le,Vr as ue,ar as de,jc as fe,kc as pe,or as me,sr as he}from"./growthbook-p4aJ_UMv.js";import{E as ge,K as _e,O as ve,U as ye,_ as be,h as xe,l as Se,p as Ce}from"./debug-CjIaNjpK.js";import{t as we}from"./sdk-Drp69kIx.js";import{o as Te,s as Ee}from"./log-DVv8YiNo.js";import{i as De,o as Oe}from"./platform-BXz_rgpy.js";import{s as ke,u as Ae}from"./types-BVelRhgb.js";import{f as je,m as Me}from"./oauth-DMPGYAoZ.js";import{a as Ne,i as Pe,r as Fe,t as Ie}from"./slowOperations-niPqC54V.js";import{i as Le,r as Re,t as ze}from"./cron-iqTFGIos.js";import{join as Be}from"path";import{join as h,parse as Ve,resolve as g,sep as He}from"node:path";import"fs";import{createHash as Ue}from"node:crypto";import{randomUUID as We}from"crypto";import{mkdir as Ge,writeFile as Ke}from"fs/promises";import{appendFile as qe,mkdir as Je,readFile as _,readdir as Ye,rm as Xe,writeFile as Ze}from"node:fs/promises";var v,y=e((()=>{v=`Bash`}));function Qe(){return`A powerful search tool built on ripgrep
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
- ALWAYS use ${b} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${v} command. The ${b} tool has been optimized for correct permissions and access.
|
|
5
|
+
- Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
|
|
6
|
+
- Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
|
|
7
|
+
- Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
|
|
8
|
+
- Use ${fe} tool for open-ended searches requiring multiple rounds
|
|
9
|
+
- Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
|
|
10
|
+
- Multiline matching: By default patterns match within single lines only. For cross-line patterns like \`struct \\{[\\s\\S]*?field\`, use \`multiline: true\`
|
|
11
|
+
`}var b,$e=e((()=>{se(),y(),b=`Grep`})),x,et,tt,nt,rt=e((()=>{x=`Edit`,et=`/.claude/**`,tt=`~/.zaniicode/**`,nt=`File has been unexpectedly modified. Read it again before attempting to write it.`}));function it(e){let t=e.trim();if(!t)return null;if(t.endsWith(`-`)){let e=parseInt(t.slice(0,-1),10);return isNaN(e)||e<1?null:{firstPage:e,lastPage:1/0}}let n=t.indexOf(`-`);if(n===-1){let e=parseInt(t,10);return isNaN(e)||e<1?null:{firstPage:e,lastPage:e}}let r=parseInt(t.slice(0,n),10),i=parseInt(t.slice(n+1),10);return isNaN(r)||isNaN(i)||r<1||i<1||i<r?null:{firstPage:r,lastPage:i}}function at(){return!ue().toLowerCase().includes(`claude-3-haiku`)}function ot(e){let t=e.startsWith(`.`)?e.slice(1):e;return st.has(t.toLowerCase())}var st,ct=e((()=>{ce(),st=new Set([`pdf`])}));function lt(e,t,n){return`Reads a file from the local filesystem. You can access any file directly by using this tool.
|
|
12
|
+
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
- The file_path parameter must be an absolute path, not a relative path
|
|
16
|
+
- By default, it reads up to ${dt} lines starting from the beginning of the file${t}
|
|
17
|
+
${n}
|
|
18
|
+
${e}
|
|
19
|
+
- This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.${at()?`
|
|
20
|
+
- This tool can read PDF files (.pdf). For large PDFs (more than 10 pages), you MUST provide the pages parameter to read specific page ranges (e.g., pages: "1-5"). Reading a large PDF without the pages parameter will fail. Maximum 20 pages per request.`:``}
|
|
21
|
+
- This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
|
|
22
|
+
- This tool can only read files, not directories. To read a directory, use an ls command via the ${v} tool.
|
|
23
|
+
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
|
|
24
|
+
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`}var S,ut,dt,ft,pt,mt,ht,gt=e((()=>{ct(),y(),S=`Read`,ut=`File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current — refer to that instead of re-reading.`,dt=2e3,ft=`Read a file from the local filesystem.`,pt=`- Results are returned using cat -n format, with line numbers starting at 1`,mt=`- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters`,ht=`- When you already know which part of the file you need, only read that part. This can be important for larger files.`}));function _t(){return`\n- If this is an existing file, you MUST use the ${S} tool first to read the file's contents. This tool will fail if you did not read the file first.`}function vt(){return`Writes a file to the local filesystem.
|
|
25
|
+
|
|
26
|
+
Usage:
|
|
27
|
+
- This tool will overwrite the existing file if there is one at the provided path.${_t()}
|
|
28
|
+
- Prefer the Edit tool for modifying existing files \u2014 it only sends the diff. Only use this tool to create new files or for complete rewrites.
|
|
29
|
+
- NEVER create documentation files (*.md) or README files unless explicitly requested by the User.
|
|
30
|
+
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.
|
|
31
|
+
- The file_path must be a distinct file path, not a directory path. If the path resolves to an existing directory, the tool will reject it with a clear error message. Use a path that includes a filename with an appropriate extension (e.g., \`my-docs/analysis/api/report.md\`).`}var C,yt=e((()=>{gt(),C=`Write`})),bt,xt,St=e((()=>{bt=`Glob`,xt=`- Fast file pattern matching tool that works with any codebase size
|
|
32
|
+
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
33
|
+
- Returns matching file paths sorted by modification time
|
|
34
|
+
- Use this tool when you need to find files by name patterns
|
|
35
|
+
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead`})),Ct,wt=e((()=>{Ct=`NotebookEdit`}));function Tt(e,t,n){return`
|
|
36
|
+
Web page content:
|
|
37
|
+
---
|
|
38
|
+
${e}
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
${t}
|
|
42
|
+
|
|
43
|
+
${n?`Provide a concise response based on the content above. Include relevant details, code examples, and documentation excerpts as needed.`:`Provide a concise response based only on the content above. In your response:
|
|
44
|
+
- Enforce a strict 125-character maximum for quotes from any source document. Open Source Software is ok as long as we respect the license.
|
|
45
|
+
- Use quotation marks for exact language from articles; any language outside of the quotation should never be word-for-word the same.
|
|
46
|
+
- You are not a lawyer and never comment on the legality of your own prompts and responses.
|
|
47
|
+
- Never produce or reproduce exact song lyrics.`}
|
|
48
|
+
`}var Et,Dt,Ot=e((()=>{Et=`WebFetch`,Dt=`
|
|
49
|
+
- Fetches content from a specified URL and processes it using an AI model
|
|
50
|
+
- Takes a URL and a prompt as input
|
|
51
|
+
- Fetches the URL content, converts HTML to markdown
|
|
52
|
+
- Processes the content with the prompt using a small, fast model
|
|
53
|
+
- Returns the model's response about the content
|
|
54
|
+
- Use this tool when you need to retrieve and analyze web content
|
|
55
|
+
|
|
56
|
+
Usage notes:
|
|
57
|
+
- IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
|
|
58
|
+
- The URL must be a fully-formed valid URL
|
|
59
|
+
- HTTP URLs will be automatically upgraded to HTTPS
|
|
60
|
+
- The prompt should describe what information you want to extract from the page
|
|
61
|
+
- This tool is read-only and does not modify any files
|
|
62
|
+
- Results may be summarized if the content is very large
|
|
63
|
+
- Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
|
|
64
|
+
- When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
|
|
65
|
+
- For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
|
|
66
|
+
`})),kt,At=e((()=>{kt=`TodoWrite`})),w,jt=e((()=>{w=`TaskCreate`})),T,Mt=e((()=>{T=`TaskUpdate`})),E,Nt=e((()=>{E=`Skill`})),D,O,Pt=e((()=>{D=`ExitPlanMode`,O=`ExitPlanMode`}));function Ft(e,t){return e.name===t||(e.aliases?.includes(t)??!1)}function It(e,t){return e.find(e=>Ft(e,t))}function Lt(e){return{...zt,userFacingName:()=>e.name,...e}}var Rt,zt,Bt=e((()=>{Rt=()=>({mode:`default`,additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!0}),zt={isEnabled:()=>!0,isConcurrencySafe:e=>!1,isReadOnly:e=>!1,isDestructive:e=>!1,checkPermissions:(e,t)=>Promise.resolve({behavior:`allow`,updatedInput:e}),toAutoClassifierInput:e=>``,userFacingName:e=>``}})),k,Vt=e((()=>{k=`EnterPlanMode`})),A,Ht,Ut,Wt,Gt=e((()=>{Pt(),A=`AskUserQuestion`,Ht=`Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.`,Ut={markdown:`
|
|
67
|
+
Preview feature:
|
|
68
|
+
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
|
|
69
|
+
- ASCII mockups of UI layouts or components
|
|
70
|
+
- Code snippets showing different implementations
|
|
71
|
+
- Diagram variations
|
|
72
|
+
- Configuration examples
|
|
73
|
+
|
|
74
|
+
Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
|
|
75
|
+
`,html:`
|
|
76
|
+
Preview feature:
|
|
77
|
+
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
|
|
78
|
+
- HTML mockups of UI layouts or components
|
|
79
|
+
- Formatted code snippets showing different implementations
|
|
80
|
+
- Visual comparisons or diagrams
|
|
81
|
+
|
|
82
|
+
Preview content must be a self-contained HTML fragment (no <html>/<body> wrapper, no <script> or <style> tags — use inline style attributes instead). Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
|
|
83
|
+
`},Wt=`Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
84
|
+
1. Gather user preferences or requirements
|
|
85
|
+
2. Clarify ambiguous instructions
|
|
86
|
+
3. Get decisions on implementation choices as you work
|
|
87
|
+
4. Offer choices to the user about what direction to take.
|
|
88
|
+
|
|
89
|
+
Usage notes:
|
|
90
|
+
- Users will always be able to select "Other" to provide custom text input
|
|
91
|
+
- Use multiSelect: true to allow multiple answers to be selected for a question
|
|
92
|
+
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
|
93
|
+
|
|
94
|
+
Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${D} for plan approval. IMPORTANT: Do not reference "the plan" in your questions (e.g., "Do you have feedback about the plan?", "Does the plan look good?") because the user cannot see the plan in the UI until you call ${D}. If you need plan approval, use ${D} instead.
|
|
95
|
+
`}));function Kt(){if(process.env.CLAUDE_CODE_OVERRIDE_DATE)return process.env.CLAUDE_CODE_OVERRIDE_DATE;let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function qt(){return(process.env.CLAUDE_CODE_OVERRIDE_DATE?new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE):new Date).toLocaleString(`en-US`,{month:`long`,year:`numeric`})}var Jt=e((()=>{i(),r(Kt)}));function Yt(){return`
|
|
96
|
+
- Allows Claude to search the web and use the results to inform responses
|
|
97
|
+
- Provides up-to-date information for current events and recent data
|
|
98
|
+
- Returns search result information formatted as search result blocks, including links as markdown hyperlinks
|
|
99
|
+
- Use this tool for accessing information beyond Claude's knowledge cutoff
|
|
100
|
+
- Searches are performed automatically within a single API call
|
|
101
|
+
|
|
102
|
+
CRITICAL REQUIREMENT - You MUST follow this:
|
|
103
|
+
- After answering the user's question, you MUST include a "Sources:" section at the end of your response
|
|
104
|
+
- In the Sources section, list all relevant URLs from the search results as markdown hyperlinks: [Title](URL)
|
|
105
|
+
- This is MANDATORY - never skip including sources in your response
|
|
106
|
+
- Example format:
|
|
107
|
+
|
|
108
|
+
[Your answer here]
|
|
109
|
+
|
|
110
|
+
Sources:
|
|
111
|
+
- [Source Title 1](https://example.com/1)
|
|
112
|
+
- [Source Title 2](https://example.com/2)
|
|
113
|
+
|
|
114
|
+
Usage notes:
|
|
115
|
+
- Domain filtering is supported to include or block specific websites
|
|
116
|
+
- Web search is only available in the US
|
|
117
|
+
|
|
118
|
+
IMPORTANT - Use the correct year in search queries:
|
|
119
|
+
- The current month is ${qt()}. You MUST use this year when searching for recent information, documentation, or current events.
|
|
120
|
+
- Example: If the user asks for "latest React docs", search for "React documentation" with the current year, NOT last year
|
|
121
|
+
`}var j,Xt=e((()=>{Jt(),j=`WebSearch`})),Zt,Qt=e((()=>{Zt=`PowerShell`}));function $t(){return De()===`windows`?!a(process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL):!1}var M,en=e((()=>{y(),Qt(),o(),Oe(),M=[v,Zt]})),tn,nn=e((()=>{tn=`SendMessage`})),N,rn=e((()=>{N=`TaskGet`})),P,an=e((()=>{P=`TaskList`})),F,on=e((()=>{F=`SearchExtraTools`}));function sn(e){return e instanceof Error?e:Error(String(e))}function cn(e){return e instanceof Error?e.message:String(e)}function ln(e){if(e&&typeof e==`object`&&`code`in e&&typeof e.code==`string`)return e.code}function un(e){return ln(e)===`ENOENT`}var dn,fn,pn,mn,hn=e((()=>{we(),s(),dn=class extends Error{constructor(e){super(e),this.name=`AbortError`}},fn=class extends Error{constructor(e,t,n,r){super(`Shell command failed`),this.stdout=e,this.stderr=t,this.code=n,this.interrupted=r,this.name=`ShellError`}},pn=class extends Error{constructor(e,t){super(e),this.formattedMessage=t,this.name=`TeleportOperationError`}},mn=class extends Error{constructor(e,t){super(e),c(this,`telemetryMessage`,void 0),this.name=`TelemetrySafeError`,this.telemetryMessage=t??e}}}));function gn(e){return e.isNonInteractiveSession}function _n(e){let t=Cn.get(e);if(t)return t;let n=vn(e);return Cn.set(e,n),n}function vn(e){try{let t=new yn.Ajv({allErrors:!0});if(!t.validateSchema(e))return{error:t.errorsText(t.errors)};let n=t.compile(e);return{tool:{...Sn,inputJSONSchema:e,async call(e){if(!n(e)){let e=n.errors?.map(e=>`${e.instancePath||`root`}: ${e.message}`).join(`, `);throw new mn(`Output does not match required schema: ${e}`,`StructuredOutput schema mismatch: ${(e??``).slice(0,150)}`)}return{data:`Structured output provided successfully`,structured_output:e}}}}}catch(e){return{error:e instanceof Error?e.message:String(e)}}}var yn,bn,xn,I,Sn,Cn,wn=e((()=>{yn=t(m(),1),p(),Bt(),hn(),Pe(),Ie(),bn=Ne(()=>f({}).passthrough()),xn=Ne(()=>u().describe(`Structured output tool result`)),I=`StructuredOutput`,Sn=Lt({isMcp:!1,isEnabled(){return!0},isConcurrencySafe(){return!0},isReadOnly(){return!0},isOpenWorld(){return!1},name:I,searchHint:`return the final response as structured JSON`,maxResultSizeChars:1e5,async description(){return`Return structured output in the requested format`},async prompt(){return`Use this tool to return your final response in the requested structured format. You MUST call this tool exactly once at the end of your response to provide the structured output.`},get inputSchema(){return bn()},get outputSchema(){return xn()},async call(e){return{data:`Structured output provided successfully`,structured_output:e}},async checkPermissions(e){return{behavior:`allow`,updatedInput:e}},renderToolUseMessage(e){let t=Object.keys(e);return t.length===0?null:t.length<=3?t.map(t=>`${t}: ${Fe(e[t])}`).join(`, `):`${t.length} fields: ${t.slice(0,3).join(`, `)}…`},renderToolUseRejectedMessage(){return`Structured output rejected`},renderToolUseErrorMessage(){return`Structured output error`},renderToolUseProgressMessage(){return null},renderToolResultMessage(e){return e},mapToolResultToToolResultBlockParam(e,t){return{tool_use_id:t,type:`tool_result`,content:e}}}),Cn=new WeakMap})),Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn=e((()=>{Tn=`command-name`,En=`command-message`,Dn=`local-command-stdout`,On=`local-command-stderr`,kn=`tick`,An=`teammate-message`,jn=`channel`,Mn=`fork-boilerplate`,Nn=`Your directive: `})),Fn,In,Ln,Rn=e((()=>{Pn(),Fn=`Sleep`,In=`Wait for a specified duration`,Ln=`Wait for a specified duration. The user can interrupt the sleep at any time.
|
|
122
|
+
|
|
123
|
+
Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something.
|
|
124
|
+
|
|
125
|
+
You may receive <${kn}> prompts — these are periodic check-ins. Look for useful work to do before sleeping.
|
|
126
|
+
|
|
127
|
+
You can call this concurrently with other tools — it won't interfere with them.
|
|
128
|
+
|
|
129
|
+
Prefer this over \`Bash(sleep ...)\` — it doesn't hold a shell process.
|
|
130
|
+
|
|
131
|
+
Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity — balance accordingly.`})),zn,Bn=e((()=>{zn=`Interact with Language Server Protocol (LSP) servers to get code intelligence features.
|
|
132
|
+
|
|
133
|
+
Supported operations:
|
|
134
|
+
- goToDefinition: Find where a symbol is defined
|
|
135
|
+
- findReferences: Find all references to a symbol
|
|
136
|
+
- hover: Get hover information (documentation, type info) for a symbol
|
|
137
|
+
- documentSymbol: Get all symbols (functions, classes, variables) in a document
|
|
138
|
+
- workspaceSymbol: Search for symbols across the entire workspace
|
|
139
|
+
- goToImplementation: Find implementations of an interface or abstract method
|
|
140
|
+
- prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
|
|
141
|
+
- incomingCalls: Find all functions/methods that call the function at a position
|
|
142
|
+
- outgoingCalls: Find all functions/methods called by the function at a position
|
|
143
|
+
|
|
144
|
+
All operations require:
|
|
145
|
+
- filePath: The file to operate on
|
|
146
|
+
- line: The line number (1-based, as shown in editors)
|
|
147
|
+
- character: The character offset (1-based, as shown in editors)
|
|
148
|
+
|
|
149
|
+
Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.`})),Vn=n({VERIFY_PLAN_EXECUTION_TOOL_NAME:()=>L}),L,Hn=e((()=>{L=`VerifyPlanExecution`})),R,Un=e((()=>{R=`ExecuteExtraTool`})),Wn,Gn=e((()=>{Wn=`EnterWorktree`})),Kn,qn=e((()=>{Kn=`ExitWorktree`})),Jn=e((()=>{})),z,B,Yn,V,Xn,H,U=e((()=>{z=`Workflow`,B=`.claude/workflows`,Yn=`.claude/workflow-runs`,V=[`.ts`,`.js`,`.mjs`],Xn=1e3,H=4096}));function Zn(e){return{[W]:e}}function Qn(e){return typeof e==`object`&&!!e&&W in e}function $n(e){return e[W]}var W,er=e((()=>{W=Symbol(`workflow.hostHandle`)}));function tr(e,t){return e.kind===`agentType`?t.agentType===e.agentType:e.kind===`model`?typeof t.model==`string`&&t.model.startsWith(e.pattern):e.match(t)}var nr,rr,ir=e((()=>{s(),nr=class extends Error{constructor(e){super(e),this.name=`AdapterNotFoundError`}},rr=class{constructor(){c(this,`adapters`,new Map),c(this,`rules`,[]),c(this,`defaultId`,null)}register(e){return this.adapters.set(e.id,e),this}default(e){return this.defaultId=e,this}route(e){return this.rules.push(e),this}has(e){return this.adapters.has(e)}get(e){return this.adapters.get(e)}resolve(e){for(let t of this.rules)if(tr(t,e)){let e=this.adapters.get(t.adapter);if(e)return e}if(this.defaultId){let e=this.adapters.get(this.defaultId);if(e)return e}throw new nr(`No adapter matched (rules=${this.rules.length}, default=${this.defaultId??`none`})`)}async initializeAll(){for(let e of this.adapters.values())await e.initialize?.()}async disposeAll(){for(let e of this.adapters.values())await e.dispose?.()}}}));function ar(){return 3}function or(e){return e===void 0||Number.isNaN(e)?3:Math.max(1,Math.min(Math.trunc(e),16))}var sr,cr=e((()=>{U(),s(),sr=class{constructor(e){c(this,`available`,void 0),c(this,`waiters`,[]),this.available=Math.max(1,Math.floor(e))}async acquire(e){if(e?.aborted)throw Error(`Semaphore.acquire aborted (signal already aborted)`);return this.available>0?(--this.available,()=>this.release()):new Promise((t,n)=>{let r=()=>{let e=this.waiters.indexOf(i);e>=0&&this.waiters.splice(e,1),n(Error(`Semaphore.acquire aborted`))},i={wake:()=>{e?.removeEventListener(`abort`,r),t(()=>this.release())},cleanup:()=>e?.removeEventListener(`abort`,r)};e?.addEventListener(`abort`,r,{once:!0}),this.waiters.push(i)})}release(){let e=this.waiters.shift();e?e.wake():this.available+=1}}}));function lr(e){let t=mr.exec(e);if(!t)return{meta:null,body:e};let n=t.index+t[0].length;for(;n<e.length&&/\s/.test(e[n]);)n++;if(e[n]!==`{`)throw new K("meta must be an object literal `{ ... }`");let r=0,i=n,a=null;for(;n<e.length;n++){let t=e[n];if(a){if(t===`\\`){n++;continue}t===a&&(a=null);continue}if(t===`"`||t===`'`||t==="`"){a=t;continue}if(t===`{`)r++;else if(t===`}`&&(r--,r===0)){n++;break}}if(r!==0)throw new K(`meta literal braces are not closed`);let o=e.slice(i,n),s;try{s=Function(`return (${o})`)()}catch(e){throw new K(`meta must be a plain literal (no variable/function calls/interpolation): ${e.message}`)}return{meta:ur(s),body:e.slice(0,t.index)+e.slice(n).replace(/^[ \t]*;[ \t]*\n/,`
|
|
150
|
+
`)}}function ur(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new K(`meta must be an object`);let t=e;if(typeof t.name!=`string`||typeof t.description!=`string`)throw new K(`meta must include string name and description`);return t}function dr(){let e=function(...e){if(e.length===0)throw new q(`Date.now()/new Date()`);return new Date(...e)};return e.now=()=>{throw new q(`Date.now()`)},e.parse=Date.parse,e.UTC=Date.UTC,e}function fr(){return new Proxy(Math,{get(e,t,n){return t===`random`?()=>{throw new q(`Math.random()`)}:Reflect.get(e,t,n)}})}function pr(e){if(/^\s*import\b/m.test(e))throw new K(`workflow scripts are the body of new AsyncFunction (not ESM modules); import is not supported. agent / parallel / pipeline / phase / log / workflow / args / budget are injected as parameters — use them directly.`);if(/\bimport\s*\(/m.test(e))throw new K(`dynamic import(...) is forbidden in workflow scripts: it bypasses the Date/Math sandbox and breaks resume determinism. The sandbox does not guarantee security (same trust level as the LLM), but explicit escapes are prohibited. Inject external dependencies via args.`);if(/^\s*export\b/m.test(e))throw new K(`workflow scripts allow only one export const meta = {...} (already extracted by the engine). Remove other export / export default statements; use top-level return for the result.`)}function G(e){let{meta:t,body:n}=lr(e);pr(n);let r;try{r=new hr(`agent`,`parallel`,`pipeline`,`phase`,`log`,`workflow`,`args`,`budget`,`Date`,`Math`,n)}catch(e){throw new K(`Script syntax error: ${e.message}`)}let i=dr(),a=fr();return{meta:t,async execute(e,t,n){return r(e.agent,e.parallel,e.pipeline,e.phase,e.log,e.workflow,t,n,i,a)}}}var K,mr,q,hr,gr=e((()=>{K=class extends Error{constructor(e){super(e),this.name=`ScriptError`}},mr=/export\s+const\s+meta\s*=\s*/,q=class extends Error{constructor(e){super(`${e} is not available in workflow scripts (would break resume determinism). Pass timestamps/random seeds via args.`),this.name=`NonDeterministicError`}},hr=Object.getPrototypeOf(async function(){}).constructor}));function _r(e){let{label:t,phase:n,...r}=e,i=Object.keys(r).sort(),a={};for(let e of i)a[e]=r[e];return JSON.stringify(a)}function vr(e,t){return Ue(`sha256`).update(e+`
|
|
151
|
+
`+_r(t)).digest(`hex`)}function yr(e){let t=t=>h(e,t,`journal.jsonl`);return{async read(e){try{return(await _(t(e),`utf-8`)).split(`
|
|
152
|
+
`).filter(e=>e.trim().length>0).map(e=>JSON.parse(e)).sort((e,t)=>(e.seq??0)-(t.seq??0))}catch{return[]}},async append(n,r){await Je(h(e,n),{recursive:!0}),await qe(t(n),JSON.stringify(r)+`
|
|
153
|
+
`,`utf-8`)},async truncate(t){await Xe(h(e,t),{recursive:!0,force:!0})}}}var br=e((()=>{})),xr,Sr,Cr=e((()=>{s(),xr=class extends Error{constructor(){super(`workflow token budget exhausted (budget.total reached the cap)`),this.name=`BudgetExhaustedError`}},Sr=class{constructor(e){c(this,`spentTokens`,0),this.total=e}spent(){return this.spentTokens}remaining(){return this.total==null?1/0:Math.max(0,this.total-this.spentTokens)}addOutputTokens(e){e>0&&(this.spentTokens+=e)}assertCanSpend(){if(this.total!=null&&this.spentTokens>=this.total)throw new xr}}}));function wr(e){let t=Or.get(e);if(t)return t;let n=new Dr.Ajv({allErrors:!0,strict:!1}).compile(e);if(n.$async)throw Error(`Async JSON schemas are not supported`);return Or.set(e,n),n}function Tr(e){wr(e)}function Er(e,t){let n=wr(t),r=n(e);return{valid:r,errors:r?[]:(n.errors??[]).map(e=>{let t=e.message??`validation error`;return e.instancePath?`${e.instancePath} ${t}`:t})}}var Dr,Or,kr=e((()=>{Dr=t(m(),1),Or=new WeakMap}));function Ar(e,t){let n=g(e),r=g(n,t);return r===n?!0:r.startsWith(n+He)}function jr(e){return typeof e!=`string`||e.length===0||e.includes(`/`)||e.includes(`\\`)||e.includes(`\0`)||e===`.`||e===`..`?null:e}var Mr=e((()=>{}));function Nr(e){return V.includes(e.toLowerCase())}async function J(e,t){for(let n of V){let r=g(e,t+n);if(!Ar(e,r))return null;try{return{path:r,content:await _(r,`utf-8`)}}catch{}}return null}async function Pr(e){let t;try{t=await Ye(e)}catch{return[]}return t.filter(e=>Nr(Ve(e).ext)).map(e=>Ve(e).name).sort()}var Fr=e((()=>{U(),Mr()})),Y,X,Ir=e((()=>{Y=class extends Error{constructor(e){super(e),this.name=`WorkflowError`}},X=class extends Error{constructor(){super(`workflow has been aborted`),this.name=`WorkflowAbortedError`}}}));function Lr(e,t){return{semaphore:new sr(or(t)),budget:new Sr(e),agentCountBox:{value:0},agentIdSeq:{value:0},depth:0}}function Rr(e){let t=Lr(e.budgetTotal,e.maxConcurrency);return{ports:e.ports,host:e.host,signal:e.signal,runId:e.runId,workflowName:e.workflowName,cwd:e.cwd,resources:t,journal:e.journal?[...e.journal]:[],journalIndex:0,journalInvalidated:!1,currentPhase:null}}var zr=e((()=>{Cr(),cr()}));function Br(e,t){let n=t=>{e.ports.progressEmitter.emit({runId:e.runId,...t})};return{agent:async(t,r={})=>{let i=e.resources;if(i.agentCountBox.value>=1e3)throw new Y(`workflow exceeds total agent cap (${Xn})`);let a=i.agentIdSeq.value++,o={prompt:t,...r};o.schema&&Tr(o.schema);let s=vr(t,o),c=r.label,l=r.phase??e.currentPhase??void 0,u=async()=>{e.journalInvalidated=!0,e.journal=e.journal.slice(0,e.journalIndex),await e.ports.journalStore.truncate(e.runId)};if(!e.journalInvalidated&&e.journalIndex<e.journal.length){let t=e.journal[e.journalIndex];if(t.key===s){let r=Hr(t.result,o.schema);if(t.result.kind===`ok`&&r.kind===`dead`)e.ports.logger.warn?.(`cached agent result for "${c??`#${a}`}" does not match its structured output schema; rerunning`),await u();else return e.journalIndex++,n({type:`agent_done`,agentId:a,label:c,phase:l,result:t.result}),Vr(t.result)}else await u()}let d;try{d=await e.resources.semaphore.acquire(e.signal)}catch{throw new X}try{if(e.signal.aborted)throw new X;if(i.budget.assertCanSpend(),e.ports.taskRegistrar.pendingAction(e.runId)?.kind===`skip`)return n({type:`agent_done`,agentId:a,label:c,phase:l,result:{kind:`skipped`}}),null;e.resources.agentCountBox.value++,n({type:`agent_started`,agentId:a,label:c,phase:l});let t=e.ports.agentAdapterRegistry,r=t?{host:e.host,signal:e.signal,runId:e.runId,agentId:a,onProgress:e=>{n({type:`agent_progress`,agentId:a,label:c,phase:l,...e})},...e.ports.taskRegistrar.registerAgentAbort?{registerAgentAbort:(t,n)=>{e.ports.taskRegistrar.registerAgentAbort?.(e.runId,t,n)}}:{},...e.ports.taskRegistrar.unregisterAgentAbort?{unregisterAgentAbort:t=>{e.ports.taskRegistrar.unregisterAgentAbort?.(e.runId,t)}}:{}}:null,u=t?t.resolve(o):null,d=async()=>Hr(await(u?u.run(o,r):e.ports.agentRunner.runAgentToResult(o,e.host)),o.schema),f=async()=>{try{return{kind:`result`,value:await d()}}catch(e){if(e instanceof X)throw e;return{kind:`error`,error:e}}},p=await f(),m;if(p.kind===`result`&&p.value.kind!==`dead`)m=p.value;else{if(p.kind===`error`){let t=p.error instanceof Error?p.error.message:String(p.error);e.ports.logger.warn?.(`agent "${c??`#${a}`}" threw (${t}); retrying once`)}else if(p.value.kind===`dead`){let t=typeof p.value.detail==`string`?p.value.detail:``;e.ports.logger.warn?.(`agent "${c??`#${a}`}" returned dead`+(p.value.reason?` (${p.value.reason})`:``)+(t?`: ${t.slice(0,150)}`:``)+`; retrying once`)}let t=await f();m=t.kind===`result`?t.value:{kind:`dead`,reason:`runagent-threw`,detail:t.error instanceof Error?t.error.message:String(t.error)}}m.kind===`ok`&&e.resources.budget.addOutputTokens(m.usage.outputTokens),n({type:`agent_done`,agentId:a,label:c,phase:l,result:m});let ee={key:s,seq:a,result:m};return e.journal.push(ee),e.journalIndex++,await e.ports.journalStore.append(e.runId,ee),Vr(m)}finally{d()}},parallel:async t=>{if(t.length>4096)throw new Y(`parallel exceeds the per-call items cap (${H})`);return Promise.all(t.map(async(t,n)=>{try{return await t()}catch(t){if(t instanceof X)throw t;return e.ports.logger.warn?.(`parallel thunk #${n} failed: ${t.message}`),null}}))},pipeline:async(t,...n)=>{if(t.length>4096)throw new Y(`pipeline exceeds the per-call items cap (${H})`);return Promise.all(t.map(async(t,r)=>{try{let e=t;for(let i of n)e=await i(e,t,r);return e}catch(t){if(t instanceof X)throw t;return e.ports.logger.warn?.(`pipeline item #${r} failed: ${t.message}`),null}}))},phase:t=>{e.currentPhase&&n({type:`phase_done`,phase:e.currentPhase}),e.currentPhase=t,n({type:`phase_started`,phase:t})},log:e=>{n({type:`log`,message:e})},workflow:async(n,r)=>{if(e.resources.depth>=1)throw new Y(`workflow() nesting allows only one level`);return t({...typeof n==`string`?{name:n}:{scriptPath:n.scriptPath},args:r})}}}function Vr(e){return e.kind===`ok`?e.output:null}function Hr(e,t){if(!t||e.kind!==`ok`)return e;let{valid:n,errors:r}=Er(e.output,t);return n?e:{kind:`dead`,reason:`invalid-structured-output`,detail:r.length>0?r.join(`; `):`structured output does not match schema`}}var Ur=e((()=>{U(),Ir(),br(),kr()}));async function Wr(e){let{ports:t}=e,n;try{n=G(e.script)}catch(n){let r=n.message;return t.progressEmitter.emit({type:`run_done`,runId:e.runId,status:`failed`,error:r}),{status:`failed`,error:r}}let r=e.workflowName??n.meta?.name??`workflow`,i=[],a=!1;e.resume&&!e.scriptChanged?i=await t.journalStore.read(e.runId):e.scriptChanged&&(await t.journalStore.truncate(e.runId),a=!0);let o=Rr({ports:t,host:e.host,signal:e.signal,runId:e.runId,workflowName:r,cwd:e.cwd,budgetTotal:e.budgetTotal,maxConcurrency:e.maxConcurrency,journal:i});a&&(o.journalInvalidated=!0),t.progressEmitter.emit({type:`run_started`,runId:e.runId,workflowName:r,meta:n.meta});let s=async t=>{let n=await Gr(t,e.cwd),r;try{r=G(n)}catch(e){throw new Y(`Sub-workflow script error: ${e.message}`)}let i=o.resources.depth;o.resources.depth+=1;try{let e=Br(o,s);return await r.execute(e,t.args,o.resources.budget)}finally{o.resources.depth=i}},c=Br(o,s),l=()=>{o.currentPhase&&t.progressEmitter.emit({type:`phase_done`,runId:e.runId,phase:o.currentPhase})},u;try{u={status:`completed`,returnValue:await n.execute(c,e.args,o.resources.budget)}}catch(e){u=e instanceof X?{status:`killed`}:{status:`failed`,error:e.message}}return l(),t.progressEmitter.emit({type:`run_done`,runId:e.runId,...u}),u}async function Gr(e,t){if(e.script)return e.script;if(e.scriptPath)return await _(e.scriptPath,`utf-8`);if(e.name){let n=await J(h(t,B),e.name);if(!n)throw new Y(`Sub-workflow "${e.name}" not found`);return n.content}throw new Y(`workflow() requires name or scriptPath`)}var Kr=e((()=>{U(),zr(),Ir(),Ur(),Fr(),gr()}));function qr(e){return{emit:e}}function Jr(){let e=[];return{emitter:{emit:t=>void e.push(t)},events:e}}var Yr=e((()=>{})),Xr,Zr=e((()=>{p(),Xr=f({script:u().optional().describe(`Self-contained workflow script source (inline)`),name:u().optional().describe(`Named workflow, resolved to .claude/workflows/<name>.ts|js|mjs`),scriptPath:u().optional().describe(`Absolute path to an existing script file`),args:d().optional().describe(`The args global variable passed through to the script. Pass a real JSON value (object/array/string), not a JSON string.`),resumeFromRunId:u().optional().describe(`Resume the specified run, replaying the journal`),description:u().optional().describe(`A short description of this invocation (3-5 words)`),title:u().optional().describe(`Progress viewer title`),maxConcurrency:l().int().min(1).max(16).optional().describe(`Concurrency cap for agent(). Defaults to 3 (max 16). When the workflow contains heavy parallel/pipeline fan-out, you may confirm the desired concurrency with the user via AskUserQuestion before launching.`)})}));async function Qr(e,t,n){let r=h(n,Yn,t);await Je(r,{recursive:!0});let i=h(r,`script.js`);return await Ze(i,e,`utf-8`),i}var $r=e((()=>{U()}));function ei(e){return{name:z,inputSchema:Xr,isEnabled:()=>!0,isReadOnly:()=>!1,async description(){return`Execute a workflow script that orchestrates multiple subagents to complete a task`},async prompt(){return ai},renderToolUseMessage(e){return e.resumeFromRunId?`Workflow resume: ${e.resumeFromRunId}`:`Workflow: ${e.name??e.scriptPath??(e.script?`inline`:`unknown`)}`},async call(t,n,r,i){let a=e.hostFactory({context:n,canUseTool:r,parentMessage:i}),o,s;try{let e=await ii(t,a.cwd);o=e.script,s=e.workflowFile}catch(e){return{data:{output:`Error: ${e.message}`}}}try{G(o)}catch(e){return{data:{output:`Error: script validation failed: ${e.message}`}}}let c=t.name??t.title??`workflow`,{runId:l,signal:u}=e.taskRegistrar.register({workflowName:c,...s?{workflowFile:s}:{},...t.description?{summary:t.description}:{},...a.toolUseId?{toolUseId:a.toolUseId}:{},...t.resumeFromRunId?{runId:t.resumeFromRunId}:{}},a.handle);if(!s&&t.script)try{s=await Qr(t.script,l,a.cwd)}catch(t){e.logger.warn?.(`inline script persist failed: ${t.message}`)}Wr({script:o,...t.args===void 0?{}:{args:ri(t.args)},runId:l,workflowName:c,ports:e,host:a.handle,signal:u,cwd:a.cwd,budgetTotal:a.budgetTotal,...t.maxConcurrency===void 0?{}:{maxConcurrency:t.maxConcurrency},...t.resumeFromRunId?{resume:!0}:{}}).then(t=>ti(e,t,l)).catch(t=>e.taskRegistrar.fail(l,t.message));let d=s??`<inline run ${l}>`;return{data:{output:[`Workflow started (running in the background).`,`run_id: ${l}`,`workflow: ${c}`,`script: ${d}`,``,`You will be notified on completion. Use /workflows to view live progress.`].join(`
|
|
154
|
+
`)}}},mapToolResultToToolResultBlockParam(e,t){return{tool_use_id:t,type:`tool_result`,content:[{type:`text`,text:e.output}]}}}}function ti(e,t,n){if(t.status===`completed`){let r=t.returnValue==null?`(no return value)`:ni(t.returnValue);e.taskRegistrar.complete(n,r)}else t.status===`failed`?e.taskRegistrar.fail(n,t.error??`workflow failed`):e.taskRegistrar.kill(n)}function ni(e){if(typeof e==`string`)return e.slice(0,500);try{return JSON.stringify(e).slice(0,500)}catch{return String(e)}}function ri(e){if(typeof e!=`string`)return e;try{let t=JSON.parse(e);return typeof t==`object`&&t?t:e}catch{return e}}async function ii(e,t){if(e.script)return{script:e.script};if(e.scriptPath){let n=g(t,e.scriptPath);if(!Ar(t,n))throw Error(`scriptPath "${e.scriptPath}" is out of bounds (after resolve, ${n} is not within cwd ${t})`);return{script:await _(n,`utf-8`),workflowFile:n}}if(e.name){if(jr(e.name)===null)throw Error(`Named workflow name "${e.name}" is invalid (contains path separators or is . / ..)`);let n=await J(h(t,B),e.name);if(!n)throw Error(`Named workflow "${e.name}" not found (looked in ${B}/)`);return{script:n.content,workflowFile:n.path}}throw Error(`One of script, name, or scriptPath must be provided`)}var ai,oi=e((()=>{U(),Fr(),Kr(),gr(),Mr(),Zr(),$r(),ai='Use the Workflow tool to execute a workflow script that orchestrates multiple subagents deterministically. The script runs in the background; you receive a run_id immediately and are notified on completion.\n\nProvide the script inline via "script", or reference a named workflow via "name" (resolved from .claude/workflows/), or an existing file via "scriptPath". Pass "args" as a real JSON value (object/array/string), not a stringified string.\n\nUse "resumeFromRunId" to resume a prior run — completed agent() calls replay from the journal instantly.\n\nConcurrency: default is 3 (hard ceiling 16). OMIT maxConcurrency to use 3. To set maxConcurrency to ANY value other than 3, you MUST first ask the user via AskUserQuestion — propose 3 / 6 / 9 (or other tiers matching the fan-out width) with 3 marked "(Recommended)". The ONLY exception: the user has ALREADY specified a concurrency number in this session ("use 6", "maxConcurrency 9") — then honor it without re-asking. Never silently raise concurrency above 3 just because the workflow fans out; 3 is the recommended default.\n\nScript execution model (common pitfalls — getting these wrong is the #1 cause of script errors): the script is the body of `new AsyncFunction` — NOT an ESM module, and TypeScript is NOT transpiled. Therefore:\n- Do NOT use `import` — `agent`, `parallel`, `pipeline`, `phase`, `log`, `workflow`, `args`, and `budget` are injected as parameters; reference them directly.\n- Do NOT use TS type annotations, `interface`, `enum`, `as`, or generics — the engine does not transpile, so even a .ts file with type syntax fails to parse.\n- Keep EXACTLY ONE `export const meta = {...}` (plain literal) and remove every other `export` / `export default`.\n- Return the result with a top-level `return`.\nPrefer .js / .mjs. See /ultracode for the full playbook and quality patterns.'})),si=n({AdapterNotFoundError:()=>nr,AgentAdapterRegistry:()=>rr,Budget:()=>Sr,BudgetExhaustedError:()=>xr,DEFAULT_MAX_CONCURRENCY:()=>3,MAX_CONCURRENCY_CAP:()=>16,MAX_ITEMS_PER_CALL:()=>H,MAX_TOTAL_AGENTS:()=>Xn,ScriptError:()=>K,Semaphore:()=>sr,WORKFLOW_DIR_NAME:()=>B,WORKFLOW_RUNS_DIR:()=>Yn,WORKFLOW_SCRIPT_EXTENSIONS:()=>V,WORKFLOW_TOOL_NAME:()=>z,WorkflowAbortedError:()=>X,WorkflowError:()=>Y,agentCallKey:()=>vr,clampMaxConcurrency:()=>or,createBufferingEmitter:()=>Jr,createEngineContext:()=>Rr,createFileJournalStore:()=>yr,createHostHandle:()=>Zn,createProgressEmitter:()=>qr,createSharedResources:()=>Lr,createWorkflowTool:()=>ei,extractMeta:()=>lr,isHostHandle:()=>Qn,listNamedWorkflows:()=>Pr,makeHooks:()=>Br,maxConcurrency:()=>ar,parseScript:()=>G,persistInlineScript:()=>Qr,resolveNamedWorkflow:()=>J,runWorkflow:()=>Wr,unwrapHostHandle:()=>$n,validateAgainstSchema:()=>Er,workflowInputSchema:()=>Xr}),ci=e((()=>{Jn(),U(),er(),ir(),cr(),gr(),br(),Cr(),kr(),Fr(),Ir(),zr(),Ur(),Kr(),Yr(),oi(),Zr(),$r()}));function li(e){return Be(e??ne(),gi)}async function ui(e){let t=xe(),n;try{n=await t.readFile(li(e),{encoding:`utf-8`})}catch(e){return _e(e)||Ee(e),[]}let r=Ae(n,!1);if(!r||typeof r!=`object`)return[];let i=r;if(!Array.isArray(i.tasks))return[];let a=[];for(let e of i.tasks){if(!e||typeof e.id!=`string`||typeof e.cron!=`string`||typeof e.prompt!=`string`||typeof e.createdAt!=`number`){Ce(`[ScheduledTasks] skipping malformed task: ${ve(e)}`);continue}if(!Le(e.cron)){Ce(`[ScheduledTasks] skipping task ${e.id} with invalid cron '${e.cron}'`);continue}a.push({id:e.id,cron:e.cron,prompt:e.prompt,createdAt:e.createdAt,...typeof e.lastFiredAt==`number`?{lastFiredAt:e.lastFiredAt}:{},...e.recurring?{recurring:!0}:{},...e.permanent?{permanent:!0}:{}})}return a}async function di(e,t){let n=t??ne();await Ge(Be(n,`.claude`),{recursive:!0});let r={tasks:e.map(({durable:e,...t})=>t)};await Ke(li(n),ve(r,null,2)+`
|
|
155
|
+
`,`utf-8`)}async function fi(e,t,n,r,i){let a=We().slice(0,8),o={id:a,cron:e,prompt:t,createdAt:Date.now(),...n?{recurring:!0}:{}};if(!r)return ie({...o,...i?{agentId:i}:{}}),a;let s=await ui();return s.push(o),await di(s),a}async function pi(e,t){if(e.length===0||t===void 0&&te(e)===e.length)return;let n=new Set(e),r=await ui(t),i=r.filter(e=>!n.has(e.id));i.length!==r.length&&await di(i,t)}async function mi(e){let t=await ui(e);if(e!==void 0)return t;let n=re().map(e=>({...e,durable:!1}));return[...t,...n]}function hi(e,t){let n=Le(e);if(!n)return null;let r=ze(n,new Date(t));return r?r.getTime():null}var gi,_i,vi=e((()=>{ee(),Re(),Se(),ye(),be(),ke(),Te(),ge(),gi=Be(`.claude`,`scheduled_tasks.json`),_i={recurringFrac:.1,recurringCapMs:900*1e3,oneShotMaxMs:90*1e3,oneShotFloorMs:0,oneShotMinuteMod:30,recurringMaxAgeMs:10080*60*1e3}})),yi=n({CRON_CREATE_TOOL_NAME:()=>Q,CRON_DELETE_DESCRIPTION:()=>Oi,CRON_DELETE_TOOL_NAME:()=>$,CRON_LIST_DESCRIPTION:()=>ki,CRON_LIST_TOOL_NAME:()=>Di,DEFAULT_MAX_AGE_DAYS:()=>Z,buildCronCreateDescription:()=>Si,buildCronCreatePrompt:()=>Ci,buildCronDeletePrompt:()=>wi,buildCronListPrompt:()=>Ti,isDurableCronEnabled:()=>xi,isKairosCronEnabled:()=>bi});function bi(){return!Me(process.env.CLAUDE_CODE_DISABLE_CRON)}function xi(){return me(`tengu_kairos_cron_durable`,!0,Ei)}function Si(e){return e?`Schedule a prompt to run at a future time — either recurring on a cron schedule, or once at a specific time. Pass durable: true to persist to .claude/scheduled_tasks.json; otherwise session-only.`:`Schedule a prompt to run at a future time within this Claude session — either recurring on a cron schedule, or once at a specific time.`}function Ci(e){return`Schedule a prompt to be enqueued at a future time. Use for both recurring schedules and one-shot reminders.
|
|
156
|
+
|
|
157
|
+
Uses standard 5-field cron in the user's local timezone: minute hour day-of-month month day-of-week. "0 9 * * *" means 9am local — no timezone conversion needed.
|
|
158
|
+
|
|
159
|
+
## One-shot tasks (recurring: false)
|
|
160
|
+
|
|
161
|
+
For "remind me at X" or "at <time>, do Y" requests — fire once then auto-delete.
|
|
162
|
+
Pin minute/hour/day-of-month/month to specific values:
|
|
163
|
+
"remind me at 2:30pm today to check the deploy" → cron: "30 14 <today_dom> <today_month> *", recurring: false
|
|
164
|
+
"tomorrow morning, run the smoke test" → cron: "57 8 <tomorrow_dom> <tomorrow_month> *", recurring: false
|
|
165
|
+
|
|
166
|
+
## Recurring jobs (recurring: true, the default)
|
|
167
|
+
|
|
168
|
+
For "every N minutes" / "every hour" / "weekdays at 9am" requests:
|
|
169
|
+
"*/5 * * * *" (every 5 min), "0 * * * *" (hourly), "0 9 * * 1-5" (weekdays at 9am local)
|
|
170
|
+
|
|
171
|
+
## Avoid the :00 and :30 minute marks when the task allows it
|
|
172
|
+
|
|
173
|
+
Every user who asks for "9am" gets \`0 9\`, and every user who asks for "hourly" gets \`0 *\` — which means requests from across the planet land on the API at the same instant. When the user's request is approximate, pick a minute that is NOT 0 or 30:
|
|
174
|
+
"every morning around 9" → "57 8 * * *" or "3 9 * * *" (not "0 9 * * *")
|
|
175
|
+
"hourly" → "7 * * * *" (not "0 * * * *")
|
|
176
|
+
"in an hour or so, remind me to..." → pick whatever minute you land on, don't round
|
|
177
|
+
|
|
178
|
+
Only use minute 0 or 30 when the user names that exact time and clearly means it ("at 9:00 sharp", "at half past", coordinating with a meeting). When in doubt, nudge a few minutes early or late — the user will not notice, and the fleet will.
|
|
179
|
+
|
|
180
|
+
${e?`## Durability
|
|
181
|
+
|
|
182
|
+
By default (durable: false) the job lives only in this Claude session — nothing is written to disk, and the job is gone when Claude exits. Pass durable: true to write to .claude/scheduled_tasks.json so the job survives restarts. Only use durable: true when the user explicitly asks for the task to persist ("keep doing this every day", "set this up permanently"). Most "remind me in 5 minutes" / "check back in an hour" requests should stay session-only.`:`## Session-only
|
|
183
|
+
|
|
184
|
+
Jobs live only in this Claude session — nothing is written to disk, and the job is gone when Claude exits.`}
|
|
185
|
+
|
|
186
|
+
## Runtime behavior
|
|
187
|
+
|
|
188
|
+
Jobs only fire while the REPL is idle (not mid-query). ${e?`Durable jobs persist to .claude/scheduled_tasks.json and survive session restarts — on next launch they resume automatically. One-shot durable tasks that were missed while the REPL was closed are surfaced for catch-up. Session-only jobs die with the process. `:``}The scheduler adds a small deterministic jitter on top of whatever you pick: recurring tasks fire up to 10% of their period late (max 15 min); one-shot tasks landing on :00 or :30 fire up to 90 s early. Picking an off-minute is still the bigger lever.
|
|
189
|
+
|
|
190
|
+
Recurring tasks auto-expire after ${Z} days — they fire one final time, then are deleted. This bounds session lifetime. Tell the user about the ${Z}-day limit when scheduling recurring jobs.
|
|
191
|
+
|
|
192
|
+
Returns a job ID you can pass to ${$}.`}function wi(e){return e?`Cancel a cron job previously scheduled with ${Q}. Removes it from .claude/scheduled_tasks.json (durable jobs) or the in-memory session store (session-only jobs).`:`Cancel a cron job previously scheduled with ${Q}. Removes it from the in-memory session store.`}function Ti(e){return e?`List all cron jobs scheduled via ${Q}, both durable (.claude/scheduled_tasks.json) and session-only.`:`List all cron jobs scheduled via ${Q} in this session.`}var Ei,Z,Q,$,Di,Oi,ki,Ai=e((()=>{he(),vi(),je(),Ei=300*1e3,Z=_i.recurringMaxAgeMs/(1440*60*1e3),Q=`CronCreate`,$=`CronDelete`,Di=`CronList`,Oi=`Cancel a scheduled cron job by ID`,ki=`List scheduled cron jobs`})),ji,Mi,Ni,Pi,Fi,Ii,Li=e((()=>{ji=`LocalMemoryRecall`,Mi=100*1024,Ni=2*1024,Pi=50*1024,Fi=4*1024,Ii=8*1024})),Ri,zi,Bi,Vi=e((()=>{Ri=`VaultHttpFetch`,zi=1048576,Bi=3e4})),Hi,Ui,Wi,Gi,Ki,qi=e((()=>{ae(),Pt(),Vt(),se(),Gt(),le(),gt(),Xt(),At(),$e(),Ot(),St(),en(),rt(),yt(),wt(),Nt(),nn(),jt(),rn(),an(),Mt(),on(),wn(),Rn(),Bn(),Hn(),Un(),Gn(),qn(),ci(),Ai(),Li(),Vi(),Hi=new Set([pe,O,k,...process.env.USER_TYPE===`ant`?[]:[fe],A,oe,...[z],ji,Ri]),Ui=new Set([...Hi]),Wi=new Set([S,j,kt,b,Et,bt,...M,x,C,Ct,E,I,F,R,Wn,Kn]),Gi=new Set([w,N,P,T,tn,Q,$,Di]),Ki=new Set([...M,S,x,C,bt,b,Ct,fe,A,pe,oe,w,N,P,T,kt,k,O,L,Et,j,`LSP`,E,z,Fn,F,R,I])}));function Ji(){return process.env.USER_TYPE===`ant`||de(`tengu_glacier_2xr`,!1)?`Deferred tools appear by name in <system-reminder> messages.`:`Deferred tools appear by name in <available-deferred-tools> messages.`}function Yi(e){return!(e.alwaysLoad===!0||Ki.has(e.name))}function Xi(e){return e.name}function Zi(){return Qi+Ji()+$i}var Qi,$i,ea=e((()=>{he(),qi(),on(),Qi=`Search for deferred tools by name or keyword. LOW PRIORITY — only use this tool when no core tool can accomplish the task. Core tools (Read, Edit, Write, Bash, Glob, Grep, Agent, WebFetch, WebSearch, Skill) are always available and should be used directly. This tool is for discovering additional capabilities like MCP tools, cron scheduling, worktree management, agent teams (TeamCreate, TeamDelete, SendMessage), etc.
|
|
193
|
+
|
|
194
|
+
`,$i=` Returns matching tool names.
|
|
195
|
+
|
|
196
|
+
## Two-step workflow (MUST follow exactly)
|
|
197
|
+
|
|
198
|
+
Deferred tools CANNOT be called directly. You MUST use this two-step pattern:
|
|
199
|
+
|
|
200
|
+
Step 1 — Search: Call this tool (SearchExtraTools) to discover the target tool.
|
|
201
|
+
Input: {"query": "select:CronCreate"}
|
|
202
|
+
Response: "Found 1 deferred tool(s): CronCreate. Use ExecuteExtraTool with {"tool_name": "<name>", "params": {...}} to invoke."
|
|
203
|
+
|
|
204
|
+
Step 2 — Execute: Call ExecuteExtraTool to run the discovered tool.
|
|
205
|
+
Input: {"tool_name": "CronCreate", "params": {"schedule": "*/5 * * * *", "prompt": "check the deploy"}}
|
|
206
|
+
Response: the actual tool result.
|
|
207
|
+
|
|
208
|
+
## Example: user asks "schedule a cron to check deploy every 5 minutes"
|
|
209
|
+
|
|
210
|
+
1. SearchExtraTools({"query": "select:CronCreate"})
|
|
211
|
+
→ Response: Found deferred tool CronCreate
|
|
212
|
+
2. ExecuteExtraTool({"tool_name": "CronCreate", "params": {"schedule": "*/5 * * * *", "prompt": "check the deploy"}})
|
|
213
|
+
→ Response: Cron job created successfully
|
|
214
|
+
|
|
215
|
+
If you don't know the exact tool name, use keyword search first:
|
|
216
|
+
1. SearchExtraTools({"query": "cron schedule"})
|
|
217
|
+
→ Response: Found deferred tool(s): CronCreate
|
|
218
|
+
2. ExecuteExtraTool({"tool_name": "CronCreate", "params": {...}})
|
|
219
|
+
|
|
220
|
+
## Query forms
|
|
221
|
+
- "select:CronCreate" — exact tool name (fastest, preferred when you know the name from <available-deferred-tools>)
|
|
222
|
+
- "select:CronCreate,CronList" — comma-separated multi-select
|
|
223
|
+
- "discover:schedule cron job" — returns tool name + description + schema without loading. Use to understand a tool before calling it.
|
|
224
|
+
- "notebook jupyter" — keyword search, up to max_results best matches
|
|
225
|
+
- "+slack send" — require "slack" in the name, rank by remaining terms
|
|
226
|
+
|
|
227
|
+
## Failure policy
|
|
228
|
+
If ExecuteExtraTool fails, do NOT re-search for the same tool — it will loop. Stop and tell the user what failed.`}));export{Zn as $,nt as $n,Qt as $t,Ti as A,Ct as An,_n as At,pi as B,ut as Bn,sn as Bt,$ as C,jt as Cn,On as Ct,Si as D,Et as Dn,Pn as Dt,Z as E,Dt as En,kn as Et,fi as F,C as Fn,pn as Ft,Xr as G,gt as Gn,N as Gt,si as H,dt as Hn,on as Ht,li as I,vt as In,cn as It,Pr as J,ot as Jn,nn as Jt,Wr as K,lt as Kn,rn as Kt,vi as L,yt as Ln,ln as Lt,xi as M,xt as Mn,gn as Mt,bi as N,bt as Nn,dn as Nt,Ci as O,Ot as On,I as Ot,yi as P,St as Pn,fn as Pt,rr as Q,x as Qn,Zt as Qt,mi as R,ft as Rn,hn as Rt,Oi as S,w as Sn,Nn as St,Di as T,At as Tn,An as Tt,ei as U,mt as Un,P as Ut,ci as V,pt as Vn,F as Vt,Qr as W,ht as Wn,an as Wt,yr as X,it as Xn,en as Xt,J as Y,at as Yn,M as Yt,G as Z,et as Zn,$t as Zt,ji as _,Pt as _n,Rn as _t,Hi as a,Ht as an,v as ar,Wn as at,Li as b,T as bn,Tn as bt,Gi as c,k as cn,Un as ct,zi as d,It as dn,Hn as dt,j as en,tt as er,$n as et,Ri as f,Rt as fn,zn as ft,Fi as g,O as gn,Ln as gt,Ii as h,D as hn,Fn as ht,Yi as i,Wt as in,$e as ir,qn as it,Ai as j,wt as jn,wn as jt,wi as k,Tt as kn,Sn as kt,qi as l,Vt as ln,L as lt,Pi as m,Ft as mn,In as mt,Zi as n,Xt as nn,b as nr,z as nt,Wi as o,Ut as on,y as or,Gn as ot,Vi as p,Bt as pn,Bn as pt,X as q,ct as qn,tn as qt,ea as r,A as rn,Qe as rr,Kn as rt,Ui as s,Gt as sn,R as st,Xi as t,Yt as tn,rt as tr,B as tt,Bi as u,Lt as un,Vn as ut,Mi as v,E as vn,jn as vt,ki as w,kt as wn,Dn as wt,Q as x,Mt as xn,Mn as xt,Ni as y,Nt as yn,En as yt,hi as z,S as zn,un as zt};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";function t(){return n}var n,r,i,a=e((()=>{n=`# Claude in Chrome browser automation
|
|
2
|
+
|
|
3
|
+
You have access to browser automation tools (mcp__claude-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation.
|
|
4
|
+
|
|
5
|
+
## GIF recording
|
|
6
|
+
|
|
7
|
+
When performing multi-step browser interactions that the user may want to review or share, use mcp__claude-in-chrome__gif_creator to record them.
|
|
8
|
+
|
|
9
|
+
You must ALWAYS:
|
|
10
|
+
* Capture extra frames before and after taking actions to ensure smooth playback
|
|
11
|
+
* Name the file meaningfully to help the user identify it later (e.g., "login_process.gif")
|
|
12
|
+
|
|
13
|
+
## Console log debugging
|
|
14
|
+
|
|
15
|
+
You can use mcp__claude-in-chrome__read_console_messages to read console output. Console output may be verbose. If you are looking for specific log entries, use the 'pattern' parameter with a regex-compatible pattern. This filters results efficiently and avoids overwhelming output. For example, use pattern: "[MyApp]" to filter for application-specific logs rather than reading all console output.
|
|
16
|
+
|
|
17
|
+
## Alerts and dialogs
|
|
18
|
+
|
|
19
|
+
IMPORTANT: Do not trigger JavaScript alerts, confirms, prompts, or browser modal dialogs through your actions. These browser dialogs block all further browser events and will prevent the extension from receiving any subsequent commands. Instead, when possible, use console.log for debugging and then use the mcp__claude-in-chrome__read_console_messages tool to read those log messages. If a page has dialog-triggering elements:
|
|
20
|
+
1. Avoid clicking buttons or links that may trigger alerts (e.g., "Delete" buttons with confirmation dialogs)
|
|
21
|
+
2. If you must interact with such elements, warn the user first that this may interrupt the session
|
|
22
|
+
3. Use mcp__claude-in-chrome__javascript_tool to check for and dismiss any existing dialogs before proceeding
|
|
23
|
+
|
|
24
|
+
If you accidentally trigger a dialog and lose responsiveness, inform the user they need to manually dismiss it in the browser.
|
|
25
|
+
|
|
26
|
+
## Avoid rabbit holes and loops
|
|
27
|
+
|
|
28
|
+
When using browser automation tools, stay focused on the specific task. If you encounter any of the following, stop and ask the user for guidance:
|
|
29
|
+
- Unexpected complexity or tangential browser exploration
|
|
30
|
+
- Browser tool calls failing or returning errors after 2-3 attempts
|
|
31
|
+
- No response from the browser extension
|
|
32
|
+
- Page elements not responding to clicks or input
|
|
33
|
+
- Pages not loading or timing out
|
|
34
|
+
- Unable to complete the browser task despite multiple approaches
|
|
35
|
+
|
|
36
|
+
Explain what you attempted, what went wrong, and ask how the user would like to proceed. Do not keep retrying the same failing browser action or explore unrelated pages without checking in first.
|
|
37
|
+
|
|
38
|
+
## Tab context and session startup
|
|
39
|
+
|
|
40
|
+
IMPORTANT: At the start of each browser automation session, call mcp__claude-in-chrome__tabs_context_mcp first to get information about the user's current browser tabs. Use this context to understand what the user might want to work with before creating new tabs.
|
|
41
|
+
|
|
42
|
+
Never reuse tab IDs from a previous/other session. Follow these guidelines:
|
|
43
|
+
1. Only reuse an existing tab if the user explicitly asks to work with it
|
|
44
|
+
2. Otherwise, create a new tab with mcp__claude-in-chrome__tabs_create_mcp
|
|
45
|
+
3. If a tool returns an error indicating the tab doesn't exist or is invalid, call tabs_context_mcp to get fresh tab IDs
|
|
46
|
+
4. When a tab is closed by the user or a navigation error occurs, call tabs_context_mcp to see what tabs are available`,r=`**IMPORTANT: Before using any chrome browser tools, you MUST first load them using SearchExtraTools.**
|
|
47
|
+
|
|
48
|
+
Chrome browser tools are MCP tools that require loading before use. Before calling any mcp__claude-in-chrome__* tool:
|
|
49
|
+
1. Use SearchExtraTools with \`select:mcp__claude-in-chrome__<tool_name>\` to load the specific tool
|
|
50
|
+
2. Then call the tool
|
|
51
|
+
|
|
52
|
+
For example, to get tab context:
|
|
53
|
+
1. First: SearchExtraTools with query "select:mcp__claude-in-chrome__tabs_context_mcp"
|
|
54
|
+
2. Then: Call mcp__claude-in-chrome__tabs_context_mcp`,i=`**Browser Automation**: Chrome browser tools are available via the "claude-in-chrome" skill. CRITICAL: Before using any mcp__claude-in-chrome__* tools, invoke the skill by calling the Skill tool with skill: "claude-in-chrome". The skill provides browser automation instructions and enables the tools.`}));export{a,t as i,r as n,i as r,n as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{Lt as r,t as i}from"./src-DNHWYkls.js";import{A as a,E as o,_ as s,h as c,l,p as u}from"./debug-CjIaNjpK.js";import{n as d,t as f}from"./execSyncWrapper-Ch4TNj8u.js";import{r as p,t as m}from"./which-C0ex-06E.js";import{FC as h,IC as g,Pl as _,SE as v,TE as y,Ul as b,bE as x,wE as S}from"./loadAgentsDir-Bz0FfcVt.js";import{basename as C}from"path";import{spawn as w,spawnSync as T}from"child_process";function E(e){return!!p(e)}function D(e){let t=C(e.split(` `)[0]??``);return A.find(e=>t.includes(e))}function O(e,t,n){return n?M.has(e)?[`-g`,`${t}:${n}`]:e===`subl`?[`${t}:${n}`]:[t]:[t]}function k(e,t){let n=N();if(!n)return!1;let i=n.split(` `),a=i[0]??n,o=i.slice(1),s=D(n);if(s){let r=O(s,e,t),i={detached:!0,stdio:`ignore`},c;return c=process.platform===`win32`?w(`${n} ${r.map(e=>`"${e}"`).join(` `)}`,{...i,shell:!0}):w(a,[...o,...r],i),c.on(`error`,e=>u(`editor spawn failed: ${e}`,{level:`error`})),c.unref(),!0}let c=r.get(process.stdout);if(!c)return!1;let l=t&&j.test(C(a));c.enterAlternateScreen();try{let r={stdio:`inherit`},i;return i=process.platform===`win32`?T(`${n} ${l?`+${t} `:``}"${e}"`,{...r,shell:!0}):T(a,[...o,...l?[`+${t}`,e]:[e]],r),i.error?(u(`editor spawn failed: ${i.error}`,{level:`error`}),!1):!0}finally{c.exitAlternateScreen()}}var A,j,M,N,P=e((()=>{n(),i(),l(),m(),A=[`code`,`cursor`,`windsurf`,`codium`,`subl`,`atom`,`gedit`,`notepad++`,`notepad`],j=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,M=new Set([`code`,`cursor`,`windsurf`,`codium`]),N=t(()=>process.env.VISUAL?.trim()?process.env.VISUAL.trim():process.env.EDITOR?.trim()?process.env.EDITOR.trim():process.platform===`win32`?`start /wait notepad`:[`code`,`vi`,`nano`].find(e=>E(e)))}));function F(e){return D(e)!==void 0}function I(e){let t=c(),n=r.get(process.stdout);if(!n)throw Error(`Ink instance not found - cannot pause rendering`);let i=N();if(!i)return{content:null};try{t.statSync(e)}catch{return{content:null}}let a=!F(i);a?n.enterAlternateScreen():(n.pause(),n.suspendStdin());try{return f(`${z[i]??i} "${e}"`,{stdio:`inherit`}),{content:t.readFileSync(e,{encoding:`utf-8`})}}catch(e){if(typeof e==`object`&&e&&`status`in e&&typeof e.status==`number`){let t=e.status;if(t!==0)return{content:null,error:`${b(i)} exited with code ${t}`}}return{content:null}}finally{a?n.exitAlternateScreen():(n.resumeStdin(),n.resume())}}function L(e,t,n){let r=e;for(let[e,t]of Object.entries(n))if(t.type===`text`){let n=parseInt(e,10),i=t.content,a=r.indexOf(i);if(a!==-1){let e=v(n,S(i));r=r.slice(0,a)+e+r.slice(a+i.length)}}return r}function R(e,t){let n=c(),r=h();try{a(r,t?x(e,t):e,{encoding:`utf-8`,flush:!0});let n=I(r);if(n.content===null)return n;let i=n.content;return i.endsWith(`
|
|
2
|
+
`)&&!i.endsWith(`
|
|
3
|
+
|
|
4
|
+
`)&&(i=i.slice(0,-1)),t&&(i=L(i,e,t)),{content:i}}finally{try{n.unlinkSync(r)}catch{}}}var z,B=e((()=>{y(),i(),P(),d(),s(),_(),o(),g(),z={code:`code -w`,subl:`subl --wait`}}));export{P as a,N as i,R as n,k as o,B as r,I as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./chunk-DR8-3Aex.js";var n=t({checkProtectedNamespace:()=>r}),r,i=e((()=>{r=()=>!1}));export{n,i as t};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{_s as e,ls as t}from"./growthbook-p4aJ_UMv.js";import{E as n,O as r,l as i,p as a}from"./debug-CjIaNjpK.js";import{r as o,t as s}from"./execFileNoThrow-DdmR1mBS.js";import{n as c,t as l}from"./which-C0ex-06E.js";import{n as u,t as d}from"./githubRepoPathMapping-DGivBX9h.js";import{n as f}from"./banner-BGLr3KYQ.js";import{a as p,i as m,n as h}from"./registerProtocol-BHZ3vZED.js";import{homedir as g}from"os";import{basename as _}from"path";import{spawn as v}from"child_process";n(),m(),h(),e(),i(),o(),l();var y=[{name:`iTerm2`,bundleId:`com.googlecode.iterm2`,app:`iTerm`},{name:`Ghostty`,bundleId:`com.mitchellh.ghostty`,app:`Ghostty`},{name:`Kitty`,bundleId:`net.kovidgoyal.kitty`,app:`kitty`},{name:`Alacritty`,bundleId:`org.alacritty`,app:`Alacritty`},{name:`WezTerm`,bundleId:`com.github.wez.wezterm`,app:`WezTerm`},{name:`Terminal.app`,bundleId:`com.apple.Terminal`,app:`Terminal`}],b=[`ghostty`,`kitty`,`alacritty`,`wezterm`,`gnome-terminal`,`konsole`,`xfce4-terminal`,`mate-terminal`,`tilix`,`xterm`];async function x(){let e=t().deepLinkTerminal;if(e){let t=y.find(t=>t.app===e);if(t)return{name:t.name,command:t.app}}let n=process.env.TERM_PROGRAM;if(n){let e=n.replace(/\.app$/i,``).toLowerCase(),t=y.find(t=>t.app.toLowerCase()===e||t.name.toLowerCase()===e);if(t)return{name:t.name,command:t.app}}for(let e of y){let{code:t,stdout:n}=await s(`mdfind`,[`kMDItemCFBundleIdentifier == "${e.bundleId}"`],{timeout:5e3,useCwd:!1});if(t===0&&n.trim().length>0)return{name:e.name,command:e.app}}for(let e of y){let{code:t}=await s(`ls`,[`/Applications/${e.app}.app`],{timeout:1e3,useCwd:!1});if(t===0)return{name:e.name,command:e.app}}return{name:`Terminal.app`,command:`Terminal`}}async function S(){let e=process.env.TERMINAL;if(e){let t=await c(e);if(t)return{name:_(e),command:t}}let t=await c(`x-terminal-emulator`);if(t)return{name:`x-terminal-emulator`,command:t};for(let e of b){let t=await c(e);if(t)return{name:e,command:t}}return null}async function C(){let e=await c(`wt.exe`);if(e)return{name:`Windows Terminal`,command:e};let t=await c(`pwsh.exe`);if(t)return{name:`PowerShell`,command:t};let n=await c(`powershell.exe`);return n?{name:`PowerShell`,command:n}:{name:`Command Prompt`,command:`cmd.exe`}}async function w(){switch(process.platform){case`darwin`:return x();case`linux`:return S();case`win32`:return C();default:return null}}async function T(e,t){let n=await w();if(!n)return a(`No terminal emulator detected`,{level:`error`}),!1;a(`Launching in terminal: ${n.name} (${n.command})`);let r=[`--deep-link-origin`];switch(t.repo&&(r.push(`--deep-link-repo`,t.repo),t.lastFetchMs!==void 0&&r.push(`--deep-link-last-fetch`,String(t.lastFetchMs))),t.query&&r.push(`--prefill`,t.query),process.platform){case`darwin`:return E(n,e,r,t.cwd);case`linux`:return D(n,e,r,t.cwd);case`win32`:return O(n,e,r,t.cwd);default:return!1}}async function E(e,t,n,r){switch(e.command){case`iTerm`:{let{code:e}=await s(`osascript`,[`-e`,`tell application "iTerm"
|
|
2
|
+
if running then
|
|
3
|
+
create window with default profile
|
|
4
|
+
else
|
|
5
|
+
activate
|
|
6
|
+
end if
|
|
7
|
+
tell current session of current window
|
|
8
|
+
write text ${M(A(t,n,r))}
|
|
9
|
+
end tell
|
|
10
|
+
end tell`],{useCwd:!1});if(e===0)return!0;break}case`Terminal`:{let{code:e}=await s(`osascript`,[`-e`,`tell application "Terminal"
|
|
11
|
+
do script ${M(A(t,n,r))}
|
|
12
|
+
activate
|
|
13
|
+
end tell`],{useCwd:!1});return e===0}case`Ghostty`:{let i=[`-na`,e.command,`--args`,`--window-save-state=never`];r&&i.push(`--working-directory=${r}`),i.push(`-e`,t,...n);let{code:a}=await s(`open`,i,{useCwd:!1});if(a===0)return!0;break}case`Alacritty`:{let i=[`-na`,e.command,`--args`];r&&i.push(`--working-directory`,r),i.push(`-e`,t,...n);let{code:a}=await s(`open`,i,{useCwd:!1});if(a===0)return!0;break}case`kitty`:{let i=[`-na`,e.command,`--args`];r&&i.push(`--directory`,r),i.push(t,...n);let{code:a}=await s(`open`,i,{useCwd:!1});if(a===0)return!0;break}case`WezTerm`:{let i=[`-na`,e.command,`--args`,`start`];r&&i.push(`--cwd`,r),i.push(`--`,t,...n);let{code:a}=await s(`open`,i,{useCwd:!1});if(a===0)return!0;break}}return a(`Failed to launch ${e.name}, falling back to Terminal.app`),E({name:`Terminal.app`,command:`Terminal`},t,n,r)}async function D(e,t,n,r){let i,a;switch(e.name){case`gnome-terminal`:i=r?[`--working-directory=${r}`,`--`]:[`--`],i.push(t,...n);break;case`konsole`:i=r?[`--workdir`,r,`-e`]:[`-e`],i.push(t,...n);break;case`kitty`:i=r?[`--directory`,r]:[],i.push(t,...n);break;case`wezterm`:i=r?[`start`,`--cwd`,r,`--`]:[`start`,`--`],i.push(t,...n);break;case`alacritty`:i=r?[`--working-directory`,r,`-e`]:[`-e`],i.push(t,...n);break;case`ghostty`:i=r?[`--working-directory=${r}`,`-e`]:[`-e`],i.push(t,...n);break;case`xfce4-terminal`:case`mate-terminal`:i=r?[`--working-directory=${r}`,`-x`]:[`-x`],i.push(t,...n);break;case`tilix`:i=r?[`--working-directory=${r}`,`-e`]:[`-e`],i.push(t,...n);break;default:i=[`-e`,t,...n],a=r;break}return k(e.command,i,{cwd:a})}async function O(e,t,n,r){let i=[];switch(e.name){case`Windows Terminal`:r&&i.push(`-d`,r),i.push(`--`,t,...n);break;case`PowerShell`:{let e=r?`Set-Location ${N(r)}; `:``;i.push(`-NoExit`,`-Command`,`${e}& ${N(t)} ${n.map(N).join(` `)}`);break}default:{let e=r?`cd /d ${P(r)} && `:``;i.push(`/k`,`${e}${P(t)} ${n.map(e=>P(e)).join(` `)}`);break}}return k(e.command,i,{windowsVerbatimArguments:e.name===`Command Prompt`})}function k(e,t,n={}){return new Promise(r=>{let i=v(e,t,{detached:!0,stdio:`ignore`,cwd:n.cwd,windowsVerbatimArguments:n.windowsVerbatimArguments});i.once(`error`,t=>{a(`Failed to spawn ${e}: ${t.message}`,{level:`error`}),r(!1)}),i.once(`spawn`,()=>{i.unref(),r(!0)})})}function A(e,t,n){return`${n?`cd ${j(n)} && `:``}${[e,...t].map(j).join(` `)}`}function j(e){return`'${e.replace(/'/g,`'\\''`)}'`}function M(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function N(e){return`'${e.replace(/'/g,`''`)}'`}function P(e){return`"${e.replace(/"/g,``).replace(/%/g,`%%`).replace(/(\\+)$/,`$1$1`)}"`}i();async function F(e){a(`Handling deep link URI: ${e}`);let t;try{t=p(e)}catch(e){let t=e instanceof Error?e.message:String(e);return console.error(`Deep link error: ${t}`),1}a(`Parsed deep link action: ${r(t)}`);let{cwd:n,resolvedRepo:i}=await L(t),o=i?await f(n):void 0;return await T(process.execPath,{query:t.query,cwd:n,repo:i,lastFetchMs:o?.getTime()})?0:(console.error(`Failed to open a terminal. Make sure a supported terminal emulator is installed.`),1)}async function I(){if(process.env.__CFBundleIdentifier!==`com.anthropic.claude-code-url-handler`)return null;try{let{waitForUrlEvent:e}=await import(`./src-CMY4XoRy.js`),t=await e(5e3);return t?await F(t):null}catch{return null}}async function L(e){if(e.cwd)return{cwd:e.cwd};if(e.repo){let t=await d(u(e.repo));if(t[0])return a(`Resolved repo ${e.repo} → ${t[0]}`),{cwd:t[0],resolvedRepo:e.repo};a(`No local clone found for repo ${e.repo}, falling back to home`)}return{cwd:g()}}export{F as handleDeepLinkUri,I as handleUrlSchemeLaunch};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-CaCI0a5T.js";import{n as r,r as i,t as a}from"./dist-es-Cp--qjOi.js";import{r as o,t as s}from"./dist-es-BctcPxLN.js";import{a as c,i as l,n as u,o as d,s as f,t as p}from"./dist-es-6kjvVbJd.js";import{n as m,t as ee}from"./dist-es-BgLoR-hQ.js";import{n as h,t as g}from"./dist-es-C66BuLgn.js";import{Readable as _}from"stream";import v from"crypto";import{Readable as y,Writable as b}from"node:stream";import{Agent as x,request as te}from"node:https";import S,{constants as C}from"node:http2";var w,T,E=e((()=>{f(),w=/^[A-Za-z0-9+/]*={0,2}$/,T=e=>{if(e.length*3%4!=0)throw TypeError(`Incorrect padding on base64 string.`);if(!w.exec(e))throw TypeError(`Invalid base64 string.`);let t=d(e,`base64`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}})),D,ne=e((()=>{f(),p(),D=e=>{let t;if(t=typeof e==`string`?l(e):e,typeof t!=`object`||typeof t.byteOffset!=`number`||typeof t.byteLength!=`number`)throw Error(`@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.`);return c(t.buffer,t.byteOffset,t.byteLength).toString(`base64`)}})),O=e((()=>{E(),ne()})),re,ie=e((()=>{O(),p(),re=class e extends Uint8Array{static fromString(t,n=`utf-8`){if(typeof t==`string`)return n===`base64`?e.mutate(T(t)):e.mutate(l(t));throw Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,e.prototype),t}transformToString(e=`utf-8`){return e===`base64`?D(this):u(this)}}})),ae=e((()=>{})),oe,se=e((()=>{oe=e=>typeof ReadableStream==`function`&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream)})),ce=e((()=>{})),le=e((()=>{})),ue=e((()=>{})),de=e((()=>{}));function k(e){let t=e&&typeof e==`object`&&`reason`in e?e.reason:void 0;if(t){if(t instanceof Error){let e=Error(`Request aborted`);return e.name=`AbortError`,e.cause=t,e}let e=Error(String(t));return e.name=`AbortError`,e}let n=Error(`Request aborted`);return n.name=`AbortError`,n}var fe=e((()=>{})),pe,me=e((()=>{pe=[`ECONNRESET`,`EPIPE`,`ETIMEDOUT`]})),he,ge=e((()=>{he=e=>{let t={};for(let n of Object.keys(e)){let r=e[n];t[n]=Array.isArray(r)?r.join(`,`):r}return t}})),A,j=e((()=>{A={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)}})),_e,ve,ye=e((()=>{j(),_e=1e3,ve=(e,t,n=0)=>{if(!n)return-1;let r=r=>{let i=A.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:`TimeoutError`}))},n-r),a=e=>{e?.connecting?e.on(`connect`,()=>{A.clearTimeout(i)}):A.clearTimeout(i)};e.socket?a(e.socket):e.on(`socket`,a)};return n<2e3?(r(0),0):A.setTimeout(r.bind(null,_e),_e)}})),be,xe=e((()=>{j(),be=(e,t,n=0,r,i)=>n?A.setTimeout(()=>{let a=`@smithy/node-http-handler - [${r?`ERROR`:`WARN`}] a request has exceeded the configured ${n} ms requestTimeout.`;if(r){let n=Object.assign(Error(a),{name:`TimeoutError`,code:`ETIMEDOUT`});e.destroy(n),t(n)}else a+=` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`,i?.warn?.(a)},n):-1})),Se,Ce,we=e((()=>{j(),Se=3e3,Ce=(e,{keepAlive:t,keepAliveMsecs:n},r=Se)=>{if(t!==!0)return-1;let i=()=>{e.socket?e.socket.setKeepAlive(t,n||0):e.on(`socket`,e=>{e.setKeepAlive(t,n||0)})};return r===0?(i(),0):A.setTimeout(i,r)}})),Te,Ee,De=e((()=>{j(),Te=3e3,Ee=(e,t,n=0)=>{let r=r=>{let i=n-r,a=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:`TimeoutError`}))};e.socket?(e.socket.setTimeout(i,a),e.on(`close`,()=>e.socket?.removeListener(`timeout`,a))):e.setTimeout(i,a)};return 0<n&&n<6e3?(r(0),0):A.setTimeout(r.bind(null,n===0?0:Te),Te)}}));async function Oe(e,t,n=Ae,r=!1){let i=t.headers??{},a=i.Expect||i.expect,o=-1,s=!0;!r&&a===`100-continue`&&(s=await Promise.race([new Promise(e=>{o=Number(A.setTimeout(()=>e(!0),Math.max(Ae,n)))}),new Promise(t=>{e.on(`continue`,()=>{A.clearTimeout(o),t(!0)}),e.on(`response`,()=>{A.clearTimeout(o),t(!1)}),e.on(`error`,()=>{A.clearTimeout(o),t(!1)})})])),s&&ke(e,t.body)}function ke(e,t){if(t instanceof y){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==`string`){n&&t.byteLength===0?e.end():e.end(t);return}let r=t;if(typeof r==`object`&&r.buffer&&typeof r.byteOffset==`number`&&typeof r.byteLength==`number`){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}var Ae,je=e((()=>{j(),Ae=6e3})),M,Me,Ne,Pe=e((()=>{a(),m(),fe(),me(),ge(),ye(),xe(),we(),De(),j(),je(),t(),M=void 0,Me=void 0,Ne=class e{static create(t){return typeof t?.handle==`function`?t:new e(t)}static checkSocketUsage(e,t,n=console){let{sockets:r,requests:i,maxSockets:a}=e;if(typeof a!=`number`||a===1/0||Date.now()-15e3<t)return t;if(r&&i)for(let e in r){let t=r[e]?.length??0,o=i[e]?.length??0;if(t>=a&&o>=2*a)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${t} and ${o} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){n(this,`config`,void 0),n(this,`configProvider`,void 0),n(this,`socketWarningTimestamp`,0),n(this,`externalAgent`,!1),n(this,`metadata`,{handlerProtocol:`http/1.1`}),this.configProvider=new Promise((t,n)=>{typeof e==`function`?e().then(e=>{t(this.resolveDefaultConfig(e))}).catch(n):t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:n,requestTimeout:i}={}){this.config||(this.config=await this.configProvider);let a=this.config,o=t.protocol===`https:`;return!o&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((s,c)=>{let l,u=[],d=async e=>{await l,u.forEach(A.clearTimeout),s(e)},f=async e=>{await l,u.forEach(A.clearTimeout),c(e)};if(n?.aborted){f(k(n));return}let p=t.headers??{},m=(p.Expect??p.expect)===`100-continue`,h=o?a.httpsAgent:a.httpAgent;m&&!this.externalAgent&&(h=new(o?x:M)({keepAlive:!1,maxSockets:1/0})),u.push(A.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(h,this.socketWarningTimestamp,a.logger)},a.socketAcquisitionWarningTimeout??(a.requestTimeout??2e3)+(a.connectionTimeout??1e3)));let g=ee(t.query||{}),_;(t.username!=null||t.password!=null)&&(_=`${t.username??``}:${t.password??``}`);let v=t.path;g&&(v+=`?${g}`),t.fragment&&(v+=`#${t.fragment}`);let y=t.hostname??``;y=y[0]===`[`&&y.endsWith(`]`)?t.hostname.slice(1,-1):t.hostname;let b={headers:t.headers,host:y,method:t.method,path:v,port:t.port,agent:h,auth:_},S=(o?te:Me)(b,e=>{d({response:new r({statusCode:e.statusCode||-1,reason:e.statusMessage,headers:he(e.headers),body:e})})});if(S.on(`error`,e=>{pe.includes(e.code)?f(Object.assign(e,{name:`TimeoutError`})):f(e)}),n){let e=()=>{S.destroy(),f(k(n))};if(typeof n.addEventListener==`function`){let t=n;t.addEventListener(`abort`,e,{once:!0}),S.once(`close`,()=>t.removeEventListener(`abort`,e))}else n.onabort=e}let C=i??a.requestTimeout;u.push(ve(S,f,a.connectionTimeout)),u.push(be(S,f,C,a.throwOnRequestTimeout,a.logger??console)),u.push(Ee(S,f,a.socketTimeout));let w=b.agent;typeof w==`object`&&`keepAlive`in w&&u.push(Ce(S,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs})),l=Oe(S,t,C,this.externalAgent).catch(e=>(u.forEach(A.clearTimeout),c(e)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:n,socketTimeout:r,socketAcquisitionWarningTimeout:i,httpAgent:a,httpsAgent:o,throwOnRequestTimeout:s,logger:c}=e||{};return{connectionTimeout:n,requestTimeout:t,socketTimeout:r,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:s,httpAgentProvider:async()=>{let{Agent:e,request:t}=await import(`node:http`);return Me=t,M=e,a instanceof M||typeof a?.destroy==`function`?(this.externalAgent=!0,a):new M({keepAlive:!0,maxSockets:50,...a})},httpsAgent:o instanceof x||typeof o?.destroy==`function`?(this.externalAgent=!0,o):new x({keepAlive:!0,maxSockets:50,...o}),logger:c}}}})),Fe,Ie,Le=e((()=>{t(),Fe=new Uint16Array(1),Ie=class{constructor(e){n(this,`id`,Fe[0]++),n(this,`total`,0),n(this,`max`,0),n(this,`session`,void 0),n(this,`refs`,0),e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error(`@smithy/node-http-handler - cannot acquire reference to destroyed session.`);this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(--this.refs,this.refs===0&&this.session.unref(),this.refs<0))throw Error(`@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.`)}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}}})),Re,ze,Be=e((()=>{Le(),t(),Re=Symbol.iterator,ze=class{constructor(e){n(this,`sessions`,[]),n(this,`maxConcurrency`,0),this.sessions=(e??[]).map(e=>new Ie(e))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e)for(let e of this.sessions)e.deref().destroyed&&this.remove(e)}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);t>-1&&this.sessions.splice(t,1)}[Re](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}})),Ve,He=e((()=>{Le(),Be(),t(),Ve=class{constructor(e){if(n(this,`config`,void 0),n(this,`connectionPools`,new Map),this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError(`maxConcurrency must be greater than zero.`)}lease(e,t){let n=this.getUrlString(e),r=this.getPool(n);if(!this.config.disableConcurrency&&!t.isEventStream){let e=r.poll();if(e)return e.retain(),e}let i=new Ie(S.connect(n)),a=i.deref();this.config.maxConcurrency&&a.settings({maxConcurrentStreams:this.config.maxConcurrency},t=>{if(t)throw Error(`Fail to set maxConcurrentStreams to `+this.config.maxConcurrency+`when creating new session for `+e.destination.toString())});let o=()=>{this.removeFromPoolAndClose(n,i)},s=()=>{this.removeFromPoolAndCheckedDestroy(n,i)};return a.on(`goaway`,o),a.on(`error`,s),a.on(`frameError`,s),a.on(`close`,s),t.requestTimeout&&a.setTimeout(t.requestTimeout,s),r.offerLast(i),i.retain(),i}release(e,t){t.free()}createIsolatedSession(e,t){let n=this.getUrlString(e),r=new Ie(S.connect(n)),i=r.deref();i.settings({maxConcurrentStreams:1});let a=()=>{r.destroy()};return i.on(`error`,a),i.on(`frameError`,a),i.on(`close`,a),t.requestTimeout&&i.setTimeout(t.requestTimeout,a),r.retain(),r}destroy(){for(let[e,t]of this.connectionPools){for(let e of[...t])e.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError(`maxConcurrentStreams must be greater than zero.`);this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}debug(){let e={};for(let[t,n]of this.connectionPools){let r=[];for(let e of n)r.push({id:e.id,active:e.useCount(),maxConcurrent:e.max,totalRequests:e.total});e[t]={sessions:r}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new ze;this.config.maxConcurrency&&t.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}}})),Ue,We=e((()=>{a(),m(),fe(),ge(),He(),je(),t(),Ue=class e{static create(t){return typeof t?.handle==`function`?t:new e(t)}constructor(e){n(this,`config`,void 0),n(this,`configProvider`,void 0),n(this,`metadata`,{handlerProtocol:`h2`}),n(this,`connectionManager`,new Ve({})),this.configProvider=new Promise((t,n)=>{typeof e==`function`?e().then(e=>{t(e||{})}).catch(n):t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n,isEventStream:i}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:e,maxConcurrentStreams:t}=this.config;this.connectionManager.setDisableConcurrentStreams(e??!1),t&&this.connectionManager.setMaxConcurrentStreams(t)}let{requestTimeout:a,disableConcurrentStreams:o}=this.config,s=o||i,c=n??a;return new Promise((n,a)=>{let o=!1,l,u=async e=>{await l,n(e)},d=async e=>{await l,a(e)};if(t?.aborted){o=!0,d(k(t));return}let{hostname:f,method:p,port:m,protocol:h,query:g}=e,_=``;(e.username!=null||e.password!=null)&&(_=`${e.username??``}:${e.password??``}@`);let v=`${h}//${_}${f}${m?`:${m}`:``}`,y={destination:new URL(v)},b={requestTimeout:this.config?.sessionTimeout,isEventStream:i},x=s?this.connectionManager.createIsolatedSession(y,b):this.connectionManager.lease(y,b),te=x.deref(),S=e=>{s&&x.destroy(),o=!0,d(e)},w=ee(g??{}),T=e.path;w&&(T+=`?${w}`),e.fragment&&(T+=`#${e.fragment}`);let E=te.request({...e.headers,[C.HTTP2_HEADER_PATH]:T,[C.HTTP2_HEADER_METHOD]:p});if(c&&E.setTimeout(c,()=>{E.close();let e=Error(`Stream timed out because of no activity for ${c} ms`);e.name=`TimeoutError`,S(e)}),t){let e=()=>{E.close(),S(k(t))};if(typeof t.addEventListener==`function`){let n=t;n.addEventListener(`abort`,e,{once:!0}),E.once(`close`,()=>n.removeEventListener(`abort`,e))}else t.onabort=e}E.on(`frameError`,(e,t,n)=>{S(Error(`Frame type id ${e} in stream id ${n} has failed with code ${t}.`))}),E.on(`error`,S),E.on(`aborted`,()=>{S(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${E.rstCode}.`))}),E.on(`response`,e=>{let t=new r({statusCode:e[`:status`]??-1,headers:he(e),body:E});o=!0,u({response:t}),s&&te.close()}),E.on(`close`,()=>{s?x.destroy():this.connectionManager.release(y,x),o||S(Error(`Unexpected error: http2 request did not get a response`))}),l=Oe(E,e,c)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}})),Ge,Ke=e((()=>{t(),Ge=class extends b{constructor(...e){super(...e),n(this,`bufferedBytes`,[])}_write(e,t,n){this.bufferedBytes.push(e),n()}}}));async function qe(e){let t=[],n=e.getReader(),r=!1,i=0;for(;!r;){let{done:e,value:a}=await n.read();a&&(t.push(a),i+=a.length),r=e}let a=new Uint8Array(i),o=0;for(let e of t)a.set(e,o),o+=e.length;return a}var Je,Ye,Xe=e((()=>{Ke(),Je=e=>Ye(e)?qe(e):new Promise((t,n)=>{let r=new Ge;e.pipe(r),e.on(`error`,e=>{r.end(),n(e)}),r.on(`error`,n),r.on(`finish`,function(){t(new Uint8Array(Buffer.concat(this.bufferedBytes)))})}),Ye=e=>typeof ReadableStream==`function`&&e instanceof ReadableStream})),Ze=e((()=>{Pe(),We(),Xe()}));function Qe(e,t){return new Request(e,t)}var $e=e((()=>{}));function et(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{let t=Error(`Request did not complete within ${e} ms`);t.name=`TimeoutError`,n(t)},e)})}var tt=e((()=>{}));function nt(e){let t=e&&typeof e==`object`&&`reason`in e?e.reason:void 0;if(t){if(t instanceof Error){let e=Error(`Request aborted`);return e.name=`AbortError`,e.cause=t,e}let e=Error(String(t));return e.name=`AbortError`,e}let n=Error(`Request aborted`);return n.name=`AbortError`,n}var rt,it,at=e((()=>{a(),m(),$e(),tt(),t(),rt={supported:void 0},it=class e{static create(t){return typeof t?.handle==`function`?t:new e(t)}constructor(e){n(this,`config`,void 0),n(this,`configProvider`,void 0),typeof e==`function`?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),rt.supported===void 0&&(rt.supported=typeof Request<`u`&&`keepalive`in Qe(`https://[::1]`))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let i=n??this.config.requestTimeout,a=this.config.keepAlive===!0,o=this.config.credentials;if(t?.aborted){let e=nt(t);return Promise.reject(e)}let s=e.path,c=ee(e.query||{});c&&(s+=`?${c}`),e.fragment&&(s+=`#${e.fragment}`);let l=``;(e.username!=null||e.password!=null)&&(l=`${e.username??``}:${e.password??``}@`);let{port:u,method:d}=e,f=`${e.protocol}//${l}${e.hostname}${u?`:${u}`:``}${s}`,p=d===`GET`||d===`HEAD`?void 0:e.body,m={body:p,headers:new Headers(e.headers),method:d,credentials:o};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex=`half`),typeof AbortController<`u`&&(m.signal=t),rt.supported&&(m.keepalive=a),typeof this.config.requestInit==`function`&&Object.assign(m,this.config.requestInit(e));let h=()=>{},g=Qe(f,m),_=[fetch(g).then(e=>{let t=e.headers,n={};for(let e of t.entries())n[e[0]]=e[1];return e.body==null?e.blob().then(t=>({response:new r({headers:n,reason:e.statusText,statusCode:e.status,body:t})})):{response:new r({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}}),et(i)];return t&&_.push(new Promise((e,n)=>{let r=()=>{n(nt(t))};if(typeof t.addEventListener==`function`){let e=t;e.addEventListener(`abort`,r,{once:!0}),h=()=>e.removeEventListener(`abort`,r)}else t.onabort=r})),Promise.race(_).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}}));async function ot(e){let t=T(await ct(e));return new Uint8Array(t)}async function st(e){let t=[],n=e.getReader(),r=!1,i=0;for(;!r;){let{done:e,value:a}=await n.read();a&&(t.push(a),i+=a.length),r=e}let a=new Uint8Array(i),o=0;for(let e of t)a.set(e,o),o+=e.length;return a}function ct(e){return new Promise((t,n)=>{let r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(Error(`Reader aborted too early`));let e=r.result??``,i=e.indexOf(`,`),a=i>-1?i+1:e.length;t(e.substring(a))},r.onabort=()=>n(Error(`Read aborted`)),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}var lt,ut=e((()=>{O(),lt=async e=>typeof Blob==`function`&&e instanceof Blob||e.constructor?.name===`Blob`?Blob.prototype.arrayBuffer===void 0?ot(e):new Uint8Array(await e.arrayBuffer()):st(e)})),dt=e((()=>{at(),ut()}));function ft(e){if(e.length%2!=0)throw Error(`Hex encoded strings must have an even number length`);let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){let r=e.slice(n,n+2).toLowerCase();if(r in ht)t[n/2]=ht[r];else throw Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function pt(e){let t=``;for(let n=0;n<e.byteLength;n++)t+=mt[e[n]];return t}var mt,ht,gt=e((()=>{mt={},ht={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),mt[e]=t,ht[t]=e}})),_t,vt,yt,bt=e((()=>{dt(),O(),gt(),p(),se(),_t=`The stream has already been transformed.`,vt=e=>{if(!yt(e)&&!oe(e)){let t=e?.__proto__?.constructor?.name||e;throw Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${t}`)}let t=!1,n=async()=>{if(t)throw Error(_t);return t=!0,await lt(e)},r=e=>{if(typeof e.stream!=`function`)throw Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
4
|
+
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return e.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{let t=await n();if(e===`base64`)return D(t);if(e===`hex`)return pt(t);if(e===void 0||e===`utf8`||e===`utf-8`)return u(t);if(typeof TextDecoder==`function`)return new TextDecoder(e).decode(t);throw Error(`TextDecoder is not available, please make sure polyfill is provided.`)},transformToWebStream:()=>{if(t)throw Error(_t);if(t=!0,yt(e))return r(e);if(oe(e))return e;throw Error(`Cannot transform payload to web stream, got ${e}`)}})},yt=e=>typeof Blob==`function`&&e instanceof Blob})),xt,St,Ct=e((()=>{Ze(),f(),bt(),xt=`The stream has already been transformed.`,St=e=>{if(!(e instanceof _))try{return vt(e)}catch{let t=e?.__proto__?.constructor?.name||e;throw Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${t}`)}let t=!1,n=async()=>{if(t)throw Error(xt);return t=!0,await Je(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{let t=await n();return e===void 0||Buffer.isEncoding(e)?c(t.buffer,t.byteOffset,t.byteLength).toString(e):new TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw Error(xt);if(e.readableFlowing!==null)throw Error(`The stream has been consumed by other callbacks.`);if(typeof _.toWeb!=`function`)throw Error(`Readable.toWeb() is not supported. Please ensure a polyfill is available.`);return t=!0,_.toWeb(e)}})}})),wt=e((()=>{})),Tt=e((()=>{ie(),ae(),ce(),le(),ue(),de(),Ct(),wt(),se()})),N,Et=e((()=>{Tt(),N=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return re.mutate(e);if(!e)return re.mutate(new Uint8Array);let n=t.streamCollector(e);return re.mutate(await n)}}));function Dt(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return`%`+e.charCodeAt(0).toString(16).toUpperCase()})}var Ot=e((()=>{})),P,kt=e((()=>{P=e=>typeof e==`function`?e():e})),At,jt=e((()=>{At=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i})})),Mt,F,Nt=e((()=>{a(),s(),jt(),Mt=e=>(t,n)=>async i=>{let{response:a}=await t(i),{operationSchema:s}=o(n),[,c,l,u,d,f]=s??[];try{return{response:a,output:await e.protocol.deserializeResponse(At(c,l,u,d,f),{...e,...n},a)}}catch(e){if(Object.defineProperty(e,`$response`,{value:a,enumerable:!1,writable:!1,configurable:!1}),!(`$metadata`in e)){let t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+=`
|
|
5
|
+
`+t}catch{!n.logger||n.logger?.constructor?.name===`NoOpLogger`?console.warn(t):n.logger?.warn?.(t)}e.$responseBodyText!==void 0&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(r.isInstance(a)){let{headers:t={}}=a,n=Object.entries(t);e.$metadata={httpStatusCode:a.statusCode,requestId:F(/^x-[\w-]+-request-?id$/,n),extendedRequestId:F(/^x-[\w-]+-id-2$/,n),cfId:F(/^x-[\w-]+-cf-id$/,n)}}}catch{}}throw e}},F=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1]})),Pt,Ft=e((()=>{g(),Pt=e=>{if(typeof e==`object`){if(`url`in e){let t=h(e.url);if(e.headers){t.headers={};for(let n in e.headers)t.headers[n.toLowerCase()]=e.headers[n].join(`, `)}return t}return e}return h(e)}})),It=e((()=>{Ft()})),Lt,Rt=e((()=>{It(),s(),jt(),Lt=e=>(t,n)=>async r=>{let{operationSchema:i}=o(n),[,a,s,c,l,u]=i??[],d=n.endpointV2?async()=>Pt(n.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(At(a,s,c,l,u),r.input,{...e,...n,endpoint:d});return t({...r,request:f})}}));function zt(e){return{applyToStack:t=>{t.add(Lt(e),Vt),t.add(Mt(e),Bt),e.protocol.setSerdeContext(e)}}}var Bt,Vt,Ht=e((()=>{Nt(),Rt(),Bt={name:`deserializerMiddleware`,step:`deserialize`,tags:[`DESERIALIZER`],override:!0},Vt={name:`serializerMiddleware`,step:`serialize`,tags:[`SERIALIZER`],override:!0}})),Ut,I,L=e((()=>{t(),Ut=Symbol.hasInstance,I=class{constructor(){n(this,`name`,void 0),n(this,`namespace`,void 0),n(this,`traits`,void 0)}static assign(e,t){return Object.assign(e,t)}static[Ut](e){let t=this.prototype.isPrototypeOf(e);return!t&&typeof e==`object`&&e?e.symbol===this.symbol:t}getName(){return this.namespace+`#`+this.name}}})),Wt,Gt=e((()=>{L(),t(),Wt=class e extends I{constructor(...t){super(...t),n(this,`name`,void 0),n(this,`traits`,void 0),n(this,`valueSchema`,void 0),n(this,`symbol`,e.symbol)}},n(Wt,`symbol`,Symbol.for(`@smithy/lis`))})),Kt,qt=e((()=>{L(),t(),Kt=class e extends I{constructor(...t){super(...t),n(this,`name`,void 0),n(this,`traits`,void 0),n(this,`keySchema`,void 0),n(this,`valueSchema`,void 0),n(this,`symbol`,e.symbol)}},n(Kt,`symbol`,Symbol.for(`@smithy/map`))})),Jt,Yt=e((()=>{L(),t(),Jt=class e extends I{constructor(...t){super(...t),n(this,`name`,void 0),n(this,`traits`,void 0),n(this,`input`,void 0),n(this,`output`,void 0),n(this,`symbol`,e.symbol)}},n(Jt,`symbol`,Symbol.for(`@smithy/ope`))})),Xt,Zt=e((()=>{L(),t(),Xt=class e extends I{constructor(...t){super(...t),n(this,`name`,void 0),n(this,`traits`,void 0),n(this,`memberNames`,void 0),n(this,`memberList`,void 0),n(this,`symbol`,e.symbol)}},n(Xt,`symbol`,Symbol.for(`@smithy/str`))})),Qt,$t=e((()=>{Zt(),t(),Qt=class e extends Xt{constructor(...t){super(...t),n(this,`ctor`,void 0),n(this,`symbol`,e.symbol)}},n(Qt,`symbol`,Symbol.for(`@smithy/err`))}));function R(e){if(typeof e==`object`)return e;if(e|=0,en[e])return en[e];let t={},n=0;for(let r of[`httpLabel`,`idempotent`,`idempotencyToken`,`sensitive`,`httpPayload`,`httpResponseCode`,`httpQueryParams`])(e>>n++&1)==1&&(t[r]=1);return en[e]=t}var en,tn=e((()=>{en=[]}));function z(e,t){return e instanceof V?Object.assign(e,{memberName:t,_isMemberSchema:!0}):new V(e,t)}var nn,B,rn,an,V,H,on,sn=e((()=>{kt(),tn(),t(),B={it:Symbol.for(`@smithy/nor-struct-it`),ns:Symbol.for(`@smithy/ns`)},rn=[],an={},nn=Symbol.hasInstance,V=class e{constructor(t,r){n(this,`ref`,void 0),n(this,`memberName`,void 0),n(this,`symbol`,e.symbol),n(this,`name`,void 0),n(this,`schema`,void 0),n(this,`_isMemberSchema`,void 0),n(this,`traits`,void 0),n(this,`memberTraits`,void 0),n(this,`normalizedTraits`,void 0),this.ref=t,this.memberName=r;let i=[],a=t,o=t;for(this._isMemberSchema=!1;H(a);)i.push(a[1]),a=a[0],o=P(a),this._isMemberSchema=!0;if(i.length>0){this.memberTraits={};for(let e=i.length-1;e>=0;--e){let t=i[e];Object.assign(this.memberTraits,R(t))}}else this.memberTraits=0;if(o instanceof e){let e=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},e,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=P(o),on(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[nn](e){let t=this.prototype.isPrototypeOf(e);return!t&&typeof e==`object`&&e?e.symbol===this.symbol:t}static of(t){let n=typeof t==`function`||typeof t==`object`&&!!t;if(typeof t==`number`){if(rn[t])return rn[t]}else if(typeof t==`string`){if(an[t])return an[t]}else if(n&&t[B.ns])return t[B.ns];let r=P(t);if(r instanceof e)return r;if(H(r)){let[n,i]=r;if(n instanceof e)return Object.assign(n.getMergedTraits(),R(i)),n;throw Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}let i=new e(r);return n?t[B.ns]=i:typeof r==`string`?an[r]=i:typeof r==`number`?rn[r]=i:i}getSchema(){let e=this.schema;return Array.isArray(e)&&e[0]===0?e[4]:e}getName(e=!1){let{name:t}=this;return!e&&t&&t.includes(`#`)?t.split(`#`)[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let e=this.getSchema();return typeof e==`number`?e>=64&&e<128:e[0]===1}isMapSchema(){let e=this.getSchema();return typeof e==`number`?e>=128&&e<=255:e[0]===2}isStructSchema(){let e=this.getSchema();if(typeof e!=`object`)return!1;let t=e[0];return t===3||t===-3||t===4}isUnionSchema(){let e=this.getSchema();return typeof e==`object`?e[0]===4:!1}isBlobSchema(){let e=this.getSchema();return e===21||e===42}isTimestampSchema(){let e=this.getSchema();return typeof e==`number`&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()===`unit`}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return R(this.memberTraits)}getOwnTraits(){return R(this.traits)}getKeySchema(){let[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let n=this.getSchema();return z([e?15:n[4]??0,0],`key`)}getValueSchema(){let e=this.getSchema(),[t,n,r]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof e==`number`?63&e:e&&typeof e==`object`&&(n||r)?e[3+e[0]]:t?15:void 0;if(i!=null)return z([i,0],n?`value`:`member`);throw Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){let t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){let n=t[4].indexOf(e),r=t[5][n];return z(H(r)?r:[r,0],e)}if(this.isDocumentSchema())return z([15,0],e);throw Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){let e={};try{for(let[t,n]of this.structIterator())e[t]=n}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(let[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e}return``}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw Error(`@smithy/core/schema - cannot iterate non-struct schema.`);let e=this.getSchema(),t=e[4].length,n=e[B.it];if(n&&t===n.length){yield*n;return}n=Array(t);for(let r=0;r<t;++r){let t=e[4][r],i=z([e[5][r],0],t);yield n[r]=[t,i]}e[B.it]=n}},n(V,`symbol`,Symbol.for(`@smithy/nor`)),H=e=>Array.isArray(e)&&e.length===2,on=e=>Array.isArray(e)&&e.length>=5})),cn,ln=e((()=>{L(),t(),cn=class e extends I{constructor(...t){super(...t),n(this,`name`,void 0),n(this,`schemaRef`,void 0),n(this,`traits`,void 0),n(this,`symbol`,e.symbol)}},n(cn,`symbol`,Symbol.for(`@smithy/sim`))})),un=e((()=>{})),dn,fn=e((()=>{t(),dn=class e{constructor(e,t=new Map,r=new Map){n(this,`namespace`,void 0),n(this,`schemas`,void 0),n(this,`exceptions`,void 0),this.namespace=e,this.schemas=t,this.exceptions=r}static for(t){return e.registries.has(t)||e.registries.set(t,new e(t)),e.registries.get(t)}copyFrom(e){let{schemas:t,exceptions:n}=this;for(let[n,r]of e.schemas)t.has(n)||t.set(n,r);for(let[t,r]of e.exceptions)n.has(t)||n.set(t,r)}register(t,n){let r=this.normalizeShapeId(t);for(let t of[this,e.for(r.split(`#`)[0])])t.schemas.set(r,n)}getSchema(e){let t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(t,n){let r=t,i=r[1];for(let t of[this,e.for(i)])t.schemas.set(i+`#`+r[2],r),t.exceptions.set(r,n)}getErrorCtor(t){let n=t;return this.exceptions.has(n)?this.exceptions.get(n):e.for(n[1]).exceptions.get(n)}getBaseException(){for(let e of this.exceptions.keys())if(Array.isArray(e)){let[,t,n]=e,r=t+`#`+n;if(r.startsWith(`smithy.ts.sdk.synthetic.`)&&r.endsWith(`ServiceException`))return e}}find(e){for(let t of this.schemas.values())if(e(t))return t}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes(`#`)?e:this.namespace+`#`+e}},n(dn,`registries`,new Map)})),U=e((()=>{kt(),Ht(),Gt(),qt(),Yt(),jt(),$t(),sn(),L(),ln(),Zt(),un(),tn(),fn()})),pn=e((()=>{})),mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,W,G,Tn,En,Dn,On=e((()=>{mn=e=>{if(e!=null){if(typeof e==`string`){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Dn.warn(En(`Expected number but observed string: ${e}`)),t}if(typeof e==`number`)return e;throw TypeError(`Expected number, got ${typeof e}: ${e}`)}},hn=Math.ceil(2**127*(2-2**-23)),gn=e=>{let t=mn(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>hn)throw TypeError(`Expected 32-bit float, got ${e}`);return t},_n=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw TypeError(`Expected integer, got ${typeof e}: ${e}`)}},vn=e=>bn(e,16),yn=e=>bn(e,8),bn=(e,t)=>{let n=_n(e);if(n!==void 0&&xn(n,t)!==n)throw TypeError(`Expected ${t}-bit integer, got ${e}`);return n},xn=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Sn=e=>mn(typeof e==`string`?W(e):e),Cn=e=>gn(typeof e==`string`?W(e):e),wn=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,W=e=>{let t=e.match(wn);if(t===null||t[0].length!==e.length)throw TypeError(`Expected real number, got implicit NaN`);return parseFloat(e)},G=e=>vn(typeof e==`string`?W(e):e),Tn=e=>yn(typeof e==`string`?W(e):e),En=e=>String(TypeError(e).stack||e).split(`
|
|
6
|
+
`).slice(0,5).filter(e=>!e.includes(`stackTraceWarning`)).join(`
|
|
7
|
+
`),Dn={warn:console.warn}}));function kn(e){let t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),a=e.getUTCHours(),o=e.getUTCMinutes(),s=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,l=a<10?`0${a}`:`${a}`,u=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`;return`${An[r]}, ${c} ${jn[n]} ${t} ${l}:${u}:${d} GMT`}var An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,K,Vn,Hn,Un,Wn,Gn,Kn,qn,q,Jn,Yn,J,Xn=e((()=>{On(),An=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],jn=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Mn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Nn=e=>{if(e==null)return;if(typeof e!=`string`)throw TypeError(`RFC-3339 date-times must be expressed as strings`);let t=Mn.exec(e);if(!t)throw TypeError(`Invalid RFC-3339 date-time value`);let[n,r,i,a,o,s,c,l]=t;return K(G(J(r)),q(i,`month`,1,12),q(a,`day`,1,31),{hours:o,minutes:s,seconds:c,fractionalMilliseconds:l})},Pn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Fn=e=>{if(e==null)return;if(typeof e!=`string`)throw TypeError(`RFC-3339 date-times must be expressed as strings`);let t=Pn.exec(e);if(!t)throw TypeError(`Invalid RFC-3339 date-time value`);let[n,r,i,a,o,s,c,l,u]=t,d=K(G(J(r)),q(i,`month`,1,12),q(a,`day`,1,31),{hours:o,minutes:s,seconds:c,fractionalMilliseconds:l});return u.toUpperCase()!=`Z`&&d.setTime(d.getTime()-Yn(u)),d},In=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ln=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Rn=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),zn=e=>{if(e==null)return;if(typeof e!=`string`)throw TypeError(`RFC-7231 date-times must be expressed as strings`);let t=In.exec(e);if(t){let[e,n,r,i,a,o,s,c]=t;return K(G(J(i)),Wn(r),q(n,`day`,1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:c})}if(t=Ln.exec(e),t){let[e,n,r,i,a,o,s,c]=t;return Un(K(Vn(i),Wn(r),q(n,`day`,1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:c}))}if(t=Rn.exec(e),t){let[e,n,r,i,a,o,s,c]=t;return K(G(J(c)),Wn(n),q(r.trimLeft(),`day`,1,31),{hours:i,minutes:a,seconds:o,fractionalMilliseconds:s})}throw TypeError(`Invalid RFC-7231 date-time value`)},Bn=e=>{if(e==null)return;let t;if(typeof e==`number`)t=e;else if(typeof e==`string`)t=Sn(e);else if(typeof e==`object`&&e.tag===1)t=e.value;else throw TypeError(`Epoch timestamps must be expressed as floating point numbers or their string representation`);if(Number.isNaN(t)||t===1/0||t===-1/0)throw TypeError(`Epoch timestamps must be valid, non-Infinite, non-NaN numerics`);return new Date(Math.round(t*1e3))},K=(e,t,n,r)=>{let i=t-1;return Kn(e,i,n),new Date(Date.UTC(e,i,n,q(r.hours,`hour`,0,23),q(r.minutes,`minute`,0,59),q(r.seconds,`seconds`,0,60),Jn(r.fractionalMilliseconds)))},Vn=e=>{let t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+G(J(e));return n<t?n+100:n},Hn=50*365*24*60*60*1e3,Un=e=>e.getTime()-new Date().getTime()>Hn?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Wn=e=>{let t=jn.indexOf(e);if(t<0)throw TypeError(`Invalid month: ${e}`);return t+1},Gn=[31,28,31,30,31,30,31,31,30,31,30,31],Kn=(e,t,n)=>{let r=Gn[t];if(t===1&&qn(e)&&(r=29),n>r)throw TypeError(`Invalid day for ${jn[t]} in ${e}: ${n}`)},qn=e=>e%4==0&&(e%100!=0||e%400==0),q=(e,t,n,r)=>{let i=Tn(J(e));if(i<n||i>r)throw TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},Jn=e=>e==null?0:Cn(`0.`+e)*1e3,Yn=e=>{let t=e[0],n=1;if(t==`+`)n=1;else if(t==`-`)n=-1;else throw TypeError(`Offset direction, ${t}, must be "+" or "-"`);let r=Number(e.substring(1,3)),i=Number(e.substring(4,6));return n*(r*60+i)*60*1e3},J=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)===`0`;)t++;return t===0?e:e.slice(t)}})),Zn,Qn=e((()=>{Zn=v.randomUUID.bind(v)})),Y,$n,er=e((()=>{Qn(),Y=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`)),$n=()=>{if(Zn)return Zn();let e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Y[e[0]]+Y[e[1]]+Y[e[2]]+Y[e[3]]+`-`+Y[e[4]]+Y[e[5]]+`-`+Y[e[6]]+Y[e[7]]+`-`+Y[e[8]]+Y[e[9]]+`-`+Y[e[10]]+Y[e[11]]+Y[e[12]]+Y[e[13]]+Y[e[14]]+Y[e[15]]}})),tr=e((()=>{er()})),nr=e((()=>{tr()})),X,rr=e((()=>{X=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})},X.from=e=>e&&typeof e==`object`&&(e instanceof X||`deserializeJSON`in e)?e:typeof e==`string`||Object.getPrototypeOf(e)===String.prototype?X(String(e)):X(JSON.stringify(e)),X.fromObject=X.from}));function ir(e){return(e.includes(`,`)||e.includes(`"`))&&(e=`"${e.replace(/"/g,`\\"`)}"`),e}var ar=e((()=>{}));function Z(e,t,n){let r=Number(e);if(r<t||r>n)throw Error(`Value ${r} out of range [${t}, ${n}]`)}var or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr=e((()=>{or=`(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`,sr=`(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`,cr=`(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`,lr=`(\\d?\\d)`,ur=`(\\d{4})`,dr=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),fr=RegExp(`^${or}, ${lr} ${sr} ${ur} ${cr} GMT$`),pr=RegExp(`^${or}, ${lr}-${sr}-(\\d\\d) ${cr} GMT$`),mr=RegExp(`^${or} ${sr} ( [1-9]|\\d\\d) ${cr} ${ur}$`),hr=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],gr=e=>{if(e==null)return;let t=NaN;if(typeof e==`number`)t=e;else if(typeof e==`string`){if(!/^-?\d*\.?\d+$/.test(e))throw TypeError(`parseEpochTimestamp - numeric string invalid.`);t=Number.parseFloat(e)}else typeof e==`object`&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw TypeError(`Epoch timestamps must be valid finite numbers.`);return new Date(Math.round(t*1e3))},_r=e=>{if(e==null)return;if(typeof e!=`string`)throw TypeError(`RFC3339 timestamps must be strings`);let t=dr.exec(e);if(!t)throw TypeError(`Invalid RFC3339 timestamp format ${e}`);let[,n,r,i,a,o,s,,c,l]=t;Z(r,1,12),Z(i,1,31),Z(a,0,23),Z(o,0,59),Z(s,0,60);let u=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(a),Number(o),Number(s),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(u.setUTCFullYear(Number(n)),l.toUpperCase()!=`Z`){let[,e,t,n]=/([+-])(\d\d):(\d\d)/.exec(l)||[void 0,`+`,0,0],r=e===`-`?1:-1;u.setTime(u.getTime()+r*(Number(t)*60*60*1e3+Number(n)*60*1e3))}return u},vr=e=>{if(e==null)return;if(typeof e!=`string`)throw TypeError(`RFC7231 timestamps must be strings.`);let t,n,r,i,a,o,s,c;if((c=fr.exec(e))?[,t,n,r,i,a,o,s]=c:(c=pr.exec(e))?([,t,n,r,i,a,o,s]=c,r=(Number(r)+1900).toString()):(c=mr.exec(e))&&([,n,t,i,a,o,s,r]=c),r&&o){let e=Date.UTC(Number(r),hr.indexOf(n),Number(t),Number(i),Number(a),Number(o),s?Math.round(parseFloat(`0.${s}`)*1e3):0);Z(t,1,31),Z(i,0,23),Z(a,0,59),Z(o,0,60);let c=new Date(e);return c.setUTCFullYear(Number(r)),c}throw TypeError(`Invalid RFC7231 date-time value ${e}.`)}}));function br(e,t,n){if(n<=0||!Number.isInteger(n))throw Error(`Invalid number of delimiters (`+n+`) for splitEvery.`);let r=e.split(t);if(n===1)return r;let i=[],a=``;for(let e=0;e<r.length;e++)a===``?a=r[e]:a+=t+r[e],(e+1)%n===0&&(i.push(a),a=``);return a!==``&&i.push(a),i}var xr=e((()=>{})),Sr,Cr=e((()=>{Sr=e=>{let t=e.length,n=[],r=!1,i,a=0;for(let o=0;o<t;++o){let t=e[o];switch(t){case`"`:i!==`\\`&&(r=!r);break;case`,`:r||(n.push(e.slice(a,o)),a=o+1);break;default:}i=t}return n.push(e.slice(a)),n.map(e=>{e=e.trim();let t=e.length;return t<2?e:(e[0]===`"`&&e[t-1]===`"`&&(e=e.slice(1,t-1)),e.replace(/\\"/g,`"`))})}})),wr,Tr,Er,Dr=e((()=>{t(),Tr=/^-?\d*(\.\d+)?$/,wr=Symbol.hasInstance,Er=class e{constructor(e,t){if(n(this,`string`,void 0),n(this,`type`,void 0),this.string=e,this.type=t,!Tr.test(e))throw Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`)}toString(){return this.string}static[wr](t){if(!t||typeof t!=`object`)return!1;let n=t;return e.prototype.isPrototypeOf(t)||n.type===`bigDecimal`&&Tr.test(n.string)}}})),Or=e((()=>{pn(),Xn(),nr(),rr(),On(),ar(),yr(),xr(),Cr(),Dr()})),Q,$=e((()=>{t(),Q=class{constructor(){n(this,`serdeContext`,void 0)}setSerdeContext(e){this.serdeContext=e}}})),kr,Ar=e((()=>{U(),a(),$(),t(),kr=class extends Q{constructor(e){super(),n(this,`options`,void 0),n(this,`compositeErrorRegistry`,void 0),this.options=e,this.compositeErrorRegistry=dn.for(e.defaultNamespace);for(let t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return i}getResponseType(){return r}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if(`url`in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(let[n,r]of t.url.searchParams.entries())e.query[n]=r;if(t.headers)for(let n in t.headers)e.headers[n]=t.headers[n].join(`, `);return e}else{if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(let n in t.headers)e.headers[n]=t.headers[n];return e}}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix)return;let r=V.of(t.input),i=R(t.traits??{});if(i.endpoint){let t=i.endpoint?.[0];if(typeof t==`string`){for(let[e,i]of r.structIterator()){if(!i.getMergedTraits().hostLabel)continue;let r=n[e];if(typeof r!=`string`)throw Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,r)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers[`x-amzn-requestid`]??e.headers[`x-amzn-request-id`]??e.headers[`x-amz-request-id`],extendedRequestId:e.headers[`x-amz-id-2`],cfId:e.headers[`x-amz-cf-id`]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){let{EventStreamSerde:e}=await import(`./event-streams-BumpU1aB.js`);return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,n,r,i){return[]}getEventStreamMarshaller(){let e=this.serdeContext;if(!e.eventStreamMarshaller)throw Error(`@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.`);return e.eventStreamMarshaller}}})),jr,Mr=e((()=>{U(),Or(),a(),Tt(),Et(),Ot(),Ar(),jr=class extends kr{async serializeRequest(e,t,n){let r=t&&typeof t==`object`?t:{},a=this.serializer,o={},s={},c=await n.endpoint(),l=V.of(e?.input),u=[],d=[],f=!1,p,m=new i({protocol:``,hostname:``,port:void 0,path:``,fragment:void 0,query:o,headers:s,body:void 0});if(c){this.updateServiceEndpoint(m,c),this.setHostPrefix(m,e,r);let t=R(e.traits);if(t.http){m.method=t.http[0];let[e,n]=t.http[1].split(`?`);m.path==`/`?m.path=e:m.path+=e;let r=new URLSearchParams(n??``);for(let[e,t]of r)o[e]=t}}for(let[e,t]of l.structIterator()){let n=t.getMergedTraits()??{},i=r[e];if(i==null&&!t.isIdempotencyToken()){if(n.httpLabel&&(m.path.includes(`{${e}+}`)||m.path.includes(`{${e}}`)))throw Error(`No value provided for input HTTP label: ${e}.`);continue}if(n.httpPayload)t.isStreaming()?t.isStructSchema()?r[e]&&(p=await this.serializeEventStream({eventStream:r[e],requestSchema:l})):p=i:(a.write(t,i),p=a.flush());else if(n.httpLabel){a.write(t,i);let n=a.flush();m.path.includes(`{${e}+}`)?m.path=m.path.replace(`{${e}+}`,n.split(`/`).map(Dt).join(`/`)):m.path.includes(`{${e}}`)&&(m.path=m.path.replace(`{${e}}`,Dt(n)))}else if(n.httpHeader)a.write(t,i),s[n.httpHeader.toLowerCase()]=String(a.flush());else if(typeof n.httpPrefixHeaders==`string`)for(let e in i){let r=i[e],o=n.httpPrefixHeaders+e;a.write([t.getValueSchema(),{httpHeader:o}],r),s[o.toLowerCase()]=a.flush()}else n.httpQuery||n.httpQueryParams?this.serializeQuery(t,i,o):(f=!0,u.push(e),d.push(t))}if(f&&r){let[e,t]=(l.getName(!0)??`#Unknown`).split(`#`),n=l.getSchema()[6],i=[3,e,t,l.getMergedTraits(),u,d,void 0];n?i[6]=n:i.pop(),a.write(i,r),p=a.flush()}return m.headers=s,m.query=o,m.body=p,m}serializeQuery(e,t,n){let r=this.serializer,i=e.getMergedTraits();if(i.httpQueryParams){for(let r in t)if(!(r in n)){let a=t[r],o=e.getValueSchema();Object.assign(o.getMergedTraits(),{...i,httpQuery:r,httpQueryParams:void 0}),this.serializeQuery(o,a,n)}return}if(e.isListSchema()){let a=!!e.getMergedTraits().sparse,o=[];for(let n of t){r.write([e.getValueSchema(),i],n);let t=r.flush();(a||t!==void 0)&&o.push(t)}n[i.httpQuery]=o}else r.write([e,i],t),n[i.httpQuery]=r.flush()}async deserializeResponse(e,t,n){let r=this.deserializer,i=V.of(e.output),a={};if(n.statusCode>=300){let i=await N(n.body,t);throw i.byteLength>0&&Object.assign(a,await r.read(15,i)),await this.handleError(e,t,n,a,this.deserializeMetadata(n)),Error(`@smithy/core/protocols - HTTP Protocol error handler failed to throw.`)}for(let e in n.headers){let t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}let o=await this.deserializeHttpMessage(i,t,n,a);if(o.length){let e=await N(n.body,t);if(e.byteLength>0){let t=await r.read(i,e);for(let e of o)t[e]!=null&&(a[e]=t[e])}}else o.discardResponseBody&&await N(n.body,t);return a.$metadata=this.deserializeMetadata(n),a}async deserializeHttpMessage(e,t,n,r,i){let a;a=r instanceof Set?i:r;let o=!0,s=this.deserializer,c=V.of(e),l=[];for(let[e,r]of c.structIterator()){let i=r.getMemberTraits();if(i.httpPayload){if(o=!1,r.isStreaming())r.isStructSchema()?a[e]=await this.deserializeEventStream({response:n,responseSchema:c}):a[e]=St(n.body);else if(n.body){let i=await N(n.body,t);i.byteLength>0&&(a[e]=await s.read(r,i))}}else if(i.httpHeader){let t=String(i.httpHeader).toLowerCase(),o=n.headers[t];if(o!=null)if(r.isListSchema()){let n=r.getValueSchema();n.getMergedTraits().httpHeader=t;let i;i=n.isTimestampSchema()&&n.getSchema()===4?br(o,`,`,2):Sr(o);let c=[];for(let e of i)c.push(await s.read(n,e.trim()));a[e]=c}else a[e]=await s.read(r,o)}else if(i.httpPrefixHeaders!==void 0){a[e]={};for(let t in n.headers)if(t.startsWith(i.httpPrefixHeaders)){let o=n.headers[t],c=r.getValueSchema();c.getMergedTraits().httpHeader=t,a[e][t.slice(i.httpPrefixHeaders.length)]=await s.read(c,o)}}else i.httpResponseCode?a[e]=n.statusCode:l.push(e)}return l.discardResponseBody=o,l}}})),Nr,Pr=e((()=>{U(),a(),Et(),Ar(),Nr=class extends kr{async serializeRequest(e,t,n){let r=this.serializer,a={},o={},s=await n.endpoint(),c=V.of(e?.input),l=c.getSchema(),u,d=t&&typeof t==`object`?t:{},f=new i({protocol:``,hostname:``,port:void 0,path:`/`,fragment:void 0,query:a,headers:o,body:void 0});if(s&&(this.updateServiceEndpoint(f,s),this.setHostPrefix(f,e,d)),d){let e=c.getEventStreamMember();if(e){if(d[e]){let t={};for(let[n,i]of c.structIterator())n!==e&&d[n]&&(r.write(i,d[n]),t[n]=r.flush());u=await this.serializeEventStream({eventStream:d[e],requestSchema:c,initialRequest:t})}}else r.write(l,d),u=r.flush()}return f.headers=Object.assign(f.headers,o),f.query=a,f.body=u,f.method=`POST`,f}async deserializeResponse(e,t,n){let r=this.deserializer,i=V.of(e.output),a={};if(n.statusCode>=300){let i=await N(n.body,t);throw i.byteLength>0&&Object.assign(a,await r.read(15,i)),await this.handleError(e,t,n,a,this.deserializeMetadata(n)),Error(`@smithy/core/protocols - RPC Protocol error handler failed to throw.`)}for(let e in n.headers){let t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}let o=i.getEventStreamMember();if(o)a[o]=await this.deserializeEventStream({response:n,responseSchema:i,initialResponseContainer:a});else{let e=await N(n.body,t);e.byteLength>0&&Object.assign(a,await r.read(i,e))}return a.$metadata=this.deserializeMetadata(n),a}}})),Fr=e((()=>{})),Ir=e((()=>{}));function Lr(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();let{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:a}=e.getMergedTraits();return(t.httpBindings?typeof r==`string`||i?6:a||n?5:void 0:void 0)??t.timestampFormat.default}var Rr=e((()=>{})),zr,Br=e((()=>{U(),Or(),O(),p(),$(),Rr(),t(),zr=class extends Q{constructor(e){super(),n(this,`settings`,void 0),this.settings=e}read(e,t){let n=V.of(e);if(n.isListSchema())return Sr(t).map(e=>this.read(n.getValueSchema(),e));if(n.isBlobSchema())return(this.serdeContext?.base64Decoder??T)(t);if(n.isTimestampSchema())switch(Lr(n,this.settings)){case 5:return _r(t);case 6:return vr(t);case 7:return gr(t);default:return console.warn(`Missing timestamp format, parsing value with Date constructor:`,t),new Date(t)}if(n.isStringSchema()){let e=n.getMergedTraits().mediaType,r=t;if(e)return n.getMergedTraits().httpHeader&&(r=this.base64ToUtf8(r)),(e===`application/json`||e.endsWith(`+json`))&&(r=X.from(r)),r}return n.isNumericSchema()?Number(t):n.isBigIntegerSchema()?BigInt(t):n.isBigDecimalSchema()?new Er(t,`bigDecimal`):n.isBooleanSchema()?String(t).toLowerCase()===`true`:t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??u)((this.serdeContext?.base64Decoder??T)(e))}}})),Vr,Hr=e((()=>{U(),p(),$(),Br(),t(),Vr=class extends Q{constructor(e,t){super(),n(this,`codecDeserializer`,void 0),n(this,`stringDeserializer`,void 0),this.codecDeserializer=e,this.stringDeserializer=new zr(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){let n=V.of(e),r=n.getMergedTraits(),i=this.serdeContext?.utf8Encoder??u;if(r.httpHeader||r.httpResponseCode)return this.stringDeserializer.read(n,i(t));if(r.httpPayload){if(n.isBlobSchema()){let e=this.serdeContext?.utf8Decoder??l;return typeof t==`string`?e(t):t}else if(n.isStringSchema())return`byteLength`in t?i(t):t}return this.codecDeserializer.read(n,t)}}})),Ur,Wr=e((()=>{U(),Or(),O(),$(),Rr(),t(),Ur=class extends Q{constructor(e){super(),n(this,`settings`,void 0),n(this,`stringBuffer`,``),this.settings=e}write(e,t){let n=V.of(e);switch(typeof t){case`object`:if(t===null){this.stringBuffer=`null`;return}if(n.isTimestampSchema()){if(!(t instanceof Date))throw Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${n.getName(!0)}`);switch(Lr(n,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(`.000Z`,`Z`);break;case 6:this.stringBuffer=kn(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn(`Missing timestamp format, using epoch seconds`,t),this.stringBuffer=String(t.getTime()/1e3)}return}if(n.isBlobSchema()&&`byteLength`in t){this.stringBuffer=(this.serdeContext?.base64Encoder??D)(t);return}if(n.isListSchema()&&Array.isArray(t)){let e=``;for(let r of t){this.write([n.getValueSchema(),n.getMergedTraits()],r);let t=this.flush(),i=n.getValueSchema().isTimestampSchema()?t:ir(t);e!==``&&(e+=`, `),e+=i}this.stringBuffer=e;return}this.stringBuffer=JSON.stringify(t,null,2);break;case`string`:let e=n.getMergedTraits().mediaType,r=t;if(e&&((e===`application/json`||e.endsWith(`+json`))&&(r=X.from(r)),n.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??D)(r.toString());return}this.stringBuffer=t;break;default:n.isIdempotencyToken()?this.stringBuffer=$n():this.stringBuffer=String(t)}}flush(){let e=this.stringBuffer;return this.stringBuffer=``,e}}})),Gr,Kr=e((()=>{U(),Wr(),t(),Gr=class{constructor(e,t,r=new Ur(t)){n(this,`codecSerializer`,void 0),n(this,`stringSerializer`,void 0),n(this,`buffer`,void 0),this.codecSerializer=e,this.stringSerializer=r}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){let n=V.of(e),r=n.getMergedTraits();if(r.httpHeader||r.httpLabel||r.httpQuery){this.stringSerializer.write(n,t),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(n,t)}flush(){if(this.buffer!==void 0){let e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}})),qr=e((()=>{Et(),Ot(),Mr(),Ar(),Pr(),Ir(),Fr(),Br(),Hr(),Kr(),Wr(),Rr(),$()}));export{dt as A,Dt as C,ft as D,St as E,Ue as F,Ne as I,O as L,it as M,Ze as N,gt as O,Je as P,D as R,P as S,Tt as T,zn as _,Lr as a,V as b,Or as c,tr as d,$n as f,Fn as g,Nn as h,zr as i,lt as j,pt as k,Er as l,Bn as m,Gr as n,Nr as o,kn as p,Vr as r,jr as s,qr as t,X as u,U as v,N as w,zt as x,dn as y,T as z};
|