claude-code-best 2.7.2 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/chunks/{AddWorkspaceDirectory-V2tF7iCY.js → AddWorkspaceDirectory-CNyPaerF.js} +1 -1
- package/dist/chunks/{App-DLdRpU7c.js → App-hiKxO6UA.js} +1 -1
- package/dist/chunks/{ApproveApiKey-DPws3jax.js → ApproveApiKey-Cd43j9Wa.js} +1 -1
- package/dist/chunks/ApproveApiKey-DUoUTxFp.js +1 -0
- package/dist/chunks/{AssistantSessionChooser-D6rS0OVe.js → AssistantSessionChooser-C8OxwSGM.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-hGlbm5z5.js → BackgroundTasksDialog-VKhuyQLe.js} +2 -2
- package/dist/chunks/{BypassPermissionsModeDialog-CuEpdRVd.js → BypassPermissionsModeDialog-Ddjzluka.js} +1 -1
- package/dist/chunks/{ClaudeInChromeOnboarding-CTTKMRbt.js → ClaudeInChromeOnboarding-BhvrEJlm.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-COO2W0ij.js +1 -0
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-B-GkVoA_.js → ClaudeMdExternalIncludesDialog-DoNd72PS.js} +1 -1
- package/dist/chunks/ConsoleOAuthFlow-CPWq7O57.js +1 -0
- package/dist/chunks/{DesktopHandoff-BjPylhOT.js → DesktopHandoff-DVUOZjb0.js} +1 -1
- package/dist/chunks/{DevChannelsDialog-c4YVqBX9.js → DevChannelsDialog-DJbRHAIy.js} +1 -1
- package/dist/chunks/{DiffDialog-I5wuXw2C.js → DiffDialog-D0RK4t-9.js} +2 -2
- package/dist/chunks/{Doctor-Cr_MlSPc.js → Doctor-0Nv3L1Oy.js} +1 -1
- package/dist/chunks/Doctor-Ba9zhV0V.js +1 -0
- package/dist/chunks/{ExitFlow-Bz5grDWv.js → ExitFlow-BPbtGcEg.js} +1 -1
- package/dist/chunks/{Feedback-COgMI5tY.js → Feedback-BSagYjmf.js} +1 -1
- package/dist/chunks/{Grove-m57x4tY1.js → Grove-BrP9JNpK.js} +1 -1
- package/dist/chunks/Grove-DyvIToPa.js +1 -0
- package/dist/chunks/{HybridTransport-Bok4-Ptt.js → HybridTransport-DLaxmXCR.js} +1 -1
- package/dist/chunks/{ITermBackend-BBSP-NNa.js → ITermBackend-tXN55G2D.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-uTSuSBvO.js → InvalidConfigDialog-BzFQdfwu.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-B-Os12-H.js → InvalidSettingsDialog-KFg61s41.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-y97Inszc.js → MCPConnectionManager-N-oJu3qn.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-DMFUZw92.js → McpParsingWarnings-DsHSSgsx.js} +1 -1
- package/dist/chunks/{MessageSelector-DwdAC2io.js → MessageSelector-D10JMnsc.js} +1 -1
- package/dist/chunks/Messages-CQdQJ2AA.js +11 -0
- package/dist/chunks/{Onboarding-B8qMJaBh.js → Onboarding-DBJX6Cnf.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-DnFv5z-z.js → OverageCreditUpsell-B4beCEX2.js} +1 -1
- package/dist/chunks/{PluginSettings-B_xVgTTp.js → PluginSettings-BBrFCSpQ.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-DhIQ0Nge.js → PromptInputFooterSuggestions-DAFZfAT0.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-CoMkWchC.js → PromptInputHelpMenu-Bjjr3tYl.js} +1 -1
- package/dist/chunks/{QueryEngine-C7r7O-hH.js → QueryEngine-BSk8-8vB.js} +1 -1
- package/dist/chunks/{REPL-CmJdJrGO.js → REPL-CXcCBQuz.js} +13 -13
- package/dist/chunks/REPL-D-akKdFc.js +1 -0
- package/dist/chunks/{RemoteCallout-4JOZROfT.js → RemoteCallout-CuxqarhC.js} +1 -1
- package/dist/chunks/RemoteSessionManager-BhPF41Wn.js +2 -0
- package/dist/chunks/{ResumeConversation-CZ2Uedkf.js → ResumeConversation-hmIOkZ2U.js} +1 -1
- package/dist/chunks/{SSETransport-kEH_p4Yq.js → SSETransport-8yaTbdSK.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-wDSdfnRo.js +1 -0
- package/dist/chunks/SentryErrorBoundary-Duyg6HeT.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-97iY7Nb7.js → SentryErrorBoundary-ydwbrVTx.js} +1 -1
- package/dist/chunks/{Settings-CuljH0mu.js → Settings-BSbzT25q.js} +2 -2
- package/dist/chunks/{TeleportProgress-Ctdqi7iS.js → TeleportProgress-CNcl_DxR.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-DyTBg1YD.js → TeleportRepoMismatchDialog-DJc8_mjE.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-B66clYsG.js → TeleportResumeWrapper-Cw438s-J.js} +1 -1
- package/dist/chunks/{ThemePicker-WKmYvrqz.js → ThemePicker-8X6yAwuQ.js} +1 -1
- package/dist/chunks/{TmuxBackend-OKX2NP14.js → TmuxBackend-CqAnVFoI.js} +1 -1
- package/dist/chunks/{TrustDialog-0anSIf-G.js → TrustDialog-Ch1FJzxi.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-CfgC1KJb.js → ValidationErrorsList-sgfvJPWZ.js} +1 -1
- package/dist/chunks/{WelcomeV2-BMHXiNt3.js → WelcomeV2-Bu8l3w90.js} +1 -1
- package/dist/chunks/{WindowsTerminalBackend-fCSGVe4W.js → WindowsTerminalBackend-Bvq7nHOp.js} +1 -1
- package/dist/chunks/{add-dir-CMtuW667.js → add-dir-DqrRNnxe.js} +1 -1
- package/dist/chunks/{agentDisplay-CgYKW3G7.js → agentDisplay-DcxzWi1v.js} +1 -1
- package/dist/chunks/{agents-CdqcGm9o.js → agents-Do1ynqiW.js} +1 -1
- package/dist/chunks/{agents-D90TsYOf.js → agents-QqLm1wcM.js} +1 -1
- package/dist/chunks/{ant-DZjimiuz.js → ant-D5gD6O-r.js} +1 -1
- package/dist/chunks/api-VMfJpk1G.js +1 -0
- package/dist/chunks/{api-CQWbpxLP.js → api-hcsOinLV.js} +1 -1
- package/dist/chunks/artifacts-DH8c2yG0.js +1 -0
- package/dist/chunks/{assistant-CEmC_DlU.js → assistant-CemNvrYr.js} +1 -1
- package/dist/chunks/assistant-D7D1sqTB.js +1 -0
- package/dist/chunks/{assistant-CyVcFPIR.js → assistant-DkECAILU.js} +1 -1
- package/dist/chunks/auth-CGdLe3rq.js +1 -0
- package/dist/chunks/{auth-DsQEVs9W.js → auth-Dm8aWPRh.js} +1 -1
- package/dist/chunks/{autoMode-DEbM9UaE.js → autoMode-dygqoN_C.js} +1 -1
- package/dist/chunks/{autonomy-Clap6Swl.js → autonomy-BdxnxJnk.js} +1 -1
- package/dist/chunks/{autonomy-lNpGnyiu.js → autonomy-DPeEmb00.js} +1 -1
- package/dist/chunks/{autonomyPanel-BqEvfI0e.js → autonomyPanel-Bocl2taZ.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-4H6yTjsj.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-KvOpP_4M.js → backgroundHousekeeping-zf-tDimg.js} +2 -2
- package/dist/chunks/{banner-D9Cq292T.js → banner-DUL-7A0b.js} +1 -1
- package/dist/chunks/{branch-CSYB04xC.js → branch-DwdVgun5.js} +1 -1
- package/dist/chunks/{break-cache-DrIa8RdW.js → break-cache-DjCRzxDv.js} +1 -1
- package/dist/chunks/{bridge-DDgASypO.js → bridge-DkkMogD_.js} +2 -2
- package/dist/chunks/bridgeConfig-CTJBoASk.js +1 -0
- package/dist/chunks/{bridgeConfig-DjC4oig1.js → bridgeConfig-l6Ldi_hk.js} +1 -1
- package/dist/chunks/{bridgeEnabled-Csn6Ym3k.js → bridgeEnabled-DYclTb9d.js} +1 -1
- package/dist/chunks/bridgeEnabled-SMuWz3Is.js +1 -0
- package/dist/chunks/{bridgeMain-B5wsmwkN.js → bridgeMain-Ct5oDosG.js} +11 -11
- package/dist/chunks/bridgeMain-UqwOi37W.js +1 -0
- package/dist/chunks/{bridgeMessaging-ChOzzVWj.js → bridgeMessaging-CYe1Cixl.js} +1 -1
- package/dist/chunks/{btw-BgjcOoeo.js → btw-CyOlY5R-.js} +1 -1
- package/dist/chunks/{buddy-C1wE3noR.js → buddy-q-utA1_5.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-C0diGLRB.js → bypassPermissionsKillswitch-CTrRxzdz.js} +1 -1
- package/dist/chunks/{caches-CIoVGP24.js → caches-Bz4yVQyE.js} +2 -2
- package/dist/chunks/caches-DKMoKTAZ.js +1 -0
- package/dist/chunks/{ccrClient-C1msT1E3.js → ccrClient-DXiEw9xU.js} +1 -1
- package/dist/chunks/changeDetector--KPj2maX.js +1 -0
- package/dist/chunks/{channelNotification-CWlu9ZWs.js → channelNotification-CLPdvxGZ.js} +1 -1
- package/dist/chunks/channelNotification-fJgjqRMx.js +1 -0
- package/dist/chunks/{chrome-Bo9uNZ7s.js → chrome-DxbhLWDW.js} +1 -1
- package/dist/chunks/clear-CYVCwiwu.js +1 -0
- package/dist/chunks/client-DvWRsIpi.js +1 -0
- package/dist/chunks/{color-CkzktPHt.js → color-DiLtK8_L.js} +1 -1
- package/dist/chunks/commands-BT2_ICaW.js +1 -0
- package/dist/chunks/commitAttribution-Bpbro1a4.js +1 -0
- package/dist/chunks/{commitAttribution-csu3NO7Y.js → commitAttribution-CJXF8wMs.js} +1 -1
- package/dist/chunks/{compact-DNGIVZRN.js → compact-C6xm1N5a.js} +1 -1
- package/dist/chunks/{companion-Diuav3lA.js → companion-rXSt0nmz.js} +1 -1
- package/dist/chunks/{config-B25IrkTA.js → config-BE3jrcr-.js} +1 -1
- package/dist/chunks/{config-ODoYZY8i.js → config-CzC08IjE.js} +1 -1
- package/dist/chunks/{context-CZ5enuPE.js → context-BHE99SMA.js} +1 -1
- package/dist/chunks/context-noninteractive-BQDOgVUW.js +1 -0
- package/dist/chunks/{context-noninteractive-62P5EnN5.js → context-noninteractive-BZQIUH_y.js} +13 -13
- package/dist/chunks/conversation-Bt6QdGd-.js +1 -0
- package/dist/chunks/{conversation-DyhWeHw2.js → conversation-CBPRFDod.js} +1 -1
- package/dist/chunks/{copy-9JLr2-Xs.js → copy-TgphIVzy.js} +1 -1
- package/dist/chunks/{createSSHSession-B1hTuDpB.js → createSSHSession-CSKEZ4ic.js} +1 -1
- package/dist/chunks/createSession-BaHXBnfG.js +1 -0
- package/dist/chunks/{createSession-fzjzy0aS.js → createSession-Ce218tQj.js} +1 -1
- package/dist/chunks/{cronJitterConfig-9OmmYmIT.js → cronJitterConfig-CnKed5Gi.js} +1 -1
- package/dist/chunks/crossProjectResume-BFlsTYOq.js +40 -0
- package/dist/chunks/{daemon-BRKR4D1D.js → daemon-Bu0Uy-qG.js} +1 -1
- package/dist/chunks/{datadog-SSxsxcC-.js → datadog-D5jSRybW.js} +1 -1
- package/dist/chunks/datadog-DgYqUGa-.js +1 -0
- package/dist/chunks/{desktop-CQnMcbex.js → desktop-cjA0tGOa.js} +1 -1
- package/dist/chunks/{diff-uAwKYa51.js → diff-DMd61IjE.js} +1 -1
- package/dist/chunks/{doctor-CBF0fkBF.js → doctor-ueUYyjyL.js} +1 -1
- package/dist/chunks/earlyInput-DEZaWwKF.js +1 -0
- package/dist/chunks/{effort-F-bhAM2u.js → effort-B9IvAstG.js} +1 -1
- package/dist/chunks/entry-Bq_KRMWs.js +14 -0
- package/dist/chunks/{envLessBridgeConfig-Dg0hNsdi.js → envLessBridgeConfig-CpjlwmvF.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-D_GCqhTu.js +1 -0
- package/dist/chunks/{exit-CqcvZJwI.js → exit-DtjFIrvJ.js} +1 -1
- package/dist/chunks/{export-c6WoGlsG.js → export-CP638-TO.js} +1 -1
- package/dist/chunks/{exportRenderer-CaegIP5N.js → exportRenderer-B5emJDvn.js} +1 -1
- package/dist/chunks/extra-usage-C4dUWLhg.js +1 -0
- package/dist/chunks/{extra-usage-Cj8fokgc.js → extra-usage-DIm8nrKj.js} +1 -1
- package/dist/chunks/{extra-usage-core-sHzc4eE1.js → extra-usage-core-DERKSEe1.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-D0kqrqsg.js → extra-usage-noninteractive-Dq5dog_-.js} +1 -1
- package/dist/chunks/{extraUsage-CbkqfG1U.js → extraUsage-BMvDY0Sk.js} +1 -1
- package/dist/chunks/extractMemories-DS7XXeEo.js +1 -0
- package/dist/chunks/{fast-DS3iQ1CH.js → fast-BP2t1xDM.js} +1 -1
- package/dist/chunks/fast-D1xIHYaN.js +1 -0
- package/dist/chunks/{feedback-QJynmG5q.js → feedback-C-mR6zJr.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-DlW8BUXq.js → firstPartyEventLogger-sMmHdYjg.js} +1 -1
- package/dist/chunks/{flushGate-CK5B9-Zn.js → flushGate-C18XwNsa.js} +1 -1
- package/dist/chunks/{gates-vlrMjO-X.js → gates-Be5r2kKS.js} +1 -1
- package/dist/chunks/gates-CUAwAhPL.js +1 -0
- package/dist/chunks/{gemini-B5ZRjDrh.js → gemini-BberPcp1.js} +1 -1
- package/dist/chunks/{generateRecap-SgRMdsyN.js → generateRecap-B76UcVUS.js} +1 -1
- package/dist/chunks/{generateSessionName-sZFzpwsq.js → generateSessionName-BwtXd8TC.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-DUGvTwPB.js → githubRepoPathMapping-5IlVgR2l.js} +1 -1
- package/dist/chunks/{goal-Dy-GGn9r.js → goal-DQ0jNcLO.js} +1 -1
- package/dist/chunks/{grok-BG4_buNt.js → grok-Dh_thT2_.js} +1 -1
- package/dist/chunks/{growthbook-Br1dDRtd.js → growthbook-4ADV3CAt.js} +1 -1
- package/dist/chunks/{heapdump-B9PVKMxa.js → heapdump-Dwqmh4SX.js} +1 -1
- package/dist/chunks/{help-BfWF7xij.js → help-Bznaywoi.js} +1 -1
- package/dist/chunks/hooks-DynUngv2.js +1 -0
- package/dist/chunks/{hooks-KK32pxq3.js → hooks-F-82cg6M.js} +1 -1
- package/dist/chunks/{hostAdapter-TBJav3vX.js → hostAdapter-DpfLr3hX.js} +1 -1
- package/dist/chunks/{ide-BU1A79BE.js → ide-BfAKWufQ.js} +1 -1
- package/dist/chunks/{inboundAttachments-D4tBPCB8.js → inboundAttachments-CFV_eqMu.js} +1 -1
- package/dist/chunks/inboundAttachments-Cug-8Xdy.js +1 -0
- package/dist/chunks/{initReplBridge-99sUBVEk.js → initReplBridge-DV9KhSic.js} +1 -1
- package/dist/chunks/{insights-lDHodCMG.js → insights-BNsCwNYa.js} +1 -1
- package/dist/chunks/{install-Bg4ZgW81.js → install-Bszzs98N.js} +1 -1
- package/dist/chunks/{install-github-app-RLbUq5EL.js → install-github-app-DVxGR2rp.js} +1 -1
- package/dist/chunks/{install-slack-app-CHmIwsbm.js → install-slack-app-CjlRL19o.js} +1 -1
- package/dist/chunks/{instrumentation-BCiV3SKX.js → instrumentation-BOYPOtyu.js} +3 -3
- package/dist/chunks/{job-xOGf0j5Q.js → job-BvD5_lGz.js} +1 -1
- package/dist/chunks/{keybindings-DMbReZ4p.js → keybindings-RPmPPGhp.js} +1 -1
- package/dist/chunks/{lang-A6LUGP_7.js → lang-9VNaOJMz.js} +1 -1
- package/dist/chunks/language-CjFs6_la.js +1 -0
- package/dist/chunks/{language-CGfURU2y.js → language-Ct5Nkqm6.js} +1 -1
- package/dist/chunks/{launchAgentsPlatform-Dbpm7Jyo.js → launchAgentsPlatform-CnoxFIXV.js} +1 -1
- package/dist/chunks/{launchAutofixPr-RZfqx5eM.js → launchAutofixPr-ChaDUtvx.js} +1 -1
- package/dist/chunks/{launchLocalMemory-DIntbsvg.js → launchLocalMemory-MwZfEJxz.js} +1 -1
- package/dist/chunks/{launchLocalVault-CCUw0ayu.js → launchLocalVault-B6Ib5WXx.js} +1 -1
- package/dist/chunks/{launchMemoryStores-QJTh8KSP.js → launchMemoryStores-D6xyGwQ1.js} +1 -1
- package/dist/chunks/{launchOnboarding--Pe30AYd.js → launchOnboarding-BtdAOO3p.js} +1 -1
- package/dist/chunks/{launchSchedule-DjN1RbRX.js → launchSchedule-XVljzNKg.js} +1 -1
- package/dist/chunks/{launchSkillStore-CcKmVDz1.js → launchSkillStore-QT8Qcc5N.js} +1 -1
- package/dist/chunks/{launchTeleport-BKlEo0yF.js → launchTeleport-DwxPesKQ.js} +1 -1
- package/dist/chunks/{launchVault-C7UHA-IG.js → launchVault-Dbti6pph.js} +1 -1
- package/dist/chunks/{loadAgentsDir-ClTeo0nk.js → loadAgentsDir-BYWykYwn.js} +727 -727
- package/dist/chunks/loadAgentsDir-tPgCg0WD.js +1 -0
- package/dist/chunks/{loadPluginHooks-DVZmzYLl.js → loadPluginHooks-2U3UO__Q.js} +1 -1
- package/dist/chunks/localSearch-CxwxzM8W.js +1 -0
- package/dist/chunks/{localSearch-Koc8naSr.js → localSearch-eWjZxMc8.js} +1 -1
- package/dist/chunks/login-CVVFklZw.js +1 -0
- package/dist/chunks/{login-C3MZQTDL.js → login-D1aQCqp0.js} +1 -1
- package/dist/chunks/{logoV2Utils-DAIIwt5R.js → logoV2Utils-CPNvLtol.js} +1 -1
- package/dist/chunks/logout-BYsszpXx.js +1 -0
- package/dist/chunks/{magicDocs-C_inI3JJ.js → magicDocs-DAvjAbAJ.js} +1 -1
- package/dist/chunks/{main-qqcmncHA.js → main-BKlQiSuc.js} +130 -51
- package/dist/chunks/{mappers-7BSMbYvH.js → mappers-BBkM1aA5.js} +1 -1
- package/dist/chunks/{mcp-HQ8-nEZ1.js → mcp-C3jlClk0.js} +2 -2
- package/dist/chunks/{mcp-DV8Prhgi.js → mcp-Cmw8ecKk.js} +1 -1
- package/dist/chunks/{mcp-DRBiobrN.js → mcp-ya96irNP.js} +1 -1
- package/dist/chunks/{mcpServer-CLIYAgGs.js → mcpServer-B1q9blAc.js} +1 -1
- package/dist/chunks/{mcpServer-DS0yRfcu.js → mcpServer-BJB5g6j2.js} +1 -1
- package/dist/chunks/{memory-Cz_JaFLF.js → memory-CxiukAGg.js} +1 -1
- package/dist/chunks/{mode-Kx0kSZkr.js → mode-DqAJ2y6R.js} +1 -1
- package/dist/chunks/{model-CNXtfiLg.js → model-C8TW-qjl.js} +1 -1
- package/dist/chunks/model-VB4ItNVB.js +1 -0
- package/dist/chunks/{onChangeAppState-C4ic-Mib.js → onChangeAppState-BG1pF7ht.js} +1 -1
- package/dist/chunks/{openai-CGGSfpPh.js → openai-CHoRhRtf.js} +1 -1
- package/dist/chunks/{overageCreditGrant-BqW_6R5v.js → overageCreditGrant-DYMg1lV4.js} +1 -1
- package/dist/chunks/{panel-D3wvAEFE.js → panel-BY6q16am.js} +1 -1
- package/dist/chunks/{panel-BYfvo_mR.js → panel-BdRBXAv3.js} +1 -1
- package/dist/chunks/panelCall-SYrmrKt9.js +1 -0
- package/dist/chunks/{passes-sYE91Vtr.js → passes-CSV-SZJc.js} +1 -1
- package/dist/chunks/{paths-DO4WOQtD.js → paths-BZjPDxMm.js} +3 -3
- package/dist/chunks/{permissions-BPerbf1I.js → permissions-DBddT2NP.js} +1 -1
- package/dist/chunks/{pipeTransport-CW9zF_UN.js → pipeTransport-uK7GxbSG.js} +1 -1
- package/dist/chunks/{plan-CDKBVRw6.js → plan-DEbo-Adi.js} +1 -1
- package/dist/chunks/{plugin-C6US4b8W.js → plugin-Cops24hg.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-BQKtcAhC.js → pluginAutoupdate-Bg7JMOHN.js} +1 -1
- package/dist/chunks/{pluginBlocklist-B8DKXi0i.js → pluginBlocklist-DEM_RWc2.js} +1 -1
- package/dist/chunks/{pluginCliCommands-DWCeXYTl.js → pluginCliCommands-DyYEg7Cv.js} +1 -1
- package/dist/chunks/{pluginFlagging-DFMlWw2P.js → pluginFlagging-DwChUZMJ.js} +1 -1
- package/dist/chunks/{pluginOperations-CKmwDC3G.js → pluginOperations-COyT4tHs.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-D6IbyWKe.js → pluginStartupCheck-DCxJJkYs.js} +1 -1
- package/dist/chunks/pluginStartupCheck-DjfIaOch.js +1 -0
- package/dist/chunks/{plugins-BwZIRMh_.js → plugins-BanQjHmw.js} +1 -1
- package/dist/chunks/policyLimits-D-Y_soHx.js +1 -0
- package/dist/chunks/{pollConfig-C3NjXYFc.js → pollConfig-DBNHhvHf.js} +1 -1
- package/dist/chunks/{poor-BHhbua95.js → poor-aPQce502.js} +1 -1
- package/dist/chunks/{poorMode-mtlnXU-z.js → poorMode-CFRuV-nB.js} +1 -1
- package/dist/chunks/poorMode-DQagHYWe.js +1 -0
- package/dist/chunks/{print-kxnXkqGc.js → print-Cf2tY__0.js} +4 -4
- package/dist/chunks/{privacy-settings-DjY1annR.js → privacy-settings-CYkM3Aem.js} +1 -1
- package/dist/chunks/{processBashCommand-BrqLqSva.js → processBashCommand-BLSC8o8M.js} +1 -1
- package/dist/chunks/{processSlashCommand-DJGdVGbK.js → processSlashCommand-Ch9B-6nh.js} +1 -1
- package/dist/chunks/projectContext-2CzYVggO.js +1 -0
- package/dist/chunks/projectContext-CVk2Ix1r.js +1 -0
- package/dist/chunks/{prompt-CfM_xGPc.js → prompt-BGNhFY1n.js} +1 -1
- package/dist/chunks/prompt-CrNwH5kr.js +1 -0
- package/dist/chunks/prompt-dH0MMivt.js +1 -0
- package/dist/chunks/{promptEditor-FI_ewCpV.js → promptEditor-U03qQWbq.js} +1 -1
- package/dist/chunks/{protocolHandler-B7ybKpgJ.js → protocolHandler-3yBj9w5N.js} +1 -1
- package/dist/chunks/{rate-limit-options-DPJMNNou.js → rate-limit-options-D-xl_9PO.js} +1 -1
- package/dist/chunks/{rcDebugLog-CwU_wJBE.js → rcDebugLog-ClX1msJX.js} +1 -1
- package/dist/chunks/{referral-Da4mpbd3.js → referral-qe-yqXJE.js} +1 -1
- package/dist/chunks/{refresh-B6X4xb9r.js → refresh-CO_P3WKA.js} +1 -1
- package/dist/chunks/{registerProtocol-D8fFnceq.js → registerProtocol-CClQph00.js} +1 -1
- package/dist/chunks/{registry-y_z3pTg3.js → registry-C0zdU2Hb.js} +1 -1
- package/dist/chunks/{release-notes--tnd4K56.js → release-notes-CyZHxWTF.js} +1 -1
- package/dist/chunks/{releaseNotes-BPA229-J.js → releaseNotes-BtxL5R5Q.js} +2 -2
- package/dist/chunks/{reload-plugins-yQ7tEUVh.js → reload-plugins-B0eR8JHH.js} +1 -1
- package/dist/chunks/{remote-env-CER5UxTX.js → remote-env-B_sIjY87.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-Bi31i8gt.js → remoteBridgeCore-C3WRaLpU.js} +1 -1
- package/dist/chunks/{remoteControlServer-oUAcWB4i.js → remoteControlServer-BOj9qmgH.js} +1 -1
- package/dist/chunks/{rename-BTngRRZU.js → rename-BFAC3WLD.js} +1 -1
- package/dist/chunks/{resume-DZHKfBmm.js → resume-CpivBr9S.js} +1 -1
- package/dist/chunks/{runtimeObserver-B4KekIF0.js → runtimeObserver-C2_7Vsnd.js} +1 -1
- package/dist/chunks/{runtimeObserver-BUOcYxiK.js → runtimeObserver-sOnfVR7t.js} +2 -2
- package/dist/chunks/sandbox-adapter-jX_WzvnK.js +1 -0
- package/dist/chunks/{sandbox-toggle-DLBL7myN.js → sandbox-toggle-Bv68-Ca7.js} +1 -1
- package/dist/chunks/searchExtraTools-xPuOKDpi.js +1 -0
- package/dist/chunks/{sentry-B7ZBc8fA.js → sentry-BBCn6RGP.js} +1 -1
- package/dist/chunks/{session-DWYQk9YN.js → session-DfvxYP8o.js} +1 -1
- package/dist/chunks/{sessionDiscovery-BP0nv36F.js → sessionDiscovery-CyuRBTAm.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-DiKsr7H7.js +1 -0
- package/dist/chunks/sessionMemory-C34-eFnJ.js +1 -0
- package/dist/chunks/{sessionMemory-pT4lc1C-.js → sessionMemory-kYQnpcyG.js} +1 -1
- package/dist/chunks/sessionMemoryUtils-CcJcgftx.js +1 -0
- package/dist/chunks/sessionObserver-B73s6yu8.js +1 -0
- package/dist/chunks/{sessionObserver-D4SV0Ar3.js → sessionObserver-CTkIYplM.js} +1 -1
- package/dist/chunks/sessionStorage-BHi7PKs-.js +1 -0
- package/dist/chunks/{sessionTitle-CkrnWEW1.js → sessionTitle-ePQRpeV2.js} +1 -1
- package/dist/chunks/{sessionTracing-Caw-kvQr.js → sessionTracing-81-RIJBo.js} +1 -1
- package/dist/chunks/{settingsSync-Dn_lGonC.js → settingsSync-DEFWnE1o.js} +1 -1
- package/dist/chunks/{setup-II1titXI.js → setup-2611vmGJ.js} +1 -1
- package/dist/chunks/{setup-DGkOT4DX.js → setup-BJSk1czd.js} +3 -2
- package/dist/chunks/{setup-Dihjl7jo.js → setup-CTfYsKsz.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-DASW3j9H.js → shadowedRuleDetection-CGD7Nx03.js} +1 -1
- package/dist/chunks/{sideQuestion-C1qbLTAL.js → sideQuestion-BcP9Mm-5.js} +1 -1
- package/dist/chunks/{sink-CqOAfFlL.js → sink-D_t1TIt9.js} +1 -1
- package/dist/chunks/sink-i8NmYch9.js +1 -0
- package/dist/chunks/sinks-3w0mLszx.js +1 -0
- package/dist/chunks/{sinks-BT_lBY6T.js → sinks-DXsozhmS.js} +2 -2
- package/dist/chunks/{skill-learning-kh0HKn6u.js → skill-learning-CZm2iMik.js} +2 -2
- package/dist/chunks/{skillChangeDetector-DQuNepIV.js → skillChangeDetector-1aFn40GC.js} +1 -1
- package/dist/chunks/{skillGapStore-CFmLJlYm.js → skillGapStore-DzHv8v-D.js} +1 -1
- package/dist/chunks/{skillGapStore-B1gUQXhE.js → skillGapStore-cWo6Ra90.js} +2 -2
- package/dist/chunks/{skillGenerator-DIAwRpPg.js → skillGenerator-D_W1IeP3.js} +2 -2
- package/dist/chunks/skillLearning-Bddmbx8E.js +1 -0
- package/dist/chunks/skillLearning-C-uI_jZB.js +1 -0
- package/dist/chunks/{skillPanel-B9zJLHKV.js → skillPanel-ChmOZu4F.js} +3 -3
- package/dist/chunks/{skillSearchPanel-C1O9sxYS.js → skillSearchPanel-CVx2b4Pr.js} +2 -2
- package/dist/chunks/{skills-C6_3snFY.js → skills-CWX1SydA.js} +1 -1
- package/dist/chunks/{sprites-59l7vF4l.js → sprites-BuvEFwW6.js} +1 -1
- package/dist/chunks/startupProfiler-CBcN1Chw.js +3 -0
- package/dist/chunks/startupProfiler-DtTgsdnI.js +1 -0
- package/dist/chunks/{stats-BmGdg4nj.js → stats-wjMQA-CA.js} +1 -1
- package/dist/chunks/{status-KLPT7uYP.js → status-CyU7IQhO.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-DuqyBY-N.js → statusNoticeHelpers-JNibsI_v.js} +1 -1
- package/dist/chunks/{tag-0vahEnrx.js → tag-opEEZI5B.js} +1 -1
- package/dist/chunks/{tasks-zVPemGv7.js → tasks-CCtnU5u1.js} +1 -1
- package/dist/chunks/{teamHelpers-CXAmvFco.js → teamHelpers-BJJs8taN.js} +1 -1
- package/dist/chunks/teamHelpers-D41zdxpl.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-CdiglTzv.js → teammateModeSnapshot-CLiiOCkO.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-q-bARbLL.js +1 -0
- package/dist/chunks/{teleport-D6PvdjPy.js → teleport-ClxQigSQ.js} +1 -1
- package/dist/chunks/{templateJobs-Ox5ZTKjW.js → templateJobs-C6D7GC-Q.js} +1 -1
- package/dist/chunks/{terminalSetup-hLCi-2uB.js → terminalSetup-2ioFcRAA.js} +1 -1
- package/dist/chunks/{terminalSetup-Dh70ynBX.js → terminalSetup-B3bN4Cj8.js} +1 -1
- package/dist/chunks/{theme-DxgUVq9C.js → theme-Dgq_Og2P.js} +1 -1
- package/dist/chunks/thinkback-BE8NNmAo.js +1 -0
- package/dist/chunks/{thinkback-DWgU7Qhr.js → thinkback-C43WBHis.js} +1 -1
- package/dist/chunks/{thinkback-play-CDzY6Ux4.js → thinkback-play-D2_n_aoQ.js} +1 -1
- package/dist/chunks/{toolEventObserver-jO6-mlFU.js → toolEventObserver-B7EA-nNa.js} +1 -1
- package/dist/chunks/{toolEventObserver-DPoMAJwr.js → toolEventObserver-BG_3sGCL.js} +1 -1
- package/dist/chunks/toolPool-BLshLuvo.js +1 -0
- package/dist/chunks/{toolPool-Dgn1Clq8.js → toolPool-HYKCHxDA.js} +1 -1
- package/dist/chunks/{trustedDevice-D35gYkBT.js → trustedDevice-DeNxe6bl.js} +1 -1
- package/dist/chunks/{trustedDevice-CYR5AgSB.js → trustedDevice-S34i6Jc9.js} +1 -1
- package/dist/chunks/{tui-DoOiz2RW.js → tui-DcXIK0fP.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-o4GjzoXK.js → ultrareviewCommand-C45bmZqN.js} +1 -1
- package/dist/chunks/undercover-B4sdXe12.js +1 -0
- package/dist/chunks/{undercover-B4xr62Ux.js → undercover-DoUSM8d6.js} +1 -1
- package/dist/chunks/{updateCCB-Cthn50OV.js → updateCCB-BuAm25MX.js} +1 -1
- package/dist/chunks/{upgrade-D4Id4ebd.js → upgrade-BDKg286g.js} +1 -1
- package/dist/chunks/upgrade-BiWGhm2d.js +1 -0
- package/dist/chunks/{upload-BFDXvdfb.js → upload-CMptZXZs.js} +1 -1
- package/dist/chunks/{usage-DxudeFLL.js → usage-Bw_LK9YI.js} +1 -1
- package/dist/chunks/{usage-Csbso5mD.js → usage-DEWsKPXj.js} +1 -1
- package/dist/chunks/{useMainLoopModel-CEqP4HOc.js → useMainLoopModel-D0PmGDuy.js} +1 -1
- package/dist/chunks/{useManagePlugins-BmS3Adja.js → useManagePlugins-B-ejJsXy.js} +1 -1
- package/dist/chunks/{useMergedTools-wR6Bglqq.js → useMergedTools-B6x9qtfj.js} +1 -1
- package/dist/chunks/{useSearchInput-BhKAGgEN.js → useSearchInput-BpMLsxaS.js} +1 -1
- package/dist/chunks/{useSettingsErrors-CjK3P-Ki.js → useSettingsErrors-DUe4k_RK.js} +1 -1
- package/dist/chunks/{useVoice-DP1hHBWA.js → useVoice-C3ryR2HE.js} +1 -1
- package/dist/chunks/{util-CMSErQoz.js → util-DWl5gjmI.js} +1 -1
- package/dist/chunks/utils-DP3EtI6F.js +1 -0
- package/dist/chunks/{validatePlugin-_g0AqWZG.js → validatePlugin-8EMSASvV.js} +1 -1
- package/dist/chunks/{vim-8y-2Q09k.js → vim-CaZ20SrQ.js} +1 -1
- package/dist/chunks/{voice-BJAsr0K-.js → voice-BrnKguEV.js} +1 -1
- package/dist/chunks/{voiceModeEnabled-BD9GZhQ3.js → voiceModeEnabled-3eg8vSqy.js} +1 -1
- package/dist/chunks/voiceModeEnabled-B1ARFTcz.js +1 -0
- package/dist/chunks/voiceStreamSTT-CONK4g-B.js +1 -0
- package/dist/chunks/{voiceStreamSTT-B1T-8adN.js → voiceStreamSTT-D7jWIYwz.js} +1 -1
- package/dist/chunks/{web-tools-DVIvcP41.js → web-tools-BT3TbzG5.js} +1 -1
- package/dist/chunks/{workerRegistry-60_UCyc3.js → workerRegistry-C_i5wwjL.js} +1 -1
- package/dist/chunks/worktree-CFNQKVGn.js +1 -0
- package/dist/chunks/{xml-CTdKuU6f.js → xml-DOXio8vw.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-B7_TCGwt.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DxJK9NiM.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-LPZ97jsm.js +0 -1
- package/dist/chunks/Doctor-hgf3dMAW.js +0 -1
- package/dist/chunks/Grove-Bwmghb-e.js +0 -1
- package/dist/chunks/Messages-FEBcX-cT.js +0 -11
- package/dist/chunks/REPL-nP7H_-qa.js +0 -1
- package/dist/chunks/RemoteSessionManager-jcPnywfY.js +0 -2
- package/dist/chunks/SearchExtraToolsTool-C64oVFUD.js +0 -1
- package/dist/chunks/SentryErrorBoundary-2E2qGV11.js +0 -1
- package/dist/chunks/api-quOYYOhi.js +0 -1
- package/dist/chunks/assistant-B5_xx00q.js +0 -1
- package/dist/chunks/auth-CjtaiRtF.js +0 -1
- package/dist/chunks/backgroundHousekeeping-D-jt-ocx.js +0 -1
- package/dist/chunks/bridgeConfig-BdZVEqhx.js +0 -1
- package/dist/chunks/bridgeEnabled-DLRIH243.js +0 -1
- package/dist/chunks/bridgeMain-BN0Sag35.js +0 -1
- package/dist/chunks/caches-DMYdTEAr.js +0 -1
- package/dist/chunks/ccshareResume-DKwcd0Vc.js +0 -1
- package/dist/chunks/changeDetector-DoOBZOt1.js +0 -1
- package/dist/chunks/channelNotification-oZ6vG5R5.js +0 -1
- package/dist/chunks/clear-BxdX_MUP.js +0 -1
- package/dist/chunks/client-BSoJ_vaA.js +0 -1
- package/dist/chunks/commands-hyVX9-Lh.js +0 -1
- package/dist/chunks/commitAttribution-BwT0TbYF.js +0 -1
- package/dist/chunks/context-noninteractive-CjuzL9q5.js +0 -1
- package/dist/chunks/conversation-uY-V0SNK.js +0 -1
- package/dist/chunks/createSession-Qurw-N4x.js +0 -1
- package/dist/chunks/crossProjectResume-B6efoIur.js +0 -40
- package/dist/chunks/datadog-C-llbwzP.js +0 -1
- package/dist/chunks/earlyInput-D3OhUZ4G.js +0 -1
- package/dist/chunks/entry-DHN_Gr1b.js +0 -14
- package/dist/chunks/envLessBridgeConfig-CDVtIEWT.js +0 -1
- package/dist/chunks/extra-usage-Dk-wcvAu.js +0 -1
- package/dist/chunks/extractMemories-BP8Opsbp.js +0 -1
- package/dist/chunks/fast-DklfqySb.js +0 -1
- package/dist/chunks/gates-6amRNsYl.js +0 -1
- package/dist/chunks/hooks-BVrhxysz.js +0 -1
- package/dist/chunks/inboundAttachments-DWJplT9p.js +0 -1
- package/dist/chunks/language-Bzp5KDCE.js +0 -1
- package/dist/chunks/loadAgentsDir-CshktEpX.js +0 -1
- package/dist/chunks/localSearch-BtLNJRij.js +0 -1
- package/dist/chunks/login-BngE89_j.js +0 -1
- package/dist/chunks/logout-CXZBaUen.js +0 -1
- package/dist/chunks/model-Bwvn_acH.js +0 -1
- package/dist/chunks/panelCall-DgPjuhQf.js +0 -1
- package/dist/chunks/pluginStartupCheck-cYnLsWOs.js +0 -1
- package/dist/chunks/policyLimits-CFLBtFh3.js +0 -1
- package/dist/chunks/poorMode-CCK7Ek5w.js +0 -1
- package/dist/chunks/projectContext-Cd7V9pES.js +0 -1
- package/dist/chunks/projectContext-Dn7umMp6.js +0 -1
- package/dist/chunks/prompt-BZjXpviP.js +0 -1
- package/dist/chunks/prompt-CusKF4-p.js +0 -1
- package/dist/chunks/sandbox-adapter-C--j-c76.js +0 -1
- package/dist/chunks/searchExtraTools-CBYp5XeI.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-DVilA3Mm.js +0 -1
- package/dist/chunks/sessionMemory-cMgcTxtP.js +0 -1
- package/dist/chunks/sessionMemoryUtils-BgYf2OvX.js +0 -1
- package/dist/chunks/sessionObserver-CzyEF7mg.js +0 -1
- package/dist/chunks/sessionStorage-CXBgVAx-.js +0 -1
- package/dist/chunks/sink-BSPyC453.js +0 -1
- package/dist/chunks/sinks-CpuRIC3H.js +0 -1
- package/dist/chunks/skillLearning-Bxu1Uzl-.js +0 -1
- package/dist/chunks/skillLearning-CxAbHYEk.js +0 -1
- package/dist/chunks/startupProfiler-CAntGAbs.js +0 -3
- package/dist/chunks/startupProfiler-WtUzkMKV.js +0 -1
- package/dist/chunks/teamHelpers-B83RwCCC.js +0 -1
- package/dist/chunks/teammateModeSnapshot-AdUFmPGC.js +0 -1
- package/dist/chunks/thinkback-C5vFU8dM.js +0 -1
- package/dist/chunks/toolPool-BmA-BnAq.js +0 -1
- package/dist/chunks/undercover-nakrQDLh.js +0 -1
- package/dist/chunks/upgrade-DJTCV8sr.js +0 -1
- package/dist/chunks/utils-CAQfwbv8.js +0 -1
- package/dist/chunks/voiceModeEnabled-DZbxaFIg.js +0 -1
- package/dist/chunks/voiceStreamSTT-B39XaGOU.js +0 -1
- package/dist/chunks/worktree-DNK8NprA.js +0 -1
- /package/dist/chunks/{InProcessTransport-B9II3BiO.js → InProcessTransport-DW2ed2Hs.js} +0 -0
- /package/dist/chunks/{PermissionDialog-_WQPRYHQ.js → PermissionDialog-R-Vl4Tk-.js} +0 -0
- /package/dist/chunks/{PressEnterToContinue-BJ58eCFC.js → PressEnterToContinue-BYdiZwYD.js} +0 -0
- /package/dist/chunks/{SearchBox-CkO4rQ-9.js → SearchBox-Bu4gYF0J.js} +0 -0
- /package/dist/chunks/{attributionHooks-VGSpz4mk.js → attributionHooks-COqmxGy1.js} +0 -0
- /package/dist/chunks/{attributionTrailer-C8uqiLIb.js → attributionTrailer-Nx8I_ZRK.js} +0 -0
- /package/dist/chunks/{autoModeDenials-DlO5g6E9.js → autoModeDenials-BDpcFLb7.js} +0 -0
- /package/dist/chunks/{bedrockClient-BUmO2U-X.js → bedrockClient-BfPpXPI0.js} +0 -0
- /package/dist/chunks/{connectHeadless-ByewVfOb.js → connectHeadless-DutPm1RT.js} +0 -0
- /package/dist/chunks/{dangerousBackend-Dkjtndh1.js → dangerousBackend-BDKHrF6i.js} +0 -0
- /package/dist/chunks/{earlyInput-CFYRGxau.js → earlyInput-B3U01GAm.js} +0 -0
- /package/dist/chunks/{files-Bdr_PQyV.js → files-BGuNpYgH.js} +0 -0
- /package/dist/chunks/{fpsMetrics-DKWp7vng.js → fpsMetrics-DH78PzGr.js} +0 -0
- /package/dist/chunks/{fuse-D3B-UE5Y.js → fuse-D7icKomM.js} +0 -0
- /package/dist/chunks/{instinctParser-DOtj1Kni.js → instinctParser-BMtAMLSx.js} +0 -0
- /package/dist/chunks/{lockfile-C3JsqLpb.js → lockfile-DEaq0BaL.js} +0 -0
- /package/dist/chunks/{main-CfkIGrBF.js → main-SFdnVz-G.js} +0 -0
- /package/dist/chunks/{mobile-BMglW1NB.js → mobile-DLGq6g08.js} +0 -0
- /package/dist/chunks/{modalContext-c5Yqx_CQ.js → modalContext-CuTwi_eD.js} +0 -0
- /package/dist/chunks/{observationStore-rLlDwRtG.js → observationStore-Bi1rRKcD.js} +0 -0
- /package/dist/chunks/{openaiShared-C-AuktRP.js → openaiShared-BkVgd2rZ.js} +0 -0
- /package/dist/chunks/{output-style-B64-Zum6.js → output-style-F8fBWFZo.js} +0 -0
- /package/dist/chunks/{parseConnectUrl-DL390ePs.js → parseConnectUrl-CVT_db9n.js} +0 -0
- /package/dist/chunks/{poller-BA1jhG3F.js → poller-DhLgWNxJ.js} +0 -0
- /package/dist/chunks/{renderOptions-Caca3bCd.js → renderOptions-4HxIPoDZ.js} +0 -0
- /package/dist/chunks/{rewind-Djt1zU_3.js → rewind-FKh7loMA.js} +0 -0
- /package/dist/chunks/{sanitization-Ds6zRQyx.js → sanitization-B-JlvWcf.js} +0 -0
- /package/dist/chunks/{server-DONKdvGc.js → server-BsxW1FVq.js} +0 -0
- /package/dist/chunks/{serverBanner-DIyjgIM-.js → serverBanner-DR3GYXpH.js} +0 -0
- /package/dist/chunks/{serverLog-D1N5yx8A.js → serverLog-CH1fCGsD.js} +0 -0
- /package/dist/chunks/{sessionManager-BOmgJd1l.js → sessionManager-mesT4zIQ.js} +0 -0
- /package/dist/chunks/{staticRender-C5v46np_.js → staticRender-DKFIRhkH.js} +0 -0
- /package/dist/chunks/{stickers-DDAm--86.js → stickers-B0P4weWp.js} +0 -0
- /package/dist/chunks/{upstreamproxy-CLf1UaJv.js → upstreamproxy-D-6vdoIJ.js} +0 -0
- /package/dist/chunks/{voice-YtzCcIoM.js → voice-BXg-kzte.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Tt as r}from"./schemas-BGAvj1T4.js";import{t as i}from"./v4-f1i_CNUT.js";import{as as a,cs as o,ls as s,ss as c,us as l}from"./paths-DO4WOQtD.js";import{B as u,D as d,E as f,G as p,O as ee,U as m,_ as h,h as g,l as _,p as v,z as y}from"./debug-otxXY3j-.js";import{o as te,s as b}from"./log-DSV4Ht5l.js";import{AA as x,QA as S,XA as C,ZA as w,dj as T,fj as ne,hj as re,kA as E,mj as ie}from"./loadAgentsDir-ClTeo0nk.js";import{homedir as ae}from"os";import*as D from"path";import{join as oe,resolve as se}from"path";import{randomBytes as O}from"crypto";import{readFile as k,readdir as A,rename as j,stat as M,unlink as N,writeFile as P}from"fs/promises";function F(){return oe(E(),H)}async function I(){let e=F();try{let t=d(await k(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return v(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==V)return v(`Install counts cache version mismatch (got ${n.version}, expected ${V})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return v(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(v(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>W?(v(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(v(`Install counts cache has malformed entries`),null)}catch(e){return u(e)!==`ENOENT`&&v(`Failed to load install counts cache: ${y(e)}`),null}}async function L(e){let t=F(),n=`${t}.${O(8).toString(`hex`)}.tmp`;try{let r=E();await g().mkdir(r),await P(n,ee(e,null,2),{encoding:`utf-8`,mode:384}),await j(n,t),v(`Install counts cache saved successfully`)}catch(e){b(e);try{await N(n)}catch{}}}async function R(){v(`Fetching install counts from ${U}`);let e=performance.now();try{let n=await t.get(U,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return S(`install_counts`,U,`success`,performance.now()-e),n.data.plugins}catch(t){throw S(`install_counts`,U,`failure`,performance.now()-e,C(t)),t}}async function z(){let e=await I();if(e){v(`Using cached install counts`),S(`install_counts`,U,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await R();await L({version:V,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return b(e),v(`Failed to fetch install counts: ${y(e)}`),null}}function B(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var V,H,U,W,G=e((()=>{n(),_(),m(),h(),te(),f(),w(),x(),V=1,H=`install-counts-cache.json`,U=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,W=1440*60*1e3}));async function K(e){let t=e.trim(),n=g(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=se(t.startsWith(`~`)?t.replace(/^~/,ae()):t),r;try{r=await n.stat(e)}catch(t){let n=u(t);return{error:n===`ENOENT`?`Path does not exist: ${e}`:`Cannot access path: ${e} (${n??t})`}}return r.isFile()?e.endsWith(`.json`)?{source:`file`,path:e}:{error:`File path must point to a .json file (marketplace.json), but got: ${e}`}:r.isDirectory()?{source:`directory`,path:e}:{error:`Path is neither a file nor a directory: ${e}`}}if(t.includes(`/`)&&!t.startsWith(`@`)){if(t.includes(`:`))return null;let e=t.match(/^([^#@]+)(?:[#@](.+))?$/),n=e?.[1]||t,r=e?.[2];return r?{source:`github`,repo:n,ref:r}:{source:`github`,repo:n}}return null}var ce=e((()=>{m(),h()}));function le(e){let t=D.basename(e),n=D.basename(D.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=D.resolve(e),i;try{i=await k(r,{encoding:`utf-8`})}catch(e){let t=u(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=d(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:r,fileType:`plugin`}}if(a&&typeof a==`object`){let e=a;e.commands&&(Array.isArray(e.commands)?e.commands:[e.commands]).forEach((e,n)=>{typeof e==`string`&&J(e,`commands[${n}]`,t)}),e.agents&&(Array.isArray(e.agents)?e.agents:[e.agents]).forEach((e,n)=>{typeof e==`string`&&J(e,`agents[${n}]`,t)}),e.skills&&(Array.isArray(e.skills)?e.skills:[e.skills]).forEach((e,n)=>{typeof e==`string`&&J(e,`skills[${n}]`,t)})}let o=a;if(typeof a==`object`&&a){let e=a,t=Object.keys(e).filter(e=>$.has(e));if(t.length>0){let r={...e};for(let e of t)delete r[e],n.push({path:e,message:`Field '${e}' belongs in the marketplace entry (marketplace.json), not plugin.json. It's harmless here but unused — Claude Code ignores it at load time.`});o=r}}let s=c().strict().safeParse(o);if(s.success||t.push(...q(s.error)),s.success){let e=s.data;/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e.name)||n.push({path:`name`,message:`Plugin name "${e.name}" is not kebab-case. Claude Code accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`}),e.version||n.push({path:`version`,message:`No version specified. Consider adding a version following semver (e.g., "1.0.0")`}),e.description||n.push({path:`description`,message:`No description provided. Adding a description helps users understand what your plugin does`}),e.author||n.push({path:`author`,message:`No author information provided. Consider adding author details for plugin attribution`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`plugin`}}async function X(e){let t=[],n=[],i=D.resolve(e),a;try{a=await k(i,{encoding:`utf-8`})}catch(e){let t=u(e),n;return n=t===`ENOENT`?`File not found: ${i}`:t===`EISDIR`?`Path is not a file: ${i}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:i,fileType:`marketplace`}}let c;try{c=d(a)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:i,fileType:`marketplace`}}if(c&&typeof c==`object`){let e=c;Array.isArray(e.plugins)&&e.plugins.forEach((e,n)=>{if(e&&typeof e==`object`&&`source`in e){let r=e.source;typeof r==`string`&&J(r,`plugins[${n}].source`,t,ue(r)),r&&typeof r==`object`&&`path`in r&&typeof r.path==`string`&&J(r.path,`plugins[${n}].source.path`,t)}})}let l=s().extend({plugins:r(o().strict())}).strict().safeParse(c);if(l.success||t.push(...q(l.error)),l.success){let e=l.data;if((!e.plugins||e.plugins.length===0)&&n.push({path:`plugins`,message:`Marketplace has no plugins defined`}),e.plugins){e.plugins.forEach((n,r)=>{e.plugins.filter(e=>e.name===n.name).length>1&&t.push({path:`plugins[${r}].name`,message:`Duplicate plugin name "${n.name}" found in marketplace`})});let r=D.dirname(i),a=D.basename(r)===`.claude-plugin`?D.dirname(r):r;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=D.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=d(await k(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:i,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],a=t.match(T);if(!a)return i.push({path:`frontmatter`,message:`No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata.`}),{success:!0,errors:r,warnings:i,filePath:e,fileType:n};let o=a[1]||``,s;try{s=re(o)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${y(t)}. At runtime this ${n} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n}}if(typeof s!=`object`||!s||Array.isArray(s))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(s)?`an array`:s===null?`null`:typeof s}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let c=s;if(c.description!==void 0){let e=c.description;typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`&&e!==null&&r.push({path:`description`,message:`description must be a string, got ${Array.isArray(e)?`array`:typeof e}. At runtime this value is dropped.`})}else i.push({path:`description`,message:`No description in frontmatter. A description helps users and Claude understand when to use this ${n}.`});c.name!==void 0&&c.name!==null&&typeof c.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof c.name}.`});let l=c[`allowed-tools`];l!=null&&(typeof l!=`string`&&!Array.isArray(l)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof l}.`}):Array.isArray(l)&&l.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let u=c.shell;if(u!=null)if(typeof u!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof u}.`});else{let e=u.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${u}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await k(e,{encoding:`utf-8`})}catch(t){return u(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${y(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=d(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=a().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await A(e,{withFileTypes:!0})}catch(e){let t=u(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>D.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=D.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,D.join(e,`skills`)],[`agent`,D.join(e,`agents`)],[`command`,D.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await k(r,{encoding:`utf-8`})}catch(n){if(p(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${y(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(D.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=D.resolve(e),n=null;try{n=await M(t)}catch(e){if(!p(e))throw e}if(n?.isDirectory()){let e=await X(D.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(D.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=d(await k(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(u(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{i(),m(),ne(),f(),ie(),l(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{K as a,G as c,ce as i,pe as n,B as o,fe as r,z as s,me as t};
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{Tt as r}from"./schemas-BGAvj1T4.js";import{t as i}from"./v4-f1i_CNUT.js";import{as as a,cs as o,ls as s,ss as c,us as l}from"./paths-BZjPDxMm.js";import{B as u,D as d,E as f,G as p,O as ee,U as m,_ as h,h as g,l as _,p as v,z as y}from"./debug-otxXY3j-.js";import{o as te,s as b}from"./log-DSV4Ht5l.js";import{AA as x,QA as S,XA as C,ZA as w,dj as T,fj as ne,hj as re,kA as E,mj as ie}from"./loadAgentsDir-BYWykYwn.js";import{homedir as ae}from"os";import*as D from"path";import{join as oe,resolve as se}from"path";import{randomBytes as O}from"crypto";import{readFile as k,readdir as A,rename as j,stat as M,unlink as N,writeFile as P}from"fs/promises";function F(){return oe(E(),H)}async function I(){let e=F();try{let t=d(await k(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return v(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==V)return v(`Install counts cache version mismatch (got ${n.version}, expected ${V})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return v(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(v(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>W?(v(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(v(`Install counts cache has malformed entries`),null)}catch(e){return u(e)!==`ENOENT`&&v(`Failed to load install counts cache: ${y(e)}`),null}}async function L(e){let t=F(),n=`${t}.${O(8).toString(`hex`)}.tmp`;try{let r=E();await g().mkdir(r),await P(n,ee(e,null,2),{encoding:`utf-8`,mode:384}),await j(n,t),v(`Install counts cache saved successfully`)}catch(e){b(e);try{await N(n)}catch{}}}async function R(){v(`Fetching install counts from ${U}`);let e=performance.now();try{let n=await t.get(U,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return S(`install_counts`,U,`success`,performance.now()-e),n.data.plugins}catch(t){throw S(`install_counts`,U,`failure`,performance.now()-e,C(t)),t}}async function z(){let e=await I();if(e){v(`Using cached install counts`),S(`install_counts`,U,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await R();await L({version:V,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return b(e),v(`Failed to fetch install counts: ${y(e)}`),null}}function B(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var V,H,U,W,G=e((()=>{n(),_(),m(),h(),te(),f(),w(),x(),V=1,H=`install-counts-cache.json`,U=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,W=1440*60*1e3}));async function K(e){let t=e.trim(),n=g(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=se(t.startsWith(`~`)?t.replace(/^~/,ae()):t),r;try{r=await n.stat(e)}catch(t){let n=u(t);return{error:n===`ENOENT`?`Path does not exist: ${e}`:`Cannot access path: ${e} (${n??t})`}}return r.isFile()?e.endsWith(`.json`)?{source:`file`,path:e}:{error:`File path must point to a .json file (marketplace.json), but got: ${e}`}:r.isDirectory()?{source:`directory`,path:e}:{error:`Path is neither a file nor a directory: ${e}`}}if(t.includes(`/`)&&!t.startsWith(`@`)){if(t.includes(`:`))return null;let e=t.match(/^([^#@]+)(?:[#@](.+))?$/),n=e?.[1]||t,r=e?.[2];return r?{source:`github`,repo:n,ref:r}:{source:`github`,repo:n}}return null}var ce=e((()=>{m(),h()}));function le(e){let t=D.basename(e),n=D.basename(D.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=D.resolve(e),i;try{i=await k(r,{encoding:`utf-8`})}catch(e){let t=u(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=d(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:r,fileType:`plugin`}}if(a&&typeof a==`object`){let e=a;e.commands&&(Array.isArray(e.commands)?e.commands:[e.commands]).forEach((e,n)=>{typeof e==`string`&&J(e,`commands[${n}]`,t)}),e.agents&&(Array.isArray(e.agents)?e.agents:[e.agents]).forEach((e,n)=>{typeof e==`string`&&J(e,`agents[${n}]`,t)}),e.skills&&(Array.isArray(e.skills)?e.skills:[e.skills]).forEach((e,n)=>{typeof e==`string`&&J(e,`skills[${n}]`,t)})}let o=a;if(typeof a==`object`&&a){let e=a,t=Object.keys(e).filter(e=>$.has(e));if(t.length>0){let r={...e};for(let e of t)delete r[e],n.push({path:e,message:`Field '${e}' belongs in the marketplace entry (marketplace.json), not plugin.json. It's harmless here but unused — Claude Code ignores it at load time.`});o=r}}let s=c().strict().safeParse(o);if(s.success||t.push(...q(s.error)),s.success){let e=s.data;/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e.name)||n.push({path:`name`,message:`Plugin name "${e.name}" is not kebab-case. Claude Code accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`}),e.version||n.push({path:`version`,message:`No version specified. Consider adding a version following semver (e.g., "1.0.0")`}),e.description||n.push({path:`description`,message:`No description provided. Adding a description helps users understand what your plugin does`}),e.author||n.push({path:`author`,message:`No author information provided. Consider adding author details for plugin attribution`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`plugin`}}async function X(e){let t=[],n=[],i=D.resolve(e),a;try{a=await k(i,{encoding:`utf-8`})}catch(e){let t=u(e),n;return n=t===`ENOENT`?`File not found: ${i}`:t===`EISDIR`?`Path is not a file: ${i}`:`Failed to read file: ${y(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:i,fileType:`marketplace`}}let c;try{c=d(a)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(e)}`}],warnings:[],filePath:i,fileType:`marketplace`}}if(c&&typeof c==`object`){let e=c;Array.isArray(e.plugins)&&e.plugins.forEach((e,n)=>{if(e&&typeof e==`object`&&`source`in e){let r=e.source;typeof r==`string`&&J(r,`plugins[${n}].source`,t,ue(r)),r&&typeof r==`object`&&`path`in r&&typeof r.path==`string`&&J(r.path,`plugins[${n}].source.path`,t)}})}let l=s().extend({plugins:r(o().strict())}).strict().safeParse(c);if(l.success||t.push(...q(l.error)),l.success){let e=l.data;if((!e.plugins||e.plugins.length===0)&&n.push({path:`plugins`,message:`Marketplace has no plugins defined`}),e.plugins){e.plugins.forEach((n,r)=>{e.plugins.filter(e=>e.name===n.name).length>1&&t.push({path:`plugins[${r}].name`,message:`Duplicate plugin name "${n.name}" found in marketplace`})});let r=D.dirname(i),a=D.basename(r)===`.claude-plugin`?D.dirname(r):r;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=D.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=d(await k(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:i,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],a=t.match(T);if(!a)return i.push({path:`frontmatter`,message:`No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata.`}),{success:!0,errors:r,warnings:i,filePath:e,fileType:n};let o=a[1]||``,s;try{s=re(o)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${y(t)}. At runtime this ${n} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n}}if(typeof s!=`object`||!s||Array.isArray(s))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(s)?`an array`:s===null?`null`:typeof s}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let c=s;if(c.description!==void 0){let e=c.description;typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`&&e!==null&&r.push({path:`description`,message:`description must be a string, got ${Array.isArray(e)?`array`:typeof e}. At runtime this value is dropped.`})}else i.push({path:`description`,message:`No description in frontmatter. A description helps users and Claude understand when to use this ${n}.`});c.name!==void 0&&c.name!==null&&typeof c.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof c.name}.`});let l=c[`allowed-tools`];l!=null&&(typeof l!=`string`&&!Array.isArray(l)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof l}.`}):Array.isArray(l)&&l.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let u=c.shell;if(u!=null)if(typeof u!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof u}.`});else{let e=u.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${u}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await k(e,{encoding:`utf-8`})}catch(t){return u(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${y(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=d(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${y(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=a().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await A(e,{withFileTypes:!0})}catch(e){let t=u(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>D.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=D.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,D.join(e,`skills`)],[`agent`,D.join(e,`agents`)],[`command`,D.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await k(r,{encoding:`utf-8`})}catch(n){if(p(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${y(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(D.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=D.resolve(e),n=null;try{n=await M(t)}catch(e){if(!p(e))throw e}if(n?.isDirectory()){let e=await X(D.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(D.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=d(await k(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(u(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{i(),m(),ne(),f(),ie(),l(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{K as a,G as c,ce as i,pe as n,B as o,fe as r,z as s,me as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,dc as n,yc as r}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,dc as n,yc as r}from"./paths-BZjPDxMm.js";import{n as i,r as a}from"./analytics-DqMQntaB.js";var o;e((()=>{i(),r(),o=async()=>{let e=n().editorMode||`normal`;e===`emacs`&&(e=`normal`);let r=e===`normal`?`vim`:`normal`;return t(e=>({...e,editorMode:r})),a(`tengu_editor_mode_changed`,{mode:r,source:`command`}),{type:`text`,value:`Editor mode set to ${r}. ${r===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{o as call};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,Ka as n,dc as r,lo as i,oo as a,yc as o}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,Ka as n,dc as r,lo as i,oo as a,yc as o}from"./paths-BZjPDxMm.js";import{n as s,r as c}from"./analytics-DqMQntaB.js";import{AT as l,BA as u,WA as d,jT as f}from"./loadAgentsDir-BYWykYwn.js";import{n as p,r as m}from"./voiceModeEnabled-3eg8vSqy.js";import{n as h,t as g}from"./useVoice-C3ryR2HE.js";var _,v;e((()=>{g(),f(),s(),o(),u(),a(),p(),_=2,v=async e=>{if(!m())return{type:`text`,value:`Voice mode is not available.`};let a=n(),o=a.voiceEnabled===!0,s=e?.trim().toLowerCase();if(o&&s===`doubao`)return i(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o&&s===`anthropic`)return i(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o)return i(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let u=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:f}=await import(`./voiceStreamSTT-CONK4g-B.js`),{checkRecordingAvailability:p}=await import(`./voice-BXg-kzte.js`),g=await p();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(u!==`doubao`&&!f())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-BXg-kzte.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
|
|
2
2
|
Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(i(`userSettings`,{voiceEnabled:!0,...u===`doubao`?{voiceProvider:`doubao`}:{}}).error)return{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`};d.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!0});let x=l(`voice:pushToTalk`,`Chat`,`Space`),S=``,C=u===`doubao`?`Doubao ASR`:`Anthropic`;if(u!==`doubao`){let e=h(a.language),n=r(),i=n.voiceLangHintLastLanguage!==e.code,o=i?0:n.voiceLangHintShownCount??0,s=!e.fellBackFrom&&o<_;e.fellBackFrom?S=` Note: "${e.fellBackFrom}" is not a supported dictation language; using English. Change it via /config.`:s&&(S=` Dictation language: ${e.code} (/config to change).`),(i||s)&&t(t=>({...t,voiceLangHintShownCount:o+ +!!s,voiceLangHintLastLanguage:e.code}))}return{type:`text`,value:`Voice mode enabled (${C}). Hold ${x} to record.${S}`}}}))();export{v as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-BZjPDxMm.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return i()?!!t()?.accessToken:!1}function c(){return s()&&o()}function l(){return o()}var u=e((()=>{n(),a()}));export{c as a,o as i,u as n,l as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n}from"./voiceModeEnabled-3eg8vSqy.js";n();export{t as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./voiceStreamSTT-D7jWIYwz.js";t();export{e as isVoiceStreamAvailable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-BZjPDxMm.js";import{D as d,E as f,O as p,l as m,p as h}from"./debug-otxXY3j-.js";import{l as g,u as _}from"./oauth-CdZEzMww.js";import{o as v,s as y}from"./log-DSV4Ht5l.js";import{c as b,g as x,h as S,l as C,u as w}from"./proxy-CF7ZDxaW.js";function T(){if(!c())return!1;let e=r();return e!==null&&e.accessToken!==null}async function E(e,t){await i();let a=r();if(!a?.accessToken)return h(`[voice_stream] No OAuth token available`),null;let c=process.env.VOICE_STREAM_BASE_URL||g().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&h(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=s(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),h(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let f=`${c}${k}?${l.toString()}`;h(`[voice_stream] Connecting to ${f}`);let m={Authorization:`Bearer ${a.accessToken}`,"User-Agent":o(),"x-app":`cli`},_=S(),v=new n(f,typeof Bun<`u`?{headers:m,proxy:C(f),tls:_||void 0}:{headers:m,agent:b(f),..._}),x=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(v.readyState===n.OPEN){if(T){h(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}h(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),v.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){h(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}h(`[voice_stream] Finalize resolved via ${n}`),t(n)},v.readyState===n.CLOSED||v.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,v.readyState===n.OPEN&&(h(`[voice_stream] Sending CloseStream (finalize)`),v.send(O))},0)}))},close(){T=!0,x&&(clearInterval(x),x=null),w=!1,v.readyState===n.OPEN&&v.close()},isConnected(){return w&&v.readyState===n.OPEN}};v.on(`open`,()=>{h(`[voice_stream] WebSocket connected`),w=!0,h(`[voice_stream] Sending initial KeepAlive`),v.send(D),x=setInterval(e=>{e.readyState===n.OPEN&&(h(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,v),e.onReady(F)});let I=``;return v.on(`message`,t=>{let n=t.toString();h(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=d(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(h(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(h(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{h(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;h(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??p(r);h(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),v.on(`close`,(t,n)=>{let r=n?.toString()??``;if(h(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,x&&(clearInterval(x),x=null),I){h(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),v.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){h(`[voice_stream] unexpected-response fired with 101; ignoring`);return}h(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),v.on(`error`,t=>{y(t),h(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),_(),l(),m(),u(),v(),x(),w(),f(),a(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,n as a,r as o,t as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,no as f,oo as p}from"./paths-
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,n as a,r as o,t as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,no as f,oo as p}from"./paths-BZjPDxMm.js";import{t as m}from"./useTerminalSize-Du-EamDN.js";import{n as h,t as g}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as _,r as v}from"./modalContext-CuTwi_eD.js";function y({tab:e,adapters:t,current:n,fieldLabel:r,onConfigure:a,onSwitchTab:o,onSelectAdapter:s,onClose:u,contentHeight:d}){let[f,p]=(0,T.useState)(Math.max(0,t.findIndex(e=>e.key===n)));return l((n,r)=>{if(r.upArrow)p(e=>Math.max(0,e-1));else if(r.downArrow)p(e=>Math.min(e+1,t.length-1));else if(r.tab&&e===`search`)o(`fetch`),p(0);else if(r.tab&&e===`fetch`)o(`search`),p(0);else if(r.escape)u();else if(r.return){let e=t[f];e&&a(e)}else if(n===` `){let e=t[f];e&&s(e.key)}}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:r}),(0,E.jsx)(c,{flexDirection:`column`,marginTop:1,children:t.map((e,t)=>{let r=e.key===n,a=t===f,o=a||r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{color:r?`success`:void 0,children:[a?`›`:` `,(0,E.jsxs)(i,{color:r?`success`:void 0,children:[` `,r?`●`:`○`,` `]})]}),(0,E.jsx)(i,{bold:r,backgroundColor:o?`suggestion`:void 0,color:o?`inverseText`:void 0,children:e.label}),(0,E.jsx)(i,{children:` `}),(0,E.jsx)(i,{dimColor:!r,children:e.description})]},e.key)})}),(0,E.jsxs)(c,{marginTop:1,flexDirection:`row`,gap:2,children:[(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Space select · Enter config · Esc close`]}),(0,E.jsx)(i,{dimColor:!0,children:`Tab switch tab`})]})]})}function b(e){let t=[];switch(e.key){case`tavily`:t.push({key:`tavilyEndpointUrl`,label:`Endpoint URL`,placeholder:`https://tavily.claude-code-best.win`,maskInput:!1,getValue:e=>e.tavilyEndpointUrl??`https://tavily.claude-code-best.win`,setValue:(e,t)=>({...e,tavilyEndpointUrl:t||void 0})});break;case`brave`:t.push({key:`braveApiKey`,label:`API Key`,placeholder:`BSA...`,maskInput:!0,getValue:e=>e.braveApiKey??``,setValue:(e,t)=>({...e,braveApiKey:t||void 0})});break;case`exa`:t.push({key:`exaApiKey`,label:`API Key`,placeholder:`exa-...`,maskInput:!0,getValue:e=>e.exaApiKey??``,setValue:(e,t)=>({...e,exaApiKey:t||void 0})}),t.push({key:`exaEndpointUrl`,label:`Endpoint URL`,placeholder:`https://mcp.exa.ai/mcp`,maskInput:!1,getValue:e=>e.exaEndpointUrl??`https://mcp.exa.ai/mcp`,setValue:(e,t)=>({...e,exaEndpointUrl:t||void 0})});break;case`http`:t.push({key:`webFetchHttpTimeoutMs`,label:`Timeout (ms)`,placeholder:`60000`,maskInput:!1,getValue:e=>String(e.webFetchHttpTimeoutMs??6e4),setValue:(e,t)=>({...e,webFetchHttpTimeoutMs:t&&Number(t)||void 0})});break;default:break}return t}function x({adapter:e,onBack:t,onSave:n,onSelect:r}){let i=b(e),a=f();return i.length===0?(0,E.jsx)(S,{adapter:e,onBack:t,onSelect:r}):(0,E.jsx)(C,{fields:i,adapter:e,onBack:t,onSave:n,settings:a})}function S({adapter:e,onBack:t,onSelect:n}){let[r,a]=(0,T.useState)(0);return l((i,o)=>{o.upArrow||o.downArrow?a(e=>+(e===0)):o.escape?t():o.return&&(r===0?n(`Selected ${e.label}.`):t())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:e.label}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsx)(i,{children:e.description}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:`No additional configuration needed.`})})]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===0?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===0?`suggestion`:void 0,color:r===0?`inverseText`:void 0,bold:!0,children:`[ Select & Close ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===1?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===1?`suggestion`:void 0,color:r===1?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Enter confirm · Esc back`]})})]})}function C({fields:e,adapter:t,onBack:n,onSave:r,settings:a}){let[o,s]=(0,T.useState)(0),[u,f]=(0,T.useState)(!1),[p,m]=(0,T.useState)(``),[h,g]=(0,T.useState)(0),_=(0,T.useCallback)(()=>{f(!1),m(``),g(0)},[]);e.length-1;let v=e.length,y=e.length+1,b=(0,T.useCallback)(()=>{let n={...a};for(let t of e){let e=t.getValue(a);n=t.setValue(n,e)}d(`userSettings`,n),r(`Configuration saved for ${t.label}.`)},[e,a,t.label,r]),x=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.getValue(a);m(n),g(n.length),f(!0)},[o,e,a]),S=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.setValue({...a},p);Object.assign(a,n),f(!1)},[o,e,a,p]);return l((e,t)=>{u?t.escape?_():t.return?S():t.backspace||t.delete?m(e=>{let t=h;return t>0?(g(t-1),e.slice(0,t-1)+e.slice(t)):e}):t.leftArrow?g(e=>Math.max(0,e-1)):t.rightArrow?g(e=>Math.min(p.length,e+1)):e&&e.length===1&&!t.ctrl&&!t.meta&&m(t=>{let n=h;return g(n+1),t.slice(0,n)+e+t.slice(n)}):t.upArrow?s(e=>Math.max(0,e-1)):t.downArrow?s(e=>Math.min(y,e+1)):t.escape?n():t.return&&(o===v?b():o===y?n():x())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsxs)(i,{bold:!0,children:[t.label,` Configuration`]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[e.map((e,t)=>{let n=t===o&&!u,r=e.getValue(a),s=u&&t===o?e.maskInput?`•`.repeat(p.length):p:e.maskInput&&r?`•`.repeat(Math.min(r.length,16)):r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{children:[n?`›`:` `,` `]}),(0,E.jsxs)(i,{dimColor:!0,children:[e.label,`: `]}),(0,E.jsx)(i,{backgroundColor:n?`suggestion`:void 0,color:u&&t===o?`success`:n?`inverseText`:void 0,children:s||(0,E.jsx)(i,{dimColor:!0,children:`(empty)`})}),u&&t===o&&(0,E.jsxs)(i,{dimColor:!0,children:[` |`,` pos `,h,`/`,p.length]})]},e.key)}),(0,E.jsxs)(c,{marginTop:1,children:[(0,E.jsxs)(i,{children:[o===v?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===v?`suggestion`:void 0,color:o===v?`inverseText`:void 0,bold:!0,children:`[ Save ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[o===y?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===y?`suggestion`:void 0,color:o===y?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:u?`←→ move cursor · Type to edit · Enter confirm · Esc cancel edit`:`↑↓ navigate · Enter edit field · Esc go back`})})]})}function w({onClose:e,_context:t}){let[r,i]=(0,T.useState)(`search`),[s,c]=(0,T.useState)({kind:`main`}),l=f(),u=l.webSearchAdapter??`tavily`,p=l.webFetchAdapter??`tavily`,m=v(),{rows:g}=n(),_=m?g+1:Math.max(14,Math.min(Math.floor(g*.7),24));h();let b=(0,T.useCallback)(t=>{let n=r;d(`userSettings`,{[n===`search`?`webSearchAdapter`:`webFetchAdapter`]:t});let i=(n===`search`?D:O).find(e=>e.key===t)?.label??t;e(`${n===`search`?`Web search`:`Web fetch`} backend set to ${i}.`)},[r,e]),S=(0,T.useCallback)(e=>{c({kind:`config`,adapter:e})},[]),C=(0,T.useCallback)(()=>{c({kind:`main`})},[]),w=(0,T.useCallback)(t=>{e(t)},[e]),k=(0,T.useCallback)(t=>{let n=s.adapter;d(`userSettings`,{[(s.kind===`config`?D.some(e=>e.key===n.key)?`search`:`fetch`:r)===`search`?`webSearchAdapter`:`webFetchAdapter`]:n.key}),e(t)},[e,s,r]);return s.kind===`config`?(0,E.jsx)(x,{adapter:s.adapter,onBack:C,onSave:w,onSelect:k}):(0,E.jsxs)(o,{title:`Web Tools`,contentHeight:_,children:[(0,E.jsx)(a,{title:`Search`,children:(0,E.jsx)(y,{tab:r,adapters:D,current:u,fieldLabel:`Choose a web search backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`search`),(0,E.jsx)(a,{title:`Fetch`,children:(0,E.jsx)(y,{tab:r,adapters:O,current:p,fieldLabel:`Choose a web fetch backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`fetch`)]})}var T,E,D,O,k;e((()=>{r(),T=t(r(),1),s(),g(),m(),_(),p(),E=u(),D=[{key:`tavily`,label:`Tavily`,description:`Tavily Search API (default)`,hasConfig:!0},{key:`api`,label:`Anthropic API`,description:`Anthropic server-side web search`,hasConfig:!1},{key:`bing`,label:`Bing`,description:`Scrape Bing HTML results`,hasConfig:!1},{key:`brave`,label:`Brave`,description:`Brave Search API (needs API key)`,hasConfig:!0},{key:`exa`,label:`Exa`,description:`Exa AI search (MCP endpoint)`,hasConfig:!0}],O=[{key:`tavily`,label:`Tavily Extract`,description:`Use Tavily /extract (default)`,hasConfig:!0},{key:`http`,label:`HTTP Direct`,description:`Fetch URL directly via HTTP`,hasConfig:!0}],k=async(e,t)=>(0,E.jsx)(w,{onClose:e,_context:t})}))();export{k as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Jt as e,on as t}from"./paths-
|
|
1
|
+
import{Jt as e,on as t}from"./paths-BZjPDxMm.js";import{U as n,z as r}from"./debug-otxXY3j-.js";import{o as i,t as a}from"./bridgeMain-Ct5oDosG.js";import{resolve as o}from"path";t(),n();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),n=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:n,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${r(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,Ot as t}from"./loadAgentsDir-BYWykYwn.js";t();export{e as execIntoTmuxWorktree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{es as t,no as n,oo as r,us as i}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{es as t,no as n,oo as r,us as i}from"./paths-BZjPDxMm.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function S(e){return x(e).replace(/"/g,`"`).replace(/'/g,`'`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.
|
|
2
|
+
import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.8.1 (Claude Code)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-DtTgsdnI.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-BJB5g6j2.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-BldB1Zzi.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-B1q9blAc.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-Bq_KRMWs.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-BGzuPZ5q.js`),{enableConfigs:r}=await import(`./chunks/config-CzC08IjE.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-i8NmYch9.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-DgYqUGa-.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-sMmHdYjg.js`),{logForDebugging:s}=await import(`./chunks/debug-DIYxb3SF.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-fJgjqRMx.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.8.1`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-C_i5wwjL.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-CzC08IjE.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-SMuWz3Is.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-BCy5hsQR.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-UqwOi37W.js`),{exitWithError:s}=await import(`./chunks/process-CWupreF6.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-Dm8aWPRh.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-CTJBoASk.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-D-Y_soHx.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-CzC08IjE.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);r();let{initSinks:i}=await import(`./chunks/sinks-3w0mLszx.js`);i();let{daemonMain:a}=await import(`./chunks/main-SFdnVz-G.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-BdxnxJnk.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-CzC08IjE.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);r(),await(await import(`./chunks/bg-CngkAkgc.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-CzC08IjE.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);i();let{initSinks:a}=await import(`./chunks/sinks-3w0mLszx.js`);a();let{daemonMain:o}=await import(`./chunks/main-SFdnVz-G.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-C6D7GC-Q.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-C6D7GC-Q.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-CzC08IjE.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-RtizNgNg.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-CFNQKVGn.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CWupreF6.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-DEZaWwKF.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-BKlQiSuc.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-best",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "claude-code-best <claude-code-best@proton.me>",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ApproveApiKey-DPws3jax.js";export{e as ApproveApiKey};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./ClaudeMdExternalIncludesDialog-B-GkVoA_.js";e();export{t as ClaudeMdExternalIncludesDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Hy as e,Vy as t}from"./loadAgentsDir-ClTeo0nk.js";e();export{t as ConsoleOAuthFlow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./Doctor-Cr_MlSPc.js";e();export{t as Doctor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./Grove-m57x4tY1.js";e();export{t as GroveDialog};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{s as i,u as a}from"./envUtils-BWeoiL4Y.js";import{n as o,t as s}from"./figures-gfT9mM8P.js";import{B as c,Cn as l,F as u,Ft as d,In as f,Ln as p,Lt as m,Rn as h,W as g,b as _,m as v,t as y,v as b,x,y as S}from"./src-Di342QoJ.js";import{t as C}from"./jsx-runtime-D-D469L8.js";import{L as w,W as ee,cn as T,y as E}from"./state-sIHsFpDu.js";import{Bc as D,Cc as O,Fo as k,Gt as te,Ht as A,Io as ne,Ka as re,Lr as j,Pr as M,Ps as N,S as P,Uc as F,Ur as I,dc as L,dn as ie,g as R,js as ae,on as oe,oo as se,qt as ce,yc as z}from"./paths-DO4WOQtD.js";import{d as le,l as ue,o as B,p as de,u as fe}from"./debug-otxXY3j-.js";import{n as pe,r as me}from"./analytics-DqMQntaB.js";import{n as V,t as he}from"./cwd--iizewsn.js";import{a as ge,n as _e}from"./env-C2A9gV_G.js";import{H as ve,V as ye,W as be,et as xe}from"./log-DSV4Ht5l.js";import{C as Se,g as Ce,m as we,n as Te,r as Ee,t as De,x as Oe}from"./startupProfiler-CAntGAbs.js";import{l as ke,o as Ae}from"./stringUtils-KZoO4GUd.js";import{n as je,t as Me}from"./sleep-C6koP5Ka.js";import{$h as Ne,Ax as Pe,Bu as Fe,CS as Ie,CT as Le,C_ as Re,DT as ze,Do as Be,Du as Ve,FA as He,Fo as Ue,Gx as We,Ho as Ge,Io as Ke,Iu as qe,Kk as Je,Ko as Ye,Lo as Xe,Lu as Ze,MA as Qe,Ms as $e,OT as et,Oo as tt,Ox as nt,Po as rt,Px as it,Qh as at,Qk as ot,Ro as st,Rs as ct,Ru as lt,ST as ut,Sb as dt,TS as ft,TT as pt,Tj as mt,Uo as ht,Vu as gt,Vw as _t,Wx as vt,Xk as yt,Xv as bt,Yk as xt,Zo as St,Zv as Ct,a_ as wt,as as Tt,eg as Et,es as Dt,f_ as Ot,gS as kt,ho as At,lC as jt,lo as Mt,mS as Nt,nO as Pt,ng as Ft,no as It,o_ as Lt,pS as Rt,p_ as zt,rO as Bt,ro as Vt,tg as Ht,to as Ut,ts as Wt,uC as Gt,uo as Kt,wT as qt,w_ as Jt,xT as Yt,xj as Xt,yT as Zt,zu as Qt,zw as $t,zx as en}from"./loadAgentsDir-ClTeo0nk.js";import{Qn as tn,Xn as nn}from"./prompt-CfM_xGPc.js";import{f as rn,p as an}from"./xml-CTdKuU6f.js";import{C as on,y as sn}from"./rcDebugLog-CwU_wJBE.js";import{n as cn,r as ln,t as un}from"./browser-Bt-ckCaU.js";import{t as dn}from"./useTerminalSize-Du-EamDN.js";import{d as fn,f as pn,h as mn,p as hn}from"./terminalSetup-hLCi-2uB.js";import{n as gn,t as _n}from"./SentryErrorBoundary-97iY7Nb7.js";import{a as vn,n as yn}from"./voiceModeEnabled-BD9GZhQ3.js";import{a as bn,o as xn,r as Sn,s as Cn,t as wn}from"./referral-Da4mpbd3.js";import{c as Tn,r as En}from"./releaseNotes-BPA229-J.js";import{a as Dn,c as On,d as kn,i as An,l as jn,n as Mn,o as Nn,r as Pn,t as Fn,u as In}from"./logoV2Utils-DAIIwt5R.js";import{n as Ln,t as Rn}from"./systemTheme-eRWGHYSL.js";import{n as zn,r as Bn}from"./PromptInputFooterSuggestions-DhIQ0Nge.js";import{n as Vn,t as Hn}from"./useMainLoopModel-CEqP4HOc.js";import{n as Un,t as Wn}from"./modalContext-c5Yqx_CQ.js";import{i as Gn,n as Kn,r as qn,s as Jn,t as Yn}from"./OverageCreditUpsell-DnFv5z-z.js";import{n as Xn,r as Zn,t as Qn}from"./statusNoticeHelpers-DuqyBY-N.js";import{homedir as $n}from"os";import{relative as er}from"path";import{fileURLToPath as tr}from"url";function nr(e,t){for(let n of e)if(!t.has(n))return!1;return!0}var rr=t((()=>{}));function ir(e){if(e.type!==`user`)return!1;let t=Array.isArray(e.message.content)?e.message.content[0]:void 0;return!t||typeof t==`string`||t?.type!==`text`||!t.text.includes(`<task-notification`)||tt(t.text,`status`)!==`completed`?!1:tt(t.text,`summary`)?.startsWith(`Background command `)??!1}function ar(e,t){if(!ft()||t)return e;let n=[],r=0;for(;r<e.length;){let t=e[r];if(ir(t)){let i=0;for(;r<e.length&&ir(e[r]);)i++,r++;i===1?n.push(t):n.push({...t,message:{role:`user`,content:[{type:`text`,text:`<${be}><${ye}>completed</${ye}><${ve}>${i} background commands completed</${ve}></${be}>`}]}})}else n.push(t),r++}return n}var or=t((()=>{xe(),Ve(),Ie(),ht()}));function sr(e){return e.type===`system`&&e.subtype===`stop_hook_summary`&&e.hookLabel!==void 0}function cr(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(sr(r)){let i=r.hookLabel,a=[];for(;n<e.length;){let t=e[n];if(!sr(t)||t.hookLabel!==i)break;a.push(t),n++}a.length===1?t.push(r):t.push({...r,hookCount:a.reduce((e,t)=>e+t.hookCount,0),hookInfos:a.flatMap(e=>e.hookInfos),hookErrors:a.flatMap(e=>e.hookErrors),preventedContinuation:a.some(e=>e.preventedContinuation),hasOutput:a.some(e=>e.hasOutput),totalDurationMs:Math.max(...a.map(e=>e.totalDurationMs??0))})}else t.push(r),n++}return t}var lr=t((()=>{}));function ur(e){return e.type===`attachment`&&e.attachment.type===`task_status`&&e.attachment.taskType===`in_process_teammate`&&e.attachment.status===`completed`}function dr(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(ur(r)){let i=0;for(;n<e.length&&ur(e[n]);)i++,n++;i===1?t.push(r):t.push({type:`attachment`,uuid:r.uuid,timestamp:r.timestamp,attachment:{type:`teammate_shutdown_batch`,count:i}})}else t.push(r),n++}return t}var fr=t((()=>{}));function pr(e){let t=gr.get(e);return t||(t=new Set(e.filter(e=>e.renderGroupedToolUse).map(e=>e.name)),gr.set(e,t)),t}function mr(e){if(e.type===`assistant`&&e.message?.content&&Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_use`){let t=e.message.content[0];return{messageId:e.message.id,toolUseId:t.id,toolName:t.name}}return null}function hr(e,t,n=!1){if(n)return{messages:e};let r=pr(t),i=new Map;for(let t of e){let e=mr(t);if(e&&r.has(e.toolName)){let n=`${e.messageId}:${e.toolName}`,r=i.get(n)??[];r.push(t),i.set(n,r)}}let a=new Map,o=new Set;for(let[e,t]of i)if(t.length>=2){a.set(e,t);for(let e of t){let t=mr(e);t&&o.add(t.toolUseId)}}let s=new Map;for(let t of e)if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content))for(let e of t.message.content)e.type===`tool_result`&&o.has(e.tool_use_id)&&s.set(e.tool_use_id,t);let c=[],l=new Set;for(let t of e){let e=mr(t);if(e){let t=`${e.messageId}:${e.toolName}`,n=a.get(t);if(n){if(!l.has(t)){l.add(t);let r=n[0],i=[];for(let e of n){let t=e.message.content[0].id,n=s.get(t);n&&i.push(n)}let a={type:`grouped_tool_use`,toolName:e.toolName,messages:n,results:i,displayMessage:r,uuid:`grouped-${r.uuid}`,timestamp:r.timestamp,messageId:e.messageId};c.push(a)}continue}}if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content)){let e=t.message.content.filter(e=>e.type===`tool_result`);if(e.length>0&&e.every(e=>o.has(e.tool_use_id)))continue}c.push(t)}return{messages:c}}var gr,_r=t((()=>{gr=new WeakMap}));function vr(e){let t=wr.get(e);if(t!==void 0)return t;let n=yr(e).toLowerCase();return wr.set(e,n),n}function yr(e){let t=``;switch(e.type){case`user`:{let n=e.message.content;if(typeof n==`string`)t=Cr.has(n)?``:n;else{let r=[];for(let t of n??[])t.type===`text`?Cr.has(t.text)||r.push(t.text):t.type===`tool_result`&&r.push(xr(e.toolUseResult));t=r.join(`
|
|
2
|
-
`)}break}case`assistant`:{let n=e.message.content;Array.isArray(n)&&(t=n.flatMap(e=>e.type===`text`?[e.text]:e.type===`tool_use`?[br(e.input)]:[]).join(`
|
|
3
|
-
`));break}case`attachment`:if(e.attachment.type===`relevant_memories`)t=(e.attachment.memories??[]).map(e=>e.content).join(`
|
|
4
|
-
`);else if(e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
|
|
5
|
-
`)}break;case`collapsed_read_search`:e.relevantMemories&&(t=e.relevantMemories.map(e=>e.content).join(`
|
|
6
|
-
`));break;default:break}let n=t,r=n.indexOf(`<system-reminder>`);for(;r>=0;){let e=n.indexOf(Sr,r);if(e<0)break;n=n.slice(0,r)+n.slice(e+18),r=n.indexOf(`<system-reminder>`)}return n}function br(e){if(!e||typeof e!=`object`)return``;let t=e,n=[];for(let e of[`command`,`pattern`,`file_path`,`path`,`prompt`,`description`,`query`,`url`,`skill`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`args`,`files`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(` `))}return n.join(`
|
|
7
|
-
`)}function xr(e){if(!e||typeof e!=`object`)return typeof e==`string`?e:``;let t=e;if(typeof t.stdout==`string`){let e=typeof t.stderr==`string`?t.stderr:``;return t.stdout+(e?`
|
|
8
|
-
`+e:``)}if(t.file&&typeof t.file==`object`&&typeof t.file.content==`string`)return t.file.content;let n=[];for(let e of[`content`,`output`,`result`,`text`,`message`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`filenames`,`lines`,`results`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(`
|
|
9
|
-
`))}return n.join(`
|
|
10
|
-
`)}var Sr,Cr,wr,Tr=t((()=>{ht(),Sr=`</system-reminder>`,Cr=new Set([It,Vt]),wr=new WeakMap}));function Er({pose:e=`default`}={}){if(_e.terminal===`Apple_Terminal`)return(0,H.jsx)(Dr,{pose:e});let t=Or[e];return(0,H.jsxs)(x,{flexDirection:`column`,children:[(0,H.jsxs)(_,{children:[(0,H.jsx)(_,{color:`clawd_body`,children:t.r1L}),(0,H.jsx)(_,{color:`clawd_body`,backgroundColor:`clawd_background`,children:t.r1E}),(0,H.jsx)(_,{color:`clawd_body`,children:t.r1R})]}),(0,H.jsxs)(_,{children:[(0,H.jsx)(_,{color:`clawd_body`,children:t.r2L}),(0,H.jsx)(_,{color:`clawd_body`,backgroundColor:`clawd_background`,children:`█████`}),(0,H.jsx)(_,{color:`clawd_body`,children:t.r2R})]}),(0,H.jsxs)(_,{color:`clawd_body`,children:[` `,`▘▘ ▝▝`,` `]})]})}function Dr({pose:e}){return(0,H.jsxs)(x,{flexDirection:`column`,alignItems:`center`,children:[(0,H.jsxs)(_,{children:[(0,H.jsx)(_,{color:`clawd_body`,children:`▗`}),(0,H.jsx)(_,{color:`clawd_background`,backgroundColor:`clawd_body`,children:kr[e]}),(0,H.jsx)(_,{color:`clawd_body`,children:`▖`})]}),(0,H.jsx)(_,{backgroundColor:`clawd_body`,children:` `.repeat(7)}),(0,H.jsx)(_,{color:`clawd_body`,children:`▘▘ ▝▝`})]})}var H,Or,kr,Ar=t((()=>{h(),y(),ge(),H=C(),Or={default:{r1L:` ▐`,r1E:`▛███▜`,r1R:`▌`,r2L:`▝▜`,r2R:`▛▘`},"look-left":{r1L:` ▐`,r1E:`▟███▟`,r1R:`▌`,r2L:`▝▜`,r2R:`▛▘`},"look-right":{r1L:` ▐`,r1E:`▙███▙`,r1R:`▌`,r2L:`▝▜`,r2R:`▛▘`},"arms-up":{r1L:`▗▟`,r1E:`▛███▜`,r1R:`▙▖`,r2L:` ▜`,r2R:`▛ `}},kr={default:` ▗ ▖ `,"look-left":` ▘ ▘ `,"look-right":` ▝ ▝ `,"arms-up":` ▗ ▖ `}}));function jr(e){let{title:t,lines:n,footer:r,emptyMessage:i,customContent:a}=e,o=l(t);if(a!==void 0)o=Math.max(o,a.width);else if(n.length===0&&i)o=Math.max(o,l(i));else{let e=Math.max(0,...n.map(e=>e.timestamp?l(e.timestamp):0));for(let t of n){let n=e>0?e:0,r=l(t.text)+(n>0?n+2:0);o=Math.max(o,r)}}return r&&(o=Math.max(o,l(r))),o}function Mr({config:e,actualWidth:t}){let{title:n,lines:r,footer:i,emptyMessage:a,customContent:o}=e,s=Math.max(0,...r.map(e=>e.timestamp?l(e.timestamp):0));return(0,U.jsxs)(x,{flexDirection:`column`,width:t,children:[(0,U.jsx)(_,{bold:!0,color:`claude`,children:n}),o?(0,U.jsxs)(U.Fragment,{children:[o.content,i&&(0,U.jsx)(_,{dimColor:!0,italic:!0,children:Se(i,t)})]}):r.length===0&&a?(0,U.jsx)(_,{dimColor:!0,children:Se(a,t)}):(0,U.jsxs)(U.Fragment,{children:[r.map((e,n)=>{let r=Math.max(10,t-(s>0?s+2:0));return(0,U.jsxs)(_,{children:[s>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(_,{dimColor:!0,children:(e.timestamp||``).padEnd(s)}),` `]}),(0,U.jsx)(_,{children:Se(e.text,r)})]},n)}),i&&(0,U.jsx)(_,{dimColor:!0,italic:!0,children:Se(i,t)})]})]})}var U,Nr=t((()=>{h(),y(),Oe(),U=C()}));function Pr({feeds:e,maxWidth:t}){let n=e.map(e=>jr(e)),r=Math.max(...n),i=Math.min(r,t);return(0,Ir.jsx)(x,{flexDirection:`column`,children:e.map((t,n)=>(0,Ir.jsxs)(Fr.Fragment,{children:[(0,Ir.jsx)(Mr,{config:t,actualWidth:i}),n<e.length-1&&(0,Ir.jsx)(v,{color:`claude`,width:i})]},n))})}var Fr,Ir,Lr=t((()=>{Fr=n(h(),1),y(),Nr(),Ir=C()}));function Rr(e){let t=e.map(e=>{let t=Ce(e.modified);return{text:(e.summary&&e.summary!==`No prompt`?e.summary:e.firstPrompt)||``,timestamp:t}});return{title:`Recent activity`,lines:t,footer:t.length>0?`/resume for more`:void 0,emptyMessage:`No recent activity`}}function zr(e){let t=e.map(e=>{if(process.env.USER_TYPE===`ant`){let t=e.match(/^(\d+\s+\w+\s+ago)\s+(.+)$/);if(t)return{timestamp:t[1],text:t[2]||``}}return{text:e}}),n=process.env.USER_TYPE===`ant`?`Unable to fetch latest claude-cli-internal commits`:`Check the Claude Code changelog for updates`;return{title:process.env.USER_TYPE===`ant`?`What's new [ANT-ONLY: Latest CC commits]`:`What's new`,lines:t,footer:t.length>0?`/release-notes for more`:void 0,emptyMessage:n}}function Br(e){let t=e.filter(({isEnabled:e})=>e).sort((e,t)=>Number(e.isComplete)-Number(t.isComplete)).map(({text:e,isComplete:t})=>({text:`${t?`${s.tick} `:``}${e}`})),n=he()===$n()?`Note: You have launched claude in your home directory. For the best experience, launch it in a project directory instead.`:void 0;return n&&t.push({text:n}),{title:`Tips for getting started`,lines:t}}function Vr(){let e=bn(),t=e?`Share Claude Code and earn ${Sn(e)} of extra usage`:`Share Claude Code with friends`;return{title:`3 guest passes`,lines:[],customContent:{content:(0,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)(x,{marginY:1,children:(0,Hr.jsx)(_,{color:`claude`,children:`[✻] [✻] [✻]`})}),(0,Hr.jsx)(_,{dimColor:!0,children:t})]}),width:48},footer:`/passes`}}var Hr,Ur=t((()=>{o(),y(),Cn(),V(),Oe(),Hr=C()}));function Wr(e,t,n){return Array.from({length:n},()=>({pose:e,offset:t}))}function Gr(){let{pose:e,bounceOffset:t,onClick:n}=Kr();return(0,Jr.jsx)(x,{height:ei,flexDirection:`column`,onClick:n,children:(0,Jr.jsx)(x,{marginTop:t,flexShrink:0,children:(0,Jr.jsx)(Er,{pose:e})})})}function Kr(){let[e]=(0,qr.useState)(()=>re().prefersReducedMotion??!1),[t,n]=(0,qr.useState)(-1),r=(0,qr.useRef)(Yr),i=()=>{e||t!==-1||(r.current=Xr[Math.floor(Math.random()*Xr.length)],n(0))};(0,qr.useEffect)(()=>{if(t===-1)return;if(t>=r.current.length){n(-1);return}let e=setTimeout(n,Qr,$r);return()=>clearTimeout(e)},[t]);let a=r.current,o=t>=0&&t<a.length?a[t]:Zr;return{pose:o.pose,bounceOffset:o.offset,onClick:i}}var qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti=t((()=>{h(),qr=n(h(),1),y(),se(),Ar(),Jr=C(),Yr=[...Wr(`default`,1,2),...Wr(`arms-up`,0,3),...Wr(`default`,0,1),...Wr(`default`,1,2),...Wr(`arms-up`,0,3),...Wr(`default`,0,1)],Xr=[Yr,[...Wr(`look-right`,0,5),...Wr(`look-left`,0,5),...Wr(`default`,0,1)]],Zr={pose:`default`,offset:0},Qr=60,$r=e=>e+1,ei=3}));function ni(){let e=xn();e==null||e<=0||e>(L().passesLastSeenRemaining??0)&&O(t=>({...t,passesUpsellSeenCount:0,hasVisitedPasses:!1,passesLastSeenRemaining:e}))}function ri(){let{eligible:e,hasCache:t}=wn();if(!e||!t)return!1;ni();let n=L();return!((n.passesUpsellSeenCount??0)>=3||n.hasVisitedPasses)}function ii(){let[e]=(0,si.useState)(()=>ri());return e}function ai(){let e=0;O(t=>(e=(t.passesUpsellSeenCount??0)+1,{...t,passesUpsellSeenCount:e})),me(`tengu_guest_passes_upsell_shown`,{seen_count:e})}function oi(){let e=bn();return(0,ci.jsxs)(_,{dimColor:!0,children:[(0,ci.jsx)(_,{color:`claude`,children:`[✻]`}),` `,(0,ci.jsx)(_,{color:`claude`,children:`[✻]`}),` `,(0,ci.jsx)(_,{color:`claude`,children:`[✻]`}),` ·`,` `,e?`Share Claude Code and earn ${Sn(e)} of extra usage · /passes`:`3 guest passes at /passes`]})}var si,ci,li=t((()=>{h(),si=n(h(),1),y(),pe(),Cn(),z(),ci=C()}));function ui(){let{columns:e}=u(),t=Gt(e=>e.agent),n=Gt(e=>e.effortValue),r=Vn(),i=I(r),{version:a,cwd:o,billingType:s,agentName:c}=Nn(),d=t??c,f=ii(),p=Jn();(0,di.useEffect)(()=>{f&&ai()},[f]),(0,di.useEffect)(()=>{p&&!f&&qn()},[p,f]);let m=Math.max(e-15,20),h=Se(a,Math.max(m-13,6)),{shouldSplit:g,truncatedModel:v,truncatedBilling:y}=Pn(i+Xt(r,n),s,m),b=d?m-1-l(d)-3:m,S=kn(o,Math.max(b,10));return(0,W.jsx)(Ht,{children:(0,W.jsxs)(x,{flexDirection:`row`,gap:2,alignItems:`center`,children:[ft()?(0,W.jsx)(Gr,{}):(0,W.jsx)(Er,{}),(0,W.jsxs)(x,{flexDirection:`column`,children:[(0,W.jsxs)(_,{children:[(0,W.jsx)(_,{bold:!0,children:`Claude Code`}),` `,(0,W.jsxs)(_,{dimColor:!0,children:[`v`,h]})]}),g?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_,{dimColor:!0,children:v}),(0,W.jsx)(_,{dimColor:!0,children:y})]}):(0,W.jsxs)(_,{dimColor:!0,children:[v,` · `,y]}),(0,W.jsx)(_,{dimColor:!0,children:d?`@${d} · ${S}`:S}),f&&(0,W.jsx)(oi,{}),!f&&p&&(0,W.jsx)(Yn,{maxWidth:m,twoLine:!0})]})]})})}var di,W,fi=t((()=>{di=n(h(),1),Hn(),dn(),y(),jt(),mt(),Oe(),Ie(),In(),M(),Ft(),ti(),Ar(),li(),Gn(),W=C()}));function pi(){let e=(0,hi.useMemo)(mi,[]),t=(0,hi.useMemo)(()=>L().lastShownEmergencyTip,[]),n=e.tip&&e.tip!==t;return(0,hi.useEffect)(()=>{n&&O(t=>t.lastShownEmergencyTip===e.tip?t:{...t,lastShownEmergencyTip:e.tip})},[n,e.tip]),n?(0,gi.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,gi.jsx)(_,{...e.color===`warning`?{color:`warning`}:e.color===`error`?{color:`error`}:{dimColor:!0},children:e.tip})}):null}function mi(){return R(_i,vi)}var hi,gi,_i,vi,yi=t((()=>{h(),hi=n(h(),1),y(),P(),z(),gi=C(),_i=`tengu-top-of-feed-tip`,vi={tip:``,color:`dim`}}));function bi({char:e=`✻`}){let[t]=(0,xi.useState)(()=>re().prefersReducedMotion??!1),[n,r]=(0,xi.useState)(t),i=(0,xi.useRef)(null),[a,o]=c(n?null:50);return(0,xi.useEffect)(()=>{if(n)return;let e=setTimeout(r,wi,!0);return()=>clearTimeout(e)},[n]),n?(0,Si.jsx)(x,{ref:a,children:(0,Si.jsx)(_,{color:Ti,children:e})}):(i.current===null&&(i.current=o),(0,Si.jsx)(x,{ref:a,children:(0,Si.jsx)(_,{color:kt(Rt((o-i.current)/Ci*360%360)),children:e})}))}var xi,Si,Ci,wi,Ti,Ei=t((()=>{h(),xi=n(h(),1),N(),y(),se(),Nt(),Si=C(),Ci=1500,wi=Ci*2,Ti=kt({r:153,g:153,b:153})}));function Di(){return j()&&(L().opus1mMergeNoticeSeenCount??0)<ji}function Oi(){let[e]=(0,ki.useState)(Di);return(0,ki.useEffect)(()=>{if(!e)return;let t=(L().opus1mMergeNoticeSeenCount??0)+1;O(e=>(e.opus1mMergeNoticeSeenCount??0)>=t?e:{...e,opus1mMergeNoticeSeenCount:t})},[e]),e?(0,Ai.jsxs)(x,{paddingLeft:2,children:[(0,Ai.jsx)(bi,{char:`↑`}),(0,Ai.jsx)(_,{dimColor:!0,children:` Opus now defaults to 1M context · 5x more room, same pricing`})]}):null}var ki,Ai,ji,Mi=t((()=>{h(),ki=n(h(),1),N(),y(),z(),M(),Ei(),Ai=C(),ji=6}));function Ni(){return(0,Ii.jsx)(Pi,{})}function Pi(){let[e]=(0,Fi.useState)(()=>vn()&&re().voiceEnabled!==!0&&(L().voiceNoticeSeenCount??0)<Li&&!Di());return(0,Fi.useEffect)(()=>{if(!e)return;let t=(L().voiceNoticeSeenCount??0)+1;O(e=>(e.voiceNoticeSeenCount??0)>=t?e:{...e,voiceNoticeSeenCount:t})},[e]),e?(0,Ii.jsxs)(x,{paddingLeft:2,children:[(0,Ii.jsx)(bi,{}),(0,Ii.jsx)(_,{dimColor:!0,children:` Voice mode is now available · /voice to enable`})]}):null}var Fi,Ii,Li,Ri=t((()=>{h(),Fi=n(h(),1),y(),z(),se(),yn(),Ei(),Mi(),Ii=C(),Li=3}));function zi(){return null}var Bi=t((()=>{}));function Vi(){return null}var Hi=t((()=>{})),Ui=r({ChannelsNotice:()=>Wi,findUnmatched:()=>Ki});function Wi(){let[{channels:e,list:t,unmatched:n}]=(0,qi.useState)(()=>{let e=E();return e.length===0?{channels:e,list:``,unmatched:[]}:{channels:e,list:e.map(Gi).join(`, `),unmatched:Ki(e)}});if(e.length===0)return null;let r=e.some(e=>!e.dev),i=w()&&r?`Channels`:w()?`--dangerously-load-development-channels`:`--channels`;return(0,Ji.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,Ji.jsxs)(_,{color:`error`,children:[`Listening for channel messages from: `,t]}),(0,Ji.jsxs)(_,{dimColor:!0,children:[`Experimental · inbound messages will be pushed into this session, this carries prompt injection risks. Restart Claude Code without `,i,` to disable.`]}),n.map(e=>(0,Ji.jsxs)(_,{color:`warning`,children:[Gi(e.entry),` · `,e.why]},`${Gi(e.entry)}:${e.why}`))]})}function Gi(e){return e.kind===`plugin`?`plugin:${e.name}@${e.marketplace}`:`server:${e.name}`}function Ki(e,t){let n=t?.configuredServerNames??(()=>{let e=[`enterprise`,`user`,`project`,`local`],t=new Set;for(let n of e)for(let e of Object.keys($t(n).servers))t.add(e);return t})(),r=t?.installedPluginIds??(()=>{let e=new Set(Object.keys(ct().plugins)),t=rn();for(let n of[...t.enabled,...t.disabled])e.add(n.source);return e})(),i=[];for(let t of e){if(t.kind===`server`){n.has(t.name)||i.push({entry:t,why:`no MCP server configured with that name`});continue}r.has(`${t.name}@${t.marketplace}`)||i.push({entry:t,why:`plugin not installed`})}return i}var qi,Ji,Yi=t((()=>{h(),qi=n(h(),1),T(),an(),y(),_t(),$e(),Ji=C()}));function Xi(){let e=On(),t=L().oauthAccount?.displayName??``,{columns:n}=u(),r=mn(),i=Qe.isSandboxingEnabled(),o=ii(),s=Jn(),c=Gt(e=>e.agent),d=Gt(e=>e.effortValue),f=L(),p;try{p=jn(3)}catch{p=[]}let[m]=(0,Zi.useState)(()=>{let e=re().companyAnnouncements;if(!(!e||e.length===0))return f.numStartups===1?e[0]:e[Math.floor(Math.random()*e.length)]}),{hasReleaseNotes:h}=En(f.lastReleaseNotesSeen);(0,Zi.useEffect)(()=>{L().lastReleaseNotesSeen!==`2.7.2`&&(O(e=>e.lastReleaseNotesSeen===`2.7.2`?e:{...e,lastReleaseNotesSeen:`2.7.2`}),r&&pn())},[f,r]);let g=!h&&!r&&!a(process.env.CLAUDE_CODE_FORCE_FULL_LOGO);(0,Zi.useEffect)(()=>{o&&!r&&!g&&ai()},[o,r,g]),(0,Zi.useEffect)(()=>{s&&!r&&!o&&!g&&qn()},[s,r,o,g]);let v=Vn(),y=I(v),{version:S,cwd:C,billingType:w,agentName:ee}=Nn(),T=c??ee,E=Se(y+Xt(v,d),$i-20);if(!h&&!r&&!a(process.env.CLAUDE_CODE_FORCE_FULL_LOGO))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ui,{}),(0,G.jsx)(Ni,{}),(0,G.jsx)(Oi,{}),Qi&&(0,G.jsx)(Qi.ChannelsNotice,{}),fe()&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(_,{dimColor:!0,children:[`Logging to: `,le()?`stderr`:B()]})]}),(0,G.jsx)(pi,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(_,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(_,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Claude uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),m&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&f.oauthAccount?.organizationName&&(0,G.jsxs)(_,{dimColor:!0,children:[`Message from `,f.oauthAccount.organizationName,`:`]}),(0,G.jsx)(_,{children:m})]}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(_,{dimColor:!0,children:`Use /issue to report model behavior issues`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`[ANT-ONLY] Logs:`}),(0,G.jsxs)(_,{dimColor:!0,children:[`API calls: `,D(Pt())]}),(0,G.jsxs)(_,{dimColor:!0,children:[`Debug logs: `,D(B())]}),Ee()&&(0,G.jsxs)(_,{dimColor:!0,children:[`Startup Perf: `,D(De())]})]}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Vi,{})]});let k=Dn(n),te=Ln(L().theme),A=` ${b(`claude`,te)(`Claude Code`)} ${b(`inactive`,te)(`v${S}`)} `,ne=b(`claude`,te)(` Claude Code `);if(k===`compact`){let e=An(t);l(e)>n-4&&(e=An(null));let r=T?n-4-1-l(T)-3:n-4,a=kn(C,Math.max(r,10));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ht,{children:(0,G.jsxs)(x,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:ne,position:`top`,align:`start`,offset:1},paddingX:1,paddingY:1,alignItems:`center`,width:n,children:[(0,G.jsx)(_,{bold:!0,children:e}),(0,G.jsx)(x,{marginY:1,children:(0,G.jsx)(Er,{})}),(0,G.jsx)(_,{dimColor:!0,children:E}),(0,G.jsx)(_,{dimColor:!0,children:w}),(0,G.jsx)(_,{dimColor:!0,children:T?`@${T} · ${a}`:a})]})}),(0,G.jsx)(Ni,{}),(0,G.jsx)(Oi,{}),Qi&&(0,G.jsx)(Qi.ChannelsNotice,{}),i&&(0,G.jsx)(x,{marginTop:1,flexDirection:`column`,children:(0,G.jsx)(_,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Vi,{})]})}let j=An(t),M=!process.env.IS_DEMO&&f.oauthAccount?.organizationName?`${E} · ${w} · ${f.oauthAccount.organizationName}`:`${E} · ${w}`,N=T?$i-1-l(T)-3:$i,P=kn(C,Math.max(N,10)),F=T?`@${T} · ${P}`:P,{leftWidth:ie,rightWidth:R}=Fn(n,k,Mn(j,F,M));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ht,{children:(0,G.jsx)(x,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:A,position:`top`,align:`start`,offset:3},children:(0,G.jsxs)(x,{flexDirection:k===`horizontal`?`row`:`column`,paddingX:1,gap:1,children:[(0,G.jsxs)(x,{flexDirection:`column`,width:ie,justifyContent:`space-between`,alignItems:`center`,minHeight:9,children:[(0,G.jsx)(x,{marginTop:1,children:(0,G.jsx)(_,{bold:!0,children:j})}),(0,G.jsx)(Er,{}),(0,G.jsxs)(x,{flexDirection:`column`,alignItems:`center`,children:[(0,G.jsx)(_,{dimColor:!0,children:M}),(0,G.jsx)(_,{dimColor:!0,children:F})]})]}),k===`horizontal`&&(0,G.jsx)(x,{height:`100%`,borderStyle:`single`,borderColor:`claude`,borderDimColor:!0,borderTop:!1,borderBottom:!1,borderLeft:!1}),k===`horizontal`&&(0,G.jsx)(Pr,{feeds:r?[Br(fn()),Rr(e)]:o?[Rr(e),Vr()]:s?[Rr(e),Kn()]:[Rr(e),zr(p)],maxWidth:R})]})})}),(0,G.jsx)(Ni,{}),(0,G.jsx)(Oi,{}),Qi&&(0,G.jsx)(Qi.ChannelsNotice,{}),fe()&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(_,{dimColor:!0,children:[`Logging to: `,le()?`stderr`:B()]})]}),(0,G.jsx)(pi,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(_,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(_,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Claude uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),m&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&f.oauthAccount?.organizationName&&(0,G.jsxs)(_,{dimColor:!0,children:[`Message from `,f.oauthAccount.organizationName,`:`]}),(0,G.jsx)(_,{children:m})]}),i&&(0,G.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(_,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(_,{dimColor:!0,children:`Use /issue to report model behavior issues`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`[ANT-ONLY] Logs:`}),(0,G.jsxs)(_,{dimColor:!0,children:[`API calls: `,D(Pt())]}),(0,G.jsxs)(_,{dimColor:!0,children:[`Debug logs: `,D(B())]}),Ee()&&(0,G.jsxs)(_,{dimColor:!0,children:[`Startup Perf: `,D(De())]})]}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Vi,{})]})}var Zi,G,Qi,$i,ea=t((()=>{h(),y(),dn(),In(),Oe(),F(),Ar(),Lr(),Ur(),z(),Rn(),se(),ue(),Zi=n(h(),1),hn(),fi(),Ft(),Tn(),Bt(),i(),Te(),yi(),Ri(),Mi(),Bi(),Hi(),G=C(),He(),li(),Gn(),jt(),mt(),Hn(),M(),Qi=(Yi(),e(Ui)),$i=50}));function ta({message:e,isTranscriptMode:t}){let n=e.message?.content,r=Array.isArray(n)?n:[];if(!(t&&e.type===`assistant`&&e.message?.model&&r.some(e=>e?.type===`text`)))return null;let i=e.message.model;return(0,na.jsx)(x,{minWidth:l(i)+8,children:(0,na.jsx)(_,{dimColor:!0,children:i})})}var na,ra=t((()=>{h(),y(),na=C()}));function ia({message:e,isTranscriptMode:t}){if(!(t&&e.timestamp&&e.type===`assistant`&&Array.isArray(e.message.content)&&e.message.content.some(e=>e.type===`text`)))return null;let n=new Date(e.timestamp).toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,hour12:!0});return(0,aa.jsx)(x,{minWidth:l(n),children:(0,aa.jsx)(_,{dimColor:!0,children:n})})}var aa,oa=t((()=>{h(),y(),aa=C()}));function sa(e,t,n,r){for(let i=t+1;i<e.length;i++){let t=e[i];if(t?.type===`assistant`){let e=ma(t.message.content);if(e?.type===`thinking`||e?.type===`redacted_thinking`||e?.type===`tool_use`&&(lt(e.name,e.input,n).isCollapsible||r.has(e.id)))continue;return!0}if(!(t?.type===`system`||t?.type===`attachment`)&&!(t?.type===`user`&&ma(t.message.content)?.type===`tool_result`)){if(t?.type===`grouped_tool_use`){let e=ma(t.messages[0]?.message.content)?.input;if(lt(t.toolName,e,n).isCollapsible)continue}return!0}}return!1}function ca({message:e,isUserContinuation:t,hasContentAfter:n,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,streamingToolUseIDs:s,screen:c,canAnimate:l,onOpenRateLimitOptions:u,lastThinkingBlockId:d,latestBashOutputUUID:f,columns:p,isLoading:m,lookups:h,shouldCollapseDiffs:g}){let _=c===`transcript`,v=e.type===`grouped_tool_use`,y=e.type===`collapsed_read_search`,b=y&&(Fe(e,o)||m&&!n),S=v?e.displayMessage:y?Ze(e):e,C=v||y?[]:Ue(e,h),w=Mo(e,s,o,v||y?Ut:Ke(e,h),c,h),ee=!1;if(l)if(v)ee=e.messages.some(e=>{let t=ma(e.message.content);return t?.type===`tool_use`&&o.has(t.id)});else if(y)ee=Fe(e,o);else{let t=Xe(e);ee=!t||o.has(t)}let T=_&&S.type===`assistant`&&Array.isArray(S.message.content)&&S.message.content.some(e=>e.type===`text`)&&(S.timestamp||S.message.model),E=(0,pa.jsx)(at,{message:e,lookups:h,addMargin:!T,containerWidth:T?void 0:p,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,progressMessagesForMessage:C,shouldAnimate:ee,shouldShowDot:!0,isTranscriptMode:_,isStatic:w,onOpenRateLimitOptions:u,isActiveCollapsedGroup:b,isUserContinuation:t,lastThinkingBlockId:d,latestBashOutputUUID:f,shouldCollapseDiffs:g});return T?(0,pa.jsx)(Ht,{children:(0,pa.jsxs)(x,{width:p,flexDirection:`column`,children:[(0,pa.jsxs)(x,{flexDirection:`row`,justifyContent:`flex-end`,gap:1,marginTop:1,children:[(0,pa.jsx)(ia,{message:S,isTranscriptMode:_}),(0,pa.jsx)(ta,{message:S,isTranscriptMode:_})]}),E]})}):(0,pa.jsx)(Ht,{children:E})}function la(e,t){if(e.type===`grouped_tool_use`)return e.messages.some(e=>{let n=ma(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return Qt(e).some(e=>t.has(e));let n=Xe(e);return!!n&&t.has(n)}function ua(e,t){if(e.type===`grouped_tool_use`)return e.messages.every(e=>{let n=ma(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return Qt(e).every(e=>t.has(e));if(e.type===`assistant`){let n=ma(e.message.content);if(n?.type===`server_tool_use`)return t.has(n.id)}let n=Xe(e);return!n||t.has(n)}function da(e,t){if(e.message!==t.message||e.screen!==t.screen||e.verbose!==t.verbose||e.message.type===`collapsed_read_search`&&t.screen!==`transcript`||e.columns!==t.columns||e.latestBashOutputUUID===e.message.uuid!=(t.latestBashOutputUUID===t.message.uuid)||e.lastThinkingBlockId!==t.lastThinkingBlockId&&Ne(t.message))return!1;let n=la(e.message,e.streamingToolUseIDs),r=ua(e.message,e.lookups.resolvedToolUseIDs);return!(n||!r)}var fa,pa,ma,ha,ga=t((()=>{fa=n(h(),1),y(),gt(),ht(),Et(),pa=C(),ra(),Uo(),oa(),Ft(),ma=e=>{if(!Array.isArray(e))return;let t=e[0];if(!(t==null||typeof t==`string`))return t},ha=fa.memo(ca,da)}));function _a(e){return e.type===`attachment`&&va.has(e.attachment.type)}var va,ya=t((()=>{va=new Set(`hook_success.hook_additional_context.hook_cancelled.command_permissions.agent_mention.budget_usd.critical_system_reminder.edited_image_file.edited_text_file.opened_file_in_ide.output_style.plan_mode.plan_mode_exit.plan_mode_reentry.structured_output.team_context.todo_reminder.context_efficiency.deferred_tools_delta.mcp_instructions_delta.companion_intro.token_usage.ultrathink_effort.max_turns_reached.task_reminder.auto_mode.auto_mode_exit.output_token_usage.verify_plan_reminder.current_session_memory.compaction_reminder.date_change`.split(`.`))}));function ba(e){return Da.filter(t=>t.isActive(e))}var K,xa,Sa,Ca,wa,Ta,Ea,Da,Oa=t((()=>{y(),h(),ot(),o(),V(),Oe(),oe(),Zn(),Pe(),vt(),K=C(),xa={id:`large-memory-files`,type:`warning`,isActive:e=>xt(e.memoryFiles).length>0,render:e=>(0,K.jsx)(K.Fragment,{children:xt(e.memoryFiles).map(e=>{let t=e.path.startsWith(he())?er(he(),e.path):e.path;return(0,K.jsxs)(x,{flexDirection:`row`,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Large `,(0,K.jsx)(_,{bold:!0,children:t}),` will impact performance (`,we(e.content.length),` chars > `,we(Je),`)`,(0,K.jsx)(_,{dimColor:!0,children:` · /memory to edit`})]})]},e.path)})})},Sa={id:`claude-ai-external-token`,type:`warning`,isActive:()=>{let e=ce();return ie()&&(e.source===`ANTHROPIC_AUTH_TOKEN`||e.source===`apiKeyHelper`)},render:()=>{let e=ce();return(0,K.jsxs)(x,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Auth conflict: Using `,e.source,` instead of Claude account subscription token. Either unset`,` `,e.source,", or run `claude /logout`."]})]})}},Ca={id:`api-key-conflict`,type:`warning`,isActive:()=>{let{source:e}=A({skipRetrievingKeyFromApiKeyHelper:!0});return!!te()&&(e===`ANTHROPIC_API_KEY`||e===`apiKeyHelper`)},render:()=>{let{source:e}=A({skipRetrievingKeyFromApiKeyHelper:!0});return(0,K.jsxs)(x,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Auth conflict: Using `,e,` instead of Anthropic Console key. Either unset `,e,", or run `claude /logout`."]})]})}},wa={id:`both-auth-methods`,type:`warning`,isActive:()=>{let{source:e}=A({skipRetrievingKeyFromApiKeyHelper:!0}),t=ce();return e!==`none`&&t.source!==`none`&&!(e===`apiKeyHelper`&&t.source===`apiKeyHelper`)},render:()=>{let{source:e}=A({skipRetrievingKeyFromApiKeyHelper:!0}),t=ce();return(0,K.jsxs)(x,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(x,{flexDirection:`row`,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Auth conflict: Both a token (`,t.source,`) and an API key (`,e,`) are set. This may lead to unexpected behavior.`]})]}),(0,K.jsxs)(x,{flexDirection:`column`,marginLeft:3,children:[(0,K.jsxs)(_,{color:`warning`,children:[`· Trying to use `,t.source===`claude.ai`?`claude.ai`:t.source,`?`,` `,e===`ANTHROPIC_API_KEY`?`Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.`:e===`apiKeyHelper`?`Unset the apiKeyHelper setting.`:`claude /logout`]}),(0,K.jsxs)(_,{color:`warning`,children:[`· Trying to use `,e,`?`,` `,t.source===`claude.ai`?`claude /logout to sign out of claude.ai.`:`Unset the ${t.source} environment variable.`]})]})]})}},Ta={id:`large-agent-descriptions`,type:`warning`,isActive:e=>Xn(e.agentDefinitions)>Qn,render:e=>{let t=Xn(e.agentDefinitions);return(0,K.jsxs)(x,{flexDirection:`row`,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Large cumulative agent descriptions will impact performance (~`,we(t),` tokens > `,we(Qn),`)`,(0,K.jsx)(_,{dimColor:!0,children:` · /agents to manage`})]})]})}},Ea={id:`jetbrains-plugin-install`,type:`info`,isActive:e=>{if(!it()||!(e.config.autoInstallIdeExtension??!0))return!1;let t=nt();return t!==null&&!We(t)},render:()=>{let e=en(nt());return(0,K.jsxs)(x,{flexDirection:`row`,gap:1,marginLeft:1,children:[(0,K.jsx)(_,{color:`ide`,children:s.arrowUp}),(0,K.jsxs)(_,{children:[`Install the `,(0,K.jsx)(_,{color:`ide`,children:e}),` plugin from the JetBrains Marketplace:`,` `,(0,K.jsx)(_,{bold:!0,children:`https://docs.claude.com/s/claude-code-jetbrains`})]})]})}},Da=[xa,Ta,Sa,Ca,wa,Ea]}));function ka({agentDefinitions:e}={}){let t={config:L(),agentDefinitions:e,memoryFiles:(0,ja.use)(yt())},n=ba(t);return n.length===0?null:(0,Ma.jsx)(x,{flexDirection:`column`,paddingLeft:1,children:n.map(e=>(0,Ma.jsx)(Aa.Fragment,{children:e.render(t)},e.id))})}var Aa,ja,Ma,Na=t((()=>{Aa=n(h(),1),ja=n(h(),1),y(),ot(),z(),Oa(),Ma=C()}));function Pa(e,t,n){let r=(0,q.useRef)(new Map),i=(0,q.useRef)(0),a=(0,q.useRef)(0),o=(0,q.useRef)({arr:new Float64Array,version:-1,n:-1}),s=(0,q.useRef)(new Map),c=(0,q.useRef)(new Map),l=(0,q.useRef)(n),u=(0,q.useRef)(!1),d=(0,q.useRef)(null),f=(0,q.useRef)(0);if(l.current!==n){let e=l.current/n;l.current=n;for(let[t,n]of r.current)r.current.set(t,Math.max(1,Math.round(n*e)));i.current++,u.current=!0,f.current=2}let p=f.current>0?d.current:null,m=(0,q.useRef)(0),h=(0,q.useRef)(null);(0,q.useSyncExternalStore)((0,q.useCallback)(t=>e.current?.subscribe(t)??Ha,[e]),()=>{let t=e.current;if(!t)return NaN;let n=t.getScrollTop()+t.getPendingDelta(),r=Math.floor(n/Ra);return t.isSticky()?~r:r});let g=e.current?.getScrollTop()??-1,_=e.current?.getPendingDelta()??0,v=e.current?.getViewportHeight()??0,y=e.current?.isSticky()??!0;(0,q.useMemo)(()=>{let e=new Set(t),n=!1;for(let t of r.current.keys())e.has(t)||(r.current.delete(t),n=!0);for(let t of c.current.keys())e.has(t)||c.current.delete(t);n&&i.current++},[t]);let b=t.length;if(o.current.version!==i.current||o.current.n!==b){let e=o.current.arr.length>=b+1?o.current.arr:new Float64Array(b+1);e[0]=0;for(let n=0;n<b;n++)e[n+1]=e[n]+(r.current.get(t[n])??Fa);o.current={arr:e,version:i.current,n:b}}let x=o.current.arr,S=x[b],C,w;if(p)[C,w]=p,C=Math.min(C,b),w=Math.min(w,b);else if(v===0||g<0)C=Math.max(0,b-La),w=b;else{if(y){let e=v+Ia;for(C=b;C>0&&S-x[C-1]<e;)C--;w=b}else{let e=m.current,n=v*3,i=Math.min(g,g+_),a=Math.max(g,g+_),o=a-i,c=o>n&&_<0?a-n:i,l=c+Math.min(o,n),u=Math.max(0,c-e),f=l-e,p=u-Ia;{let e=0,t=b;for(;e<t;){let n=e+t>>1;x[n+1]<=p?e=n+1:t=n}C=e}{let e=d.current;if(e&&e[0]<C)for(let n=e[0];n<Math.min(C,e[1]);n++){let e=t[n];if(s.current.has(e)&&!r.current.has(e)){C=n;break}}}let h=v+2*Ia,y=Math.min(b,C+Ba),S=0;for(w=C;w<y&&(S<h||x[w]<f+v+Ia);)S+=r.current.get(t[w])??za,w++}let e=v+2*Ia,n=Math.max(0,w-Ba),i=0;for(let e=C;e<w;e++)i+=r.current.get(t[e])??za;for(;C>n&&i<e;)C--,i+=r.current.get(t[C])??za;let o=d.current,c=Math.abs(g-a.current)+Math.abs(_);if(o&&c>v*2){let[e,t]=o;C<e-Va&&(C=e-Va),w>t+Va&&(w=t+Va),C>w&&(w=Math.min(C+Va,b))}a.current=g}f.current>0?f.current--:d.current=[C,w];let ee=(0,q.useDeferredValue)(C),T=(0,q.useDeferredValue)(w),E=C<ee?ee:C,D=w>T?T:w;if((E>D||y)&&(E=C,D=w),_>0&&(D=w),D-E>Ba){let e=(x[E]+x[D])/2;g-m.current<e?D=E+Ba:E=D-Ba}let O=m.current,k=x[E],te=E===0?0:k+O,A=D===b?1/0:Math.max(k,x[D]-v)+O;(0,q.useLayoutEffect)(()=>{y?e.current?.setClampBounds(void 0,void 0):e.current?.setClampBounds(te,A)}),(0,q.useLayoutEffect)(()=>{let e=h.current?.yogaNode;if(e&&e.getComputedWidth()>0&&(m.current=e.getComputedTop()),u.current){u.current=!1;return}let t=!1;for(let[e,n]of s.current){let i=n.yogaNode;if(!i)continue;let a=i.getComputedHeight(),o=r.current.get(e);a>0?o!==a&&(r.current.set(e,a),t=!0):i.getComputedWidth()>0&&o!==0&&(r.current.set(e,0),t=!0)}t&&i.current++});let ne=(0,q.useCallback)(e=>{let t=c.current.get(e);return t||(t=t=>{if(t)s.current.set(e,t);else{let t=s.current.get(e)?.yogaNode;if(t&&!u.current){let n=t.getComputedHeight();(n>0||t.getComputedWidth()>0)&&r.current.get(e)!==n&&(r.current.set(e,n),i.current++)}s.current.delete(e)}},c.current.set(e,t)),t},[]),re=(0,q.useCallback)(e=>{let n=s.current.get(t[e])?.yogaNode;return!n||n.getComputedWidth()===0?-1:n.getComputedTop()},[t]),j=(0,q.useCallback)(e=>s.current.get(t[e])??null,[t]),M=(0,q.useCallback)(e=>r.current.get(t[e]),[t]),N=(0,q.useCallback)(t=>{let n=o.current;t<0||t>=n.n||e.current?.scrollTo(n.arr[t]+m.current)},[e]),P=S-x[D];return{range:[E,D],topSpacer:k,bottomSpacer:P,measureRef:ne,spacerRef:h,offsets:x,getItemTop:re,getItemElement:j,getItemHeight:M,scrollToIndex:N}}var q,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua=t((()=>{q=n(h(),1),Fa=3,Ia=40,La=30,Ra=Ia>>1,za=1,Ba=200,Va=25,Ha=()=>{}}));function Wa({children:e}){let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null);return(0,Ya.jsx)(Za.Provider,{value:n,children:(0,Ya.jsx)($a.Provider,{value:i,children:(0,Ya.jsx)(Xa.Provider,{value:t,children:(0,Ya.jsx)(Qa.Provider,{value:r,children:e})})})})}function Ga(){return(0,J.useContext)(Xa)}function Ka(){return(0,J.useContext)(Qa)}function qa(e){let t=(0,J.useContext)(Za);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}function Ja(e){let t=(0,J.useContext)($a);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}var J,Ya,Xa,Za,Qa,$a,eo=t((()=>{J=n(h(),1),Ya=C(),Xa=(0,J.createContext)(null),Za=(0,J.createContext)(null),Qa=(0,J.createContext)(null),$a=(0,J.createContext)(null)}));function to(e){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(e);r.current=e;let i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{n(null)},[]),o=(0,Y.useCallback)(e=>{let t=Math.max(0,e.getScrollHeight()-e.getViewportHeight());e.getScrollTop()+e.getPendingDelta()>=t||i.current===null&&(i.current=e.getScrollHeight(),n(r.current))},[]),s=(0,Y.useCallback)(e=>{e&&e.scrollToBottom()},[]);return(0,Y.useEffect)(()=>{t===null?i.current=null:e<t&&(i.current=null,n(null))},[e,t]),{dividerIndex:t,dividerYRef:i,onScrollAway:o,onRepin:a,jumpToNew:s,shiftDivider:(0,Y.useCallback)((e,t)=>{n(t=>t===null?null:t+e),i.current!==null&&(i.current+=t)},[])}}function no(e,t){let n=0,r=!1;for(let i=t;i<e.length;i++){let t=e[i];if(t.type===`progress`||t.type===`assistant`&&!ro(t))continue;let a=t.type===`assistant`;a&&!r&&n++,r=a}return n}function ro(e){if(e.type!==`assistant`||!Array.isArray(e.message.content))return!1;for(let t of e.message.content)if(typeof t!=`string`&&t.type===`text`&&t.text.trim()!==``)return!0;return!1}function io(e,t){if(t===null)return;let n=t;for(;n<e.length&&(e[n]?.type===`progress`||_a(e[n]));)n++;let r=e[n]?.uuid;if(!r)return;let i=no(e,t);return{firstUnseenUuid:r,count:Math.max(1,i)}}function ao({scrollable:e,bottom:t,overlay:n,bottomFloat:r,modal:i,modalScrollRef:a,scrollRef:o,dividerYRef:s,hidePill:c=!1,hideSticky:l=!1,newMessageCount:d=0,onPillClick:f}){let{rows:p,columns:h}=u(),[v,y]=(0,Y.useState)(null),b=(0,Y.useMemo)(()=>({setStickyPrompt:y}),[]),S=(0,Y.useSyncExternalStore)((0,Y.useCallback)(e=>o?.current?.subscribe(e)??(()=>{}),[o]),()=>{let e=o?.current,t=s?.current;return!e||t==null?!1:e.getScrollTop()+e.getPendingDelta()+e.getViewportHeight()<t});if((0,Y.useLayoutEffect)(()=>{if(!ft())return;let e=m.get(process.stdout);if(e)return e.onHyperlinkClick=e=>{if(e.startsWith(`file:`))try{ln(tr(e))}catch{}else cn(e)},()=>{e.onHyperlinkClick=void 0}},[]),ft()){let s=l?null:v,u=s!=null&&s!==`clicked`&&n==null?s:null,m=s!=null&&n==null;return(0,X.jsxs)(Wa,{children:[(0,X.jsx)(x,{flexDirection:`row`,flexGrow:1,overflow:`hidden`,width:`100%`,children:(0,X.jsxs)(x,{flexDirection:`column`,flexGrow:1,width:h,overflow:`hidden`,children:[(0,X.jsxs)(x,{flexGrow:1,flexDirection:`column`,overflow:`hidden`,children:[u&&(0,X.jsx)(so,{text:u.text,onClick:u.scrollTo}),(0,X.jsxs)(g,{ref:o,flexGrow:1,flexDirection:`column`,paddingTop:+!m,stickyScroll:!0,children:[(0,X.jsx)(fo,{value:b,children:e}),n]}),!c&&S&&n==null&&(0,X.jsx)(oo,{count:d,onClick:f}),r!=null&&(0,X.jsx)(x,{position:`absolute`,bottom:0,right:0,opaque:!0,children:r})]}),(0,X.jsxs)(x,{flexDirection:`column`,flexShrink:0,width:`100%`,maxHeight:`50%`,children:[(0,X.jsx)(co,{}),(0,X.jsx)(lo,{}),(0,X.jsx)(x,{flexDirection:`column`,width:`100%`,flexGrow:1,overflowY:`hidden`,children:t})]})]})}),i!=null&&(0,X.jsx)(Wn,{value:{rows:p-uo-1,columns:h-4,scrollRef:a??null},children:(0,X.jsxs)(x,{position:`absolute`,bottom:0,left:0,right:0,maxHeight:p-uo,flexDirection:`column`,overflow:`hidden`,opaque:!0,children:[(0,X.jsx)(x,{flexShrink:0,children:(0,X.jsx)(_,{color:`permission`,children:`▔`.repeat(h)})}),(0,X.jsx)(x,{flexDirection:`column`,paddingX:2,flexShrink:0,overflow:`hidden`,children:i})]})})]})}return(0,X.jsxs)(X.Fragment,{children:[e,t,n,i]})}function oo({count:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(x,{position:`absolute`,bottom:0,left:0,right:0,justifyContent:`center`,children:(0,X.jsx)(x,{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(_,{backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,dimColor:!0,children:[` `,e>0?`${e} new ${ke(e,`message`)}`:`Jump to bottom`,` `,s.arrowDown,` `]})})})}function so({text:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(x,{flexShrink:0,width:`100%`,height:1,paddingRight:1,backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(_,{color:`subtle`,wrap:`truncate-end`,children:[s.pointer,` `,e]})})}function co(){let e=Ga();return!e||e.suggestions.length===0?null:(0,X.jsx)(x,{position:`absolute`,bottom:`100%`,left:0,right:0,paddingX:2,paddingTop:1,flexDirection:`column`,opaque:!0,children:(0,X.jsx)(zn,{suggestions:e.suggestions,selectedSuggestion:e.selectedSuggestion,maxColumnWidth:e.maxColumnWidth,overlay:!0})})}function lo(){let e=Ka();return e?(0,X.jsx)(x,{position:`absolute`,bottom:`100%`,left:0,right:0,opaque:!0,children:e}):null}var Y,X,uo,fo,po=t((()=>{o(),Y=n(h(),1),Un(),eo(),dn(),y(),un(),Ie(),Ae(),ya(),Bn(),X=C(),uo=2,fo=(0,Y.createContext)({setStickyPrompt:()=>{}})}));function mo(e){let t=So.get(e);if(t!==void 0)return t;let n=vr(e);return So.set(e,n),n}function ho(e){let t=wo.get(e);if(t!==void 0)return t;let n=go(e);return wo.set(e,n),n}function go(e){let t=null;if(e.type===`user`){if(e.isMeta||e.isVisibleInTranscriptOnly)return null;let n=e.message.content[0];if(n?.type!==`text`)return null;t=n.text??null}else if(e.type===`attachment`&&e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text??``]:[]).join(`
|
|
11
|
-
`)}if(t===null)return null;let n=qt(t);return n.startsWith(`<`)||n===``?null:n}function _o({itemKey:e,msg:t,idx:n,measureRef:r,expanded:i,hovered:a,clickable:o,onClickK:s,onEnterK:c,onLeaveK:l,renderItem:u}){return(0,bo.jsx)(x,{ref:r(e),flexDirection:`column`,backgroundColor:i?`userMessageBackgroundHover`:void 0,paddingBottom:i?1:void 0,onClick:o?e=>s(t,e.cellIsBlank):void 0,onMouseEnter:o?()=>c(e):void 0,onMouseLeave:o?()=>l(e):void 0,children:(0,bo.jsx)(S.Provider,{value:a&&!i?`text`:void 0,children:u(t,n)})})}function vo({messages:e,scrollRef:t,columns:n,itemKey:r,renderItem:i,onItemClick:a,isItemClickable:o,isItemExpanded:s,extractSearchText:c=mo,trackStickyPrompt:l,selectedIndex:u,cursorNavRef:d,setCursor:f,jumpRef:p,onSearchMatchesChange:m,scanElement:h,setPositions:g}){let _=(0,Z.useRef)([]),v=(0,Z.useRef)(e),y=(0,Z.useRef)(r);if(y.current!==r||e.length<_.current.length||e[0]!==v.current[0])_.current=e.map(e=>r(e));else for(let t=_.current.length;t<e.length;t++)_.current.push(r(e[t]));v.current=e,y.current=r;let b=_.current,{range:S,topSpacer:C,bottomSpacer:w,measureRef:ee,spacerRef:T,offsets:E,getItemTop:D,getItemElement:O,getItemHeight:k,scrollToIndex:te}=Pa(t,b,n),[A,ne]=S,re=(0,Z.useCallback)(t=>k(t)===0?!1:Le(e[t]),[k,e]);(0,Z.useImperativeHandle)(d,()=>{let n=e=>f?.({uuid:e.uuid,msgType:e.type,expanded:!1,toolName:pt(e)?.name}),r=u??-1,i=(t,r,i=re)=>{for(let a=t;a>=0&&a<e.length;a+=r)if(i(a))return n(e[a]),!0;return!1},a=t=>re(t)&&e[t].type===`user`;return{enterCursor:()=>i(e.length-1,-1,a),navigatePrev:()=>i(r-1,-1),navigateNext:()=>{i(r+1,1)||(t.current?.scrollToBottom(),f?.(null))},navigatePrevUser:()=>i(r-1,-1,a),navigateNextUser:()=>i(r+1,1,a),navigateTop:()=>i(0,1),navigateBottom:()=>i(e.length-1,-1),getSelected:()=>r>=0?e[r]??null:null}},[e,u,f,re]);let j=(0,Z.useRef)({offsets:E,start:A,getItemElement:O,getItemTop:D,messages:e,scrollToIndex:te});j.current={offsets:E,start:A,getItemElement:O,getItemTop:D,messages:e,scrollToIndex:te},(0,Z.useEffect)(()=>{if(u===void 0)return;let e=j.current,n=e.getItemElement(u);n?t.current?.scrollToElement(n,1):e.scrollToIndex(u)},[u,t]);let M=(0,Z.useRef)(null),N=(0,Z.useRef)({msgIdx:-1,positions:[]}),P=(0,Z.useRef)(-1),F=(0,Z.useRef)(0),I=(0,Z.useRef)(0),L=(0,Z.useRef)(()=>{}),ie=(0,Z.useRef)(()=>{}),R=(0,Z.useRef)({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),ae=(0,Z.useRef)(-1),oe=(0,Z.useRef)(!1);function se(e){let t=j.current.getItemTop(e);return Math.max(0,t-xo)}function ce(e){let n=t.current,{msgIdx:r,positions:i}=N.current;if(!n||i.length===0||r<0){g?.(null);return}let a=Math.max(0,Math.min(e,i.length-1)),o=i[a],s=j.current.getItemTop(r),c=n.getViewportTop(),l=s-n.getScrollTop(),u=n.getViewportHeight(),d=c+l+o.row;(d<c||d>=c+u)&&(n.scrollTo(Math.max(0,s+o.row-xo)),l=s-n.getScrollTop(),d=c+l+o.row),g?.({positions:i,rowOffset:c+l,currentIdx:a});let f=R.current,p=f.prefixSum.at(-1)??0,h=(f.prefixSum[f.ptr]??0)+a+1;m?.(p,h),de(`highlight(i=${r}, ord=${a}/${i.length}): pos={row:${o.row},col:${o.col}} lo=${l} screenRow=${d} badge=${h}/${p}`)}ie.current=ce;let[z,le]=(0,Z.useState)(0),ue=(0,Z.useCallback)(()=>le(e=>e+1),[]);(0,Z.useEffect)(()=>{let e=M.current;if(!e)return;let{idx:n,wantLast:r,tries:i}=e,a=t.current;if(!a)return;let{getItemElement:o,getItemTop:s,scrollToIndex:c}=j.current,l=o(n),u=l?.yogaNode?.getComputedHeight()??0;if(!l||u===0){if(i>1){M.current=null,de(`seek(i=${n}): no mount after scrollToIndex, skip`),L.current(r?-1:1);return}M.current={idx:n,wantLast:r,tries:i+1},c(n),ue();return}M.current=null,a.scrollTo(Math.max(0,s(n)-xo));let d=h?.(l)??[];if(N.current={msgIdx:n,positions:d},de(`seek(i=${n} t=${i}): ${d.length} positions`),d.length===0){if(++F.current>20){F.current=0;return}L.current(r?-1:1);return}F.current=0;let f=r?d.length-1:0;R.current.screenOrd=f,P.current=-1,ie.current(f);let p=I.current;p&&(I.current=0,L.current(p))},[z]);function B(e,n){let r=t.current;if(!r)return;let i=j.current,{getItemElement:a,scrollToIndex:o}=i;if(e<0||e>=i.messages.length)return;g?.(null),N.current={msgIdx:-1,positions:[]},M.current={idx:e,wantLast:n,tries:0};let s=a(e),c=s?.yogaNode?.getComputedHeight()??0;s&&c>0?r.scrollTo(se(e)):o(e),ue()}function fe(e){let t=R.current,{matches:n,prefixSum:r}=t,i=r.at(-1)??0;if(n.length===0)return;if(M.current){I.current=e;return}P.current<0&&(P.current=t.ptr);let{positions:a}=N.current,o=t.screenOrd+e;if(o>=0&&o<a.length){t.screenOrd=o,ce(o),P.current=-1;return}let s=(t.ptr+e+n.length)%n.length;if(s===P.current){g?.(null),P.current=-1,de(`step: wraparound at ptr=${s}, all ${n.length} msgs phantoms`);return}t.ptr=s,t.screenOrd=0,B(n[s],e<0);let c=e<0?r[s+1]??i:r[s]+1;m?.(i,c)}L.current=fe,(0,Z.useImperativeHandle)(p,()=>({jumpToIndex:e=>{let n=t.current;n&&n.scrollTo(se(e))},setSearchQuery:e=>{M.current=null,N.current={msgIdx:-1,positions:[]},P.current=-1,g?.(null);let n=e.toLowerCase(),r=[],i=[0];if(n){let e=j.current.messages;for(let t=0;t<e.length;t++){let a=c(e[t]),o=a.indexOf(n),s=0;for(;o>=0;)s++,o=a.indexOf(n,o+n.length);s>0&&(r.push(t),i.push(i.at(-1)+s))}}let a=i.at(-1),o=0,s=t.current,{offsets:l,start:u,getItemTop:d}=j.current,f=d(u),p=f>=0?f-l[u]:0;if(r.length>0&&s){let t=ae.current>=0?ae.current:s.getScrollTop(),n=1/0;for(let e=0;e<r.length;e++){let i=Math.abs(p+l[r[e]]-t);i<=n&&(n=i,o=e)}de(`setSearchQuery('${e}'): ${r.length} msgs · ptr=${o} msgIdx=${r[o]} curTop=${t} origin=${p}`)}R.current={matches:r,ptr:o,screenOrd:0,prefixSum:i},r.length>0?B(r[o],!0):ae.current>=0&&s&&s.scrollTo(ae.current),m?.(a,r.length>0?i[o+1]??a:0)},nextMatch:()=>fe(1),prevMatch:()=>fe(-1),setAnchor:()=>{let e=t.current;e&&(ae.current=e.getScrollTop())},disarmSearch:()=>{g?.(null),M.current=null,N.current={msgIdx:-1,positions:[]},P.current=-1},warmSearchIndex:async()=>{if(oe.current)return 0;let e=j.current.messages,t=0,n=performance.now();for(let n=0;n<e.length;n+=500){await je(0);let r=performance.now(),i=Math.min(n+500,e.length);for(let t=n;t<i;t++)c(e[t]);t+=performance.now()-r}let r=Math.round(performance.now()-n);return de(`warmSearchIndex: ${e.length} msgs · work=${Math.round(t)}ms wall=${r}ms chunks=${Math.ceil(e.length/500)}`),oe.current=!0,Math.round(t)}}),[t]);let[pe,me]=(0,Z.useState)(null),V=(0,Z.useRef)({onItemClick:a,setHoveredKey:me});V.current={onItemClick:a,setHoveredKey:me};let he=(0,Z.useCallback)((e,t)=>{let n=V.current;!t&&n.onItemClick&&n.onItemClick(e)},[]),ge=(0,Z.useCallback)(e=>{V.current.setHoveredKey(e)},[]),_e=(0,Z.useCallback)(e=>{V.current.setHoveredKey(t=>t===e?null:t)},[]);return(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(x,{ref:T,height:C,flexShrink:0}),e.slice(A,ne).map((e,t)=>{let n=A+t,r=b[n],c=!!a&&(o?.(e)??!0),l=c&&pe===r,u=s?.(e);return(0,bo.jsx)(_o,{itemKey:r,msg:e,idx:n,measureRef:ee,expanded:u,hovered:l,clickable:c,onClickK:he,onEnterK:ge,onLeaveK:_e,renderItem:i},r)}),w>0&&(0,bo.jsx)(x,{height:w,flexShrink:0}),l&&(0,bo.jsx)(yo,{messages:e,start:A,end:ne,offsets:E,getItemTop:D,getItemElement:O,scrollRef:t})]})}function yo({messages:e,start:t,end:n,offsets:r,getItemTop:i,getItemElement:a,scrollRef:o}){let{setStickyPrompt:s}=(0,Z.useContext)(fo);(0,Z.useSyncExternalStore)((0,Z.useCallback)(e=>o.current?.subscribe(e)??To,[o]),()=>{let e=o.current;if(!e)return NaN;let t=e.getScrollTop()+e.getPendingDelta();return e.isSticky()?-1-t:t});let c=o.current?.isSticky()??!0,l=Math.max(0,(o.current?.getScrollTop()??0)+(o.current?.getPendingDelta()??0)),u=t,d=-1;for(let e=n-1;e>=t;e--){let t=i(e);if(t>=0){if(t<l)break;d=t}u=e}let f=-1,p=null;if(u>0&&!c)for(let t=u-1;t>=0;t--){let n=ho(e[t]);if(n===null)continue;let r=i(t);if(!(r>=0&&r+1>=l)){f=t,p=n;break}}let m=d>=0?d-r[u]:0,h=f>=0?Math.max(0,m+r[f]):-1,g=(0,Z.useRef)({idx:-1,tries:0}),_=(0,Z.useRef)(`none`),v=(0,Z.useRef)(-1);return(0,Z.useEffect)(()=>{if(g.current.idx>=0)return;if(_.current===`armed`){_.current=`force`;return}let e=_.current===`force`;if(_.current=`none`,!e&&v.current===f)return;if(v.current=f,p===null){s(null);return}let t=p.trimStart(),n=t.search(/\n\s*\n/),r=(n>=0?t.slice(0,n):t).slice(0,Co).replace(/\s+/g,` `).trim();if(r===``){s(null);return}let i=f,c=h;s({text:r,scrollTo:()=>{s(`clicked`),_.current=`armed`;let e=a(i);e?o.current?.scrollToElement(e,1):(o.current?.scrollTo(c),g.current={idx:i,tries:0})}})}),(0,Z.useEffect)(()=>{if(g.current.idx<0)return;let e=a(g.current.idx);e?(o.current?.scrollToElement(e,1),g.current={idx:-1,tries:0}):++g.current.tries>5&&(g.current={idx:-1,tries:0})}),null}var Z,bo,xo,So,Co,wo,To,Eo=t((()=>{h(),Z=n(h(),1),Ua(),y(),dt(),po(),bo=C(),ue(),Me(),Tr(),ut(),xo=3,So=new WeakMap,Co=500,wo=new WeakMap,To=()=>{}}));function Do(e,t){let n=new Set(t),r=new Set;return e.filter(e=>{if(e.type===`system`)return e.subtype!==`api_metrics`;let t=e.message?.content[0];if(e.type===`assistant`)return e.isApiErrorMessage?!0:t?.type===`tool_use`&&t.name&&n.has(t.name)?(`id`in t&&r.add(t.id),!0):!1;if(e.type===`user`)return t?.type===`tool_result`?t.tool_use_id!==void 0&&r.has(t.tool_use_id):!e.isMeta;if(e.type===`attachment`){let t=e.attachment;return t?.type===`queued_command`&&t.commandMode===`prompt`&&!t.isMeta&&t.origin===void 0}return!1})}function Oo(e,t){let n=new Set(t),r=new Set,i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t],s=o.message?.content[0];if(o.type===`user`&&s?.type!==`tool_result`&&!o.isMeta){a++;continue}o.type===`assistant`&&(s?.type===`text`?i[t]=a:s?.type===`tool_use`&&s.name&&n.has(s.name)&&r.add(a))}return r.size===0?e:e.filter((e,t)=>{let n=i[t];return n===void 0||!r.has(n)})}function ko(e,t,n=zo,r=Bo){let i=t.current,a=i?e.findIndex(e=>e.uuid===i.uuid):-1,o=a>=0?a:i?Math.min(i.idx,Math.max(0,e.length-n)):0;e.length-o>n+r&&(o=e.length-n);let s=e[o];return s&&(i?.uuid!==s.uuid||i.idx!==o)?t.current={uuid:s.uuid,idx:o}:!s&&i&&(t.current=null),o}function Ao(e){return(e.type===`assistant`||e.type===`user`?Xe(e):null)??e.uuid}function jo(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Mo(e,t,n,r,i,a){if(i===`transcript`)return!0;switch(e.type){case`attachment`:case`user`:case`assistant`:{if(e.type===`assistant`){let t=e.message.content[0];if(t?.type===`server_tool_use`)return a.resolvedToolUseIDs.has(t.id)}let i=Xe(e);return i?t.has(i)||n.has(i)||Ge(i,`PostToolUse`,a)?!1:nr(r,a.resolvedToolUseIDs):!0}case`system`:return e.subtype!==`api_error`;case`grouped_tool_use`:return e.messages.every(e=>{let t=e.message.content[0];return t?.type===`tool_use`&&a.resolvedToolUseIDs.has(t.id)});case`collapsed_read_search`:return!1;default:return!0}}var No,Q,$,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo=t((()=>{p(),gn(),No=n(h(),1),Q=n(h(),1),rr(),T(),N(),dn(),y(),ze(),tn(),Re(),or(),lr(),gt(),fr(),z(),i(),Ie(),_r(),ht(),Ae(),Tr(),ea(),zt(),ga(),ut(),Lt(),ya(),Ft(),Na(),$=C(),Eo(),Po=No.memo(function({agentDefinitions:e}){return(0,$.jsx)(Ht,{children:(0,$.jsxs)(x,{flexDirection:`column`,gap:1,children:[(0,$.jsx)(Xi,{}),(0,$.jsx)(No.Suspense,{fallback:null,children:(0,$.jsx)(ka,{agentDefinitions:e})})]})})}),Fo=(sn(),e(on)),Io=(k(),e(ne)).BRIEF_TOOL_NAME,Lo=(bt(),e(Ct)).SEND_USER_FILE_TOOL_NAME,Ro=30,zo=200,Bo=50,Vo=({messages:e,tools:t,commands:n,verbose:r,toolJSX:i,toolUseConfirmQueue:o,inProgressToolUseIDs:s,isMessageSelectorVisible:c,conversationId:l,screen:p,streamingToolUses:m,showAllInTranscript:h=!1,agentDefinitions:g,onOpenRateLimitOptions:y,hideLogo:b=!1,isLoading:S,hidePastThinking:C=!1,streamingThinking:w,streamingText:T,isBriefOnly:E=!1,unseenDivider:D,scrollRef:O,trackStickyPrompt:k,jumpRef:te,onSearchMatchesChange:A,scanElement:ne,setPositions:re,disableRenderCap:j=!1,cursor:M=null,setCursor:N,cursorNavRef:P,renderRange:F})=>{let{columns:I}=u(),ie=et(`transcript:toggleShowAll`,`Transcript`,`Ctrl+E`),R=(0,Q.useMemo)(()=>St(e).filter(Ye),[e]),oe=(0,Q.useMemo)(()=>w?w.isStreaming?!0:w.streamingEndedAt?Date.now()-w.streamingEndedAt<3e4:!1:!1,[w]),{lastThinkingBlockId:se,latestBashOutputUUID:ce}=(0,Q.useMemo)(()=>{let e=null,t=null,n=C&&!oe;C&&oe&&(e=`streaming`);for(let r=R.length-1;r>=0;r--){let i=R[r];if(i?.type===`user`){let r=i.message.content;if(!t){for(let e of r)if(e.type===`text`){let n=e.text??``;if(n.startsWith(`<bash-stdout`)||n.startsWith(`<bash-stderr`)){t=i.uuid;break}}}n&&!e&&(r.some(e=>e.type===`tool_result`)||(e=`no-thinking`))}else if(i?.type===`assistant`&&n&&!e){let t=i.message.content;for(let n=t.length-1;n>=0;n--)if(t[n]?.type===`thinking`){e=`${i.uuid}:${n}`;break}}if(e!==null&&t)break}return C||(e=null),{lastThinkingBlockId:e,latestBashOutputUUID:t}},[R,C,oe]),z=(0,Q.useMemo)(()=>st(R),[R]),le=(0,Q.useMemo)(()=>m.filter(e=>!s.has(e.contentBlock.id)&&!z.has(e.contentBlock.id)),[m,s,z]),ue=(0,Q.useMemo)(()=>le.flatMap(e=>{let t=At({content:[e.contentBlock]});return t.uuid=Be(e.contentBlock.id,0),St([t])}),[le]),B=p===`transcript`,de=(0,Q.useMemo)(()=>a(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),fe=O!=null&&!de,pe=B&&!h&&!fe,me=(0,Q.useRef)(null),V=(0,Q.useRef)(null),{collapsed:he,lookups:ge,hasTruncatedMessages:_e,hiddenMessageCount:ve}=(0,Q.useMemo)(()=>{let e=Dt((r||ft()?R:rt(R,{includeSnipped:!0})).filter(e=>e.type!==`progress`&&!_a(e)&&Wt(e,B)),ue),n=[Io,Lo].filter(e=>e!==null),i=[Io].filter(e=>e!==null),a=n.length>0&&!B?E?Do(e,n):i.length>0?Oo(e,i):e:e,o=pe?a.slice(-Ro):a,s=pe&&a.length>Ro,{messages:c}=hr(o,t,r),l=ar(cr(dr(qe(c,t))),r),u=Kt(R,o),d=(()=>{let e=o.at(-1);return e?.type===`assistant`?e.message?.id:void 0})(),f;if(V.current&&V.current.key===u)f=V.current.lookups;else if(V.current&&R.length>=V.current.normalizedCount&&o.length>=V.current.messageCount&&V.current.lastAssistantMsgId===d){let e=Tt(V.current.lookups,V.current.normalizedCount,V.current.messageCount,R,o);e?(f=e,V.current={key:u,lookups:f,normalizedCount:R.length,messageCount:o.length,lastAssistantMsgId:d}):(f=Mt(R,o),V.current={key:u,lookups:f,normalizedCount:R.length,messageCount:o.length,lastAssistantMsgId:d})}else f=Mt(R,o),V.current={key:u,lookups:f,normalizedCount:R.length,messageCount:o.length,lastAssistantMsgId:d};let p=e.length-Ro;return{collapsed:l,lookups:f,hasTruncatedMessages:s,hiddenMessageCount:p}},[r,R,B,ue,pe,t,E]),ye=(0,Q.useMemo)(()=>{let e=!fe&&!j?ko(he,me):0;return F?he.slice(F[0],F[1]):e>0?he.slice(e):he},[he,F,fe,j]),be=(0,Q.useMemo)(()=>new Set(m.map(e=>e.contentBlock.id)),[m]),{dividerBeforeIndex:xe,selectedIdx:Se}=(0,Q.useMemo)(()=>{if(!D&&!M)return{dividerBeforeIndex:-1,selectedIdx:-1};let e=-1,t=-1,n=D?.firstUnseenUuid.slice(0,24);for(let r=0;r<ye.length;r++){let i=ye[r];if(e===-1&&n&&i.uuid.slice(0,24)===n&&(e=r),t===-1&&M&&i.uuid===M.uuid&&(t=r),e!==-1&&t!==-1)break}return{dividerBeforeIndex:e,selectedIdx:t}},[D,M,ye]),[Ce,we]=(0,Q.useState)(()=>new Set),Te=(0,Q.useCallback)(e=>{let t=Ao(e);we(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),Ee=(0,Q.useCallback)(e=>Ce.size>0&&Ce.has(Ao(e)),[Ce]),De=(0,Q.useRef)(ge);De.current=ge;let Oe=(0,Q.useCallback)(e=>{if(e.type===`collapsed_read_search`)return!0;if(e.type===`assistant`){let t=e.message.content,n=Array.isArray(t)?t[0]:void 0;return n!=null&&Jt(n)&&n.type===`advisor_tool_result`&&n.content.type===`advisor_result`}if(e.type!==`user`)return!1;let n=e.message.content[0];if(n?.type!==`tool_result`||n.is_error||!e.toolUseResult)return!1;let r=De.current.toolUseByToolUseID.get(n.tool_use_id??``)?.name;return(r?nn(t,r):void 0)?.isResultTruncated?.(e.toolUseResult)??!1},[t]),Ae=(!i||!!i.shouldContinueAnimation)&&!o.length&&!c,je=s.size>0,{progress:Me}=d(),Ne=(0,Q.useRef)(null),Pe=L().terminalProgressBarEnabled&&!ee()&&!(Fo?.isProactiveActive()??!1);(0,Q.useEffect)(()=>{let e=Pe?je?`indeterminate`:`completed`:null;Ne.current!==e&&(Ne.current=e,Me(e))},[Me,Pe,je]),(0,Q.useEffect)(()=>()=>Me(null),[Me]);let Fe=(0,Q.useCallback)(e=>`${e.uuid}-${l}`,[l]),Ie=(e,i)=>{let a=i>0?ye[i-1]?.type:void 0,o=e.type===`user`&&a===`user`,c=e.type===`collapsed_read_search`&&(!!T||sa(ye,i,t,be)),l=ye.length-1-i>0,u=Fe(e),d=(0,$.jsx)(ha,{message:e,isUserContinuation:o,hasContentAfter:c,tools:t,commands:n,verbose:r||Ee(e)||M?.expanded===!0&&i===Se,inProgressToolUseIDs:s,streamingToolUseIDs:be,screen:p,canAnimate:Ae,onOpenRateLimitOptions:y,lastThinkingBlockId:se,latestBashOutputUUID:ce,columns:I,isLoading:S,lookups:ge,shouldCollapseDiffs:l},u),f=(0,$.jsx)(Yt.Provider,{value:i===Se,children:d},u);return D&&i===xe?[(0,$.jsx)(x,{marginTop:1,children:(0,$.jsx)(v,{title:`${D.count} new ${ke(D.count,`message`)}`,width:I,color:`inactive`})},`unseen-divider`),f]:f},Le=(0,Q.useRef)(new WeakMap),Re=(0,Q.useCallback)(e=>{let n=Le.current.get(e);if(n!==void 0)return n;let r=vr(e);if(e.type===`user`&&e.toolUseResult&&Array.isArray(e.message.content)){let n=e.message.content.find(e=>e.type===`tool_result`);if(n&&`tool_use_id`in n){let i=ge.toolUseByToolUseID.get(n.tool_use_id),a=(i&&nn(t,i.name))?.extractSearchText?.(e.toolUseResult);a!==void 0&&(r=a)}}let i=r.toLowerCase();return Le.current.set(e,i),i},[t,ge]);return(0,$.jsxs)(_n,{name:`MessagesBoundary`,children:[!b&&!(F&&F[0]>0)&&(0,$.jsx)(Po,{agentDefinitions:g}),_e&&(0,$.jsx)(v,{title:`${ie} to show ${f.bold(ve)} previous messages`,width:I}),B&&h&&ve>0&&!j&&(0,$.jsx)(v,{title:`${ie} to hide ${f.bold(ve)} previous messages`,width:I}),fe?(0,$.jsx)(Zt.Provider,{value:!0,children:(0,$.jsx)(vo,{messages:ye,scrollRef:O,columns:I,itemKey:Fe,renderItem:Ie,onItemClick:Te,isItemClickable:Oe,isItemExpanded:Ee,trackStickyPrompt:k,selectedIndex:Se>=0?Se:void 0,cursorNavRef:P,setCursor:N,jumpRef:te,onSearchMatchesChange:A,scanElement:ne,setPositions:re,extractSearchText:Re})}):ye.flatMap(Ie),T&&!E&&(0,$.jsx)(x,{alignItems:`flex-start`,flexDirection:`row`,marginTop:1,width:`100%`,children:(0,$.jsxs)(x,{flexDirection:`row`,children:[(0,$.jsx)(x,{minWidth:2,children:(0,$.jsx)(_,{color:`text`,children:ae})}),(0,$.jsx)(x,{flexDirection:`column`,children:(0,$.jsx)(Ot,{children:T})})]})}),oe&&w&&!E&&(0,$.jsx)(x,{marginTop:1,children:(0,$.jsx)(wt,{param:{type:`thinking`,thinking:w.thinking},addMargin:!1,isTranscriptMode:!0,verbose:r,hideInTranscript:!1})})]})},Ho=No.memo(Vo,(e,t)=>{let n=Object.keys(e);for(let r of n)if(!(r===`onOpenRateLimitOptions`||r===`scrollRef`||r===`trackStickyPrompt`||r===`setCursor`||r===`cursorNavRef`||r===`jumpRef`||r===`onSearchMatchesChange`||r===`scanElement`||r===`setPositions`)&&e[r]!==t[r]){if(r===`streamingToolUses`){let n=e.streamingToolUses,r=t.streamingToolUses;if(n.length===r.length&&n.every((e,t)=>e.contentBlock===r[t]?.contentBlock))continue}if(r===`inProgressToolUseIDs`&&jo(e.inProgressToolUseIDs,t.inProgressToolUseIDs))continue;if(r===`unseenDivider`){let n=e.unseenDivider,r=t.unseenDivider;if(n?.firstUnseenUuid===r?.firstUnseenUuid&&n?.count===r?.count)continue}if(r===`tools`){let n=e.tools,r=t.tools;if(n.length===r.length&&n.every((e,t)=>e.name===r[t]?.name))continue}return!1}return!0})}));export{po as a,qa as c,io as i,Ja as l,Uo as n,to as o,ao as r,eo as s,Ho as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./REPL-CmJdJrGO.js";export{e as REPL};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{In as a,Ln as o,Rn as s,b as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as ee}from"./jsx-runtime-D-D469L8.js";import{Cc as f,Dr as te,Fa as p,Ka as m,Na as ne,Nr as h,Pr as re,Qa as ie,S as g,Sc as ae,_,dc as v,fl as oe,g as se,gt as ce,lc as y,no as b,on as le,oo as ue,pl as x,sn as S,vt as C,yc as w}from"./paths-DO4WOQtD.js";import{D as de,E as fe,O as T,U as pe,l as E,p as D,z as me}from"./debug-otxXY3j-.js";import{n as he,r as ge}from"./analytics-DqMQntaB.js";import{n as _e,t as O}from"./cwd--iizewsn.js";import{_ as ve,f as ye,g as be,v as k}from"./git-C0IuvuIy.js";import{l as A,u as j}from"./oauth-CdZEzMww.js";import{a as M,n as N}from"./env-C2A9gV_G.js";import{o as P,s as F}from"./log-DSV4Ht5l.js";import{i as I,o as xe}from"./platform-mh9ypxS8.js";import{n as L,r as Se}from"./execFileNoThrow-azCkYhmF.js";import{l as Ce,r as we}from"./teammate-CbskW5G9.js";import{c as Te,g as Ee,h as R,l as De,u as Oe}from"./proxy-CF7ZDxaW.js";import{$A as z,AT as B,Ax as ke,Dj as Ae,Dx as je,Fr as Me,Fx as Ne,Is as Pe,Ix as Fe,Lr as Ie,Lx as Le,Ms as Re,Mx as ze,Rx as Be,Tj as Ve,Ty as V,Ys as He,aS as Ue,bj as We,jT as Ge,jy as Ke,oS as qe,qs as Je,tj as Ye,vd as Xe,vr as Ze,wx as Qe,yd as $e}from"./loadAgentsDir-ClTeo0nk.js";import{M as et,P as tt}from"./prompt-CfM_xGPc.js";import{n as nt,o as rt}from"./fileStateCache-BhVfo23e.js";import{a as H,i as U,o as W}from"./teamHelpers-CXAmvFco.js";import{d as it,o as at}from"./api-CQWbpxLP.js";import{c as ot,i as st}from"./terminalSetup-hLCi-2uB.js";import{a as ct,r as lt,s as ut,t as dt}from"./referral-Da4mpbd3.js";import{n as ft,t as pt}from"./PermissionDialog-_WQPRYHQ.js";import{n as mt,r as ht,t as gt}from"./overageCreditGrant-BqW_6R5v.js";import{i as _t,o as vt}from"./OverageCreditUpsell-DnFv5z-z.js";import{n as yt,t as bt}from"./DesktopHandoff-BjPylhOT.js";import{randomUUID as xt}from"crypto";E(),P(),Ce(),H();function St(){let e=we();if(!e?.teamName||!e?.agentName){D(`[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)`);return}let{teamName:t,agentId:n,agentName:r}=e,i=W(t);if(!i){F(Error(`[computeInitialTeamContext] Could not read team file for ${t}`));return}let a=U(t),o=!n;return D(`[Reconnection] Computed initial team context for ${o?`leader`:`teammate ${r}`} in team ${t}`),{teamName:t,teamFilePath:a,leadAgentId:i.leadAgentId,selfAgentId:n,selfAgentName:r,isLeader:o,teammates:{}}}function Ct(e,t,n){let r=W(t);if(!r){F(Error(`[initializeTeammateContextFromSession] Could not read team file for ${t} (agent: ${n})`));return}let i=r.members.find(e=>e.name===n);i||D(`[Reconnection] Member ${n} not found in team ${t} - may have been removed`);let a=i?.agentId,o=U(t);e(e=>({...e,teamContext:{teamName:t,teamFilePath:o,leadAgentId:r.leadAgentId,selfAgentId:a,selfAgentName:n,isLeader:!1,teammates:{}}})),D(`[Reconnection] Initialized agent context from session for ${n} in team ${t}`)}n(),oe(),_e(),w(),M(),Se(),k(),P(),C();var wt=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function Tt(e){return!wt.some(t=>t.test(e))}function Et(e,t){let n=[],r=new Set,i=new Map;for(let a=1;n.length<t&&a<=t;a++)for(let o of e){if(n.length>=t)break;if(!Tt(o))continue;let e=Math.max(o.lastIndexOf(`/`),o.lastIndexOf(`\\`)),s=e>=0?o.slice(e+1):o;if(!s||r.has(s))continue;let c=e>=0?o.slice(0,e):`.`;(i.get(c)??0)>=a||(n.push(s),r.add(s),i.set(c,(i.get(c)??0)+1))}return n.length>=t?n:[]}async function Dt(){if(N.platform===`win32`||!await ye())return[];try{let e=await ce(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
|
|
2
|
-
`)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await L(`git`,[...t,`--author=${e}`],{cwd:O()});r(n)}if(n.size<10){let{stdout:e}=await L(ve(),t,{cwd:O()});r(e)}return Et(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return F(e),[]}}var Ot=10080*60*1e3,kt=t(()=>{let e=y(),t=e.exampleFiles?.length?x(e.exampleFiles):`<filepath>`;return`Try "${x([`fix lint errors`,`fix typecheck errors`,`how does ${t} work?`,`refactor ${t}`,`how do I log an error?`,`edit ${t} to...`,`write a test for ${t}`,`create a util logging.py that...`])}"`}),At=t(async()=>{let e=y();Date.now()-(e.exampleFilesGeneratedAt??0)>Ot&&(e.exampleFiles=[]),e.exampleFiles?.length||Dt().then(e=>{e.length&&ae(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});p();var jt={"claude-3-opus":{modelName:`Claude 3 Opus`,retirementDates:{firstParty:`January 5, 2026`,bedrock:`January 15, 2026`,vertex:`January 5, 2026`,foundry:`January 5, 2026`}},"claude-3-7-sonnet":{modelName:`Claude 3.7 Sonnet`,retirementDates:{firstParty:`February 19, 2026`,bedrock:`April 28, 2026`,vertex:`May 11, 2026`,foundry:`February 19, 2026`}},"claude-3-5-haiku":{modelName:`Claude 3.5 Haiku`,retirementDates:{firstParty:`February 19, 2026`,bedrock:null,vertex:null,foundry:null}}};function Mt(e){let t=e.toLowerCase(),n=ne();for(let[e,r]of Object.entries(jt)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function Nt(e){if(!e)return null;let t=Mt(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}r(),o(),pe(),fe(),j(),xe(),ue(),le(),st(),Ke(),$e(),Me();var G=e(s());l(),g(),he(),w(),qe(),yt(),ft();var K=ee(),Pt={enable_shortcut_tip:!1,enable_startup_dialog:!1};function q(){return se(`tengu_desktop_upsell`,Pt)}function Ft(){return process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`}function It(){if(!Ft()||!q().enable_startup_dialog)return!1;let e=v();return!(e.desktopUpsellDismissed||(e.desktopUpsellSeenCount??0)>=3)}function Lt({onDone:e}){let[t,n]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=(v().desktopUpsellSeenCount??0)+1;f(t=>(t.desktopUpsellSeenCount??0)>=e?t:{...t,desktopUpsellSeenCount:e}),ge(`tengu_desktop_upsell_shown`,{seen_count:e})},[]),t)return(0,K.jsx)(bt,{onDone:()=>e()});function r(t){switch(t){case`try`:n(!0);return;case`never`:f(e=>e.desktopUpsellDismissed?e:{...e,desktopUpsellDismissed:!0}),e();return;case`not-now`:e();return}}return(0,K.jsx)(pt,{title:`Try Claude Code Desktop`,children:(0,K.jsxs)(d,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,K.jsx)(d,{marginBottom:1,children:(0,K.jsx)(c,{children:`Same Claude Code with visual diffs, live app preview, parallel sessions, and more.`})}),(0,K.jsx)(Ue,{options:[{label:`Open in Claude Code Desktop`,value:`try`},{label:`Not now`,value:`not-now`},{label:`Don't ask again`,value:`never`}],onChange:r,onCancel:()=>r(`not-now`)})]})})}re(),Ve(),Ye(),et(),rt(),at(),Ge(),ke(),Je(),Re(),ut(),ht(),_t(),w();function Rt(e){let t=v().numStartups;f(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function J(e){let t=v(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}E(),l(),w(),M(),k(),g();var Y;async function zt(){return Y===void 0&&(Y=z in await He()),Y}async function X(e,t,n){if(!await zt()||Pe(`${e}@claude-plugins-official`))return!1;let{bashTools:r}=t??{};return!!(n.cli&&r?.size&&n.cli.some(e=>r.has(e))||n.filePath&&t?.readFileState&&nt(t.readFileState).some(e=>n.filePath.test(e)))}var Bt=[{id:`new-user-warmup`,content:async()=>`Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits`,cooldownSessions:3,async isRelevant(){return v().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${B(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=v();return(e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0)>7}},{id:`default-permission-mode-config`,content:async()=>`Use /config to change your default permission mode (including Plan Mode)`,cooldownSessions:10,isRelevant:async()=>{try{let e=v(),t=b(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return D(`Failed to check default-permission-mode-config tip relevance: ${e}`,{level:`warn`}),!1}}},{id:`git-worktrees`,content:async()=>`Use git worktrees to run multiple Claude sessions in parallel.`,cooldownSessions:10,isRelevant:async()=>{try{let e=v();return await be()<=1&&e.numStartups>50}catch{return!1}}},{id:`color-when-multi-clauding`,content:async()=>`Running multiple Claude sessions? Use /color and /rename to tell them apart at a glance.`,cooldownSessions:10,isRelevant:async()=>Ze()?!1:await Xe()>=2},{id:`terminal-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more`:`Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more`,cooldownSessions:10,async isRelevant(){let e=v();return N.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>N.terminal===`Apple_Terminal`?`Press Option+Enter to send a multi-line message`:`Press Shift+Enter to send a multi-line message`,cooldownSessions:10,async isRelevant(){let e=v();return!!((N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable Option+Enter for new lines`:`Run /terminal-setup to enable Shift+Enter for new lines`,cooldownSessions:10,async isRelevant(){if(!ot())return!1;let e=v();return!(N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)}},{id:`memory-command`,content:async()=>`Use /memory to view and manage Claude memory`,cooldownSessions:15,async isRelevant(){return v().memoryUsageCount<=0}},{id:`theme-command`,content:async()=>`Use /theme to change the color theme`,cooldownSessions:20,isRelevant:async()=>!0},{id:`colorterm-truecolor`,content:async()=>`Try setting environment variable COLORTERM=truecolor for richer colors`,cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&a.level<3},{id:`powershell-tool-env`,content:async()=>`Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)`,cooldownSessions:10,isRelevant:async()=>I()===`windows`&&process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL===void 0},{id:`status-line`,content:async()=>`Use /statusline to set up a custom status line that will display beneath the input box`,cooldownSessions:25,isRelevant:async()=>b().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Claude is working.`,cooldownSessions:5,async isRelevant(){return v().promptQueueUseCount<=3}},{id:`enter-to-steer-in-relatime`,content:async()=>`Send messages to Claude while it works to steer Claude in real-time`,cooldownSessions:20,isRelevant:async()=>!0},{id:`todo-list`,content:async()=>`Ask Claude to create a todo list when working on complex tasks to track progress and remain on track`,cooldownSessions:20,isRelevant:async()=>!0},{id:`vscode-command-install`,content:async()=>`Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${N.terminal===`vscode`?`code`:N.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!Fe()||I()!==`macos`)return!1;switch(N.terminal){case`vscode`:return!await Le();case`cursor`:return!await ze();case`windsurf`:return!await Be();default:return!1}}},{id:`ide-upsell-external-terminal`,content:async()=>`Connect Claude to your IDE · /ide`,cooldownSessions:4,async isRelevant(){return Ne()||(await je()).length!==0?!1:(await Qe()).length>0}},{id:`install-github-app`,content:async()=>`Run /install-github-app to tag @claude right from your Github issues and PRs`,cooldownSessions:10,isRelevant:async()=>!v().githubActionSetupCount},{id:`install-slack-app`,content:async()=>`Run /install-slack-app to use Claude in Slack`,cooldownSessions:10,isRelevant:async()=>!v().slackAppInstallCount},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return v().numStartups>10}},{id:`drag-and-drop-images`,content:async()=>`Did you know you can drag and drop image files into your terminal?`,cooldownSessions:10,isRelevant:async()=>!N.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Claude Code using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>I()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!V()},{id:`double-esc-code-restore`,content:async()=>`Double-tap esc to rewind the code and/or conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>V()},{id:`continue`,content:async()=>`Run claude --continue or claude --resume to resume a conversation`,cooldownSessions:10,isRelevant:async()=>!0},{id:`rename-conversation`,content:async()=>`Name your conversations with /rename to find them easily in /resume later`,cooldownSessions:15,isRelevant:async()=>Ie()&&v().numStartups>10},{id:`custom-commands`,content:async()=>`Create skills by adding .md files to .claude/skills/ in your project or ~/.claude/skills/ for skills that work in any project`,cooldownSessions:15,async isRelevant(){return v().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${B(`chat:cycleMode`,`Chat`,`shift+tab`)} to cycle between default, accept edits, plan, auto, and bypass modes`,cooldownSessions:10,isRelevant:async()=>!0},{id:`image-paste`,content:async()=>`Use ${B(`chat:imagePaste`,`Chat`,`ctrl+v`)} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:`custom-agents`,content:async()=>`Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer`,cooldownSessions:15,async isRelevant(){return v().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return v().numStartups>5}},{id:`desktop-app`,content:async()=>`Run Claude Code locally or remotely using the Claude desktop app: clau.de/desktop`,cooldownSessions:15,isRelevant:async()=>I()!==`linux`},{id:`desktop-shortcut`,content:async e=>`Continue your session in Claude Code Desktop with ${u(`suggestion`,e?.theme??`dark`)(`/desktop`)}`,cooldownSessions:15,isRelevant:async()=>q().enable_shortcut_tip?process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`:!1},{id:`web-app`,content:async()=>`Run tasks in the cloud while you keep coding locally · clau.de/web`,cooldownSessions:15,isRelevant:async()=>!0},{id:`mobile-app`,content:async()=>`/mobile to use Claude Code from the Claude app on your phone`,cooldownSessions:15,isRelevant:async()=>!0},{id:`opusplan-mode-reminder`,content:async()=>`Your default model setting is Opus Plan Mode. Press ${B(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to activate Plan Mode and plan with Claude Opus.`,cooldownSessions:2,async isRelevant(){if(process.env.USER_TYPE===`ant`)return!1;let e=v(),t=h()===`opusplan`,n=e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0;return t&&n>3}},{id:`frontend-design-plugin`,content:async e=>`Working with HTML/CSS? Install the frontend-design plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${z}`)}`,cooldownSessions:3,isRelevant:async e=>X(`frontend-design`,e,{filePath:/\.(html|css|htm)$/i})},{id:`vercel-plugin`,content:async e=>`Working with Vercel? Install the vercel plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${z}`)}`,cooldownSessions:3,isRelevant:async e=>X(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`effort-high-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`)(`/effort high`);return _(`tengu_tide_elm`,`off`)===`copy_b`?`Use ${t} for better one-shot answers. Claude thinks it through first.`:`Working on something tricky? ${t} gives better first answers`},cooldownSessions:3,isRelevant:async()=>{if(!S()||!Ae(te())||ie(`policySettings`)?.effortLevel!==void 0||We()!==void 0)return!1;let e=m().effortLevel;return e===`high`||e===`max`?!1:_(`tengu_tide_elm`,`off`)!==`off`}},{id:`subagent-fanout-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return _(`tengu_tern_alloy`,`off`)===`copy_b`?`For big tasks, tell Claude to ${t(`use subagents`)}. They work in parallel and keep your main thread clean.`:`Say ${t(`"fan out subagents"`)} and Claude sends a team. Each one digs deep so nothing gets missed.`},cooldownSessions:3,isRelevant:async()=>S()?_(`tengu_tern_alloy`,`off`)!==`off`:!1},{id:`loop-command-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return _(`tengu_timber_lark`,`off`)===`copy_b`?`Use ${t(`/loop 5m check the deploy`)} to run any prompt on a schedule. Set it and forget it.`:`${t(`/loop`)} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`},cooldownSessions:3,isRelevant:async()=>!S()||!tt()?!1:_(`tengu_timber_lark`,`off`)!==`off`},{id:`guest-passes`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=ct();return n?`Share Claude Code and earn ${t(lt(n))} of extra usage · ${t(`/passes`)}`:`You have free guest passes to share · ${t(`/passes`)}`},cooldownSessions:3,isRelevant:async()=>{if(v().hasVisitedPasses)return!1;let{eligible:e}=dt();return e}},{id:`overage-credit`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=mt(),r=n?gt(n):null;return r?`${t(`${r} in extra usage, on us`)} · third-party apps · ${t(`/extra-usage`)}`:``},cooldownSessions:3,isRelevant:async()=>vt()},{id:`feedback-command`,content:async()=>`Use /feedback to help us improve!`,cooldownSessions:15,async isRelevant(){return process.env.USER_TYPE===`ant`?!1:v().numStartups>5}}],Vt=process.env.USER_TYPE===`ant`?[{id:`important-claudemd`,content:async()=>`[ANT-ONLY] Use "IMPORTANT:" prefix for must-follow CLAUDE.md rules`,cooldownSessions:30,isRelevant:async()=>!0},{id:`skillify`,content:async()=>`[ANT-ONLY] Use /skillify at the end of a workflow to turn it into a reusable skill`,cooldownSessions:15,isRelevant:async()=>!0}]:[];function Ht(){let e=m().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function Ut(e){let t=m().spinnerTipsOverride,n=Ht();if(t?.excludeDefault&&n.length>0)return n;let r=[...Bt,...Vt],i=await Promise.all(r.map(t=>t.isRelevant?.(e)??Promise.resolve(!0)));return[...r.filter((e,t)=>i[t]).filter(e=>J(e.id)>=e.cooldownSessions),...n]}E(),P(),Ee(),Oe();var Z=2e3,Q=5,Wt=3e4,$=3,Gt=new Set([4003]);function Kt(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var qt=class{constructor(e,t,n,r){i(this,`ws`,null),i(this,`state`,`closed`),i(this,`reconnectAttempts`,0),i(this,`sessionNotFoundRetries`,0),i(this,`pingInterval`,null),i(this,`reconnectTimer`,null),this.sessionId=e,this.orgUuid=t,this.getAccessToken=n,this.callbacks=r}async connect(){if(this.state===`connecting`){D(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${A().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;D(`[SessionsWebSocket] Connecting to ${e}`);let t={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":`2023-06-01`};if(typeof Bun<`u`){let n=new globalThis.WebSocket(e,{headers:t,proxy:De(e),tls:R()||void 0});this.ws=n,n.addEventListener(`open`,()=>{D(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);F(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{D(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{D(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-BSK0MCQH.js`),r=new n(e,{headers:t,agent:Te(e),...R()});this.ws=r,r.on(`open`,()=>{D(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{F(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{D(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{D(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=de(e);Kt(t)?this.callbacks.onMessage(t):D(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){F(Error(`[SessionsWebSocket] Failed to parse message: ${me(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,Gt.has(e)){D(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>$){D(`[SessionsWebSocket] 4001 retry budget exhausted (${$}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(Z*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${$}`);return}t===`connected`&&this.reconnectAttempts<Q?(this.reconnectAttempts++,this.scheduleReconnect(Z,`attempt ${this.reconnectAttempts}/${Q}`)):(D(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),D(`[SessionsWebSocket] Scheduling reconnect (${t}) in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state===`connected`)try{this.ws.ping?.()}catch{}},Wt)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}D(`[SessionsWebSocket] Sending control response`),this.ws.send(T(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:xt(),request:e};D(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(T(t))}isConnected(){return this.state===`connected`}close(){D(`[SessionsWebSocket] Closing connection`),this.state=`closed`,this.stopPingInterval(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null)}reconnect(){D(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};E(),P(),r();function Jt(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Yt=class{constructor(e,t){i(this,`websocket`,null),i(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=t}connect(){D(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`),this.websocket=new qt(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,{onMessage:e=>this.handleMessage(e),onConnected:()=>{D(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{D(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{D(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{F(e),this.callbacks.onError?.(e)}}),this.websocket.connect()}handleMessage(e){if(e.type===`control_request`){this.handleControlRequest(e);return}if(e.type===`control_cancel_request`){let{request_id:t}=e,n=this.pendingPermissionRequests.get(t);D(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){D(`[RemoteSessionManager] Received control response`);return}Jt(e)&&this.callbacks.onMessage(e)}handleControlRequest(e){let t=e.request_id,n=e.request;if(n.subtype===`can_use_tool`)D(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{D(`[RemoteSessionManager] Unsupported control request subtype: ${n.subtype}`);let e={type:`control_response`,response:{subtype:`error`,request_id:t,error:`Unsupported control request subtype: ${n.subtype}`}};this.websocket?.sendControlResponse(e)}}async sendMessage(e,t){D(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await it(this.config.sessionId,e,t);return n||F(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){F(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};D(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){D(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){D(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){D(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Xt(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{Rt as a,Nt as c,St as d,Ct as f,J as i,kt as l,Xt as n,Lt as o,Ut as r,It as s,Yt as t,At as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hk as e,mk as t}from"./loadAgentsDir-ClTeo0nk.js";e();export{t as clearSearchExtraToolsDescriptionCache};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./SentryErrorBoundary-97iY7Nb7.js";e();export{t as SentryErrorBoundary};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./api-CQWbpxLP.js";n();export{t as fetchCodeSessionsFromSessionsAPI,e as getOAuthHeaders};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,s as t}from"./assistant-CEmC_DlU.js";e();export{t as isAssistantMode};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Jb as e,Kb as t,Yb as n,qb as r}from"./loadAgentsDir-ClTeo0nk.js";n();export{t as authLogin,r as authLogout,e as authStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./backgroundHousekeeping-KvOpP_4M.js";export{e as startBackgroundHousekeeping};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,t as r}from"./bridgeConfig-DjC4oig1.js";e();export{r as getBridgeAccessToken,t as getBridgeBaseUrl,n as isSelfHostedBridge};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./bridgeEnabled-Csn6Ym3k.js";t();export{n as checkBridgeMinVersion,e as getBridgeDisabledReason};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./bridgeMain-B5wsmwkN.js";export{e as bridgeMain};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./caches-CIoVGP24.js";e();export{t as clearSessionCaches};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=()=>null,t=async()=>{throw Error(`ccshare not implemented`)};export{t as loadCcshare,e as parseCcshareId};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{BA as e,WA as t}from"./loadAgentsDir-ClTeo0nk.js";e();export{t as settingsChangeDetector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t}from"./channelNotification-CWlu9ZWs.js";t();export{e as ChannelPermissionRequestNotificationSchema};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./conversation-DyhWeHw2.js";var r;e((()=>{t(),r=async(e,t)=>(await n(t),{type:`text`,value:``})}))();export{r as call};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{la as e,ua as t}from"./paths-DO4WOQtD.js";t();export{e as getOrganizationUUID};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gi as e,Zi as t,na as n}from"./loadAgentsDir-ClTeo0nk.js";n();export{e as clearCommandsCache,t as getCommands};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,l as t}from"./commitAttribution-csu3NO7Y.js";t();export{e as isInternalModelRepo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./context-noninteractive-62P5EnN5.js";t();export{n as call,e as collectContextData};
|