claude-code-best 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-C7od6sFQ.js → AddWorkspaceDirectory-V2tF7iCY.js} +1 -1
  2. package/dist/chunks/{App-EfHjElWP.js → App-DLdRpU7c.js} +1 -1
  3. package/dist/chunks/ApproveApiKey-B7_TCGwt.js +1 -0
  4. package/dist/chunks/{ApproveApiKey-CSz0291w.js → ApproveApiKey-DPws3jax.js} +1 -1
  5. package/dist/chunks/{AssistantSessionChooser-mLIhDlxW.js → AssistantSessionChooser-D6rS0OVe.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-hGlbm5z5.js +2 -0
  7. package/dist/chunks/{BypassPermissionsModeDialog-BCdft-m_.js → BypassPermissionsModeDialog-CuEpdRVd.js} +1 -1
  8. package/dist/chunks/{ClaudeInChromeOnboarding-BPlrCIo-.js → ClaudeInChromeOnboarding-CTTKMRbt.js} +1 -1
  9. package/dist/chunks/{ClaudeMdExternalIncludesDialog-D8fk-Ib5.js → ClaudeMdExternalIncludesDialog-B-GkVoA_.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DxJK9NiM.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-LPZ97jsm.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-BQwx7qWA.js → DesktopHandoff-BjPylhOT.js} +1 -1
  13. package/dist/chunks/{DevChannelsDialog-CujM8Ivu.js → DevChannelsDialog-c4YVqBX9.js} +1 -1
  14. package/dist/chunks/{DiffDialog-Byv1UJvS.js → DiffDialog-I5wuXw2C.js} +1 -1
  15. package/dist/chunks/{Doctor-Cv7wbi6C.js → Doctor-Cr_MlSPc.js} +1 -1
  16. package/dist/chunks/Doctor-hgf3dMAW.js +1 -0
  17. package/dist/chunks/{ExitFlow-DKusdm_v.js → ExitFlow-Bz5grDWv.js} +2 -2
  18. package/dist/chunks/{Feedback-Diw8XUr-.js → Feedback-COgMI5tY.js} +1 -1
  19. package/dist/chunks/Grove-Bwmghb-e.js +1 -0
  20. package/dist/chunks/{Grove-CAi037VV.js → Grove-m57x4tY1.js} +1 -1
  21. package/dist/chunks/{HybridTransport-CP0RopXu.js → HybridTransport-Bok4-Ptt.js} +1 -1
  22. package/dist/chunks/{ITermBackend-RvD4VX7c.js → ITermBackend-BBSP-NNa.js} +1 -1
  23. package/dist/chunks/{InvalidConfigDialog-Bhlgysxl.js → InvalidConfigDialog-uTSuSBvO.js} +1 -1
  24. package/dist/chunks/{InvalidSettingsDialog-dGStgJZN.js → InvalidSettingsDialog-B-Os12-H.js} +1 -1
  25. package/dist/chunks/{MCPConnectionManager-D5a9ysw2.js → MCPConnectionManager-y97Inszc.js} +1 -1
  26. package/dist/chunks/{McpParsingWarnings-B_z9pZ_8.js → McpParsingWarnings-DMFUZw92.js} +1 -1
  27. package/dist/chunks/MessageSelector-DwdAC2io.js +3 -0
  28. package/dist/chunks/{Messages-DTmFVhRG.js → Messages-FEBcX-cT.js} +3 -3
  29. package/dist/chunks/{Onboarding-BoAtphYb.js → Onboarding-B8qMJaBh.js} +1 -1
  30. package/dist/chunks/{OverageCreditUpsell-DA7Ne7Mj.js → OverageCreditUpsell-DnFv5z-z.js} +1 -1
  31. package/dist/chunks/PluginSettings-B_xVgTTp.js +17 -0
  32. package/dist/chunks/{PromptInputHelpMenu-B__j9zE6.js → PromptInputHelpMenu-CoMkWchC.js} +1 -1
  33. package/dist/chunks/QueryEngine-C7r7O-hH.js +1 -0
  34. package/dist/chunks/{REPL-B1BS9jwx.js → REPL-CmJdJrGO.js} +36 -36
  35. package/dist/chunks/REPL-nP7H_-qa.js +1 -0
  36. package/dist/chunks/{RemoteCallout-Bwe1ESr9.js → RemoteCallout-4JOZROfT.js} +1 -1
  37. package/dist/chunks/{RemoteSessionManager-BKD4YmzY.js → RemoteSessionManager-jcPnywfY.js} +2 -2
  38. package/dist/chunks/ResumeConversation-CZ2Uedkf.js +1 -0
  39. package/dist/chunks/{SSETransport-D3e5KNL3.js → SSETransport-kEH_p4Yq.js} +1 -1
  40. package/dist/chunks/SearchExtraToolsTool-C64oVFUD.js +1 -0
  41. package/dist/chunks/SentryErrorBoundary-2E2qGV11.js +1 -0
  42. package/dist/chunks/{SentryErrorBoundary-D-YZTGQG.js → SentryErrorBoundary-97iY7Nb7.js} +1 -1
  43. package/dist/chunks/Settings-CuljH0mu.js +2 -0
  44. package/dist/chunks/{TeleportProgress-C3Ubx1Se.js → TeleportProgress-Ctdqi7iS.js} +1 -1
  45. package/dist/chunks/{TeleportRepoMismatchDialog-D_ax3xQy.js → TeleportRepoMismatchDialog-DyTBg1YD.js} +1 -1
  46. package/dist/chunks/{TeleportResumeWrapper-DeVKIXQp.js → TeleportResumeWrapper-B66clYsG.js} +1 -1
  47. package/dist/chunks/{ThemePicker-DKmIL5Ku.js → ThemePicker-WKmYvrqz.js} +1 -1
  48. package/dist/chunks/{TmuxBackend-Bm_cRJ2x.js → TmuxBackend-OKX2NP14.js} +2 -2
  49. package/dist/chunks/{TrustDialog-ClXFMKj6.js → TrustDialog-0anSIf-G.js} +1 -1
  50. package/dist/chunks/{ValidationErrorsList-SdQADfvA.js → ValidationErrorsList-CfgC1KJb.js} +1 -1
  51. package/dist/chunks/{WelcomeV2-BijS6i2Z.js → WelcomeV2-BMHXiNt3.js} +1 -1
  52. package/dist/chunks/{WindowsTerminalBackend-CGEQ5ClB.js → WindowsTerminalBackend-fCSGVe4W.js} +2 -2
  53. package/dist/chunks/{add-dir-B7kleB6k.js → add-dir-CMtuW667.js} +1 -1
  54. package/dist/chunks/{agentDisplay-Dr1XbOAu.js → agentDisplay-CgYKW3G7.js} +1 -1
  55. package/dist/chunks/{agents-CpLvvWpO.js → agents-CdqcGm9o.js} +7 -7
  56. package/dist/chunks/{agents-Dy5YOJC9.js → agents-D90TsYOf.js} +1 -1
  57. package/dist/chunks/{ant-gwf-4eGN.js → ant-DZjimiuz.js} +1 -1
  58. package/dist/chunks/{api-CDmgYrwN.js → api-CQWbpxLP.js} +1 -1
  59. package/dist/chunks/api-quOYYOhi.js +1 -0
  60. package/dist/chunks/assistant-B5_xx00q.js +1 -0
  61. package/dist/chunks/{assistant-BULedprW.js → assistant-CEmC_DlU.js} +1 -1
  62. package/dist/chunks/{assistant-1usDIXtk.js → assistant-CyVcFPIR.js} +1 -1
  63. package/dist/chunks/auth-CjtaiRtF.js +1 -0
  64. package/dist/chunks/{auth-CvHVr2A5.js → auth-DsQEVs9W.js} +1 -1
  65. package/dist/chunks/{autoMode-DSMM2seL.js → autoMode-DEbM9UaE.js} +1 -1
  66. package/dist/chunks/{autonomy-TtBO2TAe.js → autonomy-Clap6Swl.js} +1 -1
  67. package/dist/chunks/{autonomy-Dj6Nzxus.js → autonomy-lNpGnyiu.js} +3 -3
  68. package/dist/chunks/{autonomyPanel-CbmU7lPg.js → autonomyPanel-BqEvfI0e.js} +1 -1
  69. package/dist/chunks/backgroundHousekeeping-D-jt-ocx.js +1 -0
  70. package/dist/chunks/{backgroundHousekeeping-Cp2RvmEN.js → backgroundHousekeeping-KvOpP_4M.js} +2 -2
  71. package/dist/chunks/{branch-Cj5TGroO.js → branch-CSYB04xC.js} +1 -1
  72. package/dist/chunks/{bridge-CsqJAoEg.js → bridge-DDgASypO.js} +2 -2
  73. package/dist/chunks/bridgeConfig-BdZVEqhx.js +1 -0
  74. package/dist/chunks/{bridgeConfig-pjDV5Z2l.js → bridgeConfig-DjC4oig1.js} +1 -1
  75. package/dist/chunks/{bridgeEnabled-D9jI6X-w.js → bridgeEnabled-Csn6Ym3k.js} +1 -1
  76. package/dist/chunks/bridgeEnabled-DLRIH243.js +1 -0
  77. package/dist/chunks/{bridgeMain-CNmR9iDD.js → bridgeMain-B5wsmwkN.js} +11 -11
  78. package/dist/chunks/bridgeMain-BN0Sag35.js +1 -0
  79. package/dist/chunks/{bridgeMessaging-DN0X35NX.js → bridgeMessaging-ChOzzVWj.js} +1 -1
  80. package/dist/chunks/{btw-BOg0RTKl.js → btw-BgjcOoeo.js} +1 -1
  81. package/dist/chunks/{buddy-BFuPeIxM.js → buddy-C1wE3noR.js} +1 -1
  82. package/dist/chunks/{bypassPermissionsKillswitch-kxVnIVRs.js → bypassPermissionsKillswitch-C0diGLRB.js} +1 -1
  83. package/dist/chunks/{caches-BumkMuGA.js → caches-CIoVGP24.js} +2 -2
  84. package/dist/chunks/caches-DMYdTEAr.js +1 -0
  85. package/dist/chunks/{ccrClient-BI1QPLmN.js → ccrClient-C1msT1E3.js} +1 -1
  86. package/dist/chunks/changeDetector-DoOBZOt1.js +1 -0
  87. package/dist/chunks/{channelNotification-CoZSFUlb.js → channelNotification-CWlu9ZWs.js} +1 -1
  88. package/dist/chunks/channelNotification-oZ6vG5R5.js +1 -0
  89. package/dist/chunks/{chrome-C_5EZcdc.js → chrome-Bo9uNZ7s.js} +1 -1
  90. package/dist/chunks/clear-BxdX_MUP.js +1 -0
  91. package/dist/chunks/client-BSoJ_vaA.js +1 -0
  92. package/dist/chunks/color-CkzktPHt.js +1 -0
  93. package/dist/chunks/commands-hyVX9-Lh.js +1 -0
  94. package/dist/chunks/commitAttribution-BwT0TbYF.js +1 -0
  95. package/dist/chunks/{commitAttribution-iKd8bTOI.js → commitAttribution-csu3NO7Y.js} +1 -1
  96. package/dist/chunks/{compact-B6Muofhz.js → compact-DNGIVZRN.js} +3 -3
  97. package/dist/chunks/{companion-B_LrjSk5.js → companion-Diuav3lA.js} +1 -1
  98. package/dist/chunks/{config-CQd4IkXo.js → config-B25IrkTA.js} +1 -1
  99. package/dist/chunks/{config-CJd9kJ57.js → config-ODoYZY8i.js} +1 -1
  100. package/dist/chunks/{context-qAHTuazZ.js → context-CZ5enuPE.js} +1 -1
  101. package/dist/chunks/{context-noninteractive-DZsSp-ES.js → context-noninteractive-62P5EnN5.js} +1 -1
  102. package/dist/chunks/context-noninteractive-CjuzL9q5.js +1 -0
  103. package/dist/chunks/conversation-DyhWeHw2.js +1 -0
  104. package/dist/chunks/conversation-uY-V0SNK.js +1 -0
  105. package/dist/chunks/{copy-B2jhZndZ.js → copy-9JLr2-Xs.js} +1 -1
  106. package/dist/chunks/{createSSHSession-CKdoEmAg.js → createSSHSession-B1hTuDpB.js} +1 -1
  107. package/dist/chunks/createSession-Qurw-N4x.js +1 -0
  108. package/dist/chunks/{createSession-WkBw7wdn.js → createSession-fzjzy0aS.js} +1 -1
  109. package/dist/chunks/cron-DwR6OJuW.js +1 -0
  110. package/dist/chunks/{cronJitterConfig-2u6WAlti.js → cronJitterConfig-9OmmYmIT.js} +1 -1
  111. package/dist/chunks/{crossProjectResume-CjJISRBQ.js → crossProjectResume-B6efoIur.js} +3 -3
  112. package/dist/chunks/datadog-C-llbwzP.js +1 -0
  113. package/dist/chunks/{datadog-YsyhnDmr.js → datadog-SSxsxcC-.js} +1 -1
  114. package/dist/chunks/{desktop-BN9pHpK_.js → desktop-CQnMcbex.js} +1 -1
  115. package/dist/chunks/{diff-BTtUFuf-.js → diff-uAwKYa51.js} +1 -1
  116. package/dist/chunks/{doctor-BKBb426q.js → doctor-CBF0fkBF.js} +1 -1
  117. package/dist/chunks/{effort-ClhxMqY6.js → effort-F-bhAM2u.js} +1 -1
  118. package/dist/chunks/{entry-CJlJ47nP.js → entry-DHN_Gr1b.js} +3 -3
  119. package/dist/chunks/envLessBridgeConfig-CDVtIEWT.js +1 -0
  120. package/dist/chunks/{envLessBridgeConfig-C9UUbQCo.js → envLessBridgeConfig-Dg0hNsdi.js} +1 -1
  121. package/dist/chunks/{exit-DxY3yJrp.js → exit-CqcvZJwI.js} +1 -1
  122. package/dist/chunks/{export-DS2esu8D.js → export-c6WoGlsG.js} +1 -1
  123. package/dist/chunks/{exportRenderer-DX2L5fQ7.js → exportRenderer-CaegIP5N.js} +1 -1
  124. package/dist/chunks/{extra-usage-XJxfHsbe.js → extra-usage-Cj8fokgc.js} +1 -1
  125. package/dist/chunks/extra-usage-Dk-wcvAu.js +1 -0
  126. package/dist/chunks/{extra-usage-core-D84ifgBo.js → extra-usage-core-sHzc4eE1.js} +1 -1
  127. package/dist/chunks/{extra-usage-noninteractive-fxqxHnIt.js → extra-usage-noninteractive-D0kqrqsg.js} +1 -1
  128. package/dist/chunks/{extraUsage-P_NGI1-I.js → extraUsage-CbkqfG1U.js} +1 -1
  129. package/dist/chunks/extractMemories-BP8Opsbp.js +1 -0
  130. package/dist/chunks/{fast-CpN8lLnE.js → fast-DS3iQ1CH.js} +1 -1
  131. package/dist/chunks/fast-DklfqySb.js +1 -0
  132. package/dist/chunks/{feedback-CqRsOG3c.js → feedback-QJynmG5q.js} +1 -1
  133. package/dist/chunks/{firstPartyEventLogger-CM0V7Uev.js → firstPartyEventLogger-DlW8BUXq.js} +1 -1
  134. package/dist/chunks/{flushGate-DNutWuOE.js → flushGate-CK5B9-Zn.js} +1 -1
  135. package/dist/chunks/gates-6amRNsYl.js +1 -0
  136. package/dist/chunks/{gates-C4JvRq4i.js → gates-vlrMjO-X.js} +1 -1
  137. package/dist/chunks/{gemini-B0M6SQSG.js → gemini-B5ZRjDrh.js} +1 -1
  138. package/dist/chunks/{generateRecap-DhDOgXn3.js → generateRecap-SgRMdsyN.js} +1 -1
  139. package/dist/chunks/{generateSessionName-CoFR2wgK.js → generateSessionName-sZFzpwsq.js} +1 -1
  140. package/dist/chunks/{githubRepoPathMapping-DGiSNykv.js → githubRepoPathMapping-DUGvTwPB.js} +1 -1
  141. package/dist/chunks/{goal-DRb6pPAp.js → goal-Dy-GGn9r.js} +3 -3
  142. package/dist/chunks/{grok-emDua_hT.js → grok-BG4_buNt.js} +1 -1
  143. package/dist/chunks/{growthbook-COAneL48.js → growthbook-Br1dDRtd.js} +1 -1
  144. package/dist/chunks/{heapdump-CA6DHA8G.js → heapdump-B9PVKMxa.js} +1 -1
  145. package/dist/chunks/{help-XXY7deZm.js → help-BfWF7xij.js} +1 -1
  146. package/dist/chunks/hooks-BVrhxysz.js +1 -0
  147. package/dist/chunks/{hooks-C6zZYnDi.js → hooks-KK32pxq3.js} +2 -2
  148. package/dist/chunks/{hostAdapter-DZbdeXCV.js → hostAdapter-TBJav3vX.js} +1 -1
  149. package/dist/chunks/{ide-BLRNkzVx.js → ide-BU1A79BE.js} +2 -2
  150. package/dist/chunks/{inboundAttachments-60kD5Qt_.js → inboundAttachments-D4tBPCB8.js} +1 -1
  151. package/dist/chunks/inboundAttachments-DWJplT9p.js +1 -0
  152. package/dist/chunks/initReplBridge-99sUBVEk.js +1 -0
  153. package/dist/chunks/{insights-BBugI3tW.js → insights-lDHodCMG.js} +1 -1
  154. package/dist/chunks/{install-CuVHbwyW.js → install-Bg4ZgW81.js} +1 -1
  155. package/dist/chunks/{install-github-app-ByyzrlM9.js → install-github-app-RLbUq5EL.js} +2 -2
  156. package/dist/chunks/{install-slack-app-CJGtmacz.js → install-slack-app-CHmIwsbm.js} +1 -1
  157. package/dist/chunks/{instrumentation-C8zvzMg1.js → instrumentation-BCiV3SKX.js} +3 -3
  158. package/dist/chunks/{job-DBf6aPQX.js → job-xOGf0j5Q.js} +1 -1
  159. package/dist/chunks/{keybindings-Bi7SMp5-.js → keybindings-DMbReZ4p.js} +1 -1
  160. package/dist/chunks/{lang-CVDkUhjk.js → lang-A6LUGP_7.js} +1 -1
  161. package/dist/chunks/language-Bzp5KDCE.js +1 -0
  162. package/dist/chunks/{language-BYeqMX74.js → language-CGfURU2y.js} +1 -1
  163. package/dist/chunks/{launchAgentsPlatform-BKqxMFFn.js → launchAgentsPlatform-Dbpm7Jyo.js} +1 -1
  164. package/dist/chunks/{launchAutofixPr-CauX6gOB.js → launchAutofixPr-RZfqx5eM.js} +3 -3
  165. package/dist/chunks/{launchLocalMemory-Brrd_BJC.js → launchLocalMemory-DIntbsvg.js} +2 -2
  166. package/dist/chunks/{launchLocalVault-DtAn656A.js → launchLocalVault-CCUw0ayu.js} +3 -3
  167. package/dist/chunks/{launchMemoryStores-x7_Id7Yr.js → launchMemoryStores-QJTh8KSP.js} +1 -1
  168. package/dist/chunks/{launchOnboarding-DkamFByn.js → launchOnboarding--Pe30AYd.js} +1 -1
  169. package/dist/chunks/{launchSchedule-DjNQNxW4.js → launchSchedule-DjN1RbRX.js} +1 -1
  170. package/dist/chunks/{launchSkillStore-D2GUGhDD.js → launchSkillStore-CcKmVDz1.js} +1 -1
  171. package/dist/chunks/{launchTeleport-DTfhiZkf.js → launchTeleport-BKlEo0yF.js} +3 -3
  172. package/dist/chunks/{launchVault-BZ2Po4r8.js → launchVault-C7UHA-IG.js} +1 -1
  173. package/dist/chunks/{loadAgentsDir-C_wFhytF.js → loadAgentsDir-ClTeo0nk.js} +560 -560
  174. package/dist/chunks/loadAgentsDir-CshktEpX.js +1 -0
  175. package/dist/chunks/loadPluginHooks-DVZmzYLl.js +1 -0
  176. package/dist/chunks/localSearch-BtLNJRij.js +1 -0
  177. package/dist/chunks/{localSearch-B0p0_bjP.js → localSearch-Koc8naSr.js} +1 -1
  178. package/dist/chunks/login-BngE89_j.js +1 -0
  179. package/dist/chunks/{login-C1uE6Pg9.js → login-C3MZQTDL.js} +1 -1
  180. package/dist/chunks/{logoV2Utils-BJHvwGup.js → logoV2Utils-DAIIwt5R.js} +1 -1
  181. package/dist/chunks/logout-CXZBaUen.js +1 -0
  182. package/dist/chunks/{magicDocs-DPZzG7Z2.js → magicDocs-C_inI3JJ.js} +1 -1
  183. package/dist/chunks/{main-CNwSLti2.js → main-qqcmncHA.js} +36 -36
  184. package/dist/chunks/{mappers-Dxs_kNJH.js → mappers-7BSMbYvH.js} +1 -1
  185. package/dist/chunks/{mcp-CbDDqdzF.js → mcp-DRBiobrN.js} +1 -1
  186. package/dist/chunks/mcp-DV8Prhgi.js +1 -0
  187. package/dist/chunks/mcp-HQ8-nEZ1.js +6 -0
  188. package/dist/chunks/{mcpServer-BJNjQXsU.js → mcpServer-CLIYAgGs.js} +1 -1
  189. package/dist/chunks/{mcpServer-Py4Iz9Hx.js → mcpServer-DS0yRfcu.js} +1 -1
  190. package/dist/chunks/memory-Cz_JaFLF.js +1 -0
  191. package/dist/chunks/{mode-CqGusjoT.js → mode-Kx0kSZkr.js} +1 -1
  192. package/dist/chunks/model-Bwvn_acH.js +1 -0
  193. package/dist/chunks/{model-BBULcn7y.js → model-CNXtfiLg.js} +1 -1
  194. package/dist/chunks/{onChangeAppState-BkRihYau.js → onChangeAppState-C4ic-Mib.js} +1 -1
  195. package/dist/chunks/{openai-yNI_zoao.js → openai-CGGSfpPh.js} +3 -3
  196. package/dist/chunks/{overageCreditGrant-Cbh0_fbM.js → overageCreditGrant-BqW_6R5v.js} +1 -1
  197. package/dist/chunks/{panelCall-t10Sud9A.js → panelCall-DgPjuhQf.js} +1 -1
  198. package/dist/chunks/{passes-D_iS6DaC.js → passes-sYE91Vtr.js} +1 -1
  199. package/dist/chunks/{paths-Ci1iwL5Y.js → paths-DO4WOQtD.js} +2 -2
  200. package/dist/chunks/{permissions-CHvu4-yX.js → permissions-BPerbf1I.js} +3 -3
  201. package/dist/chunks/{pipeTransport-EAYXsubu.js → pipeTransport-CW9zF_UN.js} +1 -1
  202. package/dist/chunks/{plan-CP5nq_EB.js → plan-CDKBVRw6.js} +1 -1
  203. package/dist/chunks/{plugin-8apy_RBT.js → plugin-C6US4b8W.js} +1 -1
  204. package/dist/chunks/{pluginAutoupdate-ClrgF5b3.js → pluginAutoupdate-BQKtcAhC.js} +1 -1
  205. package/dist/chunks/{pluginBlocklist-B1LVo0j_.js → pluginBlocklist-B8DKXi0i.js} +1 -1
  206. package/dist/chunks/{pluginCliCommands-eqyMBWcP.js → pluginCliCommands-DWCeXYTl.js} +1 -1
  207. package/dist/chunks/{pluginFlagging-BiTDVP10.js → pluginFlagging-DFMlWw2P.js} +1 -1
  208. package/dist/chunks/{pluginOperations-gZ-iCmhu.js → pluginOperations-CKmwDC3G.js} +1 -1
  209. package/dist/chunks/{pluginStartupCheck-DCDWHam6.js → pluginStartupCheck-D6IbyWKe.js} +1 -1
  210. package/dist/chunks/pluginStartupCheck-cYnLsWOs.js +1 -0
  211. package/dist/chunks/{plugins-BAIVqfi8.js → plugins-BwZIRMh_.js} +1 -1
  212. package/dist/chunks/policyLimits-CFLBtFh3.js +1 -0
  213. package/dist/chunks/{pollConfig-_2W7bHoW.js → pollConfig-C3NjXYFc.js} +1 -1
  214. package/dist/chunks/{poor-Dii0mpOW.js → poor-BHhbua95.js} +1 -1
  215. package/dist/chunks/poorMode-CCK7Ek5w.js +1 -0
  216. package/dist/chunks/{poorMode-aDmmvJ_e.js → poorMode-mtlnXU-z.js} +1 -1
  217. package/dist/chunks/{print-BwSmcUQu.js → print-kxnXkqGc.js} +12 -12
  218. package/dist/chunks/{privacy-settings-DaAgSLKw.js → privacy-settings-DjY1annR.js} +1 -1
  219. package/dist/chunks/{processBashCommand-BZ1_JKu4.js → processBashCommand-BrqLqSva.js} +1 -1
  220. package/dist/chunks/processSlashCommand-DJGdVGbK.js +6 -0
  221. package/dist/chunks/prompt-BZjXpviP.js +1 -0
  222. package/dist/chunks/{prompt-6ZKyqv6z.js → prompt-CfM_xGPc.js} +1 -1
  223. package/dist/chunks/prompt-CusKF4-p.js +1 -0
  224. package/dist/chunks/{promptEditor-Dz41P-3I.js → promptEditor-FI_ewCpV.js} +2 -2
  225. package/dist/chunks/{protocolHandler-CHGHjfdf.js → protocolHandler-B7ybKpgJ.js} +1 -1
  226. package/dist/chunks/{rate-limit-options-BlU9av7g.js → rate-limit-options-DPJMNNou.js} +1 -1
  227. package/dist/chunks/{rcDebugLog-C42A0pX1.js → rcDebugLog-CwU_wJBE.js} +1 -1
  228. package/dist/chunks/{referral-IIcY3jkp.js → referral-Da4mpbd3.js} +1 -1
  229. package/dist/chunks/{refresh-DTGEx7X_.js → refresh-B6X4xb9r.js} +1 -1
  230. package/dist/chunks/{registerProtocol-BkNncGMI.js → registerProtocol-D8fFnceq.js} +1 -1
  231. package/dist/chunks/registry-y_z3pTg3.js +1 -0
  232. package/dist/chunks/{release-notes-BxzOD-zP.js → release-notes--tnd4K56.js} +1 -1
  233. package/dist/chunks/{releaseNotes-C8KQGZHq.js → releaseNotes-BPA229-J.js} +2 -2
  234. package/dist/chunks/{reload-plugins-gYyC6_g8.js → reload-plugins-yQ7tEUVh.js} +1 -1
  235. package/dist/chunks/{remote-env-CEJH5aJh.js → remote-env-CER5UxTX.js} +1 -1
  236. package/dist/chunks/{remoteBridgeCore-Dte7ZUAN.js → remoteBridgeCore-Bi31i8gt.js} +1 -1
  237. package/dist/chunks/{remoteControlServer-GN-eDbEz.js → remoteControlServer-oUAcWB4i.js} +1 -1
  238. package/dist/chunks/{rename-BEU6BNRp.js → rename-BTngRRZU.js} +1 -1
  239. package/dist/chunks/{resume-D36S2rXg.js → resume-DZHKfBmm.js} +2 -2
  240. package/dist/chunks/{runtimeObserver-CDMCeww2.js → runtimeObserver-B4KekIF0.js} +1 -1
  241. package/dist/chunks/{runtimeObserver-DaKaKNVW.js → runtimeObserver-BUOcYxiK.js} +2 -2
  242. package/dist/chunks/sandbox-adapter-C--j-c76.js +1 -0
  243. package/dist/chunks/{sandbox-toggle-BPO26t48.js → sandbox-toggle-DLBL7myN.js} +1 -1
  244. package/dist/chunks/searchExtraTools-CBYp5XeI.js +1 -0
  245. package/dist/chunks/{sentry-9EbPa1Xu.js → sentry-B7ZBc8fA.js} +1 -1
  246. package/dist/chunks/{session-D18B22u4.js → session-DWYQk9YN.js} +1 -1
  247. package/dist/chunks/{sessionDiscovery-B-OTvXJf.js → sessionDiscovery-BP0nv36F.js} +1 -1
  248. package/dist/chunks/sessionFileAccessHooks-DVilA3Mm.js +1 -0
  249. package/dist/chunks/sessionMemory-cMgcTxtP.js +1 -0
  250. package/dist/chunks/{sessionMemory-Ctauybzs.js → sessionMemory-pT4lc1C-.js} +1 -1
  251. package/dist/chunks/sessionMemoryUtils-BgYf2OvX.js +1 -0
  252. package/dist/chunks/sessionObserver-CzyEF7mg.js +1 -0
  253. package/dist/chunks/{sessionObserver-ardnTJ37.js → sessionObserver-D4SV0Ar3.js} +1 -1
  254. package/dist/chunks/sessionStorage-CXBgVAx-.js +1 -0
  255. package/dist/chunks/{sessionTitle-DEKvIVCK.js → sessionTitle-CkrnWEW1.js} +1 -1
  256. package/dist/chunks/{sessionTracing-CJUUEWZ4.js → sessionTracing-Caw-kvQr.js} +1 -1
  257. package/dist/chunks/{settingsSync-BWt3oUR7.js → settingsSync-Dn_lGonC.js} +1 -1
  258. package/dist/chunks/{setup-CDxkPTCq.js → setup-DGkOT4DX.js} +2 -2
  259. package/dist/chunks/{setup-BECFDOT9.js → setup-Dihjl7jo.js} +1 -1
  260. package/dist/chunks/{setup-CmCTB2T_.js → setup-II1titXI.js} +1 -1
  261. package/dist/chunks/{shadowedRuleDetection-BbALfdxE.js → shadowedRuleDetection-DASW3j9H.js} +1 -1
  262. package/dist/chunks/{sideQuestion-BHK6dd1q.js → sideQuestion-C1qbLTAL.js} +1 -1
  263. package/dist/chunks/sink-BSPyC453.js +1 -0
  264. package/dist/chunks/{sink-Do5fWbUC.js → sink-CqOAfFlL.js} +1 -1
  265. package/dist/chunks/{sinks-Dc9V7k6a.js → sinks-BT_lBY6T.js} +2 -2
  266. package/dist/chunks/sinks-CpuRIC3H.js +1 -0
  267. package/dist/chunks/{skill-learning-BHW9G3Dn.js → skill-learning-kh0HKn6u.js} +1 -1
  268. package/dist/chunks/skillChangeDetector-DQuNepIV.js +1 -0
  269. package/dist/chunks/{skillGapStore-Wa7s6orv.js → skillGapStore-B1gUQXhE.js} +2 -2
  270. package/dist/chunks/{skillGapStore-DVMbI2yy.js → skillGapStore-CFmLJlYm.js} +1 -1
  271. package/dist/chunks/{skillGenerator-CBuoIFsH.js → skillGenerator-DIAwRpPg.js} +2 -2
  272. package/dist/chunks/skillLearning-Bxu1Uzl-.js +1 -0
  273. package/dist/chunks/skillLearning-CxAbHYEk.js +1 -0
  274. package/dist/chunks/{skillPanel-2w82nkOl.js → skillPanel-B9zJLHKV.js} +3 -3
  275. package/dist/chunks/{skillSearchPanel-7BhCBkdh.js → skillSearchPanel-C1O9sxYS.js} +2 -2
  276. package/dist/chunks/{skills-D5rMEo2w.js → skills-C6_3snFY.js} +1 -1
  277. package/dist/chunks/{sprites-uNWgVZT6.js → sprites-59l7vF4l.js} +1 -1
  278. package/dist/chunks/{stats-D0CJB2HV.js → stats-BmGdg4nj.js} +1 -1
  279. package/dist/chunks/{status-nte1Arzy.js → status-KLPT7uYP.js} +1 -1
  280. package/dist/chunks/{statusNoticeHelpers-Lqf99003.js → statusNoticeHelpers-DuqyBY-N.js} +1 -1
  281. package/dist/chunks/{tag-BnvWS9HE.js → tag-0vahEnrx.js} +1 -1
  282. package/dist/chunks/{tasks-CEs-pxkC.js → tasks-zVPemGv7.js} +1 -1
  283. package/dist/chunks/teamHelpers-B83RwCCC.js +1 -0
  284. package/dist/chunks/{teamHelpers-D8R_gGLb.js → teamHelpers-CXAmvFco.js} +1 -1
  285. package/dist/chunks/teammateModeSnapshot-AdUFmPGC.js +1 -0
  286. package/dist/chunks/{teammateModeSnapshot-Bdra3VIJ.js → teammateModeSnapshot-CdiglTzv.js} +1 -1
  287. package/dist/chunks/teleport-D6PvdjPy.js +1 -0
  288. package/dist/chunks/{templateJobs-BDKGtmr3.js → templateJobs-Ox5ZTKjW.js} +1 -1
  289. package/dist/chunks/{terminalSetup-Bbvq-9Xl.js → terminalSetup-Dh70ynBX.js} +1 -1
  290. package/dist/chunks/{terminalSetup-C1X-sXwp.js → terminalSetup-hLCi-2uB.js} +1 -1
  291. package/dist/chunks/{theme-DXv6bV7f.js → theme-DxgUVq9C.js} +1 -1
  292. package/dist/chunks/thinkback-C5vFU8dM.js +1 -0
  293. package/dist/chunks/{thinkback-CMsW7mvG.js → thinkback-DWgU7Qhr.js} +1 -1
  294. package/dist/chunks/{thinkback-play-CFdkpzlj.js → thinkback-play-CDzY6Ux4.js} +1 -1
  295. package/dist/chunks/{toolEventObserver-CF7T7FBH.js → toolEventObserver-DPoMAJwr.js} +1 -1
  296. package/dist/chunks/{toolEventObserver-DDJV8cvW.js → toolEventObserver-jO6-mlFU.js} +1 -1
  297. package/dist/chunks/toolPool-BmA-BnAq.js +1 -0
  298. package/dist/chunks/{toolPool-BJv0sBnR.js → toolPool-Dgn1Clq8.js} +1 -1
  299. package/dist/chunks/{trustedDevice-C9nJhhyZ.js → trustedDevice-CYR5AgSB.js} +1 -1
  300. package/dist/chunks/{trustedDevice-C5s2au0k.js → trustedDevice-D35gYkBT.js} +1 -1
  301. package/dist/chunks/{ultrareviewCommand-BEv1_AS1.js → ultrareviewCommand-o4GjzoXK.js} +2 -2
  302. package/dist/chunks/{undercover-DPVt2WN7.js → undercover-B4xr62Ux.js} +1 -1
  303. package/dist/chunks/undercover-nakrQDLh.js +1 -0
  304. package/dist/chunks/{updateCCB-D-4naIUu.js → updateCCB-Cthn50OV.js} +1 -1
  305. package/dist/chunks/{upgrade-CSld83v7.js → upgrade-D4Id4ebd.js} +1 -1
  306. package/dist/chunks/upgrade-DJTCV8sr.js +1 -0
  307. package/dist/chunks/{upload-DVlE8SRp.js → upload-BFDXvdfb.js} +1 -1
  308. package/dist/chunks/{usage-D4Ubnttz.js → usage-Csbso5mD.js} +1 -1
  309. package/dist/chunks/{usage-B_bY46ep.js → usage-DxudeFLL.js} +1 -1
  310. package/dist/chunks/{useMainLoopModel-D3tJJC3y.js → useMainLoopModel-CEqP4HOc.js} +1 -1
  311. package/dist/chunks/{useManagePlugins-B4kcqcyY.js → useManagePlugins-BmS3Adja.js} +1 -1
  312. package/dist/chunks/{useMergedTools-CTQl4cdV.js → useMergedTools-wR6Bglqq.js} +1 -1
  313. package/dist/chunks/{useSearchInput-JPayBRPC.js → useSearchInput-BhKAGgEN.js} +1 -1
  314. package/dist/chunks/{useSettingsErrors-YTgPxnRZ.js → useSettingsErrors-CjK3P-Ki.js} +1 -1
  315. package/dist/chunks/{useVoice-CaBv3G13.js → useVoice-DP1hHBWA.js} +1 -1
  316. package/dist/chunks/{util-Q70qdjeS.js → util-CMSErQoz.js} +1 -1
  317. package/dist/chunks/utils-CAQfwbv8.js +1 -0
  318. package/dist/chunks/{validatePlugin-6lg9B564.js → validatePlugin-_g0AqWZG.js} +1 -1
  319. package/dist/chunks/{vim-zOsQBIp4.js → vim-8y-2Q09k.js} +1 -1
  320. package/dist/chunks/{voice-DBQevAhk.js → voice-BJAsr0K-.js} +1 -1
  321. package/dist/chunks/{voiceModeEnabled-CjBjjeNR.js → voiceModeEnabled-BD9GZhQ3.js} +1 -1
  322. package/dist/chunks/voiceModeEnabled-DZbxaFIg.js +1 -0
  323. package/dist/chunks/{voiceStreamSTT-B8CTbb_6.js → voiceStreamSTT-B1T-8adN.js} +1 -1
  324. package/dist/chunks/voiceStreamSTT-B39XaGOU.js +1 -0
  325. package/dist/chunks/{web-tools-CGqBqo07.js → web-tools-DVIvcP41.js} +1 -1
  326. package/dist/chunks/{workerRegistry-Bx6FvTZF.js → workerRegistry-60_UCyc3.js} +1 -1
  327. package/dist/chunks/worktree-DNK8NprA.js +1 -0
  328. package/dist/chunks/{xml-CVF7dWfi.js → xml-CTdKuU6f.js} +1 -1
  329. package/dist/cli.js +1 -1
  330. package/package.json +1 -1
  331. package/dist/chunks/ApproveApiKey-Cc5SaLqs.js +0 -1
  332. package/dist/chunks/BackgroundTasksDialog-OkUSMj0I.js +0 -2
  333. package/dist/chunks/ClaudeMdExternalIncludesDialog-BbPaorIs.js +0 -1
  334. package/dist/chunks/ConsoleOAuthFlow-Dyv4mI_o.js +0 -1
  335. package/dist/chunks/Doctor-CRrE5Sf4.js +0 -1
  336. package/dist/chunks/Grove-CgX5Fdeh.js +0 -1
  337. package/dist/chunks/MessageSelector-CEvbAZGv.js +0 -3
  338. package/dist/chunks/PluginSettings-D3bQRsge.js +0 -17
  339. package/dist/chunks/QueryEngine-CMcQGyql.js +0 -1
  340. package/dist/chunks/REPL-C9f3ToGu.js +0 -1
  341. package/dist/chunks/ResumeConversation-DxqbAKA4.js +0 -1
  342. package/dist/chunks/SearchExtraToolsTool-BVAhywUI.js +0 -1
  343. package/dist/chunks/SentryErrorBoundary-M1ipwe1n.js +0 -1
  344. package/dist/chunks/Settings-D5EWYL40.js +0 -2
  345. package/dist/chunks/api-BdbBnz5c.js +0 -1
  346. package/dist/chunks/assistant-BMviqf0l.js +0 -1
  347. package/dist/chunks/auth-ORBmEqnH.js +0 -1
  348. package/dist/chunks/backgroundHousekeeping-BAvSPaZ5.js +0 -1
  349. package/dist/chunks/bridgeConfig-B49H_B9L.js +0 -1
  350. package/dist/chunks/bridgeEnabled-DsG2JvIr.js +0 -1
  351. package/dist/chunks/bridgeMain-DYCShrcV.js +0 -1
  352. package/dist/chunks/caches-BsYvQnWV.js +0 -1
  353. package/dist/chunks/changeDetector-By54zja0.js +0 -1
  354. package/dist/chunks/channelNotification-Cx82K1CD.js +0 -1
  355. package/dist/chunks/clear-BQr2zTyP.js +0 -1
  356. package/dist/chunks/client-BbavFXJZ.js +0 -1
  357. package/dist/chunks/color-DOsgZO2n.js +0 -1
  358. package/dist/chunks/commands-CfwfGt3T.js +0 -1
  359. package/dist/chunks/commitAttribution-CH9C_hoL.js +0 -1
  360. package/dist/chunks/context-noninteractive-DCYvLxWx.js +0 -1
  361. package/dist/chunks/conversation-DYUVAAQt.js +0 -1
  362. package/dist/chunks/conversation-NrAy2em3.js +0 -1
  363. package/dist/chunks/createSession-Czx7_nf6.js +0 -1
  364. package/dist/chunks/cron-g_P3I5uT.js +0 -1
  365. package/dist/chunks/datadog-QSR9B7CZ.js +0 -1
  366. package/dist/chunks/envLessBridgeConfig-DSJqg3Ox.js +0 -1
  367. package/dist/chunks/extra-usage-DaxUQk9I.js +0 -1
  368. package/dist/chunks/extractMemories-B3cTWsph.js +0 -1
  369. package/dist/chunks/fast-CHiQGMBE.js +0 -1
  370. package/dist/chunks/gates-DvjyKZVA.js +0 -1
  371. package/dist/chunks/hooks-DOej0jqp.js +0 -1
  372. package/dist/chunks/inboundAttachments-BBYxcnvj.js +0 -1
  373. package/dist/chunks/initReplBridge-Dt2aQBia.js +0 -1
  374. package/dist/chunks/language-BoKr5ylY.js +0 -1
  375. package/dist/chunks/loadAgentsDir-whRB0phu.js +0 -1
  376. package/dist/chunks/loadPluginHooks-CYZjzxyO.js +0 -1
  377. package/dist/chunks/localSearch-DAwFmV2Y.js +0 -1
  378. package/dist/chunks/login-DOyB64Rv.js +0 -1
  379. package/dist/chunks/logout-DTPo3Myl.js +0 -1
  380. package/dist/chunks/mcp-CVnFM6nR.js +0 -6
  381. package/dist/chunks/mcp-CzfQB8BT.js +0 -1
  382. package/dist/chunks/memory-BdUqEKio.js +0 -1
  383. package/dist/chunks/model-BOc_-7m0.js +0 -1
  384. package/dist/chunks/pluginStartupCheck-EjLvCXru.js +0 -1
  385. package/dist/chunks/policyLimits-Cdp3QwZ1.js +0 -1
  386. package/dist/chunks/poorMode-DzEL0cu0.js +0 -1
  387. package/dist/chunks/processSlashCommand-v1Rvzxwn.js +0 -6
  388. package/dist/chunks/prompt-DPqKtC0b.js +0 -1
  389. package/dist/chunks/prompt-WjMHPk90.js +0 -1
  390. package/dist/chunks/registry-CBqb7wbi.js +0 -1
  391. package/dist/chunks/sandbox-adapter-DqTuhgud.js +0 -1
  392. package/dist/chunks/searchExtraTools-Brae4wmG.js +0 -1
  393. package/dist/chunks/sessionFileAccessHooks-BXsK8Dwf.js +0 -1
  394. package/dist/chunks/sessionMemory-Bv-AYifm.js +0 -1
  395. package/dist/chunks/sessionMemoryUtils-D-bzdsAT.js +0 -1
  396. package/dist/chunks/sessionObserver-j8D9hidw.js +0 -1
  397. package/dist/chunks/sessionStorage-Cw5ibYWA.js +0 -1
  398. package/dist/chunks/sink-DFWgcGHX.js +0 -1
  399. package/dist/chunks/sinks-BnkxTOU9.js +0 -1
  400. package/dist/chunks/skillChangeDetector-DwAvG835.js +0 -1
  401. package/dist/chunks/skillLearning-BI2YDG3K.js +0 -1
  402. package/dist/chunks/skillLearning-BZMJRJPp.js +0 -1
  403. package/dist/chunks/teamHelpers-D4vCj2hP.js +0 -1
  404. package/dist/chunks/teammateModeSnapshot-BDJ1JTcl.js +0 -1
  405. package/dist/chunks/teleport-RxTr4aCi.js +0 -1
  406. package/dist/chunks/thinkback-DRJBz3Is.js +0 -1
  407. package/dist/chunks/toolPool-0zCdXfEu.js +0 -1
  408. package/dist/chunks/undercover-DYa00dVv.js +0 -1
  409. package/dist/chunks/upgrade-BHj8ALep.js +0 -1
  410. package/dist/chunks/utils-Cr-x1Oyd.js +0 -1
  411. package/dist/chunks/voiceModeEnabled-DK6u8Aaj.js +0 -1
  412. package/dist/chunks/voiceStreamSTT-CCkOfmdI.js +0 -1
  413. package/dist/chunks/worktree-DPpgPLLG.js +0 -1
@@ -1,3 +1,3 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,J as o,Ln as s,Rn as c,Ut as l,_ as u,a as d,b as f,f as p,i as m,n as h,o as g,p as ee,r as te,t as _,tt as ne,x as v,xt as y}from"./src-Di342QoJ.js";import{t as b}from"./jsx-runtime-D-D469L8.js";import{cn as re,ot as x}from"./state-sIHsFpDu.js";import{Ao as S,Do as C,Gs as w,Xa as T,ko as E,oo as D,zs as O}from"./paths-Ci1iwL5Y.js";import{E as k,O as A}from"./debug-otxXY3j-.js";import{l as j,o as M}from"./stringUtils-KZoO4GUd.js";import{Dp as ie,FA as ae,FD as N,H as oe,ID as se,K as ce,MA as P,Op as le,U as ue,Uo as F,V as de,W as fe,aS as I,bo as L,bu as R,dS as z,fC as pe,fS as me,jD as B,lC as he,oS as V,q as ge,uC as _e,xu as ve}from"./loadAgentsDir-C_wFhytF.js";import{t as ye}from"./useKeybinding-DPOUuymz.js";import{t as be}from"./useTerminalSize-Du-EamDN.js";import{n as xe,t as Se}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as Ce,t as we}from"./AddWorkspaceDirectory-C7od6sFQ.js";import{t as Te}from"./SearchBox-CkO4rQ-9.js";import{n as Ee,t as De}from"./useSearchInput-JPayBRPC.js";import{n as H,t as Oe}from"./shadowedRuleDetection-BbALfdxE.js";import{n as ke,t as Ae}from"./autoModeDenials-DlO5g6E9.js";function je({ruleValue:e}){switch(e.toolName){case R.name:return e.ruleContent?e.ruleContent.endsWith(`:*`)?(0,U.jsxs)(f,{dimColor:!0,children:[`Any Bash command starting with `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent.slice(0,-2)})]}):(0,U.jsxs)(f,{dimColor:!0,children:[`The Bash command `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent})]}):(0,U.jsx)(f,{dimColor:!0,children:`Any Bash command`});default:return e.ruleContent?null:(0,U.jsxs)(f,{dimColor:!0,children:[`Any use of the `,(0,U.jsx)(f,{bold:!0,children:e.toolName}),` tool`]})}}var U,Me=e((()=>{c(),_(),ve(),U=b()}));function Ne(e){switch(e){case`localSettings`:return{label:`Project settings (local)`,description:`Saved in ${T(`localSettings`)}`,value:e};case`projectSettings`:return{label:`Project settings`,description:`Checked in at ${T(`projectSettings`)}`,value:e};case`userSettings`:return{label:`User settings`,description:`Saved in at ~/.claude/settings.json`,value:e}}}function Pe({onAddRules:e,onCancel:t,ruleValues:n,ruleBehavior:r,initialContext:i,setToolPermissionContext:a}){let o=O.map(Ne),s=(0,Fe.useCallback)(o=>{if(o===`cancel`){t();return}else if(O.includes(o)){let t=o,s=B(i,{type:`addRules`,rules:n,behavior:r,destination:t});se({type:`addRules`,rules:n,behavior:r,destination:t}),a(s);let c=n.map(e=>({ruleValue:e,ruleBehavior:r,source:t})),l=Oe(s,{sandboxAutoAllowEnabled:P.isSandboxingEnabled()&&P.isAutoAllowBashIfSandboxedEnabled()}).filter(e=>n.some(t=>t.toolName===e.rule.ruleValue.toolName&&t.ruleContent===e.rule.ruleValue.ruleContent));e(c,l.length>0?l:void 0)}},[e,t,n,r,i,a]);return(0,W.jsxs)(p,{title:`Add ${r} permission ${j(n.length,`rule`)}`,onCancel:t,color:`permission`,children:[(0,W.jsx)(v,{flexDirection:`column`,paddingX:2,children:n.map(e=>(0,W.jsxs)(v,{flexDirection:`column`,children:[(0,W.jsx)(f,{bold:!0,children:S(e)}),(0,W.jsx)(je,{ruleValue:e})]},S(e)))}),(0,W.jsxs)(v,{flexDirection:`column`,marginY:1,children:[(0,W.jsx)(f,{children:n.length===1?`Where should this rule be saved?`:`Where should these rules be saved?`}),(0,W.jsx)(I,{options:o,onChange:s})]})]})}var Fe,W,Ie=e((()=>{c(),Fe=t(c(),1),V(),_(),N(),C(),H(),ae(),w(),D(),M(),Me(),W=b()}));function Le({onCancel:e,onSubmit:t,ruleBehavior:n}){let[a,s]=(0,Re.useState)(``),[c,l]=(0,Re.useState)(0),u=xe();ne(`confirm:no`,e,{context:`Settings`});let{columns:d}=i(),p=d-6;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,G.jsxs)(f,{bold:!0,color:`permission`,children:[`Add `,n,` permission rule`]}),(0,G.jsxs)(v,{flexDirection:`column`,children:[(0,G.jsxs)(f,{children:[`Permission rules are a tool name, optionally followed by a specifier in parentheses.`,(0,G.jsx)(o,{}),`e.g., `,(0,G.jsx)(f,{bold:!0,children:S({toolName:ie.name})}),(0,G.jsx)(f,{bold:!1,children:` or `}),(0,G.jsx)(f,{bold:!0,children:S({toolName:R.name,ruleContent:`ls:*`})})]}),(0,G.jsx)(v,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,G.jsx)(z,{showCursor:!0,value:a,onChange:s,onSubmit:e=>{let r=e.trim();r.length!==0&&t(E(r),n)},placeholder:`Enter permission rule${r.ellipsis}`,columns:p,cursorOffset:c,onChangeCursorOffset:l})})]})]}),(0,G.jsx)(v,{marginLeft:3,children:u.pending?(0,G.jsxs)(f,{dimColor:!0,children:[`Press `,u.keyName,` again to exit`]}):(0,G.jsx)(f,{dimColor:!0,children:`Enter to submit · Esc to cancel`})})]})}var Re,G,ze=e((()=>{n(),c(),Re=t(c(),1),me(),Se(),be(),_(),ye(),ve(),le(),C(),G=b()}));function Be({onHeaderFocusChange:e,onStateChange:t}){let{headerFocused:n,focusHeader:r}=m();(0,K.useEffect)(()=>{e?.(n)},[n,e]);let[i]=(0,K.useState)(()=>Ae()),[a,o]=(0,K.useState)(()=>new Set),[s,c]=(0,K.useState)(()=>new Set),[l,u]=(0,K.useState)(0);(0,K.useEffect)(()=>{t({approved:a,retry:s,denials:i})},[a,s,i,t]);let d=(0,K.useCallback)(e=>{let t=Number(e);o(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),p=(0,K.useCallback)(e=>{u(Number(e))},[]);if(y((e,t)=>{e===`r`&&(c(e=>{let t=new Set(e);return t.has(l)?t.delete(l):t.add(l),t}),o(e=>{if(e.has(l))return e;let t=new Set(e);return t.add(l),t}))},{isActive:i.length>0}),i.length===0)return(0,q.jsx)(f,{dimColor:!0,children:`No recent denials. Commands denied by the auto mode classifier will appear here.`});let h=i.map((e,t)=>{let n=a.has(t),r=s.has(t)?` (retry)`:``;return{label:(0,q.jsxs)(f,{children:[(0,q.jsx)(g,{status:n?`success`:`error`,withSpace:!0}),e.display,(0,q.jsx)(f,{dimColor:!0,children:r})]}),value:String(t)}});return(0,q.jsxs)(v,{flexDirection:`column`,children:[(0,q.jsx)(f,{children:`Commands recently denied by the auto mode classifier.`}),(0,q.jsx)(v,{marginTop:1,children:(0,q.jsx)(I,{options:h,onChange:d,onFocus:p,visibleOptionCount:Math.min(10,h.length),isDisabled:n,onUpFromFirstItem:r})})]})}var K,q,Ve=e((()=>{c(),K=t(c(),1),_(),ke(),V(),q=b()}));function He({directoryPath:e,onRemove:t,onCancel:n,permissionContext:r,setPermissionContext:i}){let a=(0,J.useCallback)(()=>{i(B(r,{type:`removeDirectories`,directories:[e],destination:`session`})),t()},[e,r,i,t]),o=(0,J.useCallback)(e=>{e===`yes`?a():n()},[a,n]);return(0,Y.jsxs)(p,{title:`Remove directory from workspace?`,onCancel:n,color:`error`,children:[(0,Y.jsx)(v,{marginX:2,flexDirection:`column`,children:(0,Y.jsx)(f,{bold:!0,children:e})}),(0,Y.jsx)(f,{children:`Claude Code will no longer have access to files in this directory.`}),(0,Y.jsx)(I,{onChange:o,onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]})}var J,Y,Ue=e((()=>{c(),J=t(c(),1),V(),_(),N(),Y=b()}));function We({onExit:e,toolPermissionContext:t,onRequestAddDirectory:n,onRequestRemoveDirectory:i,onHeaderFocusChange:a}){let{headerFocused:o,focusHeader:s}=m();(0,X.useEffect)(()=>{a?.(o)},[o,a]);let c=Ge.useMemo(()=>Array.from(t.additionalWorkingDirectories.keys()).map(e=>({path:e,isCurrent:!1,isDeletable:!0})),[t.additionalWorkingDirectories]),l=(0,X.useCallback)(e=>{if(e===`add-directory`){n();return}let t=c.find(t=>t.path===e);t&&t.isDeletable&&i(t.path)},[c,n,i]),u=(0,X.useCallback)(()=>e(`Workspace dialog dismissed`,{display:`system`}),[e]),d=Ge.useMemo(()=>{let e=c.map(e=>({label:e.path,value:e.path}));return e.push({label:`Add directory${r.ellipsis}`,value:`add-directory`}),e},[c]);return(0,Z.jsxs)(v,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(v,{flexDirection:`row`,marginTop:1,marginLeft:2,gap:1,children:[(0,Z.jsx)(f,{children:`- ${x()}`}),(0,Z.jsx)(f,{dimColor:!0,children:`(Original working directory)`})]}),(0,Z.jsx)(I,{options:d,onChange:l,onCancel:u,visibleOptionCount:Math.min(10,d.length),onUpFromFirstItem:s,isDisabled:o})]})}var Ge,X,Z,Ke=e((()=>{n(),Ge=t(c(),1),X=t(c(),1),re(),V(),_(),Z=b()}));function qe({rule:e}){return(0,$.jsx)(f,{dimColor:!0,children:`From ${ge(e.source)}`})}function Je(e){switch(e){case`allow`:return`allowed`;case`deny`:return`denied`;case`ask`:return`ask`}}function Ye({rule:e,onDelete:t,onCancel:n}){let r=xe();ne(`confirm:no`,n,{context:`Confirmation`});let i=(0,$.jsxs)(v,{flexDirection:`column`,marginX:2,children:[(0,$.jsx)(f,{bold:!0,children:S(e.ruleValue)}),(0,$.jsx)(je,{ruleValue:e.ruleValue}),(0,$.jsx)(qe,{rule:e})]}),a=(0,$.jsx)(v,{marginLeft:3,children:r.pending?(0,$.jsxs)(f,{dimColor:!0,children:[`Press `,r.keyName,` again to exit`]}):(0,$.jsx)(f,{dimColor:!0,children:`Esc to cancel`})});return e.source===`policySettings`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,$.jsx)(f,{bold:!0,color:`permission`,children:`Rule details`}),i,(0,$.jsxs)(f,{italic:!0,children:[`This rule is configured by managed settings and cannot be modified.`,`
2
- `,`Contact your system administrator for more information.`]})]}),a]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`error`,children:[(0,$.jsxs)(f,{bold:!0,color:`error`,children:[`Delete `,Je(e.ruleBehavior),` tool?`]}),i,(0,$.jsx)(f,{children:`Are you sure you want to delete this permission rule?`}),(0,$.jsx)(I,{onChange:e=>e===`yes`?t():n(),onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]}),a]})}function Xe(e){let{options:t,searchQuery:n,isSearchMode:r,isFocused:i,onSelect:a,onCancel:o,lastFocusedRuleKey:s,cursorOffset:c,onHeaderFocusChange:l}=e,f=d(),{headerFocused:p,focusHeader:h,blurHeader:g}=m();return(0,Q.useEffect)(()=>{r&&p&&g()},[r,p,g]),(0,Q.useEffect)(()=>{l?.(p)},[p,l]),(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(v,{marginBottom:1,flexDirection:`column`,children:(0,$.jsx)(u,{query:n,isFocused:r&&!p,isTerminalFocused:i,width:f,cursorOffset:c})}),(0,$.jsx)(I,{options:t,onChange:a,onCancel:o,visibleOptionCount:Math.min(10,t.length),isDisabled:r||p,defaultFocusValue:s,onUpFromFirstItem:h})]})}function Ze({tab:e,getRulesOptions:t,handleToolSelect:n,...r}){return(0,$.jsxs)(v,{flexDirection:`column`,flexShrink:e===`allow`?0:void 0,children:[(0,$.jsx)(f,{children:{allow:`Claude Code won't ask before using allowed tools.`,ask:`Claude Code will always ask for confirmation before using these tools.`,deny:`Claude Code will always reject requests to use denied tools.`}[e]}),(0,$.jsx)(Xe,{options:t(e,r.searchQuery).options,onSelect:t=>n(t,e),...r})]})}function Qe({onExit:e,initialTab:t,onRetryDenials:n}){let i=Ae().length>0,o=t??(i?`recent`:`allow`),[s,c]=(0,Q.useState)([]),u=_e(e=>e.toolPermissionContext),d=pe(),p=l(),m=(0,Q.useRef)({approved:new Set,retry:new Set,denials:[]}),g=(0,Q.useCallback)(e=>{m.current=e},[]),[_,y]=(0,Q.useState)(),[b,re]=(0,Q.useState)(),[x,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(!1),[ie,ae]=(0,Q.useState)(!0),N=(0,Q.useCallback)(e=>{ae(e)},[]),ce=(0,Q.useMemo)(()=>{let e=new Map;return oe(u).forEach(t=>{e.set(A(t),t)}),e},[u]),P=(0,Q.useMemo)(()=>{let e=new Map;return fe(u).forEach(t=>{e.set(A(t),t)}),e},[u]),le=(0,Q.useMemo)(()=>{let e=new Map;return ue(u).forEach(t=>{e.set(A(t),t)}),e},[u]),F=(0,Q.useCallback)((e,t=``)=>{let n=(()=>{switch(e){case`allow`:return ce;case`deny`:return P;case`ask`:return le;case`workspace`:case`recent`:return new Map}})(),i=[];e!==`workspace`&&e!==`recent`&&!t&&i.push({label:`Add a new rule${r.ellipsis}`,value:`add-new-rule`});let a=Array.from(n.keys()).sort((e,t)=>{let r=n.get(e),i=n.get(t);if(r&&i){let e=S(r.ruleValue).toLowerCase(),t=S(i.ruleValue).toLowerCase();return e.localeCompare(t)}return 0}),o=t.toLowerCase();for(let e of a){let r=n.get(e);if(r){let n=S(r.ruleValue);if(t&&!n.toLowerCase().includes(o))continue;i.push({label:n,value:e})}}return{options:i,rulesByKey:n}},[ce,P,le]),I=xe(),L=!_&&!x&&!w&&!E&&!O,{query:R,setQuery:z,cursorOffset:me}=Ee({isActive:L&&j,onExit:()=>{M(!1)}}),he=(0,Q.useCallback)(e=>{L&&(j||e.ctrl||e.meta||(e.key===`/`?(e.preventDefault(),M(!0),z(``)):e.key.length===1&&e.key!==`j`&&e.key!==`k`&&e.key!==`m`&&e.key!==`i`&&e.key!==`r`&&e.key!==` `&&(e.preventDefault(),M(!0),z(e.key))))},[L,j,z]),V=(0,Q.useCallback)((e,t)=>{let{rulesByKey:n}=F(t);if(e===`add-new-rule`){C(t);return}else{y(n.get(e));return}},[F]),ge=(0,Q.useCallback)(()=>{C(null)},[]),ve=(0,Q.useCallback)((e,t)=>{T({ruleValue:e,ruleBehavior:t}),C(null)},[]),ye=(0,Q.useCallback)((e,t)=>{T(null);for(let t of e)c(e=>[...e,`Added ${t.ruleBehavior} rule ${a.bold(S(t.ruleValue))}`]);if(t&&t.length>0)for(let e of t){let t=e.shadowType===`deny`?`blocked`:`shadowed`;c(n=>[...n,a.yellow(`${r.warning} Warning: ${S(e.rule.ruleValue)} is ${t}`),a.dim(` ${e.reason}`),a.dim(` Fix: ${e.fix}`)])}},[]),be=(0,Q.useCallback)(()=>{T(null)},[]),Se=(0,Q.useCallback)(()=>D(!0),[]),Ce=(0,Q.useCallback)(e=>k(e),[]),Te=(0,Q.useCallback)(()=>{let t=m.current,r=e=>Array.from(e).map(e=>t.denials[e]).filter(e=>e!==void 0),i=r(t.retry);if(i.length>0){let t=i.map(e=>e.display);n?.(t),e(void 0,{shouldQuery:!0,metaMessages:[`Permission granted for: ${t.join(`, `)}. You may now retry ${t.length===1?`this command`:`these commands`} if you would like.`]});return}let o=r(t.approved);o.length>0||s.length>0?e([...o.length>0?[`Approved ${o.map(e=>a.bold(e.display)).join(`, `)}`]:[],...s].join(`
3
- `)):e(`Permissions dialog dismissed`,{display:`system`})},[s,e,n]);ne(`confirm:no`,Te,{context:`Settings`,isActive:L&&!j});let De=()=>{if(!_)return;let{options:e}=F(_.ruleBehavior),t=A(_),n=e.filter(e=>e.value!==`add-new-rule`).map(e=>e.value),r=n.indexOf(t),i;r!==-1&&(r<n.length-1?i=n[r+1]:r>0&&(i=n[r-1])),re(i),de({rule:_,initialContext:u,setToolPermissionContext(e){d(t=>({...t,toolPermissionContext:e}))}}),c(e=>[...e,`Deleted ${_.ruleBehavior} rule ${a.bold(S(_.ruleValue))}`]),y(void 0)};if(_)return(0,$.jsx)(Ye,{rule:_,onDelete:De,onCancel:()=>y(void 0)});if(x&&x!==`workspace`&&x!==`recent`)return(0,$.jsx)(Le,{onCancel:ge,onSubmit:ve,ruleBehavior:x});if(w)return(0,$.jsx)(Pe,{onAddRules:ye,onCancel:be,ruleValues:[w.ruleValue],ruleBehavior:w.ruleBehavior,initialContext:u,setToolPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});if(E)return(0,$.jsx)(we,{onAddDirectory:(e,t)=>{let n={type:`addDirectories`,directories:[e],destination:t?`localSettings`:`session`},r=B(u,n);d(e=>({...e,toolPermissionContext:r})),t&&se(n),c(n=>[...n,`Added directory ${a.bold(e)} to workspace${t?` and saved to local settings`:` for this session`}`]),D(!1)},onCancel:()=>D(!1),permissionContext:u});if(O)return(0,$.jsx)(He,{directoryPath:O,onRemove:()=>{c(e=>[...e,`Removed directory ${a.bold(O)} from workspace`]),k(null)},onCancel:()=>k(null),permissionContext:u,setPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});let H={searchQuery:R,isSearchMode:j,isFocused:p,onCancel:Te,lastFocusedRuleKey:b,cursorOffset:me,getRulesOptions:F,handleToolSelect:V,onHeaderFocusChange:N};return(0,$.jsx)(v,{flexDirection:`column`,onKeyDown:he,children:(0,$.jsxs)(ee,{color:`permission`,children:[(0,$.jsxs)(te,{title:`Permissions:`,color:`permission`,defaultTab:o,hidden:!!_||!!x||!!w||E||!!O,initialHeaderFocused:!i,navFromContent:!j,children:[(0,$.jsx)(h,{id:`recent`,title:`Recently denied`,children:(0,$.jsx)(Be,{onHeaderFocusChange:N,onStateChange:g})}),(0,$.jsx)(h,{id:`allow`,title:`Allow`,children:(0,$.jsx)(Ze,{tab:`allow`,...H})}),(0,$.jsx)(h,{id:`ask`,title:`Ask`,children:(0,$.jsx)(Ze,{tab:`ask`,...H})}),(0,$.jsx)(h,{id:`deny`,title:`Deny`,children:(0,$.jsx)(Ze,{tab:`deny`,...H})}),(0,$.jsx)(h,{id:`workspace`,title:`Workspace`,children:(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(f,{children:`Claude Code can read files in the workspace, and make edits when auto-accept edits is on.`}),(0,$.jsx)(We,{onExit:e,toolPermissionContext:u,onRequestAddDirectory:Se,onRequestRemoveDirectory:Ce,onHeaderFocusChange:N})]})})]}),(0,$.jsx)(v,{marginTop:1,paddingLeft:1,children:(0,$.jsx)(f,{dimColor:!0,children:I.pending?(0,$.jsxs)($.Fragment,{children:[`Press `,I.keyName,` again to exit`]}):ie?(0,$.jsx)($.Fragment,{children:`←/→ tab switch · ↓ return · Esc cancel`}):j?(0,$.jsx)($.Fragment,{children:`Type to filter · Enter/↓ select · ↑ tabs · Esc clear`}):i&&o===`recent`?(0,$.jsx)($.Fragment,{children:`Enter approve · r retry · ↑↓ navigate · ←/→ switch · Esc cancel`}):(0,$.jsx)($.Fragment,{children:`↑↓ navigate · Enter select · Type to search · ←/→ switch · Esc cancel`})})})]})})}var Q,$,$e=e((()=>{s(),n(),c(),Q=t(c(),1),he(),N(),V(),Se(),De(),_(),ye(),ke(),C(),ce(),k(),Te(),Ie(),Ce(),Me(),ze(),Ve(),Ue(),Ke(),$=b()})),et,tt;e((()=>{$e(),F(),et=b(),tt=async(e,t)=>(0,et.jsx)(Qe,{onExit:e,onRetryDenials:e=>{t.setMessages(t=>[...t,L(e)])}})}))();export{tt as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,In as a,J as o,Ln as s,Rn as c,Ut as l,_ as u,a as d,b as f,f as p,i as m,n as h,o as g,p as ee,r as te,t as _,tt as ne,x as v,xt as y}from"./src-Di342QoJ.js";import{t as b}from"./jsx-runtime-D-D469L8.js";import{cn as re,ot as x}from"./state-sIHsFpDu.js";import{Ao as S,Do as C,Gs as w,Xa as T,ko as E,oo as D,zs as O}from"./paths-DO4WOQtD.js";import{E as k,O as A}from"./debug-otxXY3j-.js";import{l as j,o as M}from"./stringUtils-KZoO4GUd.js";import{Dp as ie,FA as ae,FD as N,H as oe,ID as se,K as ce,MA as P,Op as le,U as ue,Uo as F,V as de,W as fe,aS as I,bo as L,dS as pe,fC as me,fS as R,jD as z,lC as he,oS as B,q as ge,uC as _e,vu as V,yu as ve}from"./loadAgentsDir-ClTeo0nk.js";import{t as ye}from"./useKeybinding-DPOUuymz.js";import{t as be}from"./useTerminalSize-Du-EamDN.js";import{n as xe,t as Se}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as Ce,t as we}from"./AddWorkspaceDirectory-V2tF7iCY.js";import{t as Te}from"./SearchBox-CkO4rQ-9.js";import{n as Ee,t as De}from"./useSearchInput-BhKAGgEN.js";import{n as H,t as Oe}from"./shadowedRuleDetection-DASW3j9H.js";import{n as ke,t as Ae}from"./autoModeDenials-DlO5g6E9.js";function je({ruleValue:e}){switch(e.toolName){case V.name:return e.ruleContent?e.ruleContent.endsWith(`:*`)?(0,U.jsxs)(f,{dimColor:!0,children:[`Any Bash command starting with `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent.slice(0,-2)})]}):(0,U.jsxs)(f,{dimColor:!0,children:[`The Bash command `,(0,U.jsx)(f,{bold:!0,children:e.ruleContent})]}):(0,U.jsx)(f,{dimColor:!0,children:`Any Bash command`});default:return e.ruleContent?null:(0,U.jsxs)(f,{dimColor:!0,children:[`Any use of the `,(0,U.jsx)(f,{bold:!0,children:e.toolName}),` tool`]})}}var U,Me=e((()=>{c(),_(),ve(),U=b()}));function Ne(e){switch(e){case`localSettings`:return{label:`Project settings (local)`,description:`Saved in ${T(`localSettings`)}`,value:e};case`projectSettings`:return{label:`Project settings`,description:`Checked in at ${T(`projectSettings`)}`,value:e};case`userSettings`:return{label:`User settings`,description:`Saved in at ~/.claude/settings.json`,value:e}}}function Pe({onAddRules:e,onCancel:t,ruleValues:n,ruleBehavior:r,initialContext:i,setToolPermissionContext:a}){let o=O.map(Ne),s=(0,Fe.useCallback)(o=>{if(o===`cancel`){t();return}else if(O.includes(o)){let t=o,s=z(i,{type:`addRules`,rules:n,behavior:r,destination:t});se({type:`addRules`,rules:n,behavior:r,destination:t}),a(s);let c=n.map(e=>({ruleValue:e,ruleBehavior:r,source:t})),l=Oe(s,{sandboxAutoAllowEnabled:P.isSandboxingEnabled()&&P.isAutoAllowBashIfSandboxedEnabled()}).filter(e=>n.some(t=>t.toolName===e.rule.ruleValue.toolName&&t.ruleContent===e.rule.ruleValue.ruleContent));e(c,l.length>0?l:void 0)}},[e,t,n,r,i,a]);return(0,W.jsxs)(p,{title:`Add ${r} permission ${j(n.length,`rule`)}`,onCancel:t,color:`permission`,children:[(0,W.jsx)(v,{flexDirection:`column`,paddingX:2,children:n.map(e=>(0,W.jsxs)(v,{flexDirection:`column`,children:[(0,W.jsx)(f,{bold:!0,children:S(e)}),(0,W.jsx)(je,{ruleValue:e})]},S(e)))}),(0,W.jsxs)(v,{flexDirection:`column`,marginY:1,children:[(0,W.jsx)(f,{children:n.length===1?`Where should this rule be saved?`:`Where should these rules be saved?`}),(0,W.jsx)(I,{options:o,onChange:s})]})]})}var Fe,W,Ie=e((()=>{c(),Fe=t(c(),1),B(),_(),N(),C(),H(),ae(),w(),D(),M(),Me(),W=b()}));function Le({onCancel:e,onSubmit:t,ruleBehavior:n}){let[a,s]=(0,Re.useState)(``),[c,l]=(0,Re.useState)(0),u=xe();ne(`confirm:no`,e,{context:`Settings`});let{columns:d}=i(),p=d-6;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,G.jsxs)(f,{bold:!0,color:`permission`,children:[`Add `,n,` permission rule`]}),(0,G.jsxs)(v,{flexDirection:`column`,children:[(0,G.jsxs)(f,{children:[`Permission rules are a tool name, optionally followed by a specifier in parentheses.`,(0,G.jsx)(o,{}),`e.g., `,(0,G.jsx)(f,{bold:!0,children:S({toolName:ie.name})}),(0,G.jsx)(f,{bold:!1,children:` or `}),(0,G.jsx)(f,{bold:!0,children:S({toolName:V.name,ruleContent:`ls:*`})})]}),(0,G.jsx)(v,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,G.jsx)(pe,{showCursor:!0,value:a,onChange:s,onSubmit:e=>{let r=e.trim();r.length!==0&&t(E(r),n)},placeholder:`Enter permission rule${r.ellipsis}`,columns:p,cursorOffset:c,onChangeCursorOffset:l})})]})]}),(0,G.jsx)(v,{marginLeft:3,children:u.pending?(0,G.jsxs)(f,{dimColor:!0,children:[`Press `,u.keyName,` again to exit`]}):(0,G.jsx)(f,{dimColor:!0,children:`Enter to submit · Esc to cancel`})})]})}var Re,G,ze=e((()=>{n(),c(),Re=t(c(),1),R(),Se(),be(),_(),ye(),ve(),le(),C(),G=b()}));function Be({onHeaderFocusChange:e,onStateChange:t}){let{headerFocused:n,focusHeader:r}=m();(0,K.useEffect)(()=>{e?.(n)},[n,e]);let[i]=(0,K.useState)(()=>Ae()),[a,o]=(0,K.useState)(()=>new Set),[s,c]=(0,K.useState)(()=>new Set),[l,u]=(0,K.useState)(0);(0,K.useEffect)(()=>{t({approved:a,retry:s,denials:i})},[a,s,i,t]);let d=(0,K.useCallback)(e=>{let t=Number(e);o(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),p=(0,K.useCallback)(e=>{u(Number(e))},[]);if(y((e,t)=>{e===`r`&&(c(e=>{let t=new Set(e);return t.has(l)?t.delete(l):t.add(l),t}),o(e=>{if(e.has(l))return e;let t=new Set(e);return t.add(l),t}))},{isActive:i.length>0}),i.length===0)return(0,q.jsx)(f,{dimColor:!0,children:`No recent denials. Commands denied by the auto mode classifier will appear here.`});let h=i.map((e,t)=>{let n=a.has(t),r=s.has(t)?` (retry)`:``;return{label:(0,q.jsxs)(f,{children:[(0,q.jsx)(g,{status:n?`success`:`error`,withSpace:!0}),e.display,(0,q.jsx)(f,{dimColor:!0,children:r})]}),value:String(t)}});return(0,q.jsxs)(v,{flexDirection:`column`,children:[(0,q.jsx)(f,{children:`Commands recently denied by the auto mode classifier.`}),(0,q.jsx)(v,{marginTop:1,children:(0,q.jsx)(I,{options:h,onChange:d,onFocus:p,visibleOptionCount:Math.min(10,h.length),isDisabled:n,onUpFromFirstItem:r})})]})}var K,q,Ve=e((()=>{c(),K=t(c(),1),_(),ke(),B(),q=b()}));function He({directoryPath:e,onRemove:t,onCancel:n,permissionContext:r,setPermissionContext:i}){let a=(0,J.useCallback)(()=>{i(z(r,{type:`removeDirectories`,directories:[e],destination:`session`})),t()},[e,r,i,t]),o=(0,J.useCallback)(e=>{e===`yes`?a():n()},[a,n]);return(0,Y.jsxs)(p,{title:`Remove directory from workspace?`,onCancel:n,color:`error`,children:[(0,Y.jsx)(v,{marginX:2,flexDirection:`column`,children:(0,Y.jsx)(f,{bold:!0,children:e})}),(0,Y.jsx)(f,{children:`Claude Code will no longer have access to files in this directory.`}),(0,Y.jsx)(I,{onChange:o,onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]})}var J,Y,Ue=e((()=>{c(),J=t(c(),1),B(),_(),N(),Y=b()}));function We({onExit:e,toolPermissionContext:t,onRequestAddDirectory:n,onRequestRemoveDirectory:i,onHeaderFocusChange:a}){let{headerFocused:o,focusHeader:s}=m();(0,X.useEffect)(()=>{a?.(o)},[o,a]);let c=Ge.useMemo(()=>Array.from(t.additionalWorkingDirectories.keys()).map(e=>({path:e,isCurrent:!1,isDeletable:!0})),[t.additionalWorkingDirectories]),l=(0,X.useCallback)(e=>{if(e===`add-directory`){n();return}let t=c.find(t=>t.path===e);t&&t.isDeletable&&i(t.path)},[c,n,i]),u=(0,X.useCallback)(()=>e(`Workspace dialog dismissed`,{display:`system`}),[e]),d=Ge.useMemo(()=>{let e=c.map(e=>({label:e.path,value:e.path}));return e.push({label:`Add directory${r.ellipsis}`,value:`add-directory`}),e},[c]);return(0,Z.jsxs)(v,{flexDirection:`column`,marginBottom:1,children:[(0,Z.jsxs)(v,{flexDirection:`row`,marginTop:1,marginLeft:2,gap:1,children:[(0,Z.jsx)(f,{children:`- ${x()}`}),(0,Z.jsx)(f,{dimColor:!0,children:`(Original working directory)`})]}),(0,Z.jsx)(I,{options:d,onChange:l,onCancel:u,visibleOptionCount:Math.min(10,d.length),onUpFromFirstItem:s,isDisabled:o})]})}var Ge,X,Z,Ke=e((()=>{n(),Ge=t(c(),1),X=t(c(),1),re(),B(),_(),Z=b()}));function qe({rule:e}){return(0,$.jsx)(f,{dimColor:!0,children:`From ${ge(e.source)}`})}function Je(e){switch(e){case`allow`:return`allowed`;case`deny`:return`denied`;case`ask`:return`ask`}}function Ye({rule:e,onDelete:t,onCancel:n}){let r=xe();ne(`confirm:no`,n,{context:`Confirmation`});let i=(0,$.jsxs)(v,{flexDirection:`column`,marginX:2,children:[(0,$.jsx)(f,{bold:!0,children:S(e.ruleValue)}),(0,$.jsx)(je,{ruleValue:e.ruleValue}),(0,$.jsx)(qe,{rule:e})]}),a=(0,$.jsx)(v,{marginLeft:3,children:r.pending?(0,$.jsxs)(f,{dimColor:!0,children:[`Press `,r.keyName,` again to exit`]}):(0,$.jsx)(f,{dimColor:!0,children:`Esc to cancel`})});return e.source===`policySettings`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`permission`,children:[(0,$.jsx)(f,{bold:!0,color:`permission`,children:`Rule details`}),i,(0,$.jsxs)(f,{italic:!0,children:[`This rule is configured by managed settings and cannot be modified.`,`
2
+ `,`Contact your system administrator for more information.`]})]}),a]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(v,{flexDirection:`column`,gap:1,borderStyle:`round`,paddingLeft:1,paddingRight:1,borderColor:`error`,children:[(0,$.jsxs)(f,{bold:!0,color:`error`,children:[`Delete `,Je(e.ruleBehavior),` tool?`]}),i,(0,$.jsx)(f,{children:`Are you sure you want to delete this permission rule?`}),(0,$.jsx)(I,{onChange:e=>e===`yes`?t():n(),onCancel:n,options:[{label:`Yes`,value:`yes`},{label:`No`,value:`no`}]})]}),a]})}function Xe(e){let{options:t,searchQuery:n,isSearchMode:r,isFocused:i,onSelect:a,onCancel:o,lastFocusedRuleKey:s,cursorOffset:c,onHeaderFocusChange:l}=e,f=d(),{headerFocused:p,focusHeader:h,blurHeader:g}=m();return(0,Q.useEffect)(()=>{r&&p&&g()},[r,p,g]),(0,Q.useEffect)(()=>{l?.(p)},[p,l]),(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(v,{marginBottom:1,flexDirection:`column`,children:(0,$.jsx)(u,{query:n,isFocused:r&&!p,isTerminalFocused:i,width:f,cursorOffset:c})}),(0,$.jsx)(I,{options:t,onChange:a,onCancel:o,visibleOptionCount:Math.min(10,t.length),isDisabled:r||p,defaultFocusValue:s,onUpFromFirstItem:h})]})}function Ze({tab:e,getRulesOptions:t,handleToolSelect:n,...r}){return(0,$.jsxs)(v,{flexDirection:`column`,flexShrink:e===`allow`?0:void 0,children:[(0,$.jsx)(f,{children:{allow:`Claude Code won't ask before using allowed tools.`,ask:`Claude Code will always ask for confirmation before using these tools.`,deny:`Claude Code will always reject requests to use denied tools.`}[e]}),(0,$.jsx)(Xe,{options:t(e,r.searchQuery).options,onSelect:t=>n(t,e),...r})]})}function Qe({onExit:e,initialTab:t,onRetryDenials:n}){let i=Ae().length>0,o=t??(i?`recent`:`allow`),[s,c]=(0,Q.useState)([]),u=_e(e=>e.toolPermissionContext),d=me(),p=l(),m=(0,Q.useRef)({approved:new Set,retry:new Set,denials:[]}),g=(0,Q.useCallback)(e=>{m.current=e},[]),[_,y]=(0,Q.useState)(),[b,re]=(0,Q.useState)(),[x,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(!1),[ie,ae]=(0,Q.useState)(!0),N=(0,Q.useCallback)(e=>{ae(e)},[]),ce=(0,Q.useMemo)(()=>{let e=new Map;return oe(u).forEach(t=>{e.set(A(t),t)}),e},[u]),P=(0,Q.useMemo)(()=>{let e=new Map;return fe(u).forEach(t=>{e.set(A(t),t)}),e},[u]),le=(0,Q.useMemo)(()=>{let e=new Map;return ue(u).forEach(t=>{e.set(A(t),t)}),e},[u]),F=(0,Q.useCallback)((e,t=``)=>{let n=(()=>{switch(e){case`allow`:return ce;case`deny`:return P;case`ask`:return le;case`workspace`:case`recent`:return new Map}})(),i=[];e!==`workspace`&&e!==`recent`&&!t&&i.push({label:`Add a new rule${r.ellipsis}`,value:`add-new-rule`});let a=Array.from(n.keys()).sort((e,t)=>{let r=n.get(e),i=n.get(t);if(r&&i){let e=S(r.ruleValue).toLowerCase(),t=S(i.ruleValue).toLowerCase();return e.localeCompare(t)}return 0}),o=t.toLowerCase();for(let e of a){let r=n.get(e);if(r){let n=S(r.ruleValue);if(t&&!n.toLowerCase().includes(o))continue;i.push({label:n,value:e})}}return{options:i,rulesByKey:n}},[ce,P,le]),I=xe(),L=!_&&!x&&!w&&!E&&!O,{query:pe,setQuery:R,cursorOffset:he}=Ee({isActive:L&&j,onExit:()=>{M(!1)}}),B=(0,Q.useCallback)(e=>{L&&(j||e.ctrl||e.meta||(e.key===`/`?(e.preventDefault(),M(!0),R(``)):e.key.length===1&&e.key!==`j`&&e.key!==`k`&&e.key!==`m`&&e.key!==`i`&&e.key!==`r`&&e.key!==` `&&(e.preventDefault(),M(!0),R(e.key))))},[L,j,R]),ge=(0,Q.useCallback)((e,t)=>{let{rulesByKey:n}=F(t);if(e===`add-new-rule`){C(t);return}else{y(n.get(e));return}},[F]),V=(0,Q.useCallback)(()=>{C(null)},[]),ve=(0,Q.useCallback)((e,t)=>{T({ruleValue:e,ruleBehavior:t}),C(null)},[]),ye=(0,Q.useCallback)((e,t)=>{T(null);for(let t of e)c(e=>[...e,`Added ${t.ruleBehavior} rule ${a.bold(S(t.ruleValue))}`]);if(t&&t.length>0)for(let e of t){let t=e.shadowType===`deny`?`blocked`:`shadowed`;c(n=>[...n,a.yellow(`${r.warning} Warning: ${S(e.rule.ruleValue)} is ${t}`),a.dim(` ${e.reason}`),a.dim(` Fix: ${e.fix}`)])}},[]),be=(0,Q.useCallback)(()=>{T(null)},[]),Se=(0,Q.useCallback)(()=>D(!0),[]),Ce=(0,Q.useCallback)(e=>k(e),[]),Te=(0,Q.useCallback)(()=>{let t=m.current,r=e=>Array.from(e).map(e=>t.denials[e]).filter(e=>e!==void 0),i=r(t.retry);if(i.length>0){let t=i.map(e=>e.display);n?.(t),e(void 0,{shouldQuery:!0,metaMessages:[`Permission granted for: ${t.join(`, `)}. You may now retry ${t.length===1?`this command`:`these commands`} if you would like.`]});return}let o=r(t.approved);o.length>0||s.length>0?e([...o.length>0?[`Approved ${o.map(e=>a.bold(e.display)).join(`, `)}`]:[],...s].join(`
3
+ `)):e(`Permissions dialog dismissed`,{display:`system`})},[s,e,n]);ne(`confirm:no`,Te,{context:`Settings`,isActive:L&&!j});let De=()=>{if(!_)return;let{options:e}=F(_.ruleBehavior),t=A(_),n=e.filter(e=>e.value!==`add-new-rule`).map(e=>e.value),r=n.indexOf(t),i;r!==-1&&(r<n.length-1?i=n[r+1]:r>0&&(i=n[r-1])),re(i),de({rule:_,initialContext:u,setToolPermissionContext(e){d(t=>({...t,toolPermissionContext:e}))}}),c(e=>[...e,`Deleted ${_.ruleBehavior} rule ${a.bold(S(_.ruleValue))}`]),y(void 0)};if(_)return(0,$.jsx)(Ye,{rule:_,onDelete:De,onCancel:()=>y(void 0)});if(x&&x!==`workspace`&&x!==`recent`)return(0,$.jsx)(Le,{onCancel:V,onSubmit:ve,ruleBehavior:x});if(w)return(0,$.jsx)(Pe,{onAddRules:ye,onCancel:be,ruleValues:[w.ruleValue],ruleBehavior:w.ruleBehavior,initialContext:u,setToolPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});if(E)return(0,$.jsx)(we,{onAddDirectory:(e,t)=>{let n={type:`addDirectories`,directories:[e],destination:t?`localSettings`:`session`},r=z(u,n);d(e=>({...e,toolPermissionContext:r})),t&&se(n),c(n=>[...n,`Added directory ${a.bold(e)} to workspace${t?` and saved to local settings`:` for this session`}`]),D(!1)},onCancel:()=>D(!1),permissionContext:u});if(O)return(0,$.jsx)(He,{directoryPath:O,onRemove:()=>{c(e=>[...e,`Removed directory ${a.bold(O)} from workspace`]),k(null)},onCancel:()=>k(null),permissionContext:u,setPermissionContext:e=>{d(t=>({...t,toolPermissionContext:e}))}});let H={searchQuery:pe,isSearchMode:j,isFocused:p,onCancel:Te,lastFocusedRuleKey:b,cursorOffset:he,getRulesOptions:F,handleToolSelect:ge,onHeaderFocusChange:N};return(0,$.jsx)(v,{flexDirection:`column`,onKeyDown:B,children:(0,$.jsxs)(ee,{color:`permission`,children:[(0,$.jsxs)(te,{title:`Permissions:`,color:`permission`,defaultTab:o,hidden:!!_||!!x||!!w||E||!!O,initialHeaderFocused:!i,navFromContent:!j,children:[(0,$.jsx)(h,{id:`recent`,title:`Recently denied`,children:(0,$.jsx)(Be,{onHeaderFocusChange:N,onStateChange:g})}),(0,$.jsx)(h,{id:`allow`,title:`Allow`,children:(0,$.jsx)(Ze,{tab:`allow`,...H})}),(0,$.jsx)(h,{id:`ask`,title:`Ask`,children:(0,$.jsx)(Ze,{tab:`ask`,...H})}),(0,$.jsx)(h,{id:`deny`,title:`Deny`,children:(0,$.jsx)(Ze,{tab:`deny`,...H})}),(0,$.jsx)(h,{id:`workspace`,title:`Workspace`,children:(0,$.jsxs)(v,{flexDirection:`column`,children:[(0,$.jsx)(f,{children:`Claude Code can read files in the workspace, and make edits when auto-accept edits is on.`}),(0,$.jsx)(We,{onExit:e,toolPermissionContext:u,onRequestAddDirectory:Se,onRequestRemoveDirectory:Ce,onHeaderFocusChange:N})]})})]}),(0,$.jsx)(v,{marginTop:1,paddingLeft:1,children:(0,$.jsx)(f,{dimColor:!0,children:I.pending?(0,$.jsxs)($.Fragment,{children:[`Press `,I.keyName,` again to exit`]}):ie?(0,$.jsx)($.Fragment,{children:`←/→ tab switch · ↓ return · Esc cancel`}):j?(0,$.jsx)($.Fragment,{children:`Type to filter · Enter/↓ select · ↑ tabs · Esc clear`}):i&&o===`recent`?(0,$.jsx)($.Fragment,{children:`Enter approve · r retry · ↑↓ navigate · ←/→ switch · Esc cancel`}):(0,$.jsx)($.Fragment,{children:`↑↓ navigate · Enter select · Type to search · ←/→ switch · Esc cancel`})})})]})})}var Q,$,$e=e((()=>{s(),n(),c(),Q=t(c(),1),he(),N(),B(),Se(),De(),_(),ye(),ke(),C(),ce(),k(),Te(),Ie(),Ce(),Me(),ze(),Ve(),Ue(),Ke(),$=b()})),et,tt;e((()=>{$e(),F(),et=b(),tt=async(e,t)=>(0,et.jsx)(Qe,{onExit:e,onRetryDenials:e=>{t.setMessages(t=>[...t,L(e)])}})}))();export{tt as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{o as r}from"./log-DSV4Ht5l.js";import{a as i,o as a}from"./teamHelpers-D8R_gGLb.js";import{join as o}from"path";import"fs/promises";import"net";import"events";function s(e){let t=a(e);if(!t)return[];let n=new Set(t.hiddenPaneIds??[]),r=[];for(let e of t.members){if(e.name===`team-lead`)continue;let t=e.isActive===!1?`idle`:`running`;r.push({name:e.name,agentId:e.agentId,agentType:e.agentType,model:e.model,prompt:e.prompt,status:t,color:e.color,tmuxPaneId:e.tmuxPaneId,cwd:e.cwd,worktreePath:e.worktreePath,isHidden:n.has(e.tmuxPaneId),backendType:e.backendType,mode:e.mode})}return r}var c=e((()=>{i()}));function l(){return o(t(),`pipes`)}function u(e){return e?.pipeIpc??d}var d,f=e((()=>{n(),r(),d={role:`main`,subIndex:null,displayRole:`main`,serverName:null,attachedBy:null,localIp:null,hostname:null,machineId:null,mac:null,statusVisible:!1,selectorOpen:!1,selectedPipes:[],routeMode:`selected`,slaves:{},discoveredPipes:[]}}));export{c as a,s as i,l as n,f as r,u as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{o as r}from"./log-DSV4Ht5l.js";import{a as i,o as a}from"./teamHelpers-CXAmvFco.js";import{join as o}from"path";import"fs/promises";import"net";import"events";function s(e){let t=a(e);if(!t)return[];let n=new Set(t.hiddenPaneIds??[]),r=[];for(let e of t.members){if(e.name===`team-lead`)continue;let t=e.isActive===!1?`idle`:`running`;r.push({name:e.name,agentId:e.agentId,agentType:e.agentType,model:e.model,prompt:e.prompt,status:t,color:e.color,tmuxPaneId:e.tmuxPaneId,cwd:e.cwd,worktreePath:e.worktreePath,isHidden:n.has(e.tmuxPaneId),backendType:e.backendType,mode:e.mode})}return r}var c=e((()=>{i()}));function l(){return o(t(),`pipes`)}function u(e){return e?.pipeIpc??d}var d,f=e((()=>{n(),r(),d={role:`main`,subIndex:null,displayRole:`main`,serverName:null,attachedBy:null,localIp:null,hostname:null,machineId:null,mac:null,statusVisible:!1,selectorOpen:!1,selectedPipes:[],routeMode:`selected`,slaves:{},discoveredPipes:[]}}));export{c as a,s as i,l as n,f as r,u as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{cn as o,rn as s}from"./state-sIHsFpDu.js";import{Ax as c,FD as l,_y as u,by as d,gy as f,j as p,jD as m,w as h,zx as g}from"./loadAgentsDir-C_wFhytF.js";import{a as _,i as v,r as y,t as b}from"./promptEditor-Dz41P-3I.js";import{r as x,t as S}from"./staticRender-C5v46np_.js";function C({planContent:e,planPath:t,editorName:r}){return(0,T.jsxs)(i,{flexDirection:`column`,children:[(0,T.jsx)(n,{bold:!0,children:`Current Plan`}),(0,T.jsx)(n,{dimColor:!0,children:t}),(0,T.jsx)(i,{marginTop:1,children:(0,T.jsx)(n,{children:e})}),r&&(0,T.jsxs)(i,{marginTop:1,children:[(0,T.jsx)(n,{dimColor:!0,children:`"/plan open"`}),(0,T.jsx)(n,{dimColor:!0,children:` to edit this plan in `}),(0,T.jsx)(n,{bold:!0,dimColor:!0,children:r})]})]})}async function w(e,t,n){let{getAppState:r,setAppState:i}=t,a=r().toolPermissionContext.mode;if(a!==`plan`){s(a,`plan`),i(e=>({...e,toolPermissionContext:m(p(e.toolPermissionContext),{type:`setMode`,mode:`plan`,destination:`session`})}));let t=n.trim();return t&&t!==`open`?e(`Enabled plan mode`,{shouldQuery:!0}):e(`Enabled plan mode`),null}let o=f(),c=u();if(!o)return e(`Already in plan mode. No plan written yet.`),null;if(n.trim().split(/\s+/)[0]===`open`){let t=await b(c);return t.error?e(`Failed to open plan in editor: ${t.error}`):e(`Opened plan in editor: ${c}`),null}let l=v();return e(await x((0,T.jsx)(C,{planContent:o,planPath:c,editorName:l?g(l):void 0}))),null}var T;e((()=>{t(),o(),r(),_(),c(),l(),h(),d(),y(),S(),T=a()}))();export{w as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{cn as o,rn as s}from"./state-sIHsFpDu.js";import{Ax as c,FD as l,hy as u,j as d,jD as f,my as p,vy as m,w as h,zx as g}from"./loadAgentsDir-ClTeo0nk.js";import{a as _,i as v,r as y,t as b}from"./promptEditor-FI_ewCpV.js";import{r as x,t as S}from"./staticRender-C5v46np_.js";function C({planContent:e,planPath:t,editorName:r}){return(0,T.jsxs)(i,{flexDirection:`column`,children:[(0,T.jsx)(n,{bold:!0,children:`Current Plan`}),(0,T.jsx)(n,{dimColor:!0,children:t}),(0,T.jsx)(i,{marginTop:1,children:(0,T.jsx)(n,{children:e})}),r&&(0,T.jsxs)(i,{marginTop:1,children:[(0,T.jsx)(n,{dimColor:!0,children:`"/plan open"`}),(0,T.jsx)(n,{dimColor:!0,children:` to edit this plan in `}),(0,T.jsx)(n,{bold:!0,dimColor:!0,children:r})]})]})}async function w(e,t,n){let{getAppState:r,setAppState:i}=t,a=r().toolPermissionContext.mode;if(a!==`plan`){s(a,`plan`),i(e=>({...e,toolPermissionContext:f(d(e.toolPermissionContext),{type:`setMode`,mode:`plan`,destination:`session`})}));let t=n.trim();return t&&t!==`open`?e(`Enabled plan mode`,{shouldQuery:!0}):e(`Enabled plan mode`),null}let o=p(),c=u();if(!o)return e(`Already in plan mode. No plan written yet.`),null;if(n.trim().split(/\s+/)[0]===`open`){let t=await b(c);return t.error?e(`Failed to open plan in editor: ${t.error}`):e(`Opened plan in editor: ${c}`),null}let l=v();return e(await x((0,T.jsx)(C,{planContent:o,planPath:c,editorName:l?g(l):void 0}))),null}var T;e((()=>{t(),o(),r(),_(),c(),l(),h(),m(),y(),S(),T=a()}))();export{w as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./PluginSettings-D3bQRsge.js";async function a(e,t,n){return(0,o.jsx)(i,{onComplete:e,args:n})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./PluginSettings-B_xVgTTp.js";async function a(e,t,n){return(0,o.jsx)(i,{onComplete:e,args:n})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{ps as t,us as n,wc as r,yc as i}from"./paths-Ci1iwL5Y.js";import{U as a,l as o,p as s,z as c}from"./debug-otxXY3j-.js";import{o as l,s as u}from"./log-DSV4Ht5l.js";import{Js as d,Ls as f,Ms as p,Ps as m,Us as h,Zs as g,qs as _}from"./loadAgentsDir-C_wFhytF.js";import{i as v,o as y}from"./xml-CVF7dWfi.js";import{f as b,s as x}from"./pluginOperations-gZ-iCmhu.js";function S(e){return O=e,k!==null&&k.length>0&&(e(k),k=null),()=>{O=null}}async function C(){let e=await d(),n=h(),r=new Set;for(let[i,a]of Object.entries(e)){let e=n[i]?.autoUpdate;(e===void 0?t(i,a):e)&&r.add(i.toLowerCase())}return r}async function w(e,t){let n=!1;for(let{scope:r}of t)try{let t=await b(e,r);t.success&&!t.alreadyUpToDate?(n=!0,s(`Plugin autoupdate: updated ${e} from ${t.oldVersion} to ${t.newVersion}`)):t.alreadyUpToDate||s(`Plugin autoupdate: failed to update ${e}: ${t.message}`,{level:`warn`})}catch(t){s(`Plugin autoupdate: error updating ${e}: ${c(t)}`,{level:`warn`})}return n?e:null}async function T(e){let t=f(),n=Object.keys(t.plugins);return n.length===0?[]:(await Promise.allSettled(n.map(async n=>{let{marketplace:r}=y(n);if(!r||!e.has(r.toLowerCase()))return null;let i=t.plugins[n];if(!i||i.length===0)return null;let a=i.filter(m);return a.length===0?null:w(n,a)}))).filter(e=>e.status===`fulfilled`&&e.value!==null).map(e=>e.value)}async function E(e){return T(e)}function D(){(async()=>{if(r()){s(`Plugin autoupdate: skipped (auto-updater disabled)`);return}try{let e=await C();if(e.size===0)return;let t=(await Promise.allSettled(Array.from(e).map(async e=>{try{await g(e,void 0,{disableCredentialHelper:!0})}catch(t){s(`Plugin autoupdate: failed to refresh marketplace ${e}: ${c(t)}`,{level:`warn`})}}))).filter(e=>e.status===`rejected`);t.length>0&&s(`Plugin autoupdate: ${t.length} marketplace refresh(es) failed`,{level:`warn`}),s(`Plugin autoupdate: checking installed plugins`);let n=await E(e);n.length>0&&(O?O(n):k=n)}catch(e){u(e)}})()}var O,k,A=e((()=>{x(),i(),o(),a(),l(),p(),_(),v(),n(),O=null,k=null}));export{T as i,A as n,S as r,D as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{ps as t,us as n,wc as r,yc as i}from"./paths-DO4WOQtD.js";import{U as a,l as o,p as s,z as c}from"./debug-otxXY3j-.js";import{o as l,s as u}from"./log-DSV4Ht5l.js";import{Js as d,Ls as f,Ms as p,Ps as m,Us as h,Zs as g,qs as _}from"./loadAgentsDir-ClTeo0nk.js";import{i as v,o as y}from"./xml-CTdKuU6f.js";import{f as b,s as x}from"./pluginOperations-CKmwDC3G.js";function S(e){return O=e,k!==null&&k.length>0&&(e(k),k=null),()=>{O=null}}async function C(){let e=await d(),n=h(),r=new Set;for(let[i,a]of Object.entries(e)){let e=n[i]?.autoUpdate;(e===void 0?t(i,a):e)&&r.add(i.toLowerCase())}return r}async function w(e,t){let n=!1;for(let{scope:r}of t)try{let t=await b(e,r);t.success&&!t.alreadyUpToDate?(n=!0,s(`Plugin autoupdate: updated ${e} from ${t.oldVersion} to ${t.newVersion}`)):t.alreadyUpToDate||s(`Plugin autoupdate: failed to update ${e}: ${t.message}`,{level:`warn`})}catch(t){s(`Plugin autoupdate: error updating ${e}: ${c(t)}`,{level:`warn`})}return n?e:null}async function T(e){let t=f(),n=Object.keys(t.plugins);return n.length===0?[]:(await Promise.allSettled(n.map(async n=>{let{marketplace:r}=y(n);if(!r||!e.has(r.toLowerCase()))return null;let i=t.plugins[n];if(!i||i.length===0)return null;let a=i.filter(m);return a.length===0?null:w(n,a)}))).filter(e=>e.status===`fulfilled`&&e.value!==null).map(e=>e.value)}async function E(e){return T(e)}function D(){(async()=>{if(r()){s(`Plugin autoupdate: skipped (auto-updater disabled)`);return}try{let e=await C();if(e.size===0)return;let t=(await Promise.allSettled(Array.from(e).map(async e=>{try{await g(e,void 0,{disableCredentialHelper:!0})}catch(t){s(`Plugin autoupdate: failed to refresh marketplace ${e}: ${c(t)}`,{level:`warn`})}}))).filter(e=>e.status===`rejected`);t.length>0&&s(`Plugin autoupdate: ${t.length} marketplace refresh(es) failed`,{level:`warn`}),s(`Plugin autoupdate: checking installed plugins`);let n=await E(e);n.length>0&&(O?O(n):k=n)}catch(e){u(e)}})()}var O,k,A=e((()=>{x(),i(),o(),a(),l(),p(),_(),v(),n(),O=null,k=null}));export{T as i,A as n,S as r,D as t};
@@ -1 +1 @@
1
- import{U as e,l as t,p as n,z as r}from"./debug-otxXY3j-.js";import{Ms as i,Rs as a,Ws as o,Ys as s,qs as c}from"./loadAgentsDir-C_wFhytF.js";import{d as l,s as u}from"./pluginOperations-gZ-iCmhu.js";import{i as d,n as f,r as p,t as m}from"./pluginFlagging-BiTDVP10.js";u(),t(),e(),i(),c(),p();function h(e,t,n){let r=new Set(t.plugins.map(e=>e.name)),i=`@${n}`,a=[];for(let t of Object.keys(e.plugins)){if(!t.endsWith(i))continue;let e=t.slice(0,-i.length);r.has(e)||a.push(t)}return a}async function g(){await d();let e=a(),t=f(),i=await s(),c=[];for(let a of Object.keys(i))try{let i=await o(a);if(!i.forceRemoveDeletedPlugins)continue;let s=h(e,i,a);for(let i of s){if(i in t)continue;let a=e.plugins[i]??[];if(a.some(e=>e.scope===`user`||e.scope===`project`||e.scope===`local`)){for(let e of a){let{scope:t}=e;if(!(t!==`user`&&t!==`project`&&t!==`local`))try{await l(i,t)}catch(e){n(`Failed to auto-uninstall delisted plugin ${i} from ${t}: ${r(e)}`,{level:`error`})}}await m(i),c.push(i)}}}catch(e){n(`Failed to check for delisted plugins in "${a}": ${r(e)}`,{level:`warn`})}return c}export{g as t};
1
+ import{U as e,l as t,p as n,z as r}from"./debug-otxXY3j-.js";import{Ms as i,Rs as a,Ws as o,Ys as s,qs as c}from"./loadAgentsDir-ClTeo0nk.js";import{d as l,s as u}from"./pluginOperations-CKmwDC3G.js";import{i as d,n as f,r as p,t as m}from"./pluginFlagging-DFMlWw2P.js";u(),t(),e(),i(),c(),p();function h(e,t,n){let r=new Set(t.plugins.map(e=>e.name)),i=`@${n}`,a=[];for(let t of Object.keys(e.plugins)){if(!t.endsWith(i))continue;let e=t.slice(0,-i.length);r.has(e)||a.push(t)}return a}async function g(){await d();let e=a(),t=f(),i=await s(),c=[];for(let a of Object.keys(i))try{let i=await o(a);if(!i.forceRemoveDeletedPlugins)continue;let s=h(e,i,a);for(let i of s){if(i in t)continue;let a=e.plugins[i]??[];if(a.some(e=>e.scope===`user`||e.scope===`project`||e.scope===`local`)){for(let e of a){let{scope:t}=e;if(!(t!==`user`&&t!==`project`&&t!==`local`))try{await l(i,t)}catch(e){n(`Failed to auto-uninstall delisted plugin ${i} from ${t}: ${r(e)}`,{level:`error`})}}await m(i),c.push(i)}}}catch(e){n(`Failed to check for delisted plugins in "${a}": ${r(e)}`,{level:`warn`})}return c}export{g as t};
@@ -1 +1 @@
1
- import{n as e,t}from"./figures-gfT9mM8P.js";import{U as n,z as r}from"./debug-otxXY3j-.js";import{n as i,r as a}from"./analytics-DqMQntaB.js";import{n as o,o as s}from"./process-DMKLUQIO.js";import{o as c,s as l}from"./log-DSV4Ht5l.js";import{As as u,SE as d,bv as f,js as p,vv as m,wE as h,yv as g}from"./loadAgentsDir-C_wFhytF.js";import{i as _,o as v}from"./xml-CVF7dWfi.js";import{a as y,c as b,d as x,f as S,i as C,r as w,s as T}from"./pluginOperations-gZ-iCmhu.js";e(),n(),h(),c(),p(),_(),o(),f(),i(),T();function E(e,n,i){l(e);let o=i?`${n} plugin "${i}"`:n===`disable-all`?`disable all plugins`:`${n} plugins`;console.error(`${t.cross} Failed to ${o}: ${r(e)}`);let s=i?(()=>{let{name:e,marketplace:t}=v(i);return{_PROTO_plugin_name:e,...t&&{_PROTO_marketplace_name:t},...m(e,t,u())}})():{};a(`tengu_plugin_command_failed`,{command:n,error_category:g(e),...s}),process.exit(1)}async function D(e,n=`user`){try{console.log(`Installing plugin "${e}"...`);let r=await b(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_installed_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope||n,install_source:`cli-explicit`,...m(i,o,u())}),process.exit(0)}catch(t){E(t,`install`,e)}}async function O(e,n=`user`,r=!1){try{let i=await x(e,n,!r);if(!i.success)throw Error(i.message);console.log(`${t.tick} ${i.message}`);let{name:o,marketplace:s}=v(i.pluginId||e);a(`tengu_plugin_uninstalled_cli`,{_PROTO_plugin_name:o,...s&&{_PROTO_marketplace_name:s},scope:i.scope||n,...m(o,s,u())}),process.exit(0)}catch(t){E(t,`uninstall`,e)}}async function k(e,n){try{let r=await y(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_enabled_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...m(i,o,u())}),process.exit(0)}catch(t){E(t,`enable`,e)}}async function A(e,n){try{let r=await C(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_disabled_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...m(i,o,u())}),process.exit(0)}catch(t){E(t,`disable`,e)}}async function j(){try{let e=await w();if(!e.success)throw Error(e.message);console.log(`${t.tick} ${e.message}`),a(`tengu_plugin_disabled_all_cli`,{}),process.exit(0)}catch(e){E(e,`disable-all`)}}async function M(e,n){try{s(`Checking for updates for plugin "${e}" at ${n} scope…\n`);let r=await S(e,n);if(!r.success)throw Error(r.message);if(s(`${t.tick} ${r.message}\n`),!r.alreadyUpToDate){let{name:t,marketplace:n}=v(r.pluginId||e);a(`tengu_plugin_updated_cli`,{_PROTO_plugin_name:t,...n&&{_PROTO_marketplace_name:n},old_version:r.oldVersion||`unknown`,new_version:r.newVersion||`unknown`,...m(t,n,u())})}await d(0)}catch(t){E(t,`update`,e)}}export{O as a,D as i,A as n,M as o,k as r,j as t};
1
+ import{n as e,t}from"./figures-gfT9mM8P.js";import{U as n,z as r}from"./debug-otxXY3j-.js";import{n as i,r as a}from"./analytics-DqMQntaB.js";import{n as o,o as s}from"./process-DMKLUQIO.js";import{o as c,s as l}from"./log-DSV4Ht5l.js";import{As as u,SE as d,_v as f,gv as p,js as m,vv as h,wE as g}from"./loadAgentsDir-ClTeo0nk.js";import{i as _,o as v}from"./xml-CTdKuU6f.js";import{a as y,c as b,d as x,f as S,i as C,r as w,s as T}from"./pluginOperations-CKmwDC3G.js";e(),n(),g(),c(),m(),_(),o(),h(),i(),T();function E(e,n,i){l(e);let o=i?`${n} plugin "${i}"`:n===`disable-all`?`disable all plugins`:`${n} plugins`;console.error(`${t.cross} Failed to ${o}: ${r(e)}`);let s=i?(()=>{let{name:e,marketplace:t}=v(i);return{_PROTO_plugin_name:e,...t&&{_PROTO_marketplace_name:t},...p(e,t,u())}})():{};a(`tengu_plugin_command_failed`,{command:n,error_category:f(e),...s}),process.exit(1)}async function D(e,n=`user`){try{console.log(`Installing plugin "${e}"...`);let r=await b(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_installed_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope||n,install_source:`cli-explicit`,...p(i,o,u())}),process.exit(0)}catch(t){E(t,`install`,e)}}async function O(e,n=`user`,r=!1){try{let i=await x(e,n,!r);if(!i.success)throw Error(i.message);console.log(`${t.tick} ${i.message}`);let{name:o,marketplace:s}=v(i.pluginId||e);a(`tengu_plugin_uninstalled_cli`,{_PROTO_plugin_name:o,...s&&{_PROTO_marketplace_name:s},scope:i.scope||n,...p(o,s,u())}),process.exit(0)}catch(t){E(t,`uninstall`,e)}}async function k(e,n){try{let r=await y(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_enabled_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...p(i,o,u())}),process.exit(0)}catch(t){E(t,`enable`,e)}}async function A(e,n){try{let r=await C(e,n);if(!r.success)throw Error(r.message);console.log(`${t.tick} ${r.message}`);let{name:i,marketplace:o}=v(r.pluginId||e);a(`tengu_plugin_disabled_cli`,{_PROTO_plugin_name:i,...o&&{_PROTO_marketplace_name:o},scope:r.scope,...p(i,o,u())}),process.exit(0)}catch(t){E(t,`disable`,e)}}async function j(){try{let e=await w();if(!e.success)throw Error(e.message);console.log(`${t.tick} ${e.message}`),a(`tengu_plugin_disabled_all_cli`,{}),process.exit(0)}catch(e){E(e,`disable-all`)}}async function M(e,n){try{s(`Checking for updates for plugin "${e}" at ${n} scope…\n`);let r=await S(e,n);if(!r.success)throw Error(r.message);if(s(`${t.tick} ${r.message}\n`),!r.alreadyUpToDate){let{name:t,marketplace:n}=v(r.pluginId||e);a(`tengu_plugin_updated_cli`,{_PROTO_plugin_name:t,...n&&{_PROTO_marketplace_name:n},old_version:r.oldVersion||`unknown`,new_version:r.newVersion||`unknown`,...p(t,n,u())})}await d(0)}catch(t){E(t,`update`,e)}}export{O as a,D as i,A as n,M as o,k as r,j as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{D as t,E as n,O as r,_ as i,h as a,l as o,p as s}from"./debug-otxXY3j-.js";import{o as c,s as l}from"./log-DSV4Ht5l.js";import{AA as u,kA as d}from"./loadAgentsDir-C_wFhytF.js";import{join as f}from"path";import{randomBytes as p}from"crypto";import{readFile as m,rename as h,unlink as g,writeFile as _}from"fs/promises";function v(){return f(d(),D)}function y(e){let n=t(e);if(typeof n!=`object`||!n||!(`plugins`in n)||typeof n.plugins!=`object`||n.plugins===null)return{};let r=n.plugins,i={};for(let[e,t]of Object.entries(r))if(t&&typeof t==`object`&&`flaggedAt`in t&&typeof t.flaggedAt==`string`){let n={flaggedAt:t.flaggedAt};`seenAt`in t&&typeof t.seenAt==`string`&&(n.seenAt=t.seenAt),i[e]=n}return i}async function b(){try{return y(await m(v(),{encoding:`utf-8`}))}catch{return{}}}async function x(e){let t=v(),n=`${t}.${p(8).toString(`hex`)}.tmp`;try{await a().mkdir(d()),await _(n,r({plugins:e},null,2),{encoding:`utf-8`,mode:384}),await h(n,t),k=e}catch(e){l(e);try{await g(n)}catch{}}}async function S(){let e=await b(),t=Date.now(),n=!1;for(let[r,i]of Object.entries(e))i.seenAt&&t-new Date(i.seenAt).getTime()>=O&&(delete e[r],n=!0);k=e,n&&await x(e)}function C(){return k??{}}async function w(e){k===null&&(k=await b()),await x({...k,[e]:{flaggedAt:new Date().toISOString()}}),s(`Flagged plugin: ${e}`)}async function T(e){k===null&&(k=await b());let t=new Date().toISOString(),n=!1,r={...k};for(let i of e){let e=r[i];e&&!e.seenAt&&(r[i]={...e,seenAt:t},n=!0)}n&&await x(r)}async function E(e){if(k===null&&(k=await b()),!(e in k))return;let{[e]:t,...n}=k;k=n,await x(n)}var D,O,k,A=e((()=>{o(),i(),c(),n(),u(),D=`flagged-plugins.json`,O=2880*60*1e3,k=null}));export{T as a,S as i,C as n,E as o,A as r,w as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{D as t,E as n,O as r,_ as i,h as a,l as o,p as s}from"./debug-otxXY3j-.js";import{o as c,s as l}from"./log-DSV4Ht5l.js";import{AA as u,kA as d}from"./loadAgentsDir-ClTeo0nk.js";import{join as f}from"path";import{randomBytes as p}from"crypto";import{readFile as m,rename as h,unlink as g,writeFile as _}from"fs/promises";function v(){return f(d(),D)}function y(e){let n=t(e);if(typeof n!=`object`||!n||!(`plugins`in n)||typeof n.plugins!=`object`||n.plugins===null)return{};let r=n.plugins,i={};for(let[e,t]of Object.entries(r))if(t&&typeof t==`object`&&`flaggedAt`in t&&typeof t.flaggedAt==`string`){let n={flaggedAt:t.flaggedAt};`seenAt`in t&&typeof t.seenAt==`string`&&(n.seenAt=t.seenAt),i[e]=n}return i}async function b(){try{return y(await m(v(),{encoding:`utf-8`}))}catch{return{}}}async function x(e){let t=v(),n=`${t}.${p(8).toString(`hex`)}.tmp`;try{await a().mkdir(d()),await _(n,r({plugins:e},null,2),{encoding:`utf-8`,mode:384}),await h(n,t),k=e}catch(e){l(e);try{await g(n)}catch{}}}async function S(){let e=await b(),t=Date.now(),n=!1;for(let[r,i]of Object.entries(e))i.seenAt&&t-new Date(i.seenAt).getTime()>=O&&(delete e[r],n=!0);k=e,n&&await x(e)}function C(){return k??{}}async function w(e){k===null&&(k=await b()),await x({...k,[e]:{flaggedAt:new Date().toISOString()}}),s(`Flagged plugin: ${e}`)}async function T(e){k===null&&(k=await b());let t=new Date().toISOString(),n=!1,r={...k};for(let i of e){let e=r[i];e&&!e.seenAt&&(r[i]={...e,seenAt:t},n=!0)}n&&await x(r)}async function E(e){if(k===null&&(k=await b()),!(e in k))return;let{[e]:t,...n}=k;k=n,await x(n)}var D,O,k,A=e((()=>{o(),i(),c(),n(),u(),D=`flagged-plugins.json`,O=2880*60*1e3,k=null}));export{T as a,S as i,C as n,E as o,A as r,w as t};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{Qa as r,lo as i,oo as a}from"./paths-Ci1iwL5Y.js";import{G as o,J as s,U as c,_ as l,h as u}from"./debug-otxXY3j-.js";import{o as d,s as f}from"./log-DSV4Ht5l.js";import{l as p,o as m}from"./stringUtils-KZoO4GUd.js";import{AA as h,Bs as g,Cs as _,EA as v,Es as y,Js as b,Ks as x,Ls as S,Ms as ee,Oh as C,Os as w,Rs as T,Ws as te,_c as E,_s as D,aT as O,gc as k,gs as A,hc as j,hs as ne,ij as re,kh as ie,ks as ae,nj as M,ps as oe,qs as se,rT as ce,rj as N,vs as P,ws as F,xs as I,ys as L,zs as R}from"./loadAgentsDir-C_wFhytF.js";import{i as z,m as B,o as V,p as H,s as U}from"./xml-CVF7dWfi.js";import{n as W,t as G}from"./pluginStartupCheck-DCDWHam6.js";import{dirname as le,join as K}from"path";function q(e){if(!Q.includes(e))throw Error(`Invalid scope "${e}". Must be one of: ${Q.join(`, `)}`)}function ue(e){return Q.includes(e)}function J(e){return e===`project`||e===`local`?n():void 0}function de(e){return r(`projectSettings`)?.enabledPlugins?.[e]===!0}function fe(e){let t=e.includes(`@`);for(let n of[`local`,`project`,`user`]){let i=r(U(n))?.enabledPlugins;if(i){for(let r of Object.keys(i))if(t?r===e:r.startsWith(`${e}@`))return{pluginId:r,scope:n}}}return null}function pe(e,t){let{name:n,marketplace:r}=V(e);return t.find(t=>t.name===e||t.name===n?!0:r&&t.source?t.name===n&&t.source.includes(`@${r}`):!1)}function me(e){let{name:t}=V(e),n=T();if(n.plugins[e]?.length)return{pluginId:e,pluginName:t};let r=Object.keys(n.plugins).find(e=>{let{name:r}=V(e);return r===t&&(n.plugins[e]?.length??0)>0});return r?{pluginId:r,pluginName:t}:null}function Y(e){let t=T().plugins[e];if(!t||t.length===0)return{scope:`user`};let r=n(),i=t.find(e=>e.scope===`local`&&e.projectPath===r);if(i)return{scope:i.scope,projectPath:i.projectPath};let a=t.find(e=>e.scope===`project`&&e.projectPath===r);if(a)return{scope:a.scope,projectPath:a.projectPath};let o=t.find(e=>e.scope===`user`);return o?{scope:o.scope}:{scope:t[0].scope,projectPath:t[0].projectPath}}async function he(e,t=`user`){q(t);let{name:n,marketplace:r}=V(e),i,a,o;if(r){let t=await x(e);t&&(i=t.entry,a=r,o=t.marketplaceInstallLocation)}else{let e=await b();for(let[t,r]of Object.entries(e))try{let e=(await te(t)).plugins.find(e=>e.name===n);if(e){i=e,a=t,o=r.installLocation;break}}catch(e){f(s(e))}}if(!i||!a)return{success:!1,message:`Plugin "${n}" not found in ${r?`marketplace "${r}"`:`any configured marketplace`}`};let c=i,l=`${c.name}@${a}`,u=await y({pluginId:l,entry:c,scope:t,marketplaceInstallLocation:o});if(!u.ok){let e=u;switch(e.reason){case`local-source-no-location`:return{success:!1,message:`Cannot install local plugin "${e.pluginName}" without marketplace install location`};case`settings-write-failed`:return{success:!1,message:`Failed to update settings: ${e.message}`};case`resolution-failed`:return{success:!1,message:_(e.resolution)};case`blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" is blocked by your organization's policy and cannot be installed`};case`dependency-blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" depends on "${e.blockedDependency}", which is blocked by your organization's policy`}}}return{success:!0,message:`Successfully installed plugin: ${l} (scope: ${t})${u.depNote}`,pluginId:l,pluginName:c.name,scope:t}}async function ge(e,t=`user`,n=!0){q(t);let{enabled:a,disabled:o}=await L(),s=[...a,...o],c=pe(e,s),l=U(t),u=r(l),d,f;if(c)d=Object.keys(u?.enabledPlugins??{}).find(t=>t===e||t===c.name||t.startsWith(`${c.name}@`))??(e.includes(`@`)?e:c.name),f=c.name;else{let t=me(e);if(!t)return{success:!1,message:`Plugin "${e}" not found in installed plugins`};d=t.pluginId,f=t.pluginName}let p=J(t),m=T().plugins[d],h=m?.find(e=>e.scope===t&&e.projectPath===p);if(!h){let{scope:n}=Y(d);return n!==t&&m&&m.length>0?n===`project`?{success:!1,message:`Plugin "${e}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${e} --scope local`}:{success:!1,message:`Plugin "${e}" is installed in ${n} scope, not ${t}. Use --scope ${n} to uninstall.`}:{success:!1,message:`Plugin "${e}" is not installed in ${t} scope. Use --scope to specify the correct scope.`}}let g=h.installPath,_={...u?.enabledPlugins};_[d]=void 0,i(l,{enabledPlugins:_}),j(),R(d,t,p);let y=T().plugins[d],b=!y||y.length===0;b&&g&&await E(g),b&&(ce(d),n&&await v(d));let x=M(d,s),S=N(x);return{success:!0,message:`Successfully uninstalled plugin: ${f} (scope: ${t})${S}`,pluginId:d,pluginName:f,scope:t,reverseDependents:x.length>0?x:void 0}}async function X(e,t,n){let a=t?`enable`:`disable`;if(B(e)){let{error:n}=i(`userSettings`,{enabledPlugins:{...r(`userSettings`)?.enabledPlugins,[e]:t}});if(n)return{success:!1,message:`Failed to ${a} built-in plugin: ${n.message}`};j();let{name:o}=V(e);return{success:!0,message:`Successfully ${a}d built-in plugin: ${o}`,pluginId:e,pluginName:o,scope:`user`}}n&&q(n);let o,s,c=fe(e);if(n)if(s=n,c)o=c.pluginId;else if(e.includes(`@`))o=e;else return{success:!1,message:`Plugin "${e}" not found in settings. Use plugin@marketplace format.`};else if(c)o=c.pluginId,s=c.scope;else if(e.includes(`@`))o=e,s=`user`;else return{success:!1,message:`Plugin "${e}" not found in any editable settings scope. Use plugin@marketplace format.`};if(t&&ie(o))return{success:!1,message:`Plugin "${o}" is blocked by your organization's policy and cannot be enabled`};let l=U(s),u=r(l)?.enabledPlugins?.[o],d={user:0,project:1,local:2},f=n&&c&&d[n]>d[c.scope];if(n&&u===void 0&&c&&c.scope!==n&&!f)return{success:!1,message:`Plugin "${e}" is installed at ${c.scope} scope, not ${n}. Use --scope ${c.scope} or omit --scope to auto-detect.`};if(t===(n&&!f?u===!0:G().has(o)))return{success:!1,message:`Plugin "${e}" is already ${t?`enabled`:`disabled`}${n?` at ${n} scope`:``}`};let p;if(!t){let{enabled:e,disabled:t}=await L(),n=M(o,[...e,...t]);n.length>0&&(p=n)}let{error:m}=i(l,{enabledPlugins:{...r(l)?.enabledPlugins,[o]:t}});if(m)return{success:!1,message:`Failed to ${a} plugin: ${m.message}`};j();let{name:h}=V(o),g=N(p);return{success:!0,message:`Successfully ${a}d plugin: ${h} (scope: ${s})${g}`,pluginId:o,pluginName:h,scope:s,reverseDependents:p}}async function _e(e,t){return X(e,!0,t)}async function ve(e,t){return X(e,!1,t)}async function Z(){let e=G();if(e.size===0)return{success:!0,message:`No enabled plugins to disable`};let t=[],n=[];for(let[r]of e){let e=await X(r,!1);e.success?t.push(r):n.push(`${r}: ${e.message}`)}return n.length>0?{success:!1,message:`Disabled ${t.length} ${p(t.length,`plugin`)}, ${n.length} failed:\n${n.join(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{cn as t,ot as n}from"./state-sIHsFpDu.js";import{Qa as r,lo as i,oo as a}from"./paths-DO4WOQtD.js";import{G as o,J as s,U as c,_ as l,h as u}from"./debug-otxXY3j-.js";import{o as d,s as f}from"./log-DSV4Ht5l.js";import{l as p,o as m}from"./stringUtils-KZoO4GUd.js";import{AA as h,Bs as g,Cs as _,EA as v,Es as y,Js as b,Ks as x,Ls as S,Ms as ee,Oh as C,Os as w,Rs as T,Ws as te,_c as E,_s as D,aT as O,gc as k,gs as A,hc as j,hs as ne,ij as re,kh as ie,ks as ae,nj as M,ps as oe,qs as se,rT as ce,rj as N,vs as P,ws as F,xs as I,ys as L,zs as R}from"./loadAgentsDir-ClTeo0nk.js";import{i as z,m as B,o as V,p as H,s as U}from"./xml-CTdKuU6f.js";import{n as W,t as G}from"./pluginStartupCheck-D6IbyWKe.js";import{dirname as le,join as K}from"path";function q(e){if(!Q.includes(e))throw Error(`Invalid scope "${e}". Must be one of: ${Q.join(`, `)}`)}function ue(e){return Q.includes(e)}function J(e){return e===`project`||e===`local`?n():void 0}function de(e){return r(`projectSettings`)?.enabledPlugins?.[e]===!0}function fe(e){let t=e.includes(`@`);for(let n of[`local`,`project`,`user`]){let i=r(U(n))?.enabledPlugins;if(i){for(let r of Object.keys(i))if(t?r===e:r.startsWith(`${e}@`))return{pluginId:r,scope:n}}}return null}function pe(e,t){let{name:n,marketplace:r}=V(e);return t.find(t=>t.name===e||t.name===n?!0:r&&t.source?t.name===n&&t.source.includes(`@${r}`):!1)}function me(e){let{name:t}=V(e),n=T();if(n.plugins[e]?.length)return{pluginId:e,pluginName:t};let r=Object.keys(n.plugins).find(e=>{let{name:r}=V(e);return r===t&&(n.plugins[e]?.length??0)>0});return r?{pluginId:r,pluginName:t}:null}function Y(e){let t=T().plugins[e];if(!t||t.length===0)return{scope:`user`};let r=n(),i=t.find(e=>e.scope===`local`&&e.projectPath===r);if(i)return{scope:i.scope,projectPath:i.projectPath};let a=t.find(e=>e.scope===`project`&&e.projectPath===r);if(a)return{scope:a.scope,projectPath:a.projectPath};let o=t.find(e=>e.scope===`user`);return o?{scope:o.scope}:{scope:t[0].scope,projectPath:t[0].projectPath}}async function he(e,t=`user`){q(t);let{name:n,marketplace:r}=V(e),i,a,o;if(r){let t=await x(e);t&&(i=t.entry,a=r,o=t.marketplaceInstallLocation)}else{let e=await b();for(let[t,r]of Object.entries(e))try{let e=(await te(t)).plugins.find(e=>e.name===n);if(e){i=e,a=t,o=r.installLocation;break}}catch(e){f(s(e))}}if(!i||!a)return{success:!1,message:`Plugin "${n}" not found in ${r?`marketplace "${r}"`:`any configured marketplace`}`};let c=i,l=`${c.name}@${a}`,u=await y({pluginId:l,entry:c,scope:t,marketplaceInstallLocation:o});if(!u.ok){let e=u;switch(e.reason){case`local-source-no-location`:return{success:!1,message:`Cannot install local plugin "${e.pluginName}" without marketplace install location`};case`settings-write-failed`:return{success:!1,message:`Failed to update settings: ${e.message}`};case`resolution-failed`:return{success:!1,message:_(e.resolution)};case`blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" is blocked by your organization's policy and cannot be installed`};case`dependency-blocked-by-policy`:return{success:!1,message:`Plugin "${e.pluginName}" depends on "${e.blockedDependency}", which is blocked by your organization's policy`}}}return{success:!0,message:`Successfully installed plugin: ${l} (scope: ${t})${u.depNote}`,pluginId:l,pluginName:c.name,scope:t}}async function ge(e,t=`user`,n=!0){q(t);let{enabled:a,disabled:o}=await L(),s=[...a,...o],c=pe(e,s),l=U(t),u=r(l),d,f;if(c)d=Object.keys(u?.enabledPlugins??{}).find(t=>t===e||t===c.name||t.startsWith(`${c.name}@`))??(e.includes(`@`)?e:c.name),f=c.name;else{let t=me(e);if(!t)return{success:!1,message:`Plugin "${e}" not found in installed plugins`};d=t.pluginId,f=t.pluginName}let p=J(t),m=T().plugins[d],h=m?.find(e=>e.scope===t&&e.projectPath===p);if(!h){let{scope:n}=Y(d);return n!==t&&m&&m.length>0?n===`project`?{success:!1,message:`Plugin "${e}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${e} --scope local`}:{success:!1,message:`Plugin "${e}" is installed in ${n} scope, not ${t}. Use --scope ${n} to uninstall.`}:{success:!1,message:`Plugin "${e}" is not installed in ${t} scope. Use --scope to specify the correct scope.`}}let g=h.installPath,_={...u?.enabledPlugins};_[d]=void 0,i(l,{enabledPlugins:_}),j(),R(d,t,p);let y=T().plugins[d],b=!y||y.length===0;b&&g&&await E(g),b&&(ce(d),n&&await v(d));let x=M(d,s),S=N(x);return{success:!0,message:`Successfully uninstalled plugin: ${f} (scope: ${t})${S}`,pluginId:d,pluginName:f,scope:t,reverseDependents:x.length>0?x:void 0}}async function X(e,t,n){let a=t?`enable`:`disable`;if(B(e)){let{error:n}=i(`userSettings`,{enabledPlugins:{...r(`userSettings`)?.enabledPlugins,[e]:t}});if(n)return{success:!1,message:`Failed to ${a} built-in plugin: ${n.message}`};j();let{name:o}=V(e);return{success:!0,message:`Successfully ${a}d built-in plugin: ${o}`,pluginId:e,pluginName:o,scope:`user`}}n&&q(n);let o,s,c=fe(e);if(n)if(s=n,c)o=c.pluginId;else if(e.includes(`@`))o=e;else return{success:!1,message:`Plugin "${e}" not found in settings. Use plugin@marketplace format.`};else if(c)o=c.pluginId,s=c.scope;else if(e.includes(`@`))o=e,s=`user`;else return{success:!1,message:`Plugin "${e}" not found in any editable settings scope. Use plugin@marketplace format.`};if(t&&ie(o))return{success:!1,message:`Plugin "${o}" is blocked by your organization's policy and cannot be enabled`};let l=U(s),u=r(l)?.enabledPlugins?.[o],d={user:0,project:1,local:2},f=n&&c&&d[n]>d[c.scope];if(n&&u===void 0&&c&&c.scope!==n&&!f)return{success:!1,message:`Plugin "${e}" is installed at ${c.scope} scope, not ${n}. Use --scope ${c.scope} or omit --scope to auto-detect.`};if(t===(n&&!f?u===!0:G().has(o)))return{success:!1,message:`Plugin "${e}" is already ${t?`enabled`:`disabled`}${n?` at ${n} scope`:``}`};let p;if(!t){let{enabled:e,disabled:t}=await L(),n=M(o,[...e,...t]);n.length>0&&(p=n)}let{error:m}=i(l,{enabledPlugins:{...r(l)?.enabledPlugins,[o]:t}});if(m)return{success:!1,message:`Failed to ${a} plugin: ${m.message}`};j();let{name:h}=V(o),g=N(p);return{success:!0,message:`Successfully ${a}d plugin: ${h} (scope: ${s})${g}`,pluginId:o,pluginName:h,scope:s,reverseDependents:p}}async function _e(e,t){return X(e,!0,t)}async function ve(e,t){return X(e,!1,t)}async function Z(){let e=G();if(e.size===0)return{success:!0,message:`No enabled plugins to disable`};let t=[],n=[];for(let[r]of e){let e=await X(r,!1);e.success?t.push(r):n.push(`${r}: ${e.message}`)}return n.length>0?{success:!1,message:`Disabled ${t.length} ${p(t.length,`plugin`)}, ${n.length} failed:\n${n.join(`
2
2
  `)}`}:{success:!0,message:`Disabled ${t.length} ${p(t.length,`plugin`)}`}}async function ye(e,t){let{name:n,marketplace:r}=V(e),i=r?`${n}@${r}`:e,a=await x(e);if(!a)return{success:!1,message:`Plugin "${n}" not found`,pluginId:i,scope:t};let{entry:o,marketplaceInstallLocation:s}=a,c=S().plugins[i];if(!c||c.length===0)return{success:!1,message:`Plugin "${n}" is not installed`,pluginId:i,scope:t};let l=J(t),u=c.find(e=>e.scope===t&&e.projectPath===l);return u?be({pluginId:i,pluginName:n,entry:o,marketplaceInstallLocation:s,installation:u,scope:t,projectPath:l}):{success:!1,message:`Plugin "${n}" is not installed at scope ${l?`${t} (${l})`:t}`,pluginId:i,scope:t}}async function be({pluginId:e,pluginName:t,entry:n,marketplaceInstallLocation:r,installation:i,scope:a,projectPath:s}){let c=u(),l=i.version,d,f,p=!1,m;if(typeof n.source!=`string`){let t=await oe(n.source,{manifest:{name:n.name}});d=t.path,p=!0,m=t.gitCommitSha,f=await w(e,n.source,t.manifest,t.path,n.version,t.gitCommitSha)}else{let t;try{t=await c.stat(r)}catch(t){if(o(t))return{success:!1,message:`Marketplace directory not found at ${r}`,pluginId:e,scope:a};throw t}d=K(t.isDirectory()?r:le(r),n.source);try{await c.stat(d)}catch(t){if(o(t))return{success:!1,message:`Plugin source not found at ${d}`,pluginId:e,scope:a};throw t}let i,s=K(d,`.claude-plugin`,`plugin.json`);try{i=await I(s,n.name,n.source)}catch{}f=await w(e,n.source,i,d,n.version)}try{let r=A(e,f),o=D(e,f);if(i.version===f||i.installPath===r||i.installPath===o)return{success:!0,message:`${t} is already at the latest version (${f}).`,pluginId:e,newVersion:f,oldVersion:l,alreadyUpToDate:!0,scope:a};r=await ne(d,e,f,n);let c=i.installPath;if(g(e,a,s,r,f,m),c&&c!==r){let e=S();Object.values(e.plugins).some(e=>e.some(e=>e.installPath===c))||await E(c)}let u=s?`${a} (${s})`:a;return{success:!0,message:`Plugin "${t}" updated from ${l||`unknown`} to ${f} for scope ${u}. Restart to apply changes.`,pluginId:e,newVersion:f,oldVersion:l,scope:a}}finally{p&&d!==A(e,f)&&await c.rm(d,{recursive:!0,force:!0})}}var Q,$,xe=e((()=>{t(),H(),c(),l(),d(),k(),re(),ee(),se(),h(),z(),F(),P(),O(),C(),W(),ae(),a(),m(),Q=[`user`,`project`,`local`],$=[`user`,`project`,`local`,`managed`]}));export{_e as a,he as c,ge as d,ye as f,ve as i,ue as l,$ as n,Y as o,Z as r,xe as s,Q as t,de as u};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Qa as t,fs as n,lo as r,oo as i,us as a}from"./paths-Ci1iwL5Y.js";import{l as o,p as s}from"./debug-otxXY3j-.js";import{n as c,t as l}from"./cwd--iizewsn.js";import{o as u,s as d}from"./log-DSV4Ht5l.js";import{Ds as f,Ks as p,Ms as m,Ss as h,aj as g,oj as _,qs as v,ws as y}from"./loadAgentsDir-C_wFhytF.js";import{i as b,s as x}from"./xml-CVF7dWfi.js";import{join as S}from"path";function C(){let e=new Map,n=g();for(let[t,r]of Object.entries(n))t.includes(`@`)&&(r===!0?e.set(t,`flag`):r===!1&&e.delete(t));for(let{scope:r,source:i}of[{scope:`managed`,source:`policySettings`},{scope:`user`,source:`userSettings`},{scope:`project`,source:`projectSettings`},{scope:`local`,source:`localSettings`},{scope:`flag`,source:`flagSettings`}]){let a=t(i);if(a?.enabledPlugins)for(let[t,o]of Object.entries(a.enabledPlugins))t.includes(`@`)&&(t in n&&n[t]!==o&&s(`Plugin ${t} from --add-dir (${n[t]}) overridden by ${i} (${o})`),o===!0?e.set(t,r):o===!1&&e.delete(t))}return s(`Found ${e.size} enabled plugins with scopes: ${Array.from(e.entries()).map(([e,t])=>`${e}(${t})`).join(`, `)}`),e}async function w(e,i,a=`user`){let o=a===`user`?void 0:l(),s=x(a),c=t(s),u={...c?.enabledPlugins},m=[],g=[];for(let t=0;t<e.length;t++){let r=e[t];if(r){i&&i(r,t+1,e.length);try{let e=await p(r);if(!e){g.push({name:r,error:`Plugin not found in any marketplace`});continue}let{entry:t,marketplaceInstallLocation:i}=e;n(t.source)?f({pluginId:r,installPath:S(i,t.source),version:t.version},a,o):await h(r,t,a,o),u[r]=!0,m.push(r)}catch(e){let t=e instanceof Error?e.message:String(e);g.push({name:r,error:t}),d(e)}}}return r(s,{...c,enabledPlugins:u}),{installed:m,failed:g}}var T=e((()=>{c(),o(),u(),i(),_(),m(),v(),b(),y(),a()}));export{T as n,w as r,C as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Qa as t,fs as n,lo as r,oo as i,us as a}from"./paths-DO4WOQtD.js";import{l as o,p as s}from"./debug-otxXY3j-.js";import{n as c,t as l}from"./cwd--iizewsn.js";import{o as u,s as d}from"./log-DSV4Ht5l.js";import{Ds as f,Ks as p,Ms as m,Ss as h,aj as g,oj as _,qs as v,ws as y}from"./loadAgentsDir-ClTeo0nk.js";import{i as b,s as x}from"./xml-CTdKuU6f.js";import{join as S}from"path";function C(){let e=new Map,n=g();for(let[t,r]of Object.entries(n))t.includes(`@`)&&(r===!0?e.set(t,`flag`):r===!1&&e.delete(t));for(let{scope:r,source:i}of[{scope:`managed`,source:`policySettings`},{scope:`user`,source:`userSettings`},{scope:`project`,source:`projectSettings`},{scope:`local`,source:`localSettings`},{scope:`flag`,source:`flagSettings`}]){let a=t(i);if(a?.enabledPlugins)for(let[t,o]of Object.entries(a.enabledPlugins))t.includes(`@`)&&(t in n&&n[t]!==o&&s(`Plugin ${t} from --add-dir (${n[t]}) overridden by ${i} (${o})`),o===!0?e.set(t,r):o===!1&&e.delete(t))}return s(`Found ${e.size} enabled plugins with scopes: ${Array.from(e.entries()).map(([e,t])=>`${e}(${t})`).join(`, `)}`),e}async function w(e,i,a=`user`){let o=a===`user`?void 0:l(),s=x(a),c=t(s),u={...c?.enabledPlugins},m=[],g=[];for(let t=0;t<e.length;t++){let r=e[t];if(r){i&&i(r,t+1,e.length);try{let e=await p(r);if(!e){g.push({name:r,error:`Plugin not found in any marketplace`});continue}let{entry:t,marketplaceInstallLocation:i}=e;n(t.source)?f({pluginId:r,installPath:S(i,t.source),version:t.version},a,o):await h(r,t,a,o),u[r]=!0,m.push(r)}catch(e){let t=e instanceof Error?e.message:String(e);g.push({name:r,error:t}),d(e)}}}return r(s,{...c,enabledPlugins:u}),{installed:m,failed:g}}var T=e((()=>{c(),o(),u(),i(),_(),m(),v(),b(),y(),a()}));export{T as n,w as r,C as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./pluginStartupCheck-D6IbyWKe.js";e();export{t as getPluginEditableScopes};
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./figures-gfT9mM8P.js";import{Or as n,cn as r}from"./state-sIHsFpDu.js";import{E as i,O as a,U as o,z as s}from"./debug-otxXY3j-.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{o as u,s as d}from"./log-DSV4Ht5l.js";import{l as f,o as p}from"./stringUtils-KZoO4GUd.js";import{$s as m,Is as h,Js as g,Ms as _,Rs as v,Vs as y,Xs as ee,Zs as te,ac as b,cj as x,dc as S,gc as C,hc as w,nT as T,pc as ne,qs as E,sj as D,tT as O,tc as k,vs as A,ys as j}from"./loadAgentsDir-C_wFhytF.js";import{i as M,o as N,s as P}from"./xml-CVF7dWfi.js";import{n as F,t as I}from"./exit-DOBLl8jN.js";import{n as L,t as R}from"./pluginOperations-gZ-iCmhu.js";import{a as z,i as B,n as V,o as H,r as U,t as W}from"./pluginCliCommands-eqyMBWcP.js";import{a as re,c as G,i as K,n as q,r as J,s as Y,t as X}from"./validatePlugin-6lg9B564.js";import{basename as ie,dirname as Z}from"path";e(),r(),c(),x(),o(),u(),C(),G(),_(),S(),E(),O(),K(),M(),A(),X(),i(),p();function Q(e,n){d(e),I(`${t.cross} Failed to ${n}: ${s(e)}`)}function $(e){e.errors.length>0&&(console.log(`${t.cross} Found ${e.errors.length} ${f(e.errors.length,`error`)}:\n`),e.errors.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``)),e.warnings.length>0&&(console.log(`${t.warning} Found ${e.warnings.length} ${f(e.warnings.length,`warning`)}:\n`),e.warnings.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``))}async function ae(e,r){r.cowork&&n(!0);try{let n=await q(e);console.log(`Validating ${n.fileType} manifest: ${n.filePath}\n`),$(n);let r=[];if(n.fileType===`plugin`){let e=Z(n.filePath);if(ie(e)===`.claude-plugin`){r=await J(Z(e));for(let e of r)console.log(`Validating ${e.fileType}: ${e.filePath}\n`),$(e)}}let i=n.success&&r.every(e=>e.success),a=n.warnings.length>0||r.some(e=>e.warnings.length>0);i?F(a?`${t.tick} Validation passed with warnings`:`${t.tick} Validation passed`):(console.log(`${t.cross} Validation failed`),process.exit(1))}catch(e){d(e),console.error(`${t.cross} Unexpected error during validation: ${s(e)}`),process.exit(2)}}async function oe(e){e.cowork&&n(!0),l(`tengu_plugin_list_command`,{});let r=v(),{getPluginEditableScopes:i}=await import(`./pluginStartupCheck-EjLvCXru.js`),o=i(),s=Object.keys(r.plugins),{enabled:c,disabled:u,errors:d}=await j(),f=[...c,...u],p=f.filter(e=>e.source.endsWith(`@inline`)),m=d.filter(e=>e.source.endsWith(`@inline`)||e.source.startsWith(`inline[`));if(e.json){let t=new Map(f.map(e=>[e.source,e])),n=[];for(let e of s.sort()){let i=r.plugins[e];if(!i||i.length===0)continue;let a=N(e).name,s=d.filter(t=>t.source===e||`plugin`in t&&t.plugin===a).map(D);for(let r of i){let i=t.get(e),a;if(i){let e=i.mcpServers||await T(i);e&&Object.keys(e).length>0&&(a=e)}n.push({id:e,version:r.version||`unknown`,scope:r.scope,enabled:o.has(e),installPath:r.installPath,installedAt:r.installedAt,lastUpdated:r.lastUpdated,projectPath:r.projectPath,mcpServers:a,errors:s.length>0?s:void 0})}}for(let e of p){let t=e.mcpServers||await T(e),r=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name).map(D);n.push({id:e.source,version:e.manifest.version??`unknown`,scope:`session`,enabled:e.enabled!==!1,installPath:e.path,mcpServers:t&&Object.keys(t).length>0?t:void 0,errors:r.length>0?r:void 0})}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))n.push({id:e.source,version:`unknown`,scope:`session`,enabled:!1,installPath:`path`in e?e.path:``,errors:[D(e)]});if(e.available){let e=[];try{let[t,n]=await Promise.all([g(),Y()]),{marketplaces:r}=await ne(t);for(let{name:t,data:i}of r)if(i)for(let r of i.plugins){let i=b(r.name,t);h(i)||e.push({pluginId:i,name:r.name,description:r.description,marketplaceName:t,version:r.version,source:r.source,installCount:n?.get(i)})}}catch{}F(a({installed:n,available:e},null,2))}else F(a(n,null,2))}s.length===0&&p.length===0&&m.length===0&&F("No plugins installed. Use `claude plugin install` to install a plugin."),s.length>0&&console.log(`Installed plugins:
1
+ import{n as e,t}from"./figures-gfT9mM8P.js";import{Or as n,cn as r}from"./state-sIHsFpDu.js";import{E as i,O as a,U as o,z as s}from"./debug-otxXY3j-.js";import{n as c,r as l}from"./analytics-DqMQntaB.js";import{o as u,s as d}from"./log-DSV4Ht5l.js";import{l as f,o as p}from"./stringUtils-KZoO4GUd.js";import{$s as m,Is as h,Js as g,Ms as _,Rs as v,Vs as y,Xs as ee,Zs as te,ac as b,cj as x,dc as S,gc as C,hc as w,nT as T,pc as ne,qs as E,sj as D,tT as O,tc as k,vs as A,ys as j}from"./loadAgentsDir-ClTeo0nk.js";import{i as M,o as N,s as P}from"./xml-CTdKuU6f.js";import{n as F,t as I}from"./exit-DOBLl8jN.js";import{n as L,t as R}from"./pluginOperations-CKmwDC3G.js";import{a as z,i as B,n as V,o as H,r as U,t as W}from"./pluginCliCommands-DWCeXYTl.js";import{a as re,c as G,i as K,n as q,r as J,s as Y,t as X}from"./validatePlugin-_g0AqWZG.js";import{basename as ie,dirname as Z}from"path";e(),r(),c(),x(),o(),u(),C(),G(),_(),S(),E(),O(),K(),M(),A(),X(),i(),p();function Q(e,n){d(e),I(`${t.cross} Failed to ${n}: ${s(e)}`)}function $(e){e.errors.length>0&&(console.log(`${t.cross} Found ${e.errors.length} ${f(e.errors.length,`error`)}:\n`),e.errors.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``)),e.warnings.length>0&&(console.log(`${t.warning} Found ${e.warnings.length} ${f(e.warnings.length,`warning`)}:\n`),e.warnings.forEach(e=>{console.log(` ${t.pointer} ${e.path}: ${e.message}`)}),console.log(``))}async function ae(e,r){r.cowork&&n(!0);try{let n=await q(e);console.log(`Validating ${n.fileType} manifest: ${n.filePath}\n`),$(n);let r=[];if(n.fileType===`plugin`){let e=Z(n.filePath);if(ie(e)===`.claude-plugin`){r=await J(Z(e));for(let e of r)console.log(`Validating ${e.fileType}: ${e.filePath}\n`),$(e)}}let i=n.success&&r.every(e=>e.success),a=n.warnings.length>0||r.some(e=>e.warnings.length>0);i?F(a?`${t.tick} Validation passed with warnings`:`${t.tick} Validation passed`):(console.log(`${t.cross} Validation failed`),process.exit(1))}catch(e){d(e),console.error(`${t.cross} Unexpected error during validation: ${s(e)}`),process.exit(2)}}async function oe(e){e.cowork&&n(!0),l(`tengu_plugin_list_command`,{});let r=v(),{getPluginEditableScopes:i}=await import(`./pluginStartupCheck-cYnLsWOs.js`),o=i(),s=Object.keys(r.plugins),{enabled:c,disabled:u,errors:d}=await j(),f=[...c,...u],p=f.filter(e=>e.source.endsWith(`@inline`)),m=d.filter(e=>e.source.endsWith(`@inline`)||e.source.startsWith(`inline[`));if(e.json){let t=new Map(f.map(e=>[e.source,e])),n=[];for(let e of s.sort()){let i=r.plugins[e];if(!i||i.length===0)continue;let a=N(e).name,s=d.filter(t=>t.source===e||`plugin`in t&&t.plugin===a).map(D);for(let r of i){let i=t.get(e),a;if(i){let e=i.mcpServers||await T(i);e&&Object.keys(e).length>0&&(a=e)}n.push({id:e,version:r.version||`unknown`,scope:r.scope,enabled:o.has(e),installPath:r.installPath,installedAt:r.installedAt,lastUpdated:r.lastUpdated,projectPath:r.projectPath,mcpServers:a,errors:s.length>0?s:void 0})}}for(let e of p){let t=e.mcpServers||await T(e),r=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name).map(D);n.push({id:e.source,version:e.manifest.version??`unknown`,scope:`session`,enabled:e.enabled!==!1,installPath:e.path,mcpServers:t&&Object.keys(t).length>0?t:void 0,errors:r.length>0?r:void 0})}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))n.push({id:e.source,version:`unknown`,scope:`session`,enabled:!1,installPath:`path`in e?e.path:``,errors:[D(e)]});if(e.available){let e=[];try{let[t,n]=await Promise.all([g(),Y()]),{marketplaces:r}=await ne(t);for(let{name:t,data:i}of r)if(i)for(let r of i.plugins){let i=b(r.name,t);h(i)||e.push({pluginId:i,name:r.name,description:r.description,marketplaceName:t,version:r.version,source:r.source,installCount:n?.get(i)})}}catch{}F(a({installed:n,available:e},null,2))}else F(a(n,null,2))}s.length===0&&p.length===0&&m.length===0&&F("No plugins installed. Use `claude plugin install` to install a plugin."),s.length>0&&console.log(`Installed plugins:
2
2
  `);for(let e of s.sort()){let n=r.plugins[e];if(!n||n.length===0)continue;let i=N(e).name,a=d.filter(t=>t.source===e||`plugin`in t&&t.plugin===i);for(let r of n){let n=o.has(e),i=a.length>0?`${t.cross} failed to load`:n?`${t.tick} enabled`:`${t.cross} disabled`,s=r.version||`unknown`,c=r.scope;console.log(` ${t.pointer} ${e}`),console.log(` Version: ${s}`),console.log(` Scope: ${c}`),console.log(` Status: ${i}`);for(let e of a)console.log(` Error: ${D(e)}`);console.log(``)}}if(p.length>0||m.length>0){console.log(`Session-only plugins (--plugin-dir):
3
3
  `);for(let e of p){let n=m.filter(t=>t.source===e.source||`plugin`in t&&t.plugin===e.name),r=n.length>0?`${t.cross} loaded with errors`:`${t.tick} loaded`;console.log(` ${t.pointer} ${e.source}`),console.log(` Version: ${e.manifest.version??`unknown`}`),console.log(` Path: ${e.path}`),console.log(` Status: ${r}`);for(let e of n)console.log(` Error: ${D(e)}`);console.log(``)}for(let e of m.filter(e=>e.source.startsWith(`inline[`)))console.log(` ${t.pointer} ${e.source}: ${t.cross} ${D(e)}\n`)}F()}async function se(e,r){r.cowork&&n(!0);try{let n=await re(e);n||I(`${t.cross} Invalid marketplace source format. Try: owner/repo, https://..., or ./path`),`error`in n&&I(`${t.cross} ${n.error}`);let i=r.scope??`user`;i!==`user`&&i!==`project`&&i!==`local`&&I(`${t.cross} Invalid scope '${i}'. Use: user, project, or local`);let a=P(i),o=n;r.sparse&&r.sparse.length>0&&(o.source===`github`||o.source===`git`?o={...o,sparsePaths:r.sparse}:I(`${t.cross} --sparse is only supported for github and git marketplace sources (got: ${o.source})`)),console.log(`Adding marketplace...`);let{name:s,alreadyMaterialized:c,resolvedSource:u}=await y(o,e=>{console.log(e)});k(s,{source:u},a),w();let d=o.source;o.source===`github`&&(d=o.repo),l(`tengu_marketplace_added`,{source_type:d}),F(c?`${t.tick} Marketplace '${s}' already on disk — declared in ${i} settings`:`${t.tick} Successfully added marketplace: ${s} (declared in ${i} settings)`)}catch(e){Q(e,`add marketplace`)}}async function ce(e){e.cowork&&n(!0);try{let n=await g(),r=Object.keys(n);e.json&&F(a(r.sort().map(e=>{let t=n[e],r=t?.source;return{name:e,source:r?.source,...r?.source===`github`&&{repo:r.repo},...r?.source===`git`&&{url:r.url},...r?.source===`url`&&{url:r.url},...r?.source===`directory`&&{path:r.path},...r?.source===`file`&&{path:r.path},installLocation:t?.installLocation}}),null,2)),r.length===0&&F(`No marketplaces configured`),console.log(`Configured marketplaces:
4
4
  `),r.forEach(e=>{let r=n[e];if(console.log(` ${t.pointer} ${e}`),r?.source){let e=r.source;e.source===`github`?console.log(` Source: GitHub (${e.repo})`):e.source===`git`?console.log(` Source: Git (${e.url})`):e.source===`url`?console.log(` Source: URL (${e.url})`):e.source===`directory`?console.log(` Source: Directory (${e.path})`):e.source===`file`&&console.log(` Source: File (${e.path})`)}console.log(``)}),F()}catch(e){Q(e,`list marketplaces`)}}async function le(e,r){r.cowork&&n(!0);try{await m(e),w(),l(`tengu_marketplace_removed`,{marketplace_name:e}),F(`${t.tick} Successfully removed marketplace: ${e}`)}catch(e){Q(e,`remove marketplace`)}}async function ue(e,r){r.cowork&&n(!0);try{if(e)console.log(`Updating marketplace: ${e}...`),await te(e,e=>{console.log(e)}),w(),l(`tengu_marketplace_updated`,{marketplace_name:e}),F(`${t.tick} Successfully updated marketplace: ${e}`);else{let e=await g(),n=Object.keys(e);n.length===0&&F(`No marketplaces configured`),console.log(`Updating ${n.length} marketplace(s)...`),await ee(),w(),l(`tengu_marketplace_updated_all`,{count:n.length}),F(`${t.tick} Successfully updated ${n.length} marketplace(s)`)}}catch(e){Q(e,`update marketplace(s)`)}}async function de(e,t){t.cowork&&n(!0);let r=t.scope||`user`;t.cowork&&r!==`user`&&I(`--cowork can only be used with user scope`),R.includes(r)||I(`Invalid scope: ${r}. Must be one of: ${R.join(`, `)}.`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_install_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r}),await B(e,r)}async function fe(e,t){t.cowork&&n(!0);let r=t.scope||`user`;t.cowork&&r!==`user`&&I(`--cowork can only be used with user scope`),R.includes(r)||I(`Invalid scope: ${r}. Must be one of: ${R.join(`, `)}.`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_uninstall_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r}),await z(e,r,t.keepData)}async function pe(e,t){t.cowork&&n(!0);let r;t.scope&&(R.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${R.join(`, `)}`),r=t.scope),t.cowork&&r!==void 0&&r!==`user`&&I(`--cowork can only be used with user scope`),t.cowork&&r===void 0&&(r=`user`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_enable_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r??`auto`}),await U(e,r)}async function me(e,t){if(t.all&&e&&I(`Cannot use --all with a specific plugin`),!t.all&&!e&&I(`Please specify a plugin name or use --all to disable all plugins`),t.cowork&&n(!0),t.all){t.scope&&I(`Cannot use --scope with --all`),l(`tengu_plugin_disable_command`,{}),await W();return}let r;t.scope&&(R.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${R.join(`, `)}`),r=t.scope),t.cowork&&r!==void 0&&r!==`user`&&I(`--cowork can only be used with user scope`),t.cowork&&r===void 0&&(r=`user`);let{name:i,marketplace:a}=N(e);l(`tengu_plugin_disable_command`,{_PROTO_plugin_name:i,...a&&{_PROTO_marketplace_name:a},scope:r??`auto`}),await V(e,r)}async function he(e,t){t.cowork&&n(!0);let{name:r,marketplace:i}=N(e);l(`tengu_plugin_update_command`,{_PROTO_plugin_name:r,...i&&{_PROTO_marketplace_name:i}});let a=`user`;t.scope&&(L.includes(t.scope)||I(`Invalid scope "${t.scope}". Valid scopes: ${L.join(`, `)}`),a=t.scope),t.cowork&&a!==`user`&&I(`--cowork can only be used with user scope`),await H(e,a)}export{se as marketplaceAddHandler,ce as marketplaceListHandler,le as marketplaceRemoveHandler,ue as marketplaceUpdateHandler,me as pluginDisableHandler,pe as pluginEnableHandler,de as pluginInstallHandler,oe as pluginListHandler,fe as pluginUninstallHandler,he as pluginUpdateHandler,ae as pluginValidateHandler};
@@ -0,0 +1 @@
1
+ import{Ka as e,Qa as t,Wa as n}from"./loadAgentsDir-ClTeo0nk.js";n();export{e as isPolicyAllowed,t as waitForPolicyLimitsToLoad};
@@ -1 +1 @@
1
- import{Cn as e,wn as t}from"./schemas-BGAvj1T4.js";import{t as n}from"./v4-f1i_CNUT.js";import{S as r,v as i}from"./paths-Ci1iwL5Y.js";import{n as a,t as o}from"./lazySchema-B0QShMaQ.js";n(),o(),r();var s=2e3,c=6e5,l={poll_interval_ms_not_at_capacity:s,poll_interval_ms_at_capacity:c,non_exclusive_heartbeat_interval_ms:0,multisession_poll_interval_ms_not_at_capacity:s,multisession_poll_interval_ms_partial_capacity:s,multisession_poll_interval_ms_at_capacity:c,reclaim_older_than_ms:5e3,session_keepalive_interval_v2_ms:12e4},u={message:`must be 0 (disabled) or ≥100ms`},d=a(()=>t({poll_interval_ms_not_at_capacity:e().int().min(100),poll_interval_ms_at_capacity:e().int().refine(e=>e===0||e>=100,u),non_exclusive_heartbeat_interval_ms:e().int().min(0).default(0),multisession_poll_interval_ms_not_at_capacity:e().int().min(100).default(l.multisession_poll_interval_ms_not_at_capacity),multisession_poll_interval_ms_partial_capacity:e().int().min(100).default(l.multisession_poll_interval_ms_partial_capacity),multisession_poll_interval_ms_at_capacity:e().int().refine(e=>e===0||e>=100,u).default(l.multisession_poll_interval_ms_at_capacity),reclaim_older_than_ms:e().int().min(1).default(5e3),session_keepalive_interval_v2_ms:e().int().min(0).default(12e4)}).refine(e=>e.non_exclusive_heartbeat_interval_ms>0||e.poll_interval_ms_at_capacity>0,{message:`at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or poll_interval_ms_at_capacity > 0`}).refine(e=>e.non_exclusive_heartbeat_interval_ms>0||e.multisession_poll_interval_ms_at_capacity>0,{message:`at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or multisession_poll_interval_ms_at_capacity > 0`}));function f(){let e=i(`tengu_bridge_poll_interval_config`,l,300*1e3),t=d().safeParse(e);return t.success?t.data:l}export{l as n,f as t};
1
+ import{Cn as e,wn as t}from"./schemas-BGAvj1T4.js";import{t as n}from"./v4-f1i_CNUT.js";import{S as r,v as i}from"./paths-DO4WOQtD.js";import{n as a,t as o}from"./lazySchema-B0QShMaQ.js";n(),o(),r();var s=2e3,c=6e5,l={poll_interval_ms_not_at_capacity:s,poll_interval_ms_at_capacity:c,non_exclusive_heartbeat_interval_ms:0,multisession_poll_interval_ms_not_at_capacity:s,multisession_poll_interval_ms_partial_capacity:s,multisession_poll_interval_ms_at_capacity:c,reclaim_older_than_ms:5e3,session_keepalive_interval_v2_ms:12e4},u={message:`must be 0 (disabled) or ≥100ms`},d=a(()=>t({poll_interval_ms_not_at_capacity:e().int().min(100),poll_interval_ms_at_capacity:e().int().refine(e=>e===0||e>=100,u),non_exclusive_heartbeat_interval_ms:e().int().min(0).default(0),multisession_poll_interval_ms_not_at_capacity:e().int().min(100).default(l.multisession_poll_interval_ms_not_at_capacity),multisession_poll_interval_ms_partial_capacity:e().int().min(100).default(l.multisession_poll_interval_ms_partial_capacity),multisession_poll_interval_ms_at_capacity:e().int().refine(e=>e===0||e>=100,u).default(l.multisession_poll_interval_ms_at_capacity),reclaim_older_than_ms:e().int().min(1).default(5e3),session_keepalive_interval_v2_ms:e().int().min(0).default(12e4)}).refine(e=>e.non_exclusive_heartbeat_interval_ms>0||e.poll_interval_ms_at_capacity>0,{message:`at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or poll_interval_ms_at_capacity > 0`}).refine(e=>e.non_exclusive_heartbeat_interval_ms>0||e.multisession_poll_interval_ms_at_capacity>0,{message:`at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or multisession_poll_interval_ms_at_capacity > 0`}));function f(){let e=i(`tengu_bridge_poll_interval_config`,l,300*1e3),t=d().safeParse(e);return t.success?t.data:l}export{l as n,f as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,n,t as r}from"./poorMode-aDmmvJ_e.js";var i;e((()=>{r(),i=async(e,r)=>{let i=!n();return t(i),i?r.setAppState(e=>({...e,promptSuggestionEnabled:!1})):r.setAppState(e=>({...e,promptSuggestionEnabled:!0})),{type:`text`,value:`Poor mode ${i?`ON`:`OFF`} — ${i?`extract_memories and prompt_suggestion are disabled`:`extract_memories and prompt_suggestion are restored`}`}}}))();export{i as call};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{i as t,n,t as r}from"./poorMode-mtlnXU-z.js";var i;e((()=>{r(),i=async(e,r)=>{let i=!n();return t(i),i?r.setAppState(e=>({...e,promptSuggestionEnabled:!1})):r.setAppState(e=>({...e,promptSuggestionEnabled:!0})),{type:`text`,value:`Poor mode ${i?`ON`:`OFF`} — ${i?`extract_memories and prompt_suggestion are disabled`:`extract_memories and prompt_suggestion are restored`}`}}}))();export{i as call};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./poorMode-mtlnXU-z.js";t();export{e as isPoorModeActive};
@@ -1 +1 @@
1
- import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{Ka as n,lo as r,oo as i}from"./paths-Ci1iwL5Y.js";var a=t({isPoorModeActive:()=>o,setPoorMode:()=>s});function o(){return c===null&&(c=n().poorMode===!0),c}function s(e){c=e,r(`userSettings`,{poorMode:e||void 0})}var c,l=e((()=>{i(),c=null}));export{s as i,o as n,a as r,l as t};
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{Ka as n,lo as r,oo as i}from"./paths-DO4WOQtD.js";var a=t({isPoorModeActive:()=>o,setPoorMode:()=>s});function o(){return c===null&&(c=n().poorMode===!0),c}function s(e){c=e,r(`userSettings`,{poorMode:e||void 0})}var c,l=e((()=>{i(),c=null}));export{s as i,o as n,a as r,l as t};