@readmagic/workmate 0.0.5 → 0.0.7

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 (415) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-DJRkEz7o.js → AddWorkspaceDirectory-CFrrXnt9.js} +1 -1
  2. package/dist/chunks/{App-iJu5qyiF.js → App-Buad9Llp.js} +1 -1
  3. package/dist/chunks/{ApproveApiKey-CRejTHUw.js → ApproveApiKey-B2HJUD7h.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-BQbHdvc3.js +1 -0
  5. package/dist/chunks/{AssistantSessionChooser-CBLQ1v-J.js → AssistantSessionChooser-4lm4eXQ8.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +2 -0
  7. package/dist/chunks/{BypassPermissionsModeDialog-D1FCKVOi.js → BypassPermissionsModeDialog-DllL8dxU.js} +1 -1
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +1 -0
  9. package/dist/chunks/{ClaudeMdExternalIncludesDialog-CI0yF6sZ.js → ClaudeMdExternalIncludesDialog-BZSyRqeq.js} +1 -1
  10. package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +1 -0
  11. package/dist/chunks/{DesktopHandoff-D1rrMxeP.js → DesktopHandoff-DaP4Riar.js} +1 -1
  12. package/dist/chunks/{DiffDialog-BKcfKx7O.js → DiffDialog-B7hx8i_Y.js} +2 -2
  13. package/dist/chunks/Doctor-89OgoAUA.js +1 -0
  14. package/dist/chunks/Doctor-CuKJ-nGt.js +3 -0
  15. package/dist/chunks/ExitFlow-DnPydE17.js +2 -0
  16. package/dist/chunks/{Feedback-bEUtrHia.js → Feedback-SmGiR3mf.js} +2 -2
  17. package/dist/chunks/Grove-CjN9DO47.js +11 -0
  18. package/dist/chunks/Grove-Cq88VBmM.js +1 -0
  19. package/dist/chunks/{HybridTransport-9fTBC2Pv.js → HybridTransport-rK83Qijz.js} +1 -1
  20. package/dist/chunks/{InvalidConfigDialog-9M-1nfZ6.js → InvalidConfigDialog-DdO0AxyF.js} +1 -1
  21. package/dist/chunks/{InvalidSettingsDialog-B2F6pryH.js → InvalidSettingsDialog-s1G0DwXF.js} +1 -1
  22. package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +1 -0
  23. package/dist/chunks/{McpParsingWarnings-BPBb7Npe.js → McpParsingWarnings-Du5IxZos.js} +1 -1
  24. package/dist/chunks/MessageSelector-iIroHvXo.js +3 -0
  25. package/dist/chunks/Messages-D4Hm4gaY.js +11 -0
  26. package/dist/chunks/{Onboarding-cHcnsBGp.js → Onboarding-BiZByBK-.js} +1 -1
  27. package/dist/chunks/{OverageCreditUpsell-CWCD_RpM.js → OverageCreditUpsell-BM7szLgm.js} +1 -1
  28. package/dist/chunks/PluginSettings-uY5KTCtK.js +17 -0
  29. package/dist/chunks/{PromptInputFooterSuggestions-D5sAO6y-.js → PromptInputFooterSuggestions-BmsFdOu9.js} +1 -1
  30. package/dist/chunks/{PromptInputHelpMenu-n6hAdsto.js → PromptInputHelpMenu-DX-0wEDo.js} +1 -1
  31. package/dist/chunks/QueryEngine-CGYaShXD.js +1 -0
  32. package/dist/chunks/REPL-CRJB2t2z.js +142 -0
  33. package/dist/chunks/REPL-u4Yq29Du.js +1 -0
  34. package/dist/chunks/{RemoteCallout-CiA4rCEs.js → RemoteCallout-B-tyvQOe.js} +1 -1
  35. package/dist/chunks/{RemoteSessionManager-zdHfmvfj.js → RemoteSessionManager-DCd0O5_l.js} +2 -2
  36. package/dist/chunks/ResumeConversation-DAAXlOCd.js +1 -0
  37. package/dist/chunks/{SSETransport-BPbhCa2f.js → SSETransport-5VK5okFv.js} +1 -1
  38. package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +1 -0
  39. package/dist/chunks/Settings-CUjWlncb.js +2 -0
  40. package/dist/chunks/{TeleportProgress-DrulEQ7z.js → TeleportProgress-DxN0bQL2.js} +1 -1
  41. package/dist/chunks/{TeleportRepoMismatchDialog-D3FOLr0P.js → TeleportRepoMismatchDialog-A5Ss0kuk.js} +1 -1
  42. package/dist/chunks/{TeleportResumeWrapper-DI5iRFND.js → TeleportResumeWrapper-Bz14mUqR.js} +1 -1
  43. package/dist/chunks/{ThemePicker-CQ7dfFtv.js → ThemePicker-CVSRqTzW.js} +1 -1
  44. package/dist/chunks/TrustDialog-CY8an_Tg.js +1 -0
  45. package/dist/chunks/{ValidationErrorsList-CPYeuppg.js → ValidationErrorsList-BYsDtAvX.js} +1 -1
  46. package/dist/chunks/{WelcomeV2-C-UXdIng.js → WelcomeV2-C1BfrqC5.js} +1 -1
  47. package/dist/chunks/{add-dir-xTz4COgn.js → add-dir-DfLYgwox.js} +1 -1
  48. package/dist/chunks/{agentDisplay-BuSReYxu.js → agentDisplay-CMmHIl86.js} +1 -1
  49. package/dist/chunks/{agents-CiLlKN2I.js → agents-DE_4mAHG.js} +1 -1
  50. package/dist/chunks/agents-DJtPfvnL.js +103 -0
  51. package/dist/chunks/allErrors-CQE2k0zO.js +1 -0
  52. package/dist/chunks/{ant-CBIfqmAb.js → ant-ClQkuQjZ.js} +1 -1
  53. package/dist/chunks/{api-B-5jqiMg.js → api-2cdIPaeq.js} +1 -1
  54. package/dist/chunks/api-CG-lhKe-.js +1 -0
  55. package/dist/chunks/{assistant-XOnU01yl.js → assistant-Bje16tQx.js} +1 -1
  56. package/dist/chunks/auth-DMfEiQrC.js +1 -0
  57. package/dist/chunks/auth-D_cGl8WD.js +1 -0
  58. package/dist/chunks/{auth-DT2yxy94.js → auth-DqcKPbw8.js} +1 -1
  59. package/dist/chunks/{autoMode-CEMflt3g.js → autoMode-ZW70mpr0.js} +5 -5
  60. package/dist/chunks/{autonomy-_N8aDaA8.js → autonomy-CwbWsCnv.js} +1 -1
  61. package/dist/chunks/autonomy-Oui8yK8G.js +15 -0
  62. package/dist/chunks/{autonomyPanel-I4yCy3Fr.js → autonomyPanel-Mq50H7iM.js} +1 -1
  63. package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +1 -0
  64. package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +17 -0
  65. package/dist/chunks/{branch-BIX-pyHp.js → branch-DU5O9KZ0.js} +1 -1
  66. package/dist/chunks/{break-cache-BQfgkNAo.js → break-cache-C_p7Kmx2.js} +3 -3
  67. package/dist/chunks/{bridge-CYskzVt8.js → bridge-DNNxtPlz.js} +2 -2
  68. package/dist/chunks/{bridgeConfig-5p_w4s5r.js → bridgeConfig-CE6dMsiJ.js} +1 -1
  69. package/dist/chunks/bridgeConfig-DP9dD1Cv.js +1 -0
  70. package/dist/chunks/{bridgeEnabled-DhFrLTbG.js → bridgeEnabled-Cc0mGlTb.js} +1 -1
  71. package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +1 -0
  72. package/dist/chunks/bridgeMain-CwxMa_pd.js +1 -0
  73. package/dist/chunks/bridgeMain-D11t1BYQ.js +68 -0
  74. package/dist/chunks/{bridgeMessaging-B5Lbzr8e.js → bridgeMessaging-DdvApEqW.js} +1 -1
  75. package/dist/chunks/{bridgePointer-MqLe5Asm.js → bridgePointer-DqHMHa2B.js} +1 -1
  76. package/dist/chunks/{btw-CWWFO7u8.js → btw-CejSEdNl.js} +1 -1
  77. package/dist/chunks/{caches-DPqPIogk.js → caches-5HVQSevy.js} +2 -2
  78. package/dist/chunks/caches-B-nJoHLM.js +1 -0
  79. package/dist/chunks/{ccrClient-CTLnU9Y1.js → ccrClient-BFyfO67b.js} +1 -1
  80. package/dist/chunks/{claudeDesktop-Cx31Ugjp.js → claudeDesktop-Fe-QL-sN.js} +1 -1
  81. package/dist/chunks/{clear-DCAgZwc4.js → clear-D8m2utXW.js} +1 -1
  82. package/dist/chunks/client-C6MbjvOB.js +17 -0
  83. package/dist/chunks/client-DKXCfdde.js +1 -0
  84. package/dist/chunks/client-xxikkAoZ.js +1 -0
  85. package/dist/chunks/{color-CmJGInHL.js → color-DWhgZH7A.js} +1 -1
  86. package/dist/chunks/commands-CxJpmEKF.js +1 -0
  87. package/dist/chunks/commitAttribution-DM6SBMwl.js +1 -0
  88. package/dist/chunks/{commitAttribution-CGZr7XNO.js → commitAttribution-DPnHHKSA.js} +1 -1
  89. package/dist/chunks/compact-CblM7306.js +2 -0
  90. package/dist/chunks/config-BLVBFi5v.js +1 -0
  91. package/dist/chunks/config-CMnqm6Se.js +1 -0
  92. package/dist/chunks/{config-3m_9zSrj.js → config-DRDuVyzE.js} +2 -2
  93. package/dist/chunks/{context-C9V4GF0n.js → context-CdSMMM-0.js} +1 -1
  94. package/dist/chunks/context-noninteractive-CPkf2vB9.js +1 -0
  95. package/dist/chunks/{context-noninteractive-BmC4o5xo.js → context-noninteractive-DNury4JI.js} +5 -5
  96. package/dist/chunks/conversation-DCMw_rsE.js +1 -0
  97. package/dist/chunks/conversation-pUtvc-cE.js +1 -0
  98. package/dist/chunks/{createSSHSession-BL6j0AU5.js → createSSHSession-BOdTAX3N.js} +1 -1
  99. package/dist/chunks/{createSession-D_sgO1Xy.js → createSession-8Ei-Lj7V.js} +1 -1
  100. package/dist/chunks/createSession-CjqxVh_Q.js +1 -0
  101. package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +40 -0
  102. package/dist/chunks/{datadog-UkGdjL8-.js → datadog-DqHxqiwY.js} +1 -1
  103. package/dist/chunks/{desktop-HbYKh-VK.js → desktop-Z5FAfunZ.js} +1 -1
  104. package/dist/chunks/{diff-nTV17iWX.js → diff-CJEKvOA5.js} +1 -1
  105. package/dist/chunks/doctor-BA2ZLDTl.js +1 -0
  106. package/dist/chunks/{entry-CCFI6-gM.js → entry-DE0uMIf0.js} +4 -4
  107. package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +1 -0
  108. package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +1 -0
  109. package/dist/chunks/{esm-CGoYrggU.js → esm-5w3xFBnt.js} +1 -1
  110. package/dist/chunks/exit-Dt9kHtJO.js +1 -0
  111. package/dist/chunks/{extra-usage-g2Pw4zt_.js → extra-usage-C7E2Z1p1.js} +1 -1
  112. package/dist/chunks/extra-usage-D0Kkjp-2.js +1 -0
  113. package/dist/chunks/{extra-usage-core-DLYHAInT.js → extra-usage-core-DjdaD1qO.js} +1 -1
  114. package/dist/chunks/{extra-usage-noninteractive-D8iszH3c.js → extra-usage-noninteractive-BnD1RhKK.js} +1 -1
  115. package/dist/chunks/{extraUsage-C2Ylufhj.js → extraUsage-CpgRTcMk.js} +1 -1
  116. package/dist/chunks/extractMemories-DhUprYa7.js +1 -0
  117. package/dist/chunks/{fast-Dx2fTmWr.js → fast-C4ZevUNL.js} +1 -1
  118. package/dist/chunks/fast-CChxlAAF.js +1 -0
  119. package/dist/chunks/{feedback-DCQ4pJ3v.js → feedback-BIhBhV6n.js} +1 -1
  120. package/dist/chunks/{firstPartyEventLogger-BNGPPBNP.js → firstPartyEventLogger-BXY1IJ2D.js} +2 -2
  121. package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +1 -0
  122. package/dist/chunks/{flushGate-XaheIZZT.js → flushGate-CgHq81Gw.js} +1 -1
  123. package/dist/chunks/{gemini-BCCLHK3K.js → gemini-C1J-x1g7.js} +1 -1
  124. package/dist/chunks/generateRecap-C0jjCg0Z.js +1 -0
  125. package/dist/chunks/generateSessionName-w0BMtwS7.js +1 -0
  126. package/dist/chunks/{githubRepoPathMapping-B4AM8luI.js → githubRepoPathMapping-8D0kpsif.js} +1 -1
  127. package/dist/chunks/{goal-Bp6fyGqo.js → goal-B4GsR54_.js} +3 -3
  128. package/dist/chunks/grok-ffNyU3Lt.js +1 -0
  129. package/dist/chunks/{grove-DrBVaZSN.js → grove-BQisE2JM.js} +1 -1
  130. package/dist/chunks/{heapdump-JseysNDr.js → heapdump-DiCjAPR3.js} +1 -1
  131. package/dist/chunks/{help-DR9hKneR.js → help-2hn8VK2-.js} +1 -1
  132. package/dist/chunks/hooks-CBmrBO-J.js +1 -0
  133. package/dist/chunks/{hooks-C5n23H1E.js → hooks-CkA9bhHl.js} +2 -2
  134. package/dist/chunks/hostGuard-BHI6Q8Mt.js +1 -0
  135. package/dist/chunks/inboundAttachments-C5K3XPTC.js +1 -0
  136. package/dist/chunks/{inboundAttachments-Cp8XvLMZ.js → inboundAttachments-IH-g95jo.js} +1 -1
  137. package/dist/chunks/initReplBridge-C-P4dgAG.js +1 -0
  138. package/dist/chunks/{install-C7qTB0V5.js → install-Dzlm4u58.js} +1 -1
  139. package/dist/chunks/{instrumentation-CLZttr_u.js → instrumentation-Yt31gxWN.js} +3 -3
  140. package/dist/chunks/{job-BhiazwPH.js → job-BXujwZNa.js} +1 -1
  141. package/dist/chunks/{keybindings-CkL8BzUt.js → keybindings-D8FXoO89.js} +2 -2
  142. package/dist/chunks/language-Baosud0X.js +1 -0
  143. package/dist/chunks/{language-DIw2871r.js → language-Ca4B018X.js} +1 -1
  144. package/dist/chunks/{launchAgentsPlatform-j-mWpwW1.js → launchAgentsPlatform-D6DmNuDt.js} +1 -1
  145. package/dist/chunks/{launchLocalMemory-DmoXp0Xo.js → launchLocalMemory-C0FzUq7x.js} +2 -2
  146. package/dist/chunks/{launchLocalVault-1uKe0HjA.js → launchLocalVault-DkYAre4O.js} +3 -3
  147. package/dist/chunks/{launchMemoryStores-SxDKjHJ3.js → launchMemoryStores-D2rKWAPs.js} +1 -1
  148. package/dist/chunks/{launchOnboarding-CTtpnXcs.js → launchOnboarding-gOVAFEFp.js} +1 -1
  149. package/dist/chunks/{launchSchedule-BDVnGhaL.js → launchSchedule-IZdFstT_.js} +1 -1
  150. package/dist/chunks/{launchSkillStore-SmMLxp4K.js → launchSkillStore-B7LamM1d.js} +1 -1
  151. package/dist/chunks/{launchTeleport-B472ZSGz.js → launchTeleport-C2BQMfYP.js} +3 -3
  152. package/dist/chunks/{launchVault-CsyBgxle.js → launchVault-C60WUcCI.js} +1 -1
  153. package/dist/chunks/{lazySchema-DcIJE_0i.js → lazySchema-DULtBUCI.js} +1 -1
  154. package/dist/chunks/loadAgentsDir-B9c3Emvg.js +1 -0
  155. package/dist/chunks/{loadAgentsDir-Clu7Uk6a.js → loadAgentsDir-x3rlgED4.js} +693 -695
  156. package/dist/chunks/loadPluginHooks-BhNdAjeY.js +1 -0
  157. package/dist/chunks/localSearch-BLCGsdyM.js +1 -0
  158. package/dist/chunks/{localSearch-iA6JTk19.js → localSearch-DtplGF-l.js} +1 -1
  159. package/dist/chunks/{logoV2Utils-YHBJLIrC.js → logoV2Utils-gGK9gErT.js} +1 -1
  160. package/dist/chunks/{magicDocs-Bf1fqnHN.js → magicDocs-qdDB_mKb.js} +2 -2
  161. package/dist/chunks/{main-gtV_TqXP.js → main-OWFSddRx.js} +84 -84
  162. package/dist/chunks/managedEnv-Aq5BXfY7.js +1 -0
  163. package/dist/chunks/managedEnv-BHoeDjpS.js +1 -0
  164. package/dist/chunks/managedEnvConstants-BPwL2aWI.js +1 -0
  165. package/dist/chunks/{mappers-C8lYERPX.js → mappers-04gNXJ3w.js} +1 -1
  166. package/dist/chunks/mcp-BSNdwbxR.js +1 -0
  167. package/dist/chunks/mcp-CMnDNI-4.js +6 -0
  168. package/dist/chunks/mcp-D1yA9E56.js +2 -0
  169. package/dist/chunks/memory-D1zbyjxN.js +1 -0
  170. package/dist/chunks/{mode-DO6g7nkX.js → mode-DY087x_x.js} +2 -2
  171. package/dist/chunks/model-CZViyZnE.js +1 -0
  172. package/dist/chunks/{model-DLXL0CNu.js → model-D0EfJBuw.js} +1 -1
  173. package/dist/chunks/model-DLLkVV6S.js +1 -0
  174. package/dist/chunks/{nativeInstaller-OPuO2sm_.js → nativeInstaller-yj81F75v.js} +1 -1
  175. package/dist/chunks/onChangeAppState-DhGKPG9g.js +1 -0
  176. package/dist/chunks/{openai-HOebt-8k.js → openai-EYRnUsco.js} +3 -3
  177. package/dist/chunks/{overageCreditGrant-Bi1CTBAx.js → overageCreditGrant-Du3dOYVu.js} +1 -1
  178. package/dist/chunks/{panel-CrTPqXCv.js → panel-BSZGX6jN.js} +1 -1
  179. package/dist/chunks/{panelCall-D0eURklm.js → panelCall-dMvRPAGE.js} +1 -1
  180. package/dist/chunks/{partition-C8RSL3SQ.js → partition-C4FWzYVm.js} +1 -1
  181. package/dist/chunks/{passes-BJci5SM_.js → passes-Daz-ARWD.js} +1 -1
  182. package/dist/chunks/permissions-DF8tAmDF.js +3 -0
  183. package/dist/chunks/{pidLock-Bd2e6xuT.js → pidLock-CbC_il6r.js} +2 -2
  184. package/dist/chunks/{plan-D4gMsK7i.js → plan-rsb_83Fo.js} +1 -1
  185. package/dist/chunks/{plugin-CwCo5Kik.js → plugin-Cm31-nej.js} +1 -1
  186. package/dist/chunks/pluginAutoupdate-0k03PVff.js +1 -0
  187. package/dist/chunks/pluginBlocklist-wPFCUPdm.js +1 -0
  188. package/dist/chunks/pluginCliCommands-DhL9LbH0.js +1 -0
  189. package/dist/chunks/{pluginFlagging-DNPBbJZo.js → pluginFlagging-CAdaFV_D.js} +1 -1
  190. package/dist/chunks/pluginOperations-Cs_Z4C6O.js +2 -0
  191. package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +1 -0
  192. package/dist/chunks/pluginStartupCheck-KeU0efTj.js +1 -0
  193. package/dist/chunks/{plugins-CzJIuPfb.js → plugins-CQNKZmjP.js} +4 -4
  194. package/dist/chunks/policyLimits-D2s8M8P2.js +1 -0
  195. package/dist/chunks/{pollConfig-DH2oCtFS.js → pollConfig-2nFzv6Hy.js} +1 -1
  196. package/dist/chunks/{poor-Dha9p9RF.js → poor-DXumVTR4.js} +1 -1
  197. package/dist/chunks/{poorMode-1NLYiS3Y.js → poorMode-CBOtooa0.js} +1 -1
  198. package/dist/chunks/poorMode-yNZL5uYf.js +1 -0
  199. package/dist/chunks/print-uxCF5ka5.js +23 -0
  200. package/dist/chunks/{privacy-settings-6ZWxR4Qt.js → privacy-settings-BncbJCV0.js} +1 -1
  201. package/dist/chunks/processBashCommand-CGdwvPmD.js +1 -0
  202. package/dist/chunks/processSlashCommand-DQarepEb.js +5 -0
  203. package/dist/chunks/prompt-BgOdcHkd.js +1 -0
  204. package/dist/chunks/{prompt-Bg_1U0gO.js → prompt-CE3sFmZV.js} +5 -5
  205. package/dist/chunks/prompt-CLJKFebn.js +1 -0
  206. package/dist/chunks/{promptEditor-BhYDmwdS.js → promptEditor-CyTzyjwG.js} +2 -2
  207. package/dist/chunks/{protocolHandler-Dnb7lITm.js → protocolHandler-JR8pASdH.js} +1 -1
  208. package/dist/chunks/rate-limit-options-C-EqWjeI.js +1 -0
  209. package/dist/chunks/{rcDebugLog-VKwMl0yg.js → rcDebugLog-DBB9r8aw.js} +1 -1
  210. package/dist/chunks/reconciler-CYD_XpG4.js +4 -0
  211. package/dist/chunks/{referral-BlrMpBAV.js → referral-CKmHHxj_.js} +1 -1
  212. package/dist/chunks/refresh-ZqZdmLK5.js +1 -0
  213. package/dist/chunks/{registerProtocol-CuKZAiCc.js → registerProtocol-wZv2uiW_.js} +1 -1
  214. package/dist/chunks/{release-notes-BgP8u7NE.js → release-notes-B5K7wVqZ.js} +1 -1
  215. package/dist/chunks/{releaseNotes-CunqVlbU.js → releaseNotes-B8gbyFFJ.js} +2 -2
  216. package/dist/chunks/{reload-plugins-CD9TzvFm.js → reload-plugins-B9ApSp2m.js} +1 -1
  217. package/dist/chunks/{remote-env-QaP_W_sv.js → remote-env-CAt1dHIS.js} +1 -1
  218. package/dist/chunks/{remoteBridgeCore-9-HVMo63.js → remoteBridgeCore-Bk3UdSLJ.js} +1 -1
  219. package/dist/chunks/remoteManagedSettings-bswzAB6W.js +1 -0
  220. package/dist/chunks/rename-CE_U6KE6.js +1 -0
  221. package/dist/chunks/{resume-D-SpOy_1.js → resume-BicEjsPd.js} +2 -2
  222. package/dist/chunks/{runtimeObserver-Dm3LIUMp.js → runtimeObserver-BrGF5QWX.js} +4 -4
  223. package/dist/chunks/{runtimeObserver-DOEcrylu.js → runtimeObserver-CiwnPFjK.js} +1 -1
  224. package/dist/chunks/sandbox-adapter-BtMiHImm.js +1 -0
  225. package/dist/chunks/{sandbox-toggle-B61AeBor.js → sandbox-toggle-D8eebdyI.js} +1 -1
  226. package/dist/chunks/searchExtraTools-hLLPuh7c.js +1 -0
  227. package/dist/chunks/{session-RwJCIIcs.js → session-BZIlR9Gc.js} +2 -2
  228. package/dist/chunks/{sessionDiscovery-dkFeWcA3.js → sessionDiscovery-DfDqTrF1.js} +1 -1
  229. package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +1 -0
  230. package/dist/chunks/sessionMemory-D37S0-jX.js +1 -0
  231. package/dist/chunks/sessionMemory-DmlAG3jq.js +1 -0
  232. package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +1 -0
  233. package/dist/chunks/sessionObserver-BUw2rzKl.js +1 -0
  234. package/dist/chunks/{sessionObserver-CSOYgsvH.js → sessionObserver-KgquhGWw.js} +1 -1
  235. package/dist/chunks/sessionStorage-CucBSK5Q.js +1 -0
  236. package/dist/chunks/{sessionTitle-CLOlPZ_M.js → sessionTitle-DAnM73S0.js} +2 -2
  237. package/dist/chunks/{sessionTracing-D8wr9j4X.js → sessionTracing-_Hh5VXxt.js} +1 -1
  238. package/dist/chunks/settings-BeLFUeie.js +19 -0
  239. package/dist/chunks/settings-Cl16Haug.js +1 -0
  240. package/dist/chunks/settingsSync-BNvFYH3c.js +1 -0
  241. package/dist/chunks/setup-D8kXv3ts.js +3 -0
  242. package/dist/chunks/{shadowedRuleDetection-CXsmUY2o.js → shadowedRuleDetection-C6R5zOUe.js} +1 -1
  243. package/dist/chunks/{sideQuestion-CHpOVzY5.js → sideQuestion-hUhxls9r.js} +3 -3
  244. package/dist/chunks/{sinks-1hFrW9HK.js → sinks-BuE17DeZ.js} +2 -2
  245. package/dist/chunks/sinks-FevoYQqP.js +1 -0
  246. package/dist/chunks/{skill-learning-Ck17rwH8.js → skill-learning-CMdxGtxr.js} +1 -1
  247. package/dist/chunks/skillChangeDetector-C65ZLSYV.js +1 -0
  248. package/dist/chunks/{skillGapStore-DyqNKuNy.js → skillGapStore-D18LRJAM.js} +2 -2
  249. package/dist/chunks/{skillGapStore-BJ1h2LVr.js → skillGapStore-Ep62R-2_.js} +1 -1
  250. package/dist/chunks/{skillGenerator-BT8NGzXT.js → skillGenerator-Bc7WwNT8.js} +2 -2
  251. package/dist/chunks/{skillLearning-Cn9Uw0Kd.js → skillLearning-Cs9fJgkV.js} +1 -1
  252. package/dist/chunks/skillLearning-duPZl69A.js +1 -0
  253. package/dist/chunks/{skillPanel-N0GoWjIi.js → skillPanel-Cyzby746.js} +3 -3
  254. package/dist/chunks/{skillSearchPanel-CTwtgTzy.js → skillSearchPanel-Cll9ccA5.js} +4 -4
  255. package/dist/chunks/{skills-Bv3lH-aA.js → skills-BPPeYBy7.js} +1 -1
  256. package/dist/chunks/{stats-C1Ff6w4i.js → stats-CqfF4Axp.js} +1 -1
  257. package/dist/chunks/{status-FD7HVYS7.js → status-CC9Q-2Yn.js} +1 -1
  258. package/dist/chunks/{status-DyXiBa0m.js → status-D4IQpsNK.js} +2 -2
  259. package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +1 -0
  260. package/dist/chunks/syncCache-CANQZ9mQ.js +1 -0
  261. package/dist/chunks/{tag-RzOSA5T0.js → tag-DDbNqBMu.js} +2 -2
  262. package/dist/chunks/{tasks-eJrOcdhB.js → tasks-CZvWJYGr.js} +1 -1
  263. package/dist/chunks/teleport-Dk5j03Ix.js +1 -0
  264. package/dist/chunks/{templateJobs-BnOBSFtq.js → templateJobs-D1BdhZsv.js} +1 -1
  265. package/dist/chunks/{terminalSetup-D_P5iZmq.js → terminalSetup-3JNy6i_J.js} +5 -5
  266. package/dist/chunks/{terminalSetup-BfvmoJaK.js → terminalSetup-Cn6jeYw1.js} +1 -1
  267. package/dist/chunks/{theme-S0kVMVt4.js → theme-Cg4GNOoQ.js} +1 -1
  268. package/dist/chunks/thinkback-p-vKIRW_.js +1 -0
  269. package/dist/chunks/thinkback-play-DnPTDE8B.js +1 -0
  270. package/dist/chunks/{thinkback-HyW_R_88.js → thinkback-rFA1do6F.js} +1 -1
  271. package/dist/chunks/{toolEventObserver--Z6jENks.js → toolEventObserver-CzsCuUMc.js} +1 -1
  272. package/dist/chunks/{toolEventObserver-BAFzvePj.js → toolEventObserver-SFwURL5F.js} +1 -1
  273. package/dist/chunks/toolPool-BR27AMJO.js +1 -0
  274. package/dist/chunks/trustedDevice-BYt39fui.js +1 -0
  275. package/dist/chunks/{trustedDevice-Dn4rXbxT.js → trustedDevice-CKedohmT.js} +1 -1
  276. package/dist/chunks/{types-C-MRCL8J.js → types-Dut4311z.js} +2 -2
  277. package/dist/chunks/{ultrareviewCommand-mYDTBCFD.js → ultrareviewCommand-C_4OSBTW.js} +2 -2
  278. package/dist/chunks/{undercover-CdapzvNH.js → undercover-D30rKimg.js} +2 -2
  279. package/dist/chunks/undercover-DRSwLozU.js +1 -0
  280. package/dist/chunks/{updateCCB-DPShheOr.js → updateCCB-C2G-U-qA.js} +1 -1
  281. package/dist/chunks/upgrade-Bi-bIz7R.js +1 -0
  282. package/dist/chunks/{upgrade-BOeakAP6.js → upgrade-Chs-OQFd.js} +1 -1
  283. package/dist/chunks/{upload-BXQsDtLW.js → upload-D8FWMSQx.js} +1 -1
  284. package/dist/chunks/{usage-iNQzY960.js → usage-BxVeUt60.js} +1 -1
  285. package/dist/chunks/usage-DUO7Yy1f.js +1 -0
  286. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-CntByfTQ.js → useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js} +1 -1
  287. package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +1 -0
  288. package/dist/chunks/useManagePlugins-B11_87VN.js +1 -0
  289. package/dist/chunks/useMergedTools-CR56my9t.js +1 -0
  290. package/dist/chunks/{useSearchInput-H-8hJeFD.js → useSearchInput-C5OzQnX6.js} +1 -1
  291. package/dist/chunks/{useSettingsErrors-BF5i5Xju.js → useSettingsErrors-B9vOZL41.js} +1 -1
  292. package/dist/chunks/{util-CoicMvOv.js → util-8EHwfg4A.js} +1 -1
  293. package/dist/chunks/validatePlugin-6q1qmnAC.js +1 -0
  294. package/dist/chunks/{vim-DdvQlLDm.js → vim-CNDzwoTd.js} +1 -1
  295. package/dist/chunks/{workerRegistry-CzqQwCHC.js → workerRegistry-CvyHvwx-.js} +1 -1
  296. package/dist/chunks/worktree-ogmNCIpz.js +1 -0
  297. package/dist/cli.js +1 -1
  298. package/package.json +1 -1
  299. package/dist/chunks/ApproveApiKey-CKfn7U1R.js +0 -1
  300. package/dist/chunks/BackgroundTasksDialog-CyoLEYWH.js +0 -2
  301. package/dist/chunks/ClaudeMdExternalIncludesDialog-TypH-X8e.js +0 -1
  302. package/dist/chunks/ConsoleOAuthFlow-wGQuFt41.js +0 -1
  303. package/dist/chunks/Doctor-CcJUwSQn.js +0 -1
  304. package/dist/chunks/Doctor-Yco1McrL.js +0 -3
  305. package/dist/chunks/ExitFlow-D3csukbB.js +0 -2
  306. package/dist/chunks/Grove-DPkIjqg8.js +0 -1
  307. package/dist/chunks/Grove-Dsd7F39b.js +0 -11
  308. package/dist/chunks/MCPConnectionManager-MWpKjeZT.js +0 -1
  309. package/dist/chunks/MessageSelector-DsQmqFt2.js +0 -3
  310. package/dist/chunks/Messages-B3sGRx5A.js +0 -11
  311. package/dist/chunks/PluginSettings-B0jbwB2M.js +0 -17
  312. package/dist/chunks/QueryEngine-cwdsr4dr.js +0 -1
  313. package/dist/chunks/REPL-CJzScgbZ.js +0 -142
  314. package/dist/chunks/REPL-DlBJIPCw.js +0 -1
  315. package/dist/chunks/ResumeConversation-Rxwd6HAJ.js +0 -1
  316. package/dist/chunks/SearchExtraToolsTool-VP87ErGx.js +0 -1
  317. package/dist/chunks/Settings-CxI_KHUj.js +0 -2
  318. package/dist/chunks/TrustDialog-CnVKrdxQ.js +0 -1
  319. package/dist/chunks/agents-Du9KYHqN.js +0 -103
  320. package/dist/chunks/allErrors-P3utlEeA.js +0 -1
  321. package/dist/chunks/api-BiwZmmsh.js +0 -1
  322. package/dist/chunks/auth-BQa4kzQo.js +0 -1
  323. package/dist/chunks/auth-UAJhZNmZ.js +0 -1
  324. package/dist/chunks/autonomy-Cg5zweUa.js +0 -15
  325. package/dist/chunks/backgroundHousekeeping-BUUZ7Csq.js +0 -1
  326. package/dist/chunks/backgroundHousekeeping-DhF2lrQ9.js +0 -17
  327. package/dist/chunks/bridgeConfig-DWEqKbXk.js +0 -1
  328. package/dist/chunks/bridgeEnabled-CjVCMwnq.js +0 -1
  329. package/dist/chunks/bridgeMain-6lollTtZ.js +0 -1
  330. package/dist/chunks/bridgeMain-BX2AkLPs.js +0 -68
  331. package/dist/chunks/caches-C46fa77L.js +0 -1
  332. package/dist/chunks/client-Bup0Sgcn.js +0 -1
  333. package/dist/chunks/commands-BdB1eFvP.js +0 -1
  334. package/dist/chunks/commitAttribution-D6J3NuhB.js +0 -1
  335. package/dist/chunks/compact-C6-lMHgn.js +0 -2
  336. package/dist/chunks/config-Bxt1UH1T.js +0 -1
  337. package/dist/chunks/config-CjjXZfNi.js +0 -1
  338. package/dist/chunks/context-noninteractive-DvGo1l7b.js +0 -1
  339. package/dist/chunks/conversation-CH9ouFai.js +0 -1
  340. package/dist/chunks/conversation-CYqqk0o7.js +0 -1
  341. package/dist/chunks/createSession-DUfOAeyE.js +0 -1
  342. package/dist/chunks/crossProjectResume-D5hTOfnE.js +0 -40
  343. package/dist/chunks/doctor-7fgVhEKL.js +0 -1
  344. package/dist/chunks/envLessBridgeConfig-B2HYnEKo.js +0 -1
  345. package/dist/chunks/envLessBridgeConfig-DXd10GXD.js +0 -1
  346. package/dist/chunks/exit-ropaQiOr.js +0 -1
  347. package/dist/chunks/extra-usage-CLhv1Z4g.js +0 -1
  348. package/dist/chunks/extractMemories-B2IAvbXM.js +0 -1
  349. package/dist/chunks/fast-_G6zcFye.js +0 -1
  350. package/dist/chunks/firstPartyEventLogger-C9LzVy6y.js +0 -1
  351. package/dist/chunks/generateRecap-BhvbixY2.js +0 -1
  352. package/dist/chunks/generateSessionName-CN1oh7Fa.js +0 -1
  353. package/dist/chunks/grok-ax26ju8y.js +0 -1
  354. package/dist/chunks/hooks-BUJLxdFJ.js +0 -1
  355. package/dist/chunks/hostGuard-C5xydXZI.js +0 -1
  356. package/dist/chunks/inboundAttachments-C0nMTtCi.js +0 -1
  357. package/dist/chunks/initReplBridge-DJs28ZkI.js +0 -1
  358. package/dist/chunks/language-DfOAuDFc.js +0 -1
  359. package/dist/chunks/loadAgentsDir-DTbJJff-.js +0 -1
  360. package/dist/chunks/loadPluginHooks-Cvd5VdjQ.js +0 -1
  361. package/dist/chunks/localSearch-DKv8PRLD.js +0 -1
  362. package/dist/chunks/mcp-CNuhEGP6.js +0 -6
  363. package/dist/chunks/mcp-Ci0OPVrR.js +0 -1
  364. package/dist/chunks/mcp-CwIYauZl.js +0 -2
  365. package/dist/chunks/memory-DCGqfQ1U.js +0 -1
  366. package/dist/chunks/model-BQF64tZx.js +0 -1
  367. package/dist/chunks/model-DvrvG6BB.js +0 -1
  368. package/dist/chunks/onChangeAppState-CHhRDkM7.js +0 -1
  369. package/dist/chunks/permissions-JU9CGHgI.js +0 -3
  370. package/dist/chunks/pluginAutoupdate-CO-n9bqe.js +0 -1
  371. package/dist/chunks/pluginBlocklist-5qbaTRbV.js +0 -1
  372. package/dist/chunks/pluginCliCommands-I-lsw_us.js +0 -1
  373. package/dist/chunks/pluginOperations-Cz6eQ0Vu.js +0 -2
  374. package/dist/chunks/pluginStartupCheck-CoW7073W.js +0 -1
  375. package/dist/chunks/pluginStartupCheck-DJ9fslCK.js +0 -1
  376. package/dist/chunks/policyLimits-BkjgMQD0.js +0 -1
  377. package/dist/chunks/poorMode-qlxqU8Hm.js +0 -1
  378. package/dist/chunks/print-BL4EUT5Z.js +0 -23
  379. package/dist/chunks/processBashCommand-BZs9wggV.js +0 -1
  380. package/dist/chunks/processSlashCommand-D8lKLNzM.js +0 -5
  381. package/dist/chunks/prompt-CN7gBNKS.js +0 -1
  382. package/dist/chunks/prompt-D-zHhqp8.js +0 -1
  383. package/dist/chunks/rate-limit-options-DVzT3eWH.js +0 -1
  384. package/dist/chunks/reconciler-BdRXZTJf.js +0 -4
  385. package/dist/chunks/refresh-jwqnoK2h.js +0 -1
  386. package/dist/chunks/remoteManagedSettings-jZ6u8ZBT.js +0 -1
  387. package/dist/chunks/rename-29qxHf8W.js +0 -1
  388. package/dist/chunks/sandbox-adapter-LzTcKwBp.js +0 -1
  389. package/dist/chunks/searchExtraTools-CbJJQqzH.js +0 -1
  390. package/dist/chunks/sessionFileAccessHooks-B_nNW0zE.js +0 -1
  391. package/dist/chunks/sessionMemory-C4JAUZ6V.js +0 -1
  392. package/dist/chunks/sessionMemory-btARBn8H.js +0 -1
  393. package/dist/chunks/sessionMemoryUtils-BlqAy8oR.js +0 -1
  394. package/dist/chunks/sessionObserver-DMvWci8-.js +0 -1
  395. package/dist/chunks/sessionStorage-Diyuvt20.js +0 -1
  396. package/dist/chunks/settings-Dlp5JTa_.js +0 -19
  397. package/dist/chunks/settingsSync-QWA0VZSu.js +0 -1
  398. package/dist/chunks/setup-UI9uv2-K.js +0 -3
  399. package/dist/chunks/sinks-CXq8-7Qn.js +0 -1
  400. package/dist/chunks/skillChangeDetector-s0F9Yf9a.js +0 -1
  401. package/dist/chunks/skillLearning-1ZfYIzfL.js +0 -1
  402. package/dist/chunks/statusNoticeHelpers-kTp9Rdk6.js +0 -1
  403. package/dist/chunks/teleport-ABA-hdmP.js +0 -1
  404. package/dist/chunks/thinkback-C6gV2LpU.js +0 -1
  405. package/dist/chunks/thinkback-play-H6md4czq.js +0 -1
  406. package/dist/chunks/toolPool-CR61XXm3.js +0 -1
  407. package/dist/chunks/trustedDevice-DUrFWupL.js +0 -1
  408. package/dist/chunks/undercover-k3JoOKAb.js +0 -1
  409. package/dist/chunks/upgrade-D7iGU0PQ.js +0 -1
  410. package/dist/chunks/usage-DbRdMJog.js +0 -1
  411. package/dist/chunks/useMainLoopModel-DHkRIgNs.js +0 -1
  412. package/dist/chunks/useManagePlugins-B8HD0RUh.js +0 -1
  413. package/dist/chunks/useMergedTools-DfchLQZC.js +0 -1
  414. package/dist/chunks/validatePlugin-z2fcngf8.js +0 -1
  415. package/dist/chunks/worktree-DMhP5T0p.js +0 -1
@@ -1,4 +0,0 @@
1
- import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{A as n,E as r,M as i,N as a,P as o,S as s,T as c,d as l,f as u,g as d,h as f,i as p,m as ee,n as m,r as h,t as g,v as te,x as _}from"./lazySchema-DcIJE_0i.js";import{en as ne,nt as v}from"./state-ix0xIunV.js";import{$T as re,Cw as y,Dn as ie,En as ae,Ew as b,Fs as oe,G as se,Gt as ce,Hs as le,Ls as ue,On as de,Ow as x,Tn as fe,Vs as pe,W as me,du as he,eE as ge,fu as _e,nT as ve,tT as ye,yn as be}from"./loadAgentsDir-Clu7Uk6a.js";import{C as xe,D as Se,F as Ce,S,a as C,l as w,w as T,z as E}from"./debug-BrXObCdR.js";import{Ct as we,St as Te}from"./settings-Dlp5JTa_.js";import{n as Ee,o as De}from"./process-gEbdy6uY.js";import{M as Oe,_ as ke,j as Ae,n as je}from"./git-Do0wJvux.js";import{o as Me,s as D}from"./log-BMCygSzM.js";import{_ as Ne,f as Pe}from"./file-DcZWPH2V.js";import{cr as Fe,sr as Ie}from"./model-BQF64tZx.js";import{d as Le,h as Re}from"./rcDebugLog-VKwMl0yg.js";import{t as ze}from"./controlMessageCompat-IFu4Gc1y.js";import{isAbsolute as Be,resolve as Ve}from"path";import{randomUUID as O}from"crypto";h(),g();var k=m(()=>r({inputTokens:c(),outputTokens:c(),cacheReadInputTokens:c(),cacheCreationInputTokens:c(),webSearchRequests:c(),costUSD:c(),contextWindow:c(),maxOutputTokens:c()})),He=m(()=>s(`json_schema`));m(()=>r({type:He()}));var Ue=m(()=>r({type:s(`json_schema`),schema:n(i(),o())}));m(()=>Ue());var We=m(()=>l([`user`,`project`,`org`,`temporary`,`oauth`]));m(()=>l([`local`,`user`,`project`]).describe(`Config scope for settings.`)),m(()=>s(`context-1m-2025-08-07`));var Ge=m(()=>r({type:s(`adaptive`)}).describe(`Claude decides when and how much to think (Opus 4.6+).`)),Ke=m(()=>r({type:s(`enabled`),budgetTokens:c().optional()}).describe(`Fixed thinking token budget (older models)`)),qe=m(()=>r({type:s(`disabled`)}).describe(`No extended thinking`));m(()=>a([Ge(),Ke(),qe()]).describe(`Controls Claude's thinking/reasoning behavior. When set, takes precedence over the deprecated maxThinkingTokens.`));var Je=m(()=>r({type:s(`stdio`).optional(),command:i(),args:f(i()).optional(),env:n(i(),i()).optional()})),Ye=m(()=>r({type:s(`sse`),url:i(),headers:n(i(),i()).optional()})),Xe=m(()=>r({type:s(`http`),url:i(),headers:n(i(),i()).optional()})),Ze=m(()=>r({type:s(`sdk`),name:i()})),A=m(()=>a([Je(),Ye(),Xe(),Ze()])),Qe=m(()=>r({type:s(`claudeai-proxy`),url:i(),id:i()})),$e=m(()=>a([A(),Qe()])),j=m(()=>r({name:i().describe(`Server name as configured`),status:l([`connected`,`failed`,`needs-auth`,`pending`,`disabled`]).describe(`Current connection status`),serverInfo:r({name:i(),version:i()}).optional().describe(`Server information (available when connected)`),error:i().optional().describe(`Error message (available when status is 'failed')`),config:$e().optional().describe(`Server configuration (includes URL for HTTP/SSE servers)`),scope:i().optional().describe(`Configuration scope (e.g., project, user, local, claudeai, managed)`),tools:f(r({name:i(),description:i().optional(),annotations:r({readOnly:d().optional(),destructive:d().optional(),openWorld:d().optional()}).optional()})).optional().describe(`Tools provided by this server (available when connected)`),capabilities:r({experimental:n(i(),o()).optional()}).optional().describe(`@internal Server capabilities (available when connected). experimental['claude/channel'] is only present if the server's plugin is on the approved channels allowlist — use its presence to decide whether to show an Enable-channel prompt.`)}).describe(`Status information for an MCP server connection.`));m(()=>r({added:f(i()).describe(`Names of servers that were added`),removed:f(i()).describe(`Names of servers that were removed`),errors:n(i(),i()).describe(`Map of server names to error messages for servers that failed to connect`)}).describe(`Result of a setMcpServers operation.`));var M=m(()=>l([`userSettings`,`projectSettings`,`localSettings`,`session`,`cliArg`])),N=m(()=>l([`allow`,`deny`,`ask`])),P=m(()=>r({toolName:i(),ruleContent:i().optional()})),F=m(()=>te(`type`,[r({type:s(`addRules`),rules:f(P()),behavior:N(),destination:M()}),r({type:s(`replaceRules`),rules:f(P()),behavior:N(),destination:M()}),r({type:s(`removeRules`),rules:f(P()),behavior:N(),destination:M()}),r({type:s(`setMode`),mode:_(()=>L()),destination:M()}),r({type:s(`addDirectories`),directories:f(i()),destination:M()}),r({type:s(`removeDirectories`),directories:f(i()),destination:M()})])),I=m(()=>l([`user_temporary`,`user_permanent`,`user_reject`]).describe(`Classification of this permission decision for telemetry. SDK hosts that prompt users (desktop apps, IDEs) should set this to reflect what actually happened: user_temporary for allow-once, user_permanent for always-allow (both the click and later cache hits), user_reject for deny. If unset, the CLI infers conservatively (temporary for allow, reject for deny). The vocabulary matches tool_decision OTel events (monitoring-usage docs).`));m(()=>a([r({behavior:s(`allow`),updatedInput:n(i(),o()).optional(),updatedPermissions:f(F()).optional(),toolUseID:i().optional(),decisionClassification:I().optional()}),r({behavior:s(`deny`),message:i(),interrupt:d().optional(),toolUseID:i().optional(),decisionClassification:I().optional()})]));var L=m(()=>l([`default`,`acceptEdits`,`bypassPermissions`,`plan`,`dontAsk`,`auto`]).describe(`Permission mode for controlling how tool executions are handled. 'default' - Standard behavior, prompts for dangerous operations. 'acceptEdits' - Auto-accept file edit operations. 'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). 'plan' - Planning mode, no actual tool execution. 'dontAsk' - Don't prompt for permissions, deny if not pre-approved. 'auto' - Automatic mode (transcript classifier).`)),et=`PreToolUse.PostToolUse.PostToolUseFailure.Notification.UserPromptSubmit.SessionStart.SessionEnd.Stop.StopFailure.SubagentStart.SubagentStop.PreCompact.PostCompact.PermissionRequest.PermissionDenied.Setup.TeammateIdle.TaskCreated.TaskCompleted.Elicitation.ElicitationResult.ConfigChange.WorktreeCreate.WorktreeRemove.InstructionsLoaded.CwdChanged.FileChanged`.split(`.`),tt=m(()=>l(et)),R=m(()=>r({session_id:i(),transcript_path:i(),cwd:i(),permission_mode:i().optional(),agent_id:i().optional().describe(`Subagent identifier. Present only when the hook fires from within a subagent (e.g., a tool called by an AgentTool worker). Absent for the main thread, even in --agent sessions. Use this field (not agent_type) to distinguish subagent calls from main-thread calls.`),agent_type:i().optional().describe(`Agent type name (e.g., "general-purpose", "code-reviewer"). Present when the hook fires from within a subagent (alongside agent_id), or on the main thread of a session started with --agent (without agent_id).`)})),nt=m(()=>R().and(r({hook_event_name:s(`PreToolUse`),tool_name:i(),tool_input:o(),tool_use_id:i()}))),rt=m(()=>R().and(r({hook_event_name:s(`PermissionRequest`),tool_name:i(),tool_input:o(),permission_suggestions:f(F()).optional()}))),it=m(()=>R().and(r({hook_event_name:s(`PostToolUse`),tool_name:i(),tool_input:o(),tool_response:o(),tool_use_id:i()}))),at=m(()=>R().and(r({hook_event_name:s(`PostToolUseFailure`),tool_name:i(),tool_input:o(),tool_use_id:i(),error:i(),is_interrupt:d().optional()}))),ot=m(()=>R().and(r({hook_event_name:s(`PermissionDenied`),tool_name:i(),tool_input:o(),tool_use_id:i(),reason:i()}))),st=m(()=>R().and(r({hook_event_name:s(`Notification`),message:i(),title:i().optional(),notification_type:i()}))),ct=m(()=>R().and(r({hook_event_name:s(`UserPromptSubmit`),prompt:i()}))),lt=m(()=>R().and(r({hook_event_name:s(`SessionStart`),source:l([`startup`,`resume`,`clear`,`compact`]),agent_type:i().optional(),model:i().optional()}))),ut=m(()=>R().and(r({hook_event_name:s(`Setup`),trigger:l([`init`,`maintenance`])}))),dt=m(()=>R().and(r({hook_event_name:s(`Stop`),stop_hook_active:d(),last_assistant_message:i().optional().describe(`Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.`)}))),ft=m(()=>R().and(r({hook_event_name:s(`StopFailure`),error:U(),error_details:i().optional(),last_assistant_message:i().optional()}))),pt=m(()=>R().and(r({hook_event_name:s(`SubagentStart`),agent_id:i(),agent_type:i()}))),mt=m(()=>R().and(r({hook_event_name:s(`SubagentStop`),stop_hook_active:d(),agent_id:i(),agent_transcript_path:i(),agent_type:i(),last_assistant_message:i().optional().describe(`Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.`)}))),ht=m(()=>R().and(r({hook_event_name:s(`PreCompact`),trigger:l([`manual`,`auto`]),custom_instructions:i().nullable()}))),gt=m(()=>R().and(r({hook_event_name:s(`PostCompact`),trigger:l([`manual`,`auto`]),compact_summary:i().describe(`The conversation summary produced by compaction`)}))),_t=m(()=>R().and(r({hook_event_name:s(`TeammateIdle`),teammate_name:i(),team_name:i()}))),vt=m(()=>R().and(r({hook_event_name:s(`TaskCreated`),task_id:i(),task_subject:i(),task_description:i().optional(),teammate_name:i().optional(),team_name:i().optional()}))),yt=m(()=>R().and(r({hook_event_name:s(`TaskCompleted`),task_id:i(),task_subject:i(),task_description:i().optional(),teammate_name:i().optional(),team_name:i().optional()}))),bt=m(()=>R().and(r({hook_event_name:s(`Elicitation`),mcp_server_name:i(),message:i(),mode:l([`form`,`url`]).optional(),url:i().optional(),elicitation_id:i().optional(),requested_schema:n(i(),o()).optional()})).describe(`Hook input for the Elicitation event. Fired when an MCP server requests user input. Hooks can auto-respond (accept/decline) instead of showing the dialog.`)),xt=m(()=>R().and(r({hook_event_name:s(`ElicitationResult`),mcp_server_name:i(),elicitation_id:i().optional(),mode:l([`form`,`url`]).optional(),action:l([`accept`,`decline`,`cancel`]),content:n(i(),o()).optional()})).describe(`Hook input for the ElicitationResult event. Fired after the user responds to an MCP elicitation. Hooks can observe or override the response before it is sent to the server.`)),St=[`user_settings`,`project_settings`,`local_settings`,`policy_settings`,`skills`],Ct=m(()=>R().and(r({hook_event_name:s(`ConfigChange`),source:l(St),file_path:i().optional()}))),wt=[`session_start`,`nested_traversal`,`path_glob_match`,`include`,`compact`],Tt=[`User`,`Project`,`Local`,`Managed`],Et=m(()=>R().and(r({hook_event_name:s(`InstructionsLoaded`),file_path:i(),memory_type:l(Tt),load_reason:l(wt),globs:f(i()).optional(),trigger_file_path:i().optional(),parent_file_path:i().optional()}))),Dt=m(()=>R().and(r({hook_event_name:s(`WorktreeCreate`),name:i()}))),Ot=m(()=>R().and(r({hook_event_name:s(`WorktreeRemove`),worktree_path:i()}))),kt=m(()=>R().and(r({hook_event_name:s(`CwdChanged`),old_cwd:i(),new_cwd:i()}))),At=m(()=>R().and(r({hook_event_name:s(`FileChanged`),file_path:i(),event:l([`change`,`add`,`unlink`])}))),jt=[`clear`,`resume`,`logout`,`prompt_input_exit`,`other`,`bypass_permissions_disabled`],Mt=m(()=>l(jt)),Nt=m(()=>R().and(r({hook_event_name:s(`SessionEnd`),reason:Mt()}))),Pt=m(()=>a([nt(),it(),at(),ot(),st(),ct(),lt(),Nt(),dt(),ft(),pt(),mt(),ht(),gt(),rt(),ut(),_t(),vt(),yt(),bt(),xt(),Ct(),Et(),Dt(),Ot(),kt(),At()])),Ft=m(()=>r({async:s(!0),asyncTimeout:c().optional()})),It=m(()=>r({hookEventName:s(`PreToolUse`),permissionDecision:N().optional(),permissionDecisionReason:i().optional(),updatedInput:n(i(),o()).optional(),additionalContext:i().optional()})),Lt=m(()=>r({hookEventName:s(`UserPromptSubmit`),additionalContext:i().optional()})),Rt=m(()=>r({hookEventName:s(`SessionStart`),additionalContext:i().optional(),initialUserMessage:i().optional(),watchPaths:f(i()).optional()})),zt=m(()=>r({hookEventName:s(`Setup`),additionalContext:i().optional()})),Bt=m(()=>r({hookEventName:s(`SubagentStart`),additionalContext:i().optional()})),Vt=m(()=>r({hookEventName:s(`PostToolUse`),additionalContext:i().optional(),updatedMCPToolOutput:o().optional()})),Ht=m(()=>r({hookEventName:s(`PostToolUseFailure`),additionalContext:i().optional()})),Ut=m(()=>r({hookEventName:s(`PermissionDenied`),retry:d().optional()})),Wt=m(()=>r({hookEventName:s(`Notification`),additionalContext:i().optional()})),Gt=m(()=>r({hookEventName:s(`PermissionRequest`),decision:a([r({behavior:s(`allow`),updatedInput:n(i(),o()).optional(),updatedPermissions:f(F()).optional()}),r({behavior:s(`deny`),message:i().optional(),interrupt:d().optional()})])})),Kt=m(()=>r({hookEventName:s(`CwdChanged`),watchPaths:f(i()).optional()})),qt=m(()=>r({hookEventName:s(`FileChanged`),watchPaths:f(i()).optional()})),Jt=m(()=>r({continue:d().optional(),suppressOutput:d().optional(),stopReason:i().optional(),decision:l([`approve`,`block`]).optional(),systemMessage:i().optional(),reason:i().optional(),hookSpecificOutput:a([It(),Lt(),Rt(),zt(),Bt(),Vt(),Ht(),Ut(),Wt(),Gt(),Yt(),Xt(),Kt(),qt(),Zt()]).optional()})),Yt=m(()=>r({hookEventName:s(`Elicitation`),action:l([`accept`,`decline`,`cancel`]).optional(),content:n(i(),o()).optional()}).describe(`Hook-specific output for the Elicitation event. Return this to programmatically accept or decline an MCP elicitation request.`)),Xt=m(()=>r({hookEventName:s(`ElicitationResult`),action:l([`accept`,`decline`,`cancel`]).optional(),content:n(i(),o()).optional()}).describe(`Hook-specific output for the ElicitationResult event. Return this to override the action or content before the response is sent to the MCP server.`)),Zt=m(()=>r({hookEventName:s(`WorktreeCreate`),worktreePath:i()}).describe(`Hook-specific output for the WorktreeCreate event. Provides the absolute path to the created worktree directory. Command hooks print the path on stdout instead.`));m(()=>a([Ft(),Jt()]));var Qt=m(()=>r({key:i().describe(`Unique key for this option, returned in the response`),label:i().describe(`Display text for this option`),description:i().optional().describe(`Optional description shown below the label`)}));m(()=>r({prompt:i().describe(`Request ID. Presence of this key marks the line as a prompt request.`),message:i().describe(`The prompt message to display to the user`),options:f(Qt()).describe(`Available options for the user to choose from`)})),m(()=>r({prompt_response:i().describe(`The request ID from the corresponding prompt request`),selected:i().describe(`The key of the selected option`)}));var z=m(()=>r({name:i().describe(`Skill name (without the leading slash)`),description:i().describe(`Description of what the skill does`),argumentHint:i().describe(`Hint for skill arguments (e.g., "<file>")`)}).describe(`Information about an available skill (invoked via /command syntax).`)),B=m(()=>r({name:i().describe(`Agent type identifier (e.g., "Explore")`),description:i().describe(`Description of when to use this agent`),model:i().optional().describe(`Model alias this agent uses. If omitted, inherits the parent's model`)}).describe(`Information about an available subagent that can be invoked via the Task tool.`)),$t=m(()=>r({value:i().describe(`Model identifier to use in API calls`),displayName:i().describe(`Human-readable display name`),description:i().describe(`Description of the model's capabilities`),supportsAdaptiveThinking:d().optional().describe(`Whether this model supports adaptive thinking (Claude decides when and how much to think)`),supportsFastMode:d().optional().describe(`Whether this model supports fast mode`),supportsAutoMode:d().optional().describe(`Whether this model supports auto mode`)}).describe(`Information about an available model.`)),en=m(()=>r({email:i().optional(),organization:i().optional(),subscriptionType:i().optional(),tokenSource:i().optional(),apiKeySource:i().optional(),apiProvider:l([`firstParty`,`bedrock`,`vertex`,`foundry`]).optional().describe(`Active API backend. Anthropic OAuth login only applies when "firstParty"; for 3P providers the other fields are absent and auth is external (AWS creds, gcloud ADC, etc.).`)}).describe(`Information about the logged in user's account.`)),tn=m(()=>a([i(),n(i(),A())])),nn=m(()=>r({description:i().describe(`Natural language description of when to use this agent`),tools:f(i()).optional().describe(`Array of allowed tool names. If omitted, inherits all tools from parent`),disallowedTools:f(i()).optional().describe(`Array of tool names to explicitly disallow for this agent`),prompt:i().describe(`The agent's system prompt`),model:i().optional().describe(`Model alias (e.g. 'sonnet', 'opus', 'haiku') or full model ID (e.g. 'claude-opus-4-5'). If omitted or 'inherit', uses the main model`),mcpServers:f(tn()).optional(),criticalSystemReminder_EXPERIMENTAL:i().optional().describe(`Experimental: Critical reminder added to system prompt`),skills:f(i()).optional().describe(`Array of skill names to preload into the agent context`),initialPrompt:i().optional().describe(`Auto-submitted as the first user turn when this agent is the main thread agent. Slash commands are processed. Prepended to any user-provided prompt.`),maxTurns:c().int().positive().optional().describe(`Maximum number of agentic turns (API round-trips) before stopping`),background:d().optional().describe(`Run this agent as a background task (non-blocking, fire-and-forget) when invoked`),memory:l([`user`,`project`,`local`]).optional().describe(`Scope for auto-loading agent memory files. 'user' - ~/.claude/agent-memory/<agentType>/, 'project' - .claude/agent-memory/<agentType>/, 'local' - .claude/agent-memory-local/<agentType>/`),permissionMode:L().optional().describe(`Permission mode controlling how tool executions are handled`)}).describe(`Definition for a custom subagent that can be invoked via the Agent tool.`));m(()=>l([`user`,`project`,`local`]).describe(`Source for loading filesystem-based settings. 'user' - Global user settings (~/.claude/settings.json). 'project' - Project settings (.claude/settings.json). 'local' - Local settings (.claude/settings.local.json).`)),m(()=>r({type:s(`local`).describe(`Plugin type. Currently only 'local' is supported`),path:i().describe(`Absolute or relative path to the plugin directory`)}).describe(`Configuration for loading a plugin.`)),m(()=>r({canRewind:d(),error:i().optional(),filesChanged:f(i()).optional(),insertions:c().optional(),deletions:c().optional()}).describe(`Result of a rewindFiles operation.`));var rn=m(()=>o()),an=m(()=>o()),on=m(()=>o()),V=m(()=>i()),H=m(()=>o()),U=m(()=>l([`authentication_failed`,`billing_error`,`rate_limit`,`invalid_request`,`server_error`,`unknown`,`max_output_tokens`])),sn=m(()=>a([s(`compacting`),u()])),W=m(()=>r({type:s(`user`),message:rn(),parent_tool_use_id:i().nullable(),isSynthetic:d().optional(),tool_use_result:o().optional(),priority:l([`now`,`next`,`later`]).optional(),timestamp:i().optional().describe(`ISO timestamp when the message was created on the originating process. Older emitters omit it; consumers should fall back to receive time.`)})),G=m(()=>W().extend({uuid:V().optional(),session_id:i().optional()})),cn=m(()=>W().extend({uuid:V(),session_id:i(),isReplay:s(!0)})),ln=m(()=>r({status:l([`allowed`,`allowed_warning`,`rejected`]),resetsAt:c().optional(),rateLimitType:l([`five_hour`,`seven_day`,`seven_day_opus`,`seven_day_sonnet`,`overage`]).optional(),utilization:c().optional(),overageStatus:l([`allowed`,`allowed_warning`,`rejected`]).optional(),overageResetsAt:c().optional(),overageDisabledReason:l([`overage_not_provisioned`,`org_level_disabled`,`org_level_disabled_until`,`out_of_credits`,`seat_tier_level_disabled`,`member_level_disabled`,`seat_tier_zero_credit_limit`,`group_zero_credit_limit`,`member_zero_credit_limit`,`org_service_level_disabled`,`org_service_zero_credit_limit`,`no_limits_configured`,`unknown`]).optional(),isUsingOverage:d().optional(),surpassedThreshold:c().optional()}).describe(`Rate limit information for claude.ai subscription users.`)),un=m(()=>r({type:s(`assistant`),message:an(),parent_tool_use_id:i().nullable(),error:U().optional(),uuid:V(),session_id:i()})),dn=m(()=>r({type:s(`rate_limit_event`),rate_limit_info:ln(),uuid:V(),session_id:i()}).describe(`Rate limit event emitted when rate limit info changes.`)),fn=m(()=>r({type:s(`streamlined_text`),text:i().describe(`Text content preserved from the assistant message`),session_id:i(),uuid:V()}).describe(`@internal Streamlined text message - replaces SDKAssistantMessage in streamlined output. Text content preserved, thinking and tool_use blocks removed.`)),pn=m(()=>r({type:s(`streamlined_tool_use_summary`),tool_summary:i().describe(`Summary of tool calls (e.g., "Read 2 files, wrote 1 file")`),session_id:i(),uuid:V()}).describe(`@internal Streamlined tool use summary - replaces tool_use blocks in streamlined output with a cumulative summary string.`)),K=m(()=>r({tool_name:i(),tool_use_id:i(),tool_input:n(i(),o())})),mn=m(()=>r({type:s(`result`),subtype:s(`success`),duration_ms:c(),duration_api_ms:c(),is_error:d(),num_turns:c(),result:i(),stop_reason:i().nullable(),total_cost_usd:c(),usage:H(),modelUsage:n(i(),k()),permission_denials:f(K()),structured_output:o().optional(),fast_mode_state:q().optional(),uuid:V(),session_id:i()})),hn=m(()=>r({type:s(`result`),subtype:l([`error_during_execution`,`error_max_turns`,`error_max_budget_usd`,`error_max_structured_output_retries`]),duration_ms:c(),duration_api_ms:c(),is_error:d(),num_turns:c(),stop_reason:i().nullable(),total_cost_usd:c(),usage:H(),modelUsage:n(i(),k()),permission_denials:f(K()),errors:f(i()),fast_mode_state:q().optional(),uuid:V(),session_id:i()})),gn=m(()=>a([mn(),hn()])),_n=m(()=>r({type:s(`system`),subtype:s(`init`),agents:f(i()).optional(),apiKeySource:We(),betas:f(i()).optional(),claude_code_version:i(),cwd:i(),tools:f(i()),mcp_servers:f(r({name:i(),status:i()})),model:i(),permissionMode:L(),slash_commands:f(i()),output_style:i(),skills:f(i()),plugins:f(r({name:i(),path:i(),source:i().optional().describe(`@internal Plugin source identifier in "name\\@marketplace" format. Sentinels: "name\\@inline" for --plugin-dir, "name\\@builtin" for built-in plugins.`)})),fast_mode_state:q().optional(),uuid:V(),session_id:i()})),vn=m(()=>r({type:s(`stream_event`),event:on(),parent_tool_use_id:i().nullable(),uuid:V(),session_id:i()})),yn=m(()=>r({type:s(`system`),subtype:s(`compact_boundary`),compact_metadata:r({trigger:l([`manual`,`auto`]),pre_tokens:c(),preserved_segment:r({head_uuid:V(),anchor_uuid:V(),tail_uuid:V()}).optional().describe(`Relink info for messagesToKeep. Loaders splice the preserved segment at anchor_uuid (summary for suffix-preserving, boundary for prefix-preserving partial compact) so resume includes preserved content. Unset when compaction summarizes everything (no messagesToKeep).`)}),uuid:V(),session_id:i()})),bn=m(()=>r({type:s(`system`),subtype:s(`status`),status:sn(),permissionMode:L().optional(),uuid:V(),session_id:i()})),xn=m(()=>r({type:s(`system`),subtype:s(`post_turn_summary`),summarizes_uuid:i(),status_category:l([`blocked`,`waiting`,`completed`,`review_ready`,`failed`]),status_detail:i(),is_noteworthy:d(),title:i(),description:i(),recent_action:i(),needs_action:i(),artifact_urls:f(i()),uuid:V(),session_id:i()}).describe(`@internal Background post-turn summary emitted after each assistant turn. summarizes_uuid points to the assistant message this summarizes.`)),Sn=m(()=>r({type:s(`system`),subtype:s(`api_retry`),attempt:c(),max_retries:c(),retry_delay_ms:c(),error_status:c().nullable(),error:U(),uuid:V(),session_id:i()}).describe(`Emitted when an API request fails with a retryable error and will be retried after a delay. error_status is null for connection errors (e.g. timeouts) that had no HTTP response.`)),Cn=m(()=>r({type:s(`system`),subtype:s(`local_command_output`),content:i(),uuid:V(),session_id:i()}).describe(`Output from a local slash command (e.g. /voice, /cost). Displayed as assistant-style text in the transcript.`)),wn=m(()=>r({type:s(`system`),subtype:s(`hook_started`),hook_id:i(),hook_name:i(),hook_event:i(),uuid:V(),session_id:i()})),Tn=m(()=>r({type:s(`system`),subtype:s(`hook_progress`),hook_id:i(),hook_name:i(),hook_event:i(),stdout:i(),stderr:i(),output:i(),uuid:V(),session_id:i()})),En=m(()=>r({type:s(`system`),subtype:s(`hook_response`),hook_id:i(),hook_name:i(),hook_event:i(),output:i(),stdout:i(),stderr:i(),exit_code:c().optional(),outcome:l([`success`,`error`,`cancelled`]),uuid:V(),session_id:i()})),Dn=m(()=>r({type:s(`tool_progress`),tool_use_id:i(),tool_name:i(),parent_tool_use_id:i().nullable(),elapsed_time_seconds:c(),task_id:i().optional(),uuid:V(),session_id:i()})),On=m(()=>r({type:s(`auth_status`),isAuthenticating:d(),output:f(i()),error:i().optional(),uuid:V(),session_id:i()})),kn=m(()=>r({type:s(`system`),subtype:s(`files_persisted`),files:f(r({filename:i(),file_id:i()})),failed:f(r({filename:i(),error:i()})),processed_at:i(),uuid:V(),session_id:i()})),An=m(()=>r({type:s(`system`),subtype:s(`task_notification`),task_id:i(),tool_use_id:i().optional(),status:l([`completed`,`failed`,`stopped`]),output_file:i(),summary:i(),usage:r({total_tokens:c(),tool_uses:c(),duration_ms:c()}).optional(),uuid:V(),session_id:i()})),jn=m(()=>r({type:s(`system`),subtype:s(`task_started`),task_id:i(),tool_use_id:i().optional(),description:i(),task_type:i().optional(),workflow_name:i().optional().describe(`meta.name from the workflow script (e.g. 'spec'). Only set when task_type is 'local_workflow'.`),prompt:i().optional(),uuid:V(),session_id:i()})),Mn=m(()=>r({type:s(`system`),subtype:s(`session_state_changed`),state:l([`idle`,`running`,`requires_action`]),uuid:V(),session_id:i()}).describe(`Mirrors notifySessionStateChanged. 'idle' fires after heldBackResult flushes and the bg-agent do-while exits — authoritative turn-over signal.`)),Nn=m(()=>r({type:s(`system`),subtype:s(`task_progress`),task_id:i(),tool_use_id:i().optional(),description:i(),usage:r({total_tokens:c(),tool_uses:c(),duration_ms:c()}),last_tool_name:i().optional(),summary:i().optional(),uuid:V(),session_id:i()})),Pn=m(()=>r({type:s(`tool_use_summary`),summary:i(),preceding_tool_use_ids:f(i()),uuid:V(),session_id:i()})),Fn=m(()=>r({type:s(`system`),subtype:s(`elicitation_complete`),mcp_server_name:i(),elicitation_id:i(),uuid:V(),session_id:i()}).describe(`Emitted when an MCP server confirms that a URL-mode elicitation is complete.`)),In=m(()=>r({type:s(`prompt_suggestion`),suggestion:i(),uuid:V(),session_id:i()}).describe(`Predicted next user prompt, emitted after each turn when promptSuggestions is enabled.`));m(()=>r({sessionId:i().describe(`Unique session identifier (UUID).`),summary:i().describe(`Display title for the session: custom title, auto-generated summary, or first prompt.`),lastModified:c().describe(`Last modified time in milliseconds since epoch.`),fileSize:c().optional().describe(`File size in bytes. Only populated for local JSONL storage.`),customTitle:i().optional().describe(`User-set session title via /rename.`),firstPrompt:i().optional().describe(`First meaningful user prompt in the session.`),gitBranch:i().optional().describe(`Git branch at the end of the session.`),cwd:i().optional().describe(`Working directory for the session.`),tag:i().optional().describe(`User-set session tag.`),createdAt:c().optional().describe(`Creation time in milliseconds since epoch, extracted from the first entry's timestamp.`)}).describe(`Session metadata returned by listSessions and getSessionInfo.`));var Ln=m(()=>a([un(),G(),cn(),gn(),_n(),vn(),yn(),bn(),Sn(),Cn(),wn(),Tn(),En(),Dn(),On(),An(),jn(),Nn(),Mn(),kn(),Pn(),dn(),Fn(),In()])),q=m(()=>l([`off`,`cooldown`,`on`]).describe(`Fast mode state: off, in cooldown after rate limit, or actively enabled.`));h(),g();var Rn=m(()=>o()),zn=m(()=>r({matcher:i().optional(),hookCallbackIds:f(i()),timeout:c().optional()}).describe(`Configuration for matching and routing hook callbacks.`)),Bn=m(()=>r({subtype:s(`initialize`),hooks:n(tt(),f(zn())).optional(),sdkMcpServers:f(i()).optional(),jsonSchema:n(i(),o()).optional(),systemPrompt:i().optional(),appendSystemPrompt:i().optional(),agents:n(i(),nn()).optional(),promptSuggestions:d().optional(),agentProgressSummaries:d().optional()}).describe(`Initializes the SDK session with hooks, MCP servers, and agent configuration.`));m(()=>r({commands:f(z()),agents:f(B()),output_style:i(),available_output_styles:f(i()),models:f($t()),account:en(),pid:c().optional().describe(`@internal CLI process PID for tmux socket isolation`),fast_mode_state:q().optional()}).describe(`Response from session initialization with available commands, models, and account info.`));var Vn=m(()=>r({subtype:s(`interrupt`)}).describe(`Interrupts the currently running conversation turn.`)),Hn=m(()=>r({subtype:s(`can_use_tool`),tool_name:i(),input:n(i(),o()),permission_suggestions:f(F()).optional(),blocked_path:i().optional(),decision_reason:i().optional(),title:i().optional(),display_name:i().optional(),tool_use_id:i(),agent_id:i().optional(),description:i().optional()}).describe(`Requests permission to use a tool with the given input.`)),Un=m(()=>r({subtype:s(`set_permission_mode`),mode:L(),ultraplan:d().optional().describe(`@internal CCR ultraplan session marker.`)}).describe(`Sets the permission mode for tool execution handling.`)),Wn=m(()=>r({subtype:s(`set_model`),model:i().optional()}).describe(`Sets the model to use for subsequent conversation turns.`)),Gn=m(()=>r({subtype:s(`set_max_thinking_tokens`),max_thinking_tokens:c().nullable()}).describe(`Sets the maximum number of thinking tokens for extended thinking.`)),Kn=m(()=>r({subtype:s(`mcp_status`)}).describe(`Requests the current status of all MCP server connections.`));m(()=>r({mcpServers:f(j())}).describe(`Response containing the current status of all MCP server connections.`));var qn=m(()=>r({subtype:s(`get_context_usage`)}).describe(`Requests a breakdown of current context window usage by category.`)),Jn=m(()=>r({name:i(),tokens:c(),color:i(),isDeferred:d().optional()})),Yn=m(()=>r({color:i(),isFilled:d(),categoryName:i(),tokens:c(),percentage:c(),squareFullness:c()}));m(()=>r({categories:f(Jn()),totalTokens:c(),maxTokens:c(),rawMaxTokens:c(),percentage:c(),gridRows:f(f(Yn())),model:i(),memoryFiles:f(r({path:i(),type:i(),tokens:c()})),mcpTools:f(r({name:i(),serverName:i(),tokens:c(),isLoaded:d().optional()})),deferredBuiltinTools:f(r({name:i(),tokens:c(),isLoaded:d()})).optional(),systemTools:f(r({name:i(),tokens:c()})).optional(),systemPromptSections:f(r({name:i(),tokens:c()})).optional(),agents:f(r({agentType:i(),source:i(),tokens:c()})),slashCommands:r({totalCommands:c(),includedCommands:c(),tokens:c()}).optional(),skills:r({totalSkills:c(),includedSkills:c(),tokens:c(),skillFrontmatter:f(r({name:i(),source:i(),tokens:c()}))}).optional(),autoCompactThreshold:c().optional(),isAutoCompactEnabled:d(),messageBreakdown:r({toolCallTokens:c(),toolResultTokens:c(),attachmentTokens:c(),assistantMessageTokens:c(),userMessageTokens:c(),toolCallsByType:f(r({name:i(),callTokens:c(),resultTokens:c()})),attachmentsByType:f(r({name:i(),tokens:c()}))}).optional(),apiUsage:r({input_tokens:c(),output_tokens:c(),cache_creation_input_tokens:c(),cache_read_input_tokens:c()}).nullable()}).describe(`Breakdown of current context window usage by category (system prompt, tools, messages, etc.).`));var Xn=m(()=>r({subtype:s(`rewind_files`),user_message_id:i(),dry_run:d().optional()}).describe(`Rewinds file changes made since a specific user message.`));m(()=>r({canRewind:d(),error:i().optional(),filesChanged:f(i()).optional(),insertions:c().optional(),deletions:c().optional()}).describe(`Result of a rewindFiles operation.`));var Zn=m(()=>r({subtype:s(`cancel_async_message`),message_uuid:i()}).describe(`Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.`));m(()=>r({cancelled:d()}).describe(`Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).`));var Qn=m(()=>r({subtype:s(`seed_read_state`),path:i(),mtime:c()}).describe(`Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.`)),$n=m(()=>r({subtype:s(`hook_callback`),callback_id:i(),input:Pt(),tool_use_id:i().optional()}).describe(`Delivers a hook callback with its input data.`)),er=m(()=>r({subtype:s(`mcp_message`),server_name:i(),message:Rn()}).describe(`Sends a JSON-RPC message to a specific MCP server.`)),tr=m(()=>r({subtype:s(`mcp_set_servers`),servers:n(i(),A())}).describe(`Replaces the set of dynamically managed MCP servers.`));m(()=>r({added:f(i()),removed:f(i()),errors:n(i(),i())}).describe(`Result of replacing the set of dynamically managed MCP servers.`));var nr=m(()=>r({subtype:s(`reload_plugins`)}).describe(`Reloads plugins from disk and returns the refreshed session components.`));m(()=>r({commands:f(z()),agents:f(B()),plugins:f(r({name:i(),path:i(),source:i().optional()})),mcpServers:f(j()),error_count:c()}).describe(`Refreshed commands, agents, plugins, and MCP server status after reload.`));var rr=m(()=>r({subtype:s(`mcp_reconnect`),serverName:i()}).describe(`Reconnects a disconnected or failed MCP server.`)),ir=m(()=>r({subtype:s(`mcp_toggle`),serverName:i(),enabled:d()}).describe(`Enables or disables an MCP server.`)),ar=m(()=>r({subtype:s(`stop_task`),task_id:i()}).describe(`Stops a running task.`)),or=m(()=>r({subtype:s(`apply_flag_settings`),settings:n(i(),o())}).describe(`Merges the provided settings into the flag settings layer, updating the active configuration.`)),sr=m(()=>r({subtype:s(`get_settings`)}).describe(`Returns the effective merged settings and the raw per-source settings.`));m(()=>r({effective:n(i(),o()),sources:f(r({source:l([`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`]),settings:n(i(),o())})).describe(`Ordered low-to-high priority — later entries override earlier ones.`),applied:r({model:i()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe(`Effective merged settings plus raw per-source settings in merge order.`));var cr=m(()=>r({subtype:s(`elicitation`),mcp_server_name:i(),message:i(),mode:l([`form`,`url`]).optional(),url:i().optional(),elicitation_id:i().optional(),requested_schema:n(i(),o()).optional()}).describe(`Requests the SDK consumer to handle an MCP elicitation (user input request).`)),lr=m(()=>r({action:l([`accept`,`decline`,`cancel`]),content:n(i(),o()).optional()}).describe(`Response from the SDK consumer for an elicitation request.`)),ur=m(()=>a([Vn(),Hn(),Bn(),Un(),Wn(),Gn(),Kn(),qn(),$n(),er(),Xn(),Zn(),Qn(),tr(),nr(),rr(),ir(),ar(),or(),sr(),cr()])),J=m(()=>r({type:s(`control_request`),request_id:i(),request:ur()})),dr=m(()=>r({subtype:s(`success`),request_id:i(),response:n(i(),o()).optional()})),fr=m(()=>r({subtype:s(`error`),request_id:i(),error:i(),pending_permission_requests:f(_(()=>J())).optional()})),Y=m(()=>r({type:s(`control_response`),response:a([dr(),fr()])})),pr=m(()=>r({type:s(`control_cancel_request`),request_id:i()}).describe(`Cancels a currently open control request.`)),X=m(()=>r({type:s(`keep_alive`)}).describe(`Keep-alive message to maintain WebSocket connection.`)),mr=m(()=>r({type:s(`update_environment_variables`),variables:n(i(),i())}).describe(`Updates environment variables at runtime.`));m(()=>a([Ln(),fn(),pn(),xn(),Y(),J(),pr(),X()])),m(()=>a([G(),J(),Y(),X(),mr()])),e(),ne(),E(),S(),Ee(),Ae(),ae(),h(),C(),g(),b(),ie(),m(()=>p.object({tool_name:p.string().describe(`The name of the tool requesting permission`),input:p.record(p.string(),p.unknown()).describe(`The input for the tool`),tool_use_id:p.string().optional().describe(`The unique tool use request ID`)}));var Z=m(()=>p.enum([`user_temporary`,`user_permanent`,`user_reject`]).optional().catch(void 0)),hr=m(()=>p.object({behavior:p.literal(`allow`),updatedInput:p.record(p.string(),p.unknown()),updatedPermissions:p.array(de()).optional().catch(e=>{w(`Malformed updatedPermissions from SDK host ignored: ${e.error.issues[0]?.message??`unknown`}`,{level:`warn`})}),toolUseID:p.string().optional(),decisionClassification:Z()})),gr=m(()=>p.object({behavior:p.literal(`deny`),message:p.string(),interrupt:p.boolean().optional(),toolUseID:p.string().optional(),decisionClassification:Z()})),Q=m(()=>p.union([hr(),gr()]));function $(e,t,n,r){let i={type:`permissionPromptTool`,permissionPromptToolName:t.name,toolResult:e};if(e.behavior===`allow`){let t=e.updatedPermissions;t&&(r.setAppState(e=>({...e,toolPermissionContext:y(e.toolPermissionContext,t)})),x(t));let a=Object.keys(e.updatedInput).length>0?e.updatedInput:n;return{...e,updatedInput:a,decisionReason:i}}else e.behavior===`deny`&&e.interrupt&&(w(`SDK permission prompt deny+interrupt: tool=${t.name} message=${e.message}`),r.abortController.abort());return{...e,decisionReason:i}}Me(),Pe(),Te(),ye(),Le(),_e(),be(),se();var _r=/\u2028|\u2029/g;function vr(e){return e.replace(_r,e=>e===`\u2028`?`\\u2028`:`\\u2029`)}function yr(e){return vr(T(e))}C(),S(),h(),b();var br=`SandboxNetworkAccess`;function xr(e){if(e){if(e.type===`classifier`)return e.reason;switch(e.type){case`rule`:case`mode`:case`subcommandResults`:case`permissionPromptTool`:return;case`hook`:case`asyncAgent`:case`sandboxOverride`:case`workingDir`:case`safetyCheck`:case`other`:return e.reason}}}function Sr(e,t,n,r){let i;try{i=e.getActivityDescription?.(t)??e.getToolUseSummary?.(t)??e.userFacingName(t)}catch{i=e.name}return{tool_name:e.name,action_description:i,tool_use_id:n,request_id:r,input:t}}var Cr=1e3,wr=class{constructor(e,n){t(this,`input`,void 0),t(this,`replayUserMessages`,void 0),t(this,`structuredInput`,void 0),t(this,`pendingRequests`,new Map),t(this,`restoredWorkerState`,Promise.resolve(null)),t(this,`inputClosed`,!1),t(this,`unexpectedResponseCallback`,void 0),t(this,`resolvedToolUseIds`,new Set),t(this,`prependedLines`,[]),t(this,`onControlRequestSent`,void 0),t(this,`onControlRequestResolved`,void 0),t(this,`outbound`,new he),this.input=e,this.replayUserMessages=n,this.input=e,this.structuredInput=this.read()}trackResolvedToolUseId(e){let t=e.request;if(t.subtype===`can_use_tool`&&(this.resolvedToolUseIds.add(t.tool_use_id),this.resolvedToolUseIds.size>Cr)){let e=this.resolvedToolUseIds.values().next().value;e!==void 0&&this.resolvedToolUseIds.delete(e)}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(e){this.prependedLines.push(T({type:`user`,content:e,uuid:``,session_id:``,message:{role:`user`,content:e},parent_tool_use_id:null})+`
2
- `)}async*read(){let e=``,t=async function*(){for(;;){this.prependedLines.length>0&&(e=this.prependedLines.join(``)+e,this.prependedLines=[]);let t=e.indexOf(`
3
- `);if(t===-1)break;let n=e.slice(0,t);e=e.slice(t+1);let r=await this.processLine(n);r&&(Oe(`info`,`cli_stdin_message_parsed`,{type:r.type}),yield r)}}.bind(this);yield*t();for await(let n of this.input)e+=n,yield*t();if(e){let t=await this.processLine(e);t&&(yield t)}this.inputClosed=!0;for(let e of this.pendingRequests.values())e.reject(Error(`Tool permission stream closed before response received`))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map(e=>e.request).filter(e=>e.request.subtype===`can_use_tool`)}setUnexpectedResponseCallback(e){this.unexpectedResponseCallback=e}injectControlResponse(e){let t=e.response,n=t?.request_id;if(!n)return;let r=this.pendingRequests.get(n);if(r)if(this.trackResolvedToolUseId(r.request),this.pendingRequests.delete(n),this.write({type:`control_cancel_request`,request_id:n}),t.subtype===`error`)r.reject(Error(t.error));else{let e=t.response;if(r.schema)try{r.resolve(r.schema.parse(e))}catch(e){r.reject(e)}else r.resolve({})}}setOnControlRequestSent(e){this.onControlRequestSent=e}setOnControlRequestResolved(e){this.onControlRequestResolved=e}async processLine(e){if(e)try{let t=ze(xe(e));if(t.type===`keep_alive`)return;if(t.type===`update_environment_variables`){let e=t.variables??{},n=Object.keys(e);for(let[t,n]of Object.entries(e))process.env[t]=n;w(`[structuredIO] applied update_environment_variables: ${n.join(`, `)}`);return}if(t.type===`control_response`){let e=`uuid`in t&&typeof t.uuid==`string`?t.uuid:void 0;e&&ve(e,`completed`);let n=t.response,r=this.pendingRequests.get(n.request_id);if(!r){let e=(n.subtype===`success`?n.response:void 0)?.toolUseID;if(typeof e==`string`&&this.resolvedToolUseIds.has(e)){w(`Ignoring duplicate control_response for already-resolved toolUseID=${e} request_id=${n.request_id}`);return}this.unexpectedResponseCallback&&await this.unexpectedResponseCallback(t);return}if(this.trackResolvedToolUseId(r.request),this.pendingRequests.delete(n.request_id),r.request.request.subtype===`can_use_tool`&&this.onControlRequestResolved&&this.onControlRequestResolved(n.request_id),n.subtype===`error`){r.reject(Error(n.error??`Unknown error`));return}let i=n.response;if(r.schema)try{r.resolve(r.schema.parse(i))}catch(e){r.reject(e)}else r.resolve({});return this.replayUserMessages?t:void 0}if(t.type!==`user`&&t.type!==`control_request`&&t.type!==`assistant`&&t.type!==`system`){w(`Ignoring unknown message type: ${t.type}`,{level:`warn`});return}return t.type===`control_request`?(t.request||Tr(`Error: Missing request on control_request`),t):(t.type===`assistant`||t.type===`system`||t.message?.role!==`user`&&Tr(`Error: Expected message role 'user', got '${t.message?.role}'`),t)}catch(t){console.error(`Error parsing streaming input line: ${e}: ${t}`),process.exit(1)}}async write(e){De(yr(e)+`
4
- `)}async sendRequest(e,t,n,r=O()){let i={type:`control_request`,request_id:r,request:e};if(this.inputClosed)throw Error(`Stream closed`);if(n?.aborted)throw Error(`Request aborted`);this.outbound.enqueue(i),e.subtype===`can_use_tool`&&this.onControlRequestSent&&this.onControlRequestSent(i);let a=()=>{this.outbound.enqueue({type:`control_cancel_request`,request_id:r});let e=this.pendingRequests.get(r);e&&(this.trackResolvedToolUseId(e.request),e.reject(new Se))};n&&n.addEventListener(`abort`,a,{once:!0});try{return await new Promise((n,i)=>{this.pendingRequests.set(r,{request:{type:`control_request`,request_id:r,request:e},resolve:e=>{n(e)},reject:i,schema:t})})}finally{n&&n.removeEventListener(`abort`,a),this.pendingRequests.delete(r)}}createCanUseTool(e){return async(t,n,r,i,a,o)=>{let s=o??await me(t,n,r,i,a);if(s.behavior===`allow`||s.behavior===`deny`)return s;let c=new AbortController,l=r.abortController.signal,u=()=>c.abort();l.addEventListener(`abort`,u,{once:!0});try{let i=Er(t.name,a,n,r,s.suggestions).then(e=>({source:`hook`,decision:e})),o=O();e?.(Sr(t,n,a,o));let l=this.sendRequest({subtype:`can_use_tool`,tool_name:t.name,input:n,permission_suggestions:s.suggestions,blocked_path:s.blockedPath,decision_reason:xr(s.decisionReason),tool_use_id:a,agent_id:r.agentId},Q(),c.signal,o).then(e=>({source:`sdk`,result:e})),u=await Promise.race([i,l]);return u.source===`hook`?u.decision?(l.catch(()=>{}),c.abort(),u.decision):$((await l).result,t,n,r):$(u.result,t,n,r)}catch(e){return $({behavior:`deny`,message:`Tool permission request failed: ${e}`,toolUseID:a},t,n,r)}finally{this.getPendingPermissionRequests().length===0&&Re(`running`),l.removeEventListener(`abort`,u)}}}createHookCallback(e,t){return{type:`callback`,timeout:t,callback:async(t,n,r)=>{try{return await this.sendRequest({subtype:`hook_callback`,callback_id:e,input:t,tool_use_id:n||void 0},fe(),r)}catch(t){return console.error(`Error in hook callback ${e}:`,t),{}}}}}async handleElicitation(e,t,n,r,i,a,o){try{return await this.sendRequest({subtype:`elicitation`,mcp_server_name:e,message:t,mode:i,url:a,elicitation_id:o,requested_schema:n},lr(),r)}catch{return{action:`cancel`}}}createSandboxAskCallback(){return async e=>{try{return(await this.sendRequest({subtype:`can_use_tool`,tool_name:br,input:{host:e.host},tool_use_id:O(),description:`Allow network connection to ${e.host}?`},Q())).behavior===`allow`}catch{return!1}}}async sendMcpMessage(e,t){return(await this.sendRequest({subtype:`mcp_message`,server_name:e,message:t},r({mcp_response:ee()}))).mcp_response}};function Tr(e){console.error(e),process.exit(1)}async function Er(e,t,n,r,i){let a=r.getAppState().toolPermissionContext.mode,o=ce(e,t,n,r,a,i,r.abortController.signal);for await(let e of o)if(e.permissionRequestResult&&(e.permissionRequestResult.behavior===`allow`||e.permissionRequestResult.behavior===`deny`)){let t=e.permissionRequestResult;if(t.behavior===`allow`){let e=t.updatedInput||n,i=t.updatedPermissions??[];if(i.length>0){x(i);let e=y(r.getAppState().toolPermissionContext,i);r.setAppState(t=>t.toolPermissionContext===e?t:{...t,toolPermissionContext:e})}return{behavior:`allow`,updatedInput:e,userModified:!1,decisionReason:{type:`hook`,hookName:`PermissionRequest`}}}else return{behavior:`deny`,message:t.message||`Permission denied by PermissionRequest hook`,decisionReason:{type:`hook`,hookName:`PermissionRequest`}}}}ge();function Dr(e){if(e.type!==`user`)return;let t=e.message?.content;if(!t||Array.isArray(t)&&t.length===0)return;let n=`uuid`in e&&typeof e.uuid==`string`?e.uuid:void 0;return{content:Array.isArray(t)?Or(t):t,uuid:n}}function Or(e){return e.some(kr)?e.map(e=>{if(!kr(e))return e;let t=e.source,n=typeof t.mediaType==`string`&&t.mediaType?t.mediaType:re(e.source.data);return{...e,source:{type:`base64`,media_type:n,data:e.source.data}}}):e}function kr(e){return e.type!==`image`||e.source?.type!==`base64`?!1:!e.source.media_type}Ie(),C(),E(),ke(),pe();function Ar(e,t,n){let r=[],i=[],a=[];for(let[o,s]of Object.entries(e)){let e=t[o],c=Mr(s.source,n?.projectRoot);e?s.sourceIsFallback||Fe(c,e.source)?a.push(o):i.push({name:o,declaredSource:c,materializedSource:e.source}):r.push(o)}return{missing:r,sourceChanged:i,upToDate:a}}async function jr(e){let t=ue();if(Object.keys(t).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let n;try{n=await le()}catch(e){D(e),n={}}let r=Ar(t,n,{projectRoot:v()}),i=[...r.missing.map(e=>({name:e,source:Mr(t[e].source),action:`install`})),...r.sourceChanged.map(({name:e,declaredSource:t})=>({name:e,source:t,action:`update`}))],a=[],o=[];for(let t of i){if(e?.skip?.(t.name,t.source)){a.push(t.name);continue}if(t.action===`update`&&we(t.source)&&!await Ne(t.source.path)){w(`[reconcile] '${t.name}' declared path does not exist; keeping materialized entry`),a.push(t.name);continue}o.push(t)}if(o.length===0)return{installed:[],updated:[],failed:[],upToDate:r.upToDate,skipped:a};w(`[reconcile] ${o.length} marketplace(s): ${o.map(e=>`${e.name}(${e.action})`).join(`, `)}`);let s=[],c=[],l=[];for(let t=0;t<o.length;t++){let{name:n,source:r,action:i}=o[t];e?.onProgress?.({type:`installing`,name:n,action:i,index:t+1,total:o.length});try{let t=await oe(r);i===`install`?s.push(n):c.push(n),e?.onProgress?.({type:`installed`,name:n,alreadyMaterialized:t.alreadyMaterialized})}catch(t){let r=Ce(t);l.push({name:n,error:r}),e?.onProgress?.({type:`failed`,name:n,error:r}),D(t)}}return{installed:s,updated:c,failed:l,upToDate:r.upToDate,skipped:a}}function Mr(e,t){if((e.source===`directory`||e.source===`file`)&&!Be(e.path)){let n=t??v(),r=je(n);return{...e,path:Ve(r??n,e.path)}}return e}export{wr as a,$ as c,br as i,jr as n,yr as o,Dr as r,Q as s,Ar as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{en as t,nt as n}from"./state-ix0xIunV.js";import{$_ as r,$y as i,Cc as a,Df as o,Q_ as s,Qy as c,Sc as l,Sm as u,_m as d,fs as f,i as p,kf as m,lc as h,o as g,ps as _,uc as v,xm as y,ym as b}from"./loadAgentsDir-Clu7Uk6a.js";import{F as x,a as S,l as C,z as w}from"./debug-BrXObCdR.js";import{o as T,s as E}from"./log-BMCygSzM.js";async function D(e){C(`refreshActivePlugins: clearing all plugin caches`),h(),o();let t=await _(),[a,s]=await Promise.all([l(),p(n())]),{enabled:c,disabled:d,errors:f}=t,[m,g]=await Promise.all([Promise.all(c.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await r(e,f);return t&&(e.mcpServers=t),t?Object.keys(t).length:0})),Promise.all(c.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await u(e,f);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))]),v=m.reduce((e,t)=>e+t,0),y=g.reduce((e,t)=>e+t,0);e(e=>({...e,plugins:{...e.plugins,enabled:c,disabled:d,commands:a,errors:O(e.plugins.errors,f),needsRefresh:!1},agentDefinitions:s,mcp:{...e.mcp,pluginReconnectKey:e.mcp.pluginReconnectKey+1}})),b();let S=!1;try{await i()}catch(e){S=!0,E(e),C(`refreshActivePlugins: loadPluginHooks failed: ${x(e)}`)}let w=c.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return C(`refreshActivePlugins: ${c.length} enabled, ${a.length} commands, ${s.allAgents.length} agents, ${w} hooks, ${v} MCP, ${y} LSP`),{enabled_count:c.length,disabled_count:d.length,command_count:a.length,agent_count:s.allAgents.length,hook_count:w,mcp_count:v,lsp_count:y,error_count:f.length+ +!!S,agentDefinitions:s,pluginCommands:a}}function O(e,t){let n=e.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(t.map(k));return[...n.filter(e=>!r.has(k(e))),...t]}function k(e){return e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`}var A=e((()=>{t(),d(),g(),S(),w(),T(),v(),a(),c(),y(),s(),m(),f()}));export{D as n,A as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./axios-DaWTGg7G.js";import{A as n,E as r,M as i,P as a,n as o,r as s,t as ee}from"./lazySchema-DcIJE_0i.js";import{Ca as c,DD as l,ED as te,Sa as u,Xa as d,Za as f,wa as p}from"./loadAgentsDir-Clu7Uk6a.js";import{I as m,P as h,S as g,a as _,l as v,nt as ne,rt as re,w as y,z as ie}from"./debug-BrXObCdR.js";import{M as b,Sn as x,Tn as S,bn as C,j as w,xn as T}from"./settings-Dlp5JTa_.js";import{l as E,s as D,u as O}from"./oauth-BqJqV-2M.js";import{Bt as k,Ot as A,St as j,_n as M,ar as N,mt as P,or as F,vn as I}from"./model-BQF64tZx.js";import{createHash as L}from"crypto";import{open as R,unlink as z}from"fs/promises";t(),s(),ne(),ie(),g(),_(),ee(),O(),b(),F(),M(),k(),te(),f();function ae(){return Promise.resolve({ok:!0})}function B(){return!0}x(),u();var V=o(()=>r({uuid:i(),checksum:i(),settings:n(i(),a())})),H=1e4,U=5,W=3600*1e3,G=null,K=null,q=null,J=3e4;function oe(){K||c()&&(K=new Promise(e=>{q=e,setTimeout(()=>{q&&(v(`Remote settings: Loading promise timed out, resolving anyway`),q(),q=null)},J)}))}function se(){return`${E().BASE_API_URL}/api/claude_code/settings`}function Y(e){if(Array.isArray(e))return e.map(Y);if(typeof e==`object`&&e){let t={};for(let n of Object.keys(e).sort())t[n]=Y(e[n]);return t}return e}function ce(e){let t=y(Y(e));return`sha256:${L(`sha256`).update(t).digest(`hex`)}`}function le(){return c()}async function ue(){K&&await K}function de(){try{let{key:e}=j({skipRetrievingKeyFromApiKeyHelper:!0});if(e)return{headers:{"x-api-key":e}}}catch{}let e=A();return e?.accessToken?{headers:{Authorization:`Bearer ${e.accessToken}`,"anthropic-beta":D}}:{headers:{},error:`No authentication available`}}async function fe(e){let t=null;for(let n=1;n<=6;n++){if(t=await pe(e),t.success||t.skipRetry||n>U)return t;let r=d(n);v(`Remote settings: Retry ${n}/${U} after ${r}ms`),await I(r)}return t}async function pe(t){try{await P();let n=de();if(n.error)return{success:!1,error:`Authentication required for remote settings`,skipRetry:!0};let r=se(),i={...n.headers,"User-Agent":N()};t&&(i[`If-None-Match`]=`"${t}"`);let a=await e.get(r,{headers:i,timeout:H,validateStatus:e=>e===200||e===204||e===304||e===404});if(a.status===304)return v(`Remote settings: Using cached settings (304)`),{success:!0,settings:null,checksum:t};if(a.status===204||a.status===404)return v(`Remote settings: No settings found (${a.status})`),{success:!0,settings:{},checksum:void 0};let o=V().safeParse(a.data);if(!o.success)return v(`Remote settings: Invalid response format - ${o.error.message}`),{success:!1,error:`Invalid remote settings format`};let s=w().safeParse(o.data.settings);return s.success?(v(`Remote settings: Fetched successfully`),{success:!0,settings:s.data,checksum:o.data.checksum}):(v(`Remote settings: Settings validation failed - ${s.error.message}`),{success:!1,error:`Invalid settings structure`})}catch(e){let{kind:t,status:n,message:r}=h(e);if(n===404)return{success:!0,settings:{},checksum:``};switch(t){case`auth`:return{success:!1,error:`Not authorized for remote settings`,skipRetry:!0};case`timeout`:return{success:!1,error:`Remote settings request timeout`};case`network`:return{success:!1,error:`Cannot connect to server`};default:return{success:!1,error:r}}}}async function me(e){try{let t=T(),n=await R(t,`w`,384);try{await n.writeFile(y(e,null,2),{encoding:`utf-8`}),await n.datasync()}finally{await n.close()}v(`Remote settings: Saved to ${t}`)}catch(e){v(`Remote settings: Failed to save - ${e instanceof Error?e.message:`unknown error`}`)}}async function X(){$(),p(),K=null,q=null;try{await z(T())}catch{}}async function Z(){if(!c())return null;let e=C(),t=e?ce(e):void 0;try{let n=await fe(t);if(!n.success)return e?(v(`Remote settings: Using stale cache after fetch failure`),S(e),e):null;if(n.settings===null&&e)return v(`Remote settings: Cache still valid (304 Not Modified)`),S(e),e;let r=n.settings||{};if(Object.keys(r).length>0)return B(await ae(e,r))?(S(r),await me(r),v(`Remote settings: Applied new settings successfully`),r):(v(`Remote settings: User rejected new settings, using cached settings`),e);S(r);try{await z(T()),v(`Remote settings: Deleted cached file (404 response)`)}catch(e){m(e)!==`ENOENT`&&v(`Remote settings: Failed to delete cached file - ${e instanceof Error?e.message:`unknown error`}`)}return r}catch{return e?(v(`Remote settings: Using stale cache after error`),S(e),e):null}}async function Q(){c()&&!K&&(K=new Promise(e=>{q=e})),C()&&q&&(q(),q=null);try{let e=await Z();c()&&_e(),e!==null&&l.notifyChange(`policySettings`)}finally{q&&(q(),q=null)}}async function he(){if(await X(),!c()){l.notifyChange(`policySettings`);return}await Z(),v(`Remote settings: Refreshed after auth change`),l.notifyChange(`policySettings`)}async function ge(){if(!c())return;let e=C(),t=e?y(e):null;try{await Z();let e=C();(e?y(e):null)!==t&&(v(`Remote settings: Changed during background poll`),l.notifyChange(`policySettings`))}catch{}}function _e(){G===null&&c()&&(G=setInterval(()=>{ge()},W),G.unref(),re(async()=>$()))}function $(){G!==null&&(clearInterval(G),G=null)}export{he as a,Q as i,oe as n,ue as o,le as r,X as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{en as t,ht as n}from"./state-ix0xIunV.js";import{Ao as r,Er as i,hi as a,jr as o,vi as s,zo as c}from"./loadAgentsDir-Clu7Uk6a.js";import{a as l,i as u,r as d}from"./bridgeConfig-5p_w4s5r.js";import{n as f,t as p}from"./generateSessionName-CN1oh7Fa.js";async function m(e,t,o){let c;if(!o||o.trim()===``){let n=await p(r(t.messages),t.abortController.signal);if(!n)return e(`Could not generate a name: no conversation context yet. Usage: /rename <name>`,{display:`system`}),null;c=n}else c=o.trim();let l=n(),f=i();await s(l,c,f);let m=t.getAppState().replBridgeSessionId;if(m){let e=u();import(`./createSession-DUfOAeyE.js`).then(({updateBridgeSessionTitle:t})=>t(m,c,{baseUrl:d(),getAccessToken:e?()=>e:void 0}).catch(()=>{}))}return await a(l,c,f),t.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:c}})),e(`Session renamed to: ${c}`,{display:`system`}),null}e((()=>{t(),l(),c(),o(),f()}))();export{m as call};
@@ -1 +0,0 @@
1
- import{SD as e,yD as t}from"./loadAgentsDir-Clu7Uk6a.js";e();export{t as SandboxManager};
@@ -1 +0,0 @@
1
- import{Yc as e,Zc as t}from"./loadAgentsDir-Clu7Uk6a.js";e();export{t as isSearchExtraToolsEnabled};
@@ -1 +0,0 @@
1
- import{xu as e,yu as t}from"./loadAgentsDir-Clu7Uk6a.js";t();export{e as registerSessionFileAccessHooks};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./sessionMemory-btARBn8H.js";t();export{e as manuallyExtractSessionMemory};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{B as r,en as i}from"./state-ix0xIunV.js";import{Al as a,Bc as o,DE as s,Dl as c,EE as l,El as u,Fn as d,In as f,Ln as ee,Lo as p,ME as te,Ml as m,NE as ne,So as h,Vc as re,Xw as g,Yw as _,ZT as ie,_E as v,bE as ae,cl as oe,dE as se,fE as ce,fl as y,gE as b,hE as le,jE as ue,kE as x,lE as de,lt as S,mE as C,ml as w,pE as T,pl as E,sE as D,sl as O,ut as k,vE as A,xE as j,yE as M,zo as N}from"./loadAgentsDir-Clu7Uk6a.js";import{F as P,I as F,d as I,p as L,z as R}from"./debug-BrXObCdR.js";import{_n as z,gn as B}from"./settings-Dlp5JTa_.js";import{n as V,r as H}from"./analytics-BotDBGh0.js";import{mi as fe,pi as pe}from"./model-BQF64tZx.js";import{fn as U,hn as me}from"./prompt-Bg_1U0gO.js";import{st as he}from"./rcDebugLog-VKwMl0yg.js";import{writeFile as W}from"fs/promises";function ge(){return!1}function _e(){return{}}function ve(e,t){let n=0,r=t==null;for(let i of e){if(!r){i.uuid===t&&(r=!0);continue}if(i.type===`assistant`){let e=i.message.content;Array.isArray(e)&&(n+=B(e,e=>e.type===`tool_use`))}}return n}function G(e){let t=x(e);if(!le()){if(!ce(t))return!1;A()}let n=T(t),r=ve(e,X)>=se(),i=p(e);if(n&&r||n&&!i){let t=e[e.length-1];return t?.uuid&&(X=t.uuid),!0}return!1}async function K(e){let t=I(),n=d();await t.mkdir(n,{mode:448});let r=f();try{await W(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await W(r,await w(),{encoding:`utf-8`,mode:384})}catch(e){if(F(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await o.call({file_path:r},e),a=``,s=i.data;return s.type===`text`&&(a=s.file.content),H(`tengu_session_memory_file_read`,{content_length:a.length}),{memoryPath:r,currentMemory:a}}function ye(){if(r())return;let e=oe();process.env.USER_TYPE===`ant`&&H(`tengu_session_memory_init`,{auto_compact_enabled:e}),e&&g($)}async function q(e,t){if(e.length===0)return{success:!1,error:`No messages to summarize`};v();try{let n=c(t),{memoryPath:r,currentMemory:i}=await K(n),a=await y(i,r),{tools:o,mainLoopModel:s}=t.options,[l,u,d]=await Promise.all([S(o,s),te(),ue()]),f=he(l);return await m({promptMessages:[h({content:a})],cacheSafeParams:{systemPrompt:f,userContext:u,systemContext:d,toolUseContext:n,forkContextMessages:e},canUseTool:J(r),querySource:`session_memory`,forkLabel:`session_memory_manual`,overrides:{readFileState:n.readFileState}}),H(`tengu_session_memory_manual_extraction`,{}),M(x(e)),Y(e),{success:!0,memoryPath:r}}catch(e){return{success:!1,error:P(e)}}finally{b()}}function J(e){return async(t,n)=>{if(t.name===`Edit`&&typeof n==`object`&&n&&`file_path`in n){let t=n.file_path;if(typeof t==`string`&&t===e)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${U} on ${e} is allowed`,decisionReason:{type:`other`,reason:`only ${U} on ${e} is allowed`}}}}function Y(e){if(!p(e)){let t=e[e.length-1];t?.uuid&&ae(t.uuid)}}var X,Z,Q,$,be=e((()=>{n(),i(),k(),ne(),me(),re(),z(),a(),L(),_(),N(),ee(),pe(),ie(),s(),V(),O(),E(),C(),R(),Z=t(()=>{let e=_e();j({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:D.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:D.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:D.toolCallsBetweenUpdates})}),Q=!1,$=fe(async function(e){let{messages:t,toolUseContext:n,querySource:r}=e;if(r!==`repl_main_thread`)return;{let{isPoorModeActive:e}=await import(`./poorMode-qlxqU8Hm.js`);if(e())return}if(!ge()){process.env.USER_TYPE===`ant`&&!Q&&(Q=!0,H(`tengu_session_memory_gate_disabled`,{}));return}if(Z(),!G(t))return;v();let i=c(n),{memoryPath:a,currentMemory:o}=await K(i);await m({promptMessages:[h({content:await y(o,a)})],cacheSafeParams:u(e),canUseTool:J(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],d=s?l(s):void 0,f=de();H(`tengu_session_memory_extraction`,{input_tokens:d?.input_tokens,output_tokens:d?.output_tokens,cache_read_input_tokens:d?.cache_read_input_tokens??void 0,cache_creation_input_tokens:d?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:f.minimumMessageTokensToInit,config_min_tokens_between_update:f.minimumTokensBetweenUpdate,config_tool_calls_between_updates:f.toolCallsBetweenUpdates}),M(x(t)),Y(t),b()})}));export{G as a,q as i,ye as n,be as r,J as t};
@@ -1 +0,0 @@
1
- import{mE as e,uE as t}from"./loadAgentsDir-Clu7Uk6a.js";e();export{t as getSessionMemoryContent};
@@ -1 +0,0 @@
1
- import{i as e,r as t}from"./sessionObserver-CSOYgsvH.js";e();export{t as heuristicObserverBackend};
@@ -1 +0,0 @@
1
- import{Rr as e,jr as t,si as n}from"./loadAgentsDir-Clu7Uk6a.js";t();export{e as linkSessionToPR,n as recordTranscript};
@@ -1,19 +0,0 @@
1
- import{a as e,n as t,r as n}from"./rolldown-runtime-DaDcL9Zw.js";import{c as r,i,n as a,r as o,s,t as c}from"./isObject-C6qM3WEW.js";import{d as l,f as ee,g as te,h as u,l as d,n as f,t as p,u as ne}from"./memoize-BK3gG5ob.js";import{l as m,n as re,o as ie}from"./envUtils-DSxRz_kt.js";import{i as ae,r as oe}from"./isSymbol-BO6cdPI7.js";import{A as h,E as g,H as se,M as _,N as v,O as ce,P as le,S as y,T as b,c as ue,d as x,g as S,h as C,i as de,j as fe,k as pe,l as me,n as w,p as he,r as T,t as E,v as ge,x as _e}from"./lazySchema-DcIJE_0i.js";import{Ar as ve,Ci as ye,Dr as be,Er as xe,Gi as Se,Ir as Ce,Kt as we,Lr as Te,M as Ee,Mi as De,N as Oe,Ni as ke,Nr as Ae,Or as je,Ri as Me,Si as Ne,Tr as Pe,Wi as Fe,ai as Ie,bi as Le,ci as Re,di as ze,en as Be,fi as Ve,ii as He,jr as Ue,kr as We,li as Ge,nt as Ke,oi as qe,pi as Je,si as Ye,ui as Xe,v as Ze,vi as Qe,wr as $e,xi as et,yi as tt,zi as nt}from"./state-ix0xIunV.js";import{n as rt,t as it}from"./cwd-CYmmnQVS.js";import{C as at,I as ot,S as st,V as ct,_ as lt,a as ut,d as D,l as dt,p as ft,w as pt,x as mt,z as ht}from"./debug-BrXObCdR.js";import{M as gt,_ as _t,j as vt,t as yt}from"./git-Do0wJvux.js";import{n as bt,r as xt}from"./execFileNoThrow-D244NytW.js";import{o as St,s as Ct}from"./log-BMCygSzM.js";import{n as wt,t as Tt}from"./which-CKQnSouy.js";import{i as Et,o as Dt}from"./platform-BrYefG_2.js";import{C as Ot,D as O,E as kt,f as At}from"./file-DcZWPH2V.js";import{a as jt,f as Mt,p as Nt,r as Pt,s as Ft,u as k}from"./types-C-MRCL8J.js";import{i as It,n as Lt}from"./startupProfiler-xa3NmN7Z.js";import{c as Rt,u as zt}from"./oauth-BqJqV-2M.js";import{r as Bt,t as Vt}from"./bundledMode--fG1S62b.js";import{f as Ht,l as Ut,n as Wt,o as Gt,p as Kt}from"./stringUtils-DGLPkqJ4.js";import{i as qt,r as Jt,t as Yt}from"./permissions-Cn_6f8CB.js";import{homedir as Xt,userInfo as Zt}from"os";import{dirname as Qt,join as A,resolve as $t}from"path";import{existsSync as en}from"fs";import{appendFile as tn,mkdir as nn,readFile as rn,writeFile as an}from"fs/promises";import{execFile as on}from"child_process";var sn,cn=t((()=>{ee(),sn=function(){try{var e=l(Object,`defineProperty`);return e({},``,{}),e}catch{}}()}));function ln(e,t,n){t==`__proto__`&&sn?sn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var un=t((()=>{cn()}));function dn(e,t,n){var r=e[t];(!(fn.call(e,t)&&d(r,n))||n===void 0&&!(t in e))&&ln(e,t,n)}var fn,pn=t((()=>{un(),ne(),fn=Object.prototype.hasOwnProperty}));function mn(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?ln(n,s,c):dn(n,s,c)}return n}var hn=t((()=>{pn(),un()}));function gn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var _n=t((()=>{}));function vn(e){if(!a(e))return gn(e);var t=Ge(e),n=[];for(var r in e)r==`constructor`&&(t||!yn.call(e,r))||n.push(r);return n}var yn,bn=t((()=>{c(),Re(),_n(),yn=Object.prototype.hasOwnProperty}));function xn(e){return Ie(e)?Xe(e,!0):vn(e)}var Sn=t((()=>{ze(),bn(),He()}));function Cn(e,t){if(t)return e.slice();var n=e.length,r=Dn?Dn(n):new e.constructor(n);return e.copy(r),r}var wn,Tn,En,Dn,On=t((()=>{s(),wn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Tn=wn&&typeof module==`object`&&module&&!module.nodeType&&module,En=Tn&&Tn.exports===wn?r.Buffer:void 0,Dn=En?En.allocUnsafe:void 0}));function kn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var An=t((()=>{})),jn,Mn=t((()=>{qe(),jn=Ye(Object.getPrototypeOf,Object)}));function Nn(e){var t=new e.constructor(e.byteLength);return new Me(t).set(new Me(e)),t}var Pn=t((()=>{nt()}));function Fn(e,t){var n=t?Nn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var In=t((()=>{Pn()})),Ln,Rn,zn=t((()=>{c(),Ln=Object.create,Rn=function(){function e(){}return function(t){if(!a(t))return{};if(Ln)return Ln(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function Bn(e){return typeof e.constructor==`function`&&!Ge(e)?Rn(jn(e)):{}}var Vn=t((()=>{zn(),Mn(),Re()}));function Hn(e,t,n){(n!==void 0&&!d(e[t],n)||n===void 0&&!(t in e))&&ln(e,t,n)}var Un=t((()=>{un(),ne()}));function Wn(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Gn=t((()=>{})),Kn,qn=t((()=>{Gn(),Kn=Wn()}));function Jn(e){return ae(e)&&Ie(e)}var Yn=t((()=>{He(),oe()}));function Xn(e){if(!ae(e)||o(e)!=Zn)return!1;var t=jn(e);if(t===null)return!0;var n=tr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&er.call(n)==nr}var Zn,Qn,$n,er,tr,nr,rr=t((()=>{i(),Mn(),oe(),Zn=`[object Object]`,Qn=Function.prototype,$n=Object.prototype,er=Qn.toString,tr=$n.hasOwnProperty,nr=er.call(Object)}));function ir(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var ar=t((()=>{}));function or(e){return mn(e,xn(e))}var sr=t((()=>{hn(),Sn()}));function cr(e,t,n,r,i,o,s){var c=ir(e,n),l=ir(t,n),ee=s.get(l);if(ee){Hn(e,n,ee);return}var u=o?o(c,l,n+``,e,t,s):void 0,d=u===void 0;if(d){var f=ke(l),p=!f&&et(l),ne=!f&&!p&&Je(l);u=l,f||p||ne?ke(c)?u=c:Jn(c)?u=kn(c):p?(d=!1,u=Cn(l,!0)):ne?(d=!1,u=Fn(l,!0)):u=[]:Xn(l)||ye(l)?(u=c,ye(c)?u=or(c):(!a(c)||te(c))&&(u=Bn(l))):d=!1}d&&(s.set(l,u),i(u,l,r,o,s),s.delete(l)),Hn(e,n,u)}var lr=t((()=>{Un(),On(),In(),An(),Vn(),Ne(),De(),Yn(),Le(),u(),c(),rr(),Ve(),ar(),sr()}));function ur(e,t,n,r,i){e!==t&&Kn(t,function(o,s){if(i||(i=new Fe),a(o))cr(e,t,s,n,ur,r,i);else{var c=r?r(ir(e,s),o,s+``,e,t,i):void 0;c===void 0&&(c=o),Hn(e,s,c)}},xn)}var dr=t((()=>{Se(),Un(),qn(),lr(),c(),Sn(),ar()}));function fr(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var pr=t((()=>{}));function mr(e,t,n){return t=hr(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=hr(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),fr(e,this,s)}}var hr,gr=t((()=>{pr(),hr=Math.max}));function _r(e){return function(){return e}}var vr=t((()=>{})),yr,br=t((()=>{vr(),cn(),Te(),yr=sn?function(e,t){return sn(e,`toString`,{configurable:!0,enumerable:!1,value:_r(t),writable:!0})}:Ce}));function xr(e){var t=0,n=0;return function(){var r=wr(),i=Cr-(r-n);if(n=r,i>0){if(++t>=Sr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Sr,Cr,wr,Tr=t((()=>{Sr=800,Cr=16,wr=Date.now})),Er,Dr=t((()=>{br(),Tr(),Er=xr(yr)}));function Or(e,t){return Er(mr(e,t,Ce),e+``)}var kr=t((()=>{Te(),gr(),Dr()}));function Ar(e,t,n){if(!a(n))return!1;var r=typeof t;return(r==`number`?Ie(n)&&tt(t,n.length):r==`string`&&t in n)?d(n[t],e):!1}var jr=t((()=>{ne(),He(),Qe(),c()}));function Mr(e){return Or(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Ar(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Nr=t((()=>{kr(),jr()})),j,Pr=t((()=>{dr(),Nr(),j=Mr(function(e,t,n,r){ur(e,t,n,r)})}));function Fr(e){M=e}function Ir(){M=null,Hr=void 0}function Lr(e){return Hr=e,e}function Rr(){return A(re(),Vr)}function zr(){try{let e=at(Nt(O(Rr())));return!e||typeof e!=`object`||Array.isArray(e)?null:e}catch{return null}}function Br(){if(Hr!==!0)return null;if(M)return M;let e=zr();return e?(M=e,We(),e):null}var Vr,M,Hr,Ur=t((()=>{ie(),kt(),Mt(),je(),st(),Vr=`remote-settings.json`,M=null}));function Wr(e,t){return e.flatMap((e,n)=>n?[t(n),e]:[e])}function Gr(e,t){let n=0;for(let r of e)n+=+!!t(r);return n}function Kr(e){return[...new Set(e)]}var qr=t((()=>{}));async function Jr(e,t){let{code:n}=await bt(`git`,[`check-ignore`,e],{preserveOutputOnError:!1,cwd:t});return n===0}function Yr(){return A(Xt(),`.config`,`git`,`ignore`)}async function Xr(e,t=it()){try{if(!await yt(t))return;let n=`**/${e}`;if(await Jr(e.endsWith(`/`)?`${e}sample-file.txt`:e,t))return;let r=Yr();await nn(Qt(r),{recursive:!0});try{if((await rn(r,{encoding:`utf-8`})).includes(n))return;await tn(r,`\n${n}\n`)}catch(e){if(ot(e)===`ENOENT`)await an(r,`${n}\n`,`utf-8`);else throw e}}catch(e){Ct(e)}}var Zr=t((()=>{rt(),ht(),xt(),_t(),St()}));function Qr(e){switch(e){case`userSettings`:return`user`;case`projectSettings`:return`project`;case`localSettings`:return`project, gitignored`;case`flagSettings`:return`cli flag`;case`policySettings`:return`managed`}}function $r(e){switch(e){case`userSettings`:return`User`;case`projectSettings`:return`Project`;case`localSettings`:return`Local`;case`flagSettings`:return`Flag`;case`policySettings`:return`Managed`;case`plugin`:return`Plugin`;case`built-in`:return`Built-in`}}function ei(e){switch(e){case`userSettings`:return`user settings`;case`projectSettings`:return`shared project settings`;case`localSettings`:return`project local settings`;case`flagSettings`:return`command line arguments`;case`policySettings`:return`enterprise managed settings`;case`cliArg`:return`CLI argument`;case`command`:return`command configuration`;case`session`:return`current session`}}function ti(e){switch(e){case`userSettings`:return`User settings`;case`projectSettings`:return`Shared project settings`;case`localSettings`:return`Project local settings`;case`flagSettings`:return`Command line arguments`;case`policySettings`:return`Enterprise managed settings`;case`cliArg`:return`CLI argument`;case`command`:return`Command configuration`;case`session`:return`Current session`}}function ni(e){if(e===``)return[];let t=e.split(`,`).map(e=>e.trim()),n=[];for(let e of t)switch(e){case`user`:n.push(`userSettings`);break;case`project`:n.push(`projectSettings`);break;case`local`:n.push(`localSettings`);break;default:throw Error(`Invalid setting source: ${e}. Valid options are: user, project, local`)}return n}function N(){let e=Ze(),t=new Set(e);return t.add(`policySettings`),t.add(`flagSettings`),Array.from(t)}function ri(e){return N().includes(e)}var ii,ai,oi,si=t((()=>{Be(),ii=[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],ai=[`localSettings`,`projectSettings`,`userSettings`],oi=`https://json.schemastore.org/claude-code-settings.json`}));function ci(e){P.set(e,Date.now())}function li(e,t){let n=P.get(e);return n!==void 0&&Date.now()-n<t?(P.delete(e),!0):!1}function ui(){P.clear()}var P,di=t((()=>{P=new Map})),F,I,fi=t((()=>{p(),Dt(),F=f(function(){if(process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_MANAGED_SETTINGS_PATH)return process.env.CLAUDE_CODE_MANAGED_SETTINGS_PATH;switch(Et()){case`macos`:return`/Library/Application Support/ClaudeCode`;case`windows`:return`C:\\Program Files\\ClaudeCode`;default:return`/etc/claude-code`}}),I=f(function(){return A(F(),`managed-settings.d`)})})),pi,mi,hi,gi=t((()=>{T(),E(),pi=w(()=>g({allowedDomains:C(_()).optional(),allowManagedDomainsOnly:S().optional().describe(`When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources.`),allowUnixSockets:C(_()).optional().describe(`macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path).`),allowAllUnixSockets:S().optional().describe(`If true, allow all Unix sockets (disables blocking on both platforms).`),allowLocalBinding:S().optional(),httpProxyPort:b().optional(),socksProxyPort:b().optional()}).optional()),mi=w(()=>g({allowWrite:C(_()).optional().describe(`Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules.`),denyWrite:C(_()).optional().describe(`Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules.`),denyRead:C(_()).optional().describe(`Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules.`),allowRead:C(_()).optional().describe(`Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths.`),allowManagedReadPathsOnly:S().optional().describe(`When true (set in managed settings), only allowRead paths from policySettings are used.`)}).optional()),hi=w(()=>g({enabled:S().optional(),failIfUnavailable:S().optional().describe(`Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate.`),autoAllowBashIfSandboxed:S().optional(),allowUnsandboxedCommands:S().optional().describe(`Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true.`),network:pi(),filesystem:mi(),ignoreViolations:h(_(),C(_())).optional(),enableWeakerNestedSandbox:S().optional(),enableWeakerNetworkIsolation:S().optional().describe(`macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. **Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false`),excludedCommands:C(_()).optional(),ripgrep:g({command:_(),args:C(_()).optional()}).optional().describe(`Custom ripgrep configuration for bundled ripgrep support`)}).passthrough())}));async function L(e){try{return!!await wt(e)}catch{return!1}}function _i(){return process.env.__CFBundleIdentifier===`com.conductor.app`}function vi(){if(process.env.CURSOR_TRACE_ID||process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`cursor`))return`cursor`;if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`windsurf`))return`windsurf`;if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes(`antigravity`))return`antigravity`;let e=process.env.__CFBundleIdentifier?.toLowerCase();if(e?.includes(`vscodium`))return`codium`;if(e?.includes(`windsurf`))return`windsurf`;if(e?.includes(`com.google.android.studio`))return`androidstudio`;if(e){for(let t of Di)if(e.includes(t))return t}if(process.env.VisualStudioVersion)return`visualstudio`;if(process.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`)return process.platform,`pycharm`;if(process.env.TERM===`xterm-ghostty`)return`ghostty`;if(process.env.TERM?.includes(`kitty`))return`kitty`;if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return`tmux`;if(process.env.STY)return`screen`;if(process.env.KONSOLE_VERSION)return`konsole`;if(process.env.GNOME_TERMINAL_SERVICE)return`gnome-terminal`;if(process.env.XTERM_VERSION)return`xterm`;if(process.env.VTE_VERSION)return`vte-based`;if(process.env.TERMINATOR_UUID)return`terminator`;if(process.env.KITTY_WINDOW_ID)return`kitty`;if(process.env.ALACRITTY_LOG)return`alacritty`;if(process.env.TILIX_ID)return`tilix`;if(process.env.WT_SESSION)return`windows-terminal`;if(process.env.SESSIONNAME&&process.env.TERM===`cygwin`)return`cygwin`;if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return`conemu`;if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(yi())return`ssh-session`;if(process.env.TERM){let e=process.env.TERM;return e.includes(`alacritty`)?`alacritty`:e.includes(`rxvt`)?`rxvt`:e.includes(`termite`)?`termite`:process.env.TERM}return process.stdout.isTTY?null:`non-interactive`}function yi(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function bi(){let e=process.env.CLAUDE_CODE_HOST_PLATFORM;return e===`win32`||e===`darwin`||e===`linux`?e:R.platform}var xi,Si,Ci,wi,Ti,Ei,Di,Oi,R,ki=t((()=>{p(),zt(),Vt(),ie(),Kt(),ft(),Tt(),xi=f(()=>{if(D().existsSync(A(re(),`.config.json`)))return A(re(),`.config.json`);let e=`.claude${Rt()}.json`;return A(process.env.CLAUDE_CONFIG_DIR||Xt(),e)}),Si=f(async()=>{try{let{default:e}=await import(`./axios-BHBm_hhU.js`);return await e.head(`http://1.1.1.1`,{signal:AbortSignal.timeout(1e3)}),!0}catch{return!1}}),Ci=f(async()=>{let e=[];return await L(`npm`)&&e.push(`npm`),await L(`yarn`)&&e.push(`yarn`),await L(`pnpm`)&&e.push(`pnpm`),e}),wi=f(async()=>{let e=[];return await L(`bun`)&&e.push(`bun`),await L(`deno`)&&e.push(`deno`),await L(`node`)&&e.push(`node`),e}),Ti=f(()=>{try{return D().existsSync(`/proc/sys/fs/binfmt_misc/WSLInterop`)}catch{return!1}}),Ei=f(()=>{try{if(!Ti())return!1;let{cmd:e}=Ht(`npm`,[]);return e.startsWith(`/mnt/c/`)}catch{return!1}}),Di=[`pycharm`,`intellij`,`webstorm`,`phpstorm`,`rubymine`,`clion`,`goland`,`rider`,`datagrip`,`appcode`,`dataspell`,`aqua`,`gateway`,`fleet`,`jetbrains`,`androidstudio`],Oi=f(()=>{if(m(process.env.CODESPACES))return`codespaces`;if(process.env.GITPOD_WORKSPACE_ID)return`gitpod`;if(process.env.REPL_ID||process.env.REPL_SLUG)return`replit`;if(process.env.PROJECT_DOMAIN)return`glitch`;if(m(process.env.VERCEL))return`vercel`;if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return`railway`;if(m(process.env.RENDER))return`render`;if(m(process.env.NETLIFY))return`netlify`;if(process.env.DYNO)return`heroku`;if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return`fly.io`;if(m(process.env.CF_PAGES))return`cloudflare-pages`;if(process.env.DENO_DEPLOYMENT_ID)return`deno-deploy`;if(process.env.AWS_LAMBDA_FUNCTION_NAME)return`aws-lambda`;if(process.env.AWS_EXECUTION_ENV===`AWS_ECS_FARGATE`)return`aws-fargate`;if(process.env.AWS_EXECUTION_ENV===`AWS_ECS_EC2`)return`aws-ecs`;try{if(D().readFileSync(`/sys/hypervisor/uuid`,{encoding:`utf8`}).trim().toLowerCase().startsWith(`ec2`))return`aws-ec2`}catch{}if(process.env.K_SERVICE)return`gcp-cloud-run`;if(process.env.GOOGLE_CLOUD_PROJECT)return`gcp`;if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return`azure-app-service`;if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return`azure-functions`;if(process.env.APP_URL?.includes(`ondigitalocean.app`))return`digitalocean-app-platform`;if(process.env.SPACE_CREATOR_USER_ID)return`huggingface-spaces`;if(m(process.env.GITHUB_ACTIONS))return`github-actions`;if(m(process.env.GITLAB_CI))return`gitlab-ci`;if(process.env.CIRCLECI)return`circleci`;if(process.env.BUILDKITE)return`buildkite`;if(m(process.env.CI))return`ci`;if(process.env.KUBERNETES_SERVICE_HOST)return`kubernetes`;try{if(D().existsSync(`/.dockerenv`))return`docker`}catch{}return R.platform===`darwin`?`unknown-darwin`:R.platform===`linux`?`unknown-linux`:R.platform===`win32`?`unknown-win32`:`unknown`}),R={hasInternetAccess:Si,isCI:m(process.env.CI),platform:[`win32`,`darwin`].includes(process.platform)?process.platform:`linux`,arch:process.arch,nodeVersion:process.version,terminal:vi(),isSSH:yi,getPackageManagers:Ci,getRuntimes:wi,isRunningWithBun:f(Bt),isWslEnvironment:Ti,isNpmFromWindowsPath:Ei,isConductor:_i,detectDeploymentEnvironment:Oi}})),Ai,ji,Mi,Ni=t((()=>{ki(),Ai=R.platform===`darwin`?`⏺`:`●`,ji=[`·|·`,`·/·`,`·—·`,`·\\·`],Mi=`·✔︎·`}));function Pi(e){return process.env.USER_TYPE!==`ant`||e!==`auto`&&e!==`bubble`}function z(e){return Ui[e]??Ui.default}function Fi(e){return z(e).external}function Ii(e){return Jt.includes(e)?e:`default`}function Li(e){return z(e).title}function Ri(e){return e==="default"||e===void 0}function zi(e){return z(e).shortTitle}function Bi(e){return z(e).symbol}function Vi(e){return z(e).color}var Hi,Ui,Wi=t((()=>{T(),Ni(),qt(),E(),w(()=>de.enum(Jt)),Hi=w(()=>de.enum(Yt)),Ui={default:{title:`Default`,shortTitle:`Default`,symbol:``,color:`text`,external:`default`},plan:{title:`Plan Mode`,shortTitle:`Plan`,symbol:`⏸`,color:`planMode`,external:`plan`},acceptEdits:{title:`Accept edits`,shortTitle:`Accept`,symbol:`⏵⏵`,color:`autoAccept`,external:`acceptEdits`},bypassPermissions:{title:`Bypass`,shortTitle:`Bypass`,symbol:`⏵⏵`,color:`error`,external:`bypassPermissions`},dontAsk:{title:`Don't Ask`,shortTitle:`DontAsk`,symbol:`⏵⏵`,color:`error`,external:`dontAsk`},auto:{title:`Auto`,shortTitle:`Auto`,symbol:`⏵⏵`,color:`warning`,external:`default`}}})),Gi,Ki=t((()=>{Gi=`PreToolUse.PostToolUse.PostToolUseFailure.Notification.UserPromptSubmit.SessionStart.SessionEnd.Stop.StopFailure.SubagentStart.SubagentStop.PreCompact.PostCompact.PermissionRequest.PermissionDenied.Setup.TeammateIdle.TaskCreated.TaskCompleted.Elicitation.ElicitationResult.ConfigChange.WorktreeCreate.WorktreeRemove.InstructionsLoaded.CwdChanged.FileChanged`.split(`.`)})),qi,Ji,Yi=t((()=>{qi=[`bash`,`powershell`],Ji=`bash`}));function Xi(){return{BashCommandHookSchema:g({type:y(`command`).describe(`Shell command hook type`),command:_().describe(`Shell command to execute`),if:B(),shell:x(qi).optional().describe(`Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash.`),timeout:b().positive().optional().describe(`Timeout in seconds for this specific command`),statusMessage:_().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`),async:S().optional().describe(`If true, hook runs in background without blocking`),asyncRewake:S().optional().describe(`If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.`)}),PromptHookSchema:g({type:y(`prompt`).describe(`LLM prompt hook type`),prompt:_().describe(`Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON.`),if:B(),timeout:b().positive().optional().describe(`Timeout in seconds for this specific prompt evaluation`),model:_().optional().describe(`Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.`),statusMessage:_().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`)}),HttpHookSchema:g({type:y(`http`).describe(`HTTP hook type`),url:_().url().describe(`URL to POST the hook input JSON to`),if:B(),timeout:b().positive().optional().describe(`Timeout in seconds for this specific request`),headers:h(_(),_()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:C(_()).optional().describe(`Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work.`),statusMessage:_().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`)}),AgentHookSchema:g({type:y(`agent`).describe(`Agentic verifier hook type`),prompt:_().describe(`Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.`),if:B(),timeout:b().positive().optional().describe(`Timeout in seconds for agent execution (default 60)`),model:_().optional().describe(`Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.`),statusMessage:_().optional().describe(`Custom status message to display in spinner while hook runs`),once:S().optional().describe(`If true, hook runs once and is removed after execution`)})}}var B,Zi,Qi,V,$i=t((()=>{Ki(),T(),E(),Yi(),B=w(()=>_().optional().describe(`Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.`)),Zi=w(()=>{let{BashCommandHookSchema:e,PromptHookSchema:t,AgentHookSchema:n,HttpHookSchema:r}=Xi();return ge(`type`,[e,t,n,r])}),Qi=w(()=>g({matcher:_().optional().describe(`String pattern to match (e.g. tool names like "Write")`),hooks:C(Zi()).describe(`List of hooks to execute when the matcher matches`)})),V=w(()=>ce(x(Gi),C(Qi())))}));function ea(e,t){let n=e.toLowerCase();return t.autoUpdate??(H.has(n)&&!aa.has(n))}function ta(e){return H.has(e.toLowerCase())?!1:sa.test(e)?!0:oa.test(e)}function na(e,t){let n=e.toLowerCase();if(!H.has(n))return null;if(t.source===`github`)return(t.repo||``).toLowerCase().startsWith(`anthropics/`)?null:`The name '${e}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${ca}/' can use this name.`;if(t.source===`git`&&t.url){let n=t.url.toLowerCase(),r=n.includes(`github.com/anthropics/`),i=n.includes(`git@github.com:anthropics/`);return r||i?null:`The name '${e}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${ca}/' can use this name.`}return`The name '${e}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${ca}' organization.`}function ra(e){return typeof e==`string`&&e.startsWith(`./`)}function ia(e){return e.source===`file`||e.source===`directory`}var H,aa,oa,sa,ca,U,W,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,G,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja=t((()=>{T(),$i(),jt(),E(),H=new Set([`claude-code-marketplace`,`claude-code-plugins`,`claude-plugins-official`,`anthropic-marketplace`,`anthropic-plugins`,`agent-skills`,`life-sciences`,`knowledge-work-plugins`]),aa=new Set([`knowledge-work-plugins`]),oa=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,sa=/[^\u0020-\u007E]/,ca=`anthropics`,U=w(()=>_().startsWith(`./`)),W=w(()=>U().endsWith(`.json`)),la=w(()=>v([U().refine(e=>e.endsWith(`.mcpb`)||e.endsWith(`.dxt`),{message:`MCPB file path must end with .mcpb or .dxt`}).describe(`Path to MCPB file relative to plugin root`),_().url().refine(e=>e.endsWith(`.mcpb`)||e.endsWith(`.dxt`),{message:`MCPB URL must end with .mcpb or .dxt`}).describe(`URL to MCPB file`)])),ua=w(()=>U().endsWith(`.md`)),da=w(()=>v([ua(),U()])),fa=w(()=>_().min(1,`Marketplace must have a name`).refine(e=>!e.includes(` `),{message:`Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")`}).refine(e=>!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`..`)&&e!==`.`,{message:`Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."`}).refine(e=>!ta(e),{message:`Marketplace name impersonates an official Anthropic/Claude marketplace`}).refine(e=>e.toLowerCase()!==`inline`,{message:`Marketplace name "inline" is reserved for --plugin-dir session plugins`}).refine(e=>e.toLowerCase()!==`builtin`,{message:`Marketplace name "builtin" is reserved for built-in plugins`})),pa=w(()=>g({name:_().min(1,`Author name cannot be empty`).describe(`Display name of the plugin author or organization`),email:_().optional().describe(`Contact email for support or feedback`),url:_().optional().describe(`Website, GitHub profile, or organization URL`)})),ma=w(()=>g({name:_().min(1,`Plugin name cannot be empty`).refine(e=>!e.includes(` `),{message:`Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")`}).describe(`Unique identifier for the plugin, used for namespacing (prefer kebab-case)`),version:_().optional().describe(`Semantic version (e.g., 1.2.3) following semver.org specification`),description:_().optional().describe(`Brief, user-facing explanation of what the plugin provides`),author:pa().optional().describe(`Information about the plugin creator or maintainer`),homepage:_().url().optional().describe(`Plugin homepage or documentation URL`),repository:_().optional().describe(`Source code repository URL`),license:_().optional().describe(`SPDX license identifier (e.g., MIT, Apache-2.0)`),keywords:C(_()).optional().describe(`Tags for plugin discovery and categorization`),dependencies:C(Ba()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),ha=w(()=>g({description:_().optional().describe(`Brief, user-facing explanation of what these hooks provide`),hooks:_e(()=>V()).describe(`The hooks provided by the plugin, in the same format as the one used for settings`)})),ga=w(()=>g({hooks:v([W().describe(`Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root`),_e(()=>V()).describe(`Additional hooks (in addition to those in hooks/hooks.json, if it exists)`),C(v([W().describe(`Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root`),_e(()=>V()).describe(`Additional hooks (in addition to those in hooks/hooks.json, if it exists)`)]))])})),_a=w(()=>g({source:da().optional().describe(`Path to command markdown file, relative to plugin root`),content:_().optional().describe(`Inline markdown content for the command`),description:_().optional().describe(`Command description override`),argumentHint:_().optional().describe(`Hint for command arguments (e.g., "[file]")`),model:_().optional().describe(`Default model for this command`),allowedTools:C(_()).optional().describe(`Tools allowed when command runs`)}).refine(e=>e.source&&!e.content||!e.source&&e.content,{message:`Command must have either "source" (file path) or "content" (inline markdown), but not both`})),va=w(()=>g({commands:v([da().describe(`Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root`),C(da().describe(`Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional command files or skill directories`),h(_(),_a()).describe(`Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")`)])})),ya=w(()=>g({agents:v([ua().describe(`Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root`),C(ua().describe(`Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional agent files`)])})),ba=w(()=>g({skills:v([U().describe(`Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root`),C(U().describe(`Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional skill directories`)])})),xa=w(()=>g({outputStyles:v([U().describe(`Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root`),C(U().describe(`Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root`)).describe(`List of paths to additional output styles directories or files`)])})),Sa=w(()=>_().min(1)),Ca=w(()=>_().min(2).refine(e=>e.startsWith(`.`),{message:`File extensions must start with dot (e.g., ".ts", not "ts")`})),wa=w(()=>g({mcpServers:v([W().describe(`MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)`),la().describe(`Path or URL to MCPB file containing MCP server configuration`),h(_(),Pt()).describe(`MCP server configurations keyed by server name`),C(v([W().describe(`Path to MCP servers configuration file`),la().describe(`Path or URL to MCPB file`),h(_(),Pt()).describe(`Inline MCP server configurations`)])).describe(`Array of MCP server configurations (paths, MCPB files, or inline definitions)`)])})),Ta=w(()=>g({type:x([`string`,`number`,`boolean`,`directory`,`file`]).describe(`Type of the configuration value`),title:_().describe(`Human-readable label shown in the config dialog`),description:_().describe(`Help text shown beneath the field in the config dialog`),required:S().optional().describe(`If true, validation fails when this field is empty`),default:v([_(),b(),S(),C(_())]).optional().describe(`Default value used when the user provides nothing`),multiple:S().optional().describe(`For string type: allow an array of strings`),sensitive:S().optional().describe(`If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json`),min:b().optional().describe(`Minimum value (number type only)`),max:b().optional().describe(`Maximum value (number type only)`)}).strict()),Ea=w(()=>g({userConfig:h(_().regex(/^[A-Za-z_]\w*$/,`Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks`),Ta()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. Note: sensitive values share a single keychain entry with OAuth tokens — keep secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),Da=w(()=>g({channels:C(g({server:_().min(1).describe(`Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers.`),displayName:_().optional().describe(`Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.`),userConfig:h(_(),Ta()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe(`Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.`)})),Oa=w(()=>fe({command:_().min(1).refine(e=>!(e.includes(` `)&&!e.startsWith(`/`)),{message:`Command should not contain spaces. Use args array for arguments.`}).describe(`Command to execute the LSP server (e.g., "typescript-language-server")`),args:C(Sa()).optional().describe(`Command-line arguments to pass to the server`),extensionToLanguage:h(Ca(),Sa()).refine(e=>Object.keys(e).length>0,{message:`extensionToLanguage must have at least one mapping`}).describe(`Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping.`),transport:x([`stdio`,`socket`]).default(`stdio`).describe(`Communication transport mechanism`),env:h(_(),_()).optional().describe(`Environment variables to set when starting the server`),initializationOptions:le().optional().describe(`Initialization options passed to the server during initialization`),settings:le().optional().describe(`Settings passed to the server via workspace/didChangeConfiguration`),workspaceFolder:_().optional().describe(`Workspace folder path to use for the server`),startupTimeout:b().int().positive().optional().describe(`Maximum time to wait for server startup (milliseconds)`),shutdownTimeout:b().int().positive().optional().describe(`Maximum time to wait for graceful shutdown (milliseconds)`),restartOnCrash:S().optional().describe(`Whether to restart the server if it crashes`),maxRestarts:b().int().nonnegative().optional().describe(`Maximum number of restart attempts before giving up`)})),ka=w(()=>g({lspServers:v([W().describe(`Path to .lsp.json configuration file relative to plugin root`),h(_(),Oa()).describe(`LSP server configurations keyed by server name`),C(v([W().describe(`Path to LSP configuration file`),h(_(),Oa()).describe(`Inline LSP server configurations`)])).describe(`Array of LSP server configurations (paths or inline definitions)`)])})),Aa=w(()=>_().refine(e=>!e.includes(`..`)&&!e.includes(`//`),`Package name cannot contain path traversal patterns`).refine(e=>/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/.test(e)||/^[a-z0-9][a-z0-9-._]*$/.test(e),`Invalid npm package name format`)),ja=w(()=>g({settings:h(_(),le()).optional().describe(`Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)`)})),Ma=w(()=>g({...ma().shape,...ga().partial().shape,...va().partial().shape,...ya().partial().shape,...ba().partial().shape,...xa().partial().shape,...Da().partial().shape,...wa().partial().shape,...ka().partial().shape,...ja().partial().shape,...Ea().partial().shape})),Na=w(()=>ge(`source`,[g({source:y(`url`),url:_().url().describe(`Direct URL to marketplace.json file`),headers:h(_(),_()).optional().describe(`Custom HTTP headers (e.g., for authentication)`)}),g({source:y(`github`),repo:_().describe(`GitHub repository in owner/repo format`),ref:_().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),path:_().optional().describe(`Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)`),sparsePaths:C(_()).optional().describe(`Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.`)}),g({source:y(`git`),url:_().describe(`Full git repository URL`),ref:_().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),path:_().optional().describe(`Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)`),sparsePaths:C(_()).optional().describe(`Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.`)}),g({source:y(`npm`),package:Aa().describe(`NPM package containing marketplace.json`)}),g({source:y(`file`),path:_().describe(`Local file path to marketplace.json`)}),g({source:y(`directory`),path:_().describe(`Local directory containing .claude-plugin/marketplace.json`)}),g({source:y(`hostPattern`),hostPattern:_().describe(`Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").`)}),g({source:y(`pathPattern`),pathPattern:_().describe(`Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.`)}),g({source:y(`settings`),name:fa().refine(e=>!H.has(e.toLowerCase()),{message:`Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false.`}).describe(`Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation as PluginMarketplaceSchema plus reserved-name rejection — validateOfficialNameSource runs after the disk write, too late to clean up.`),plugins:C(Ia()).describe(`Plugin entries declared inline in settings.json`),owner:pa().optional()}).describe(`Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).`)])),Pa=w(()=>_().length(40).regex(/^[a-f0-9]{40}$/,`Must be a full 40-character lowercase git commit SHA`)),Fa=w(()=>v([U().describe(`Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)`),g({source:y(`npm`),package:Aa().or(_()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:_().optional().describe(`Specific version or version range (e.g., ^1.0.0, ~2.1.0)`),registry:_().url().optional().describe(`Custom NPM registry URL (defaults to using system default, likely npmjs.org)`)}).describe(`NPM package as plugin source`),g({source:y(`pip`),package:_().describe(`Python package name as it appears on PyPI`),version:_().optional().describe(`Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)`),registry:_().url().optional().describe(`Custom PyPI registry URL (defaults to using system default, likely pypi.org)`)}).describe(`Python package as plugin source`),g({source:y(`url`),url:_().describe(`Full git repository URL (https:// or git@)`),ref:_().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),sha:Pa().optional().describe(`Specific commit SHA to use`)}),g({source:y(`github`),repo:_().describe(`GitHub repository in owner/repo format`),ref:_().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),sha:Pa().optional().describe(`Specific commit SHA to use`)}),g({source:y(`git-subdir`),url:_().describe(`Git repository: GitHub owner/repo shorthand, https://, or git@ URL`),path:_().min(1).describe(`Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.`),ref:_().optional().describe(`Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.`),sha:Pa().optional().describe(`Specific commit SHA to use`)}).describe(`Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.`)])),Ia=w(()=>g({name:_().min(1,`Plugin name cannot be empty`).refine(e=>!e.includes(` `),{message:`Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")`}).describe(`Plugin name as it appears in the target repository`),source:Fa().describe(`Where to fetch the plugin from. Must be a remote source — relative paths have no marketplace repository to resolve against.`),description:_().optional(),version:_().optional(),strict:S().optional()}).refine(e=>typeof e.source!=`string`,{message:`Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.`})),La=w(()=>Ma().partial().extend({name:_().min(1,`Plugin name cannot be empty`).refine(e=>!e.includes(` `),{message:`Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")`}).describe(`Unique identifier matching the plugin name`),source:Fa().describe(`Where to fetch the plugin from`),category:_().optional().describe(`Category for organizing plugins (e.g., "productivity", "development")`),tags:C(_()).optional().describe(`Tags for searchability and discovery`),strict:S().optional().default(!0).describe(`Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.`)})),Ra=w(()=>g({name:fa(),owner:pa().describe(`Marketplace maintainer or curator information`),plugins:C(La()).describe(`Collection of available plugins in this marketplace`),forceRemoveDeletedPlugins:S().optional().describe(`When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users`),metadata:g({pluginRoot:_().optional().describe(`Base path for relative plugin sources`),version:_().optional().describe(`Marketplace version`),description:_().optional().describe(`Marketplace description`)}).optional().describe(`Optional marketplace metadata`),allowCrossMarketplaceDependenciesOn:C(_()).optional().describe(`Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.`)})),G=w(()=>_().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,`Plugin ID must be in format: plugin@marketplace`)),za=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,Ba=w(()=>v([_().regex(za,`Dependency must be a plugin name, optionally qualified with @marketplace`).transform(e=>e.replace(/@\^[^@]*$/,``)),g({name:_().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:_().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform(e=>e.marketplace?`${e.name}@${e.marketplace}`:e.name)])),w(()=>v([G(),g({id:G().describe(`Plugin identifier (e.g., "formatter@tools")`),version:_().optional().describe(`Version constraint (e.g., "^2.0.0")`),required:S().optional().describe(`If true, cannot be disabled`),config:h(_(),le()).optional().describe(`Plugin-specific configuration`)})])),Va=w(()=>g({version:_().describe(`Currently installed version`),installedAt:_().describe(`ISO 8601 timestamp of installation`),lastUpdated:_().optional().describe(`ISO 8601 timestamp of last update`),installPath:_().describe(`Absolute path to the installed plugin directory`),gitCommitSha:_().optional().describe(`Git commit SHA for git-based plugins (for version tracking)`)})),Ha=w(()=>g({version:y(1).describe(`Schema version 1`),plugins:h(G(),Va()).describe(`Map of plugin IDs to their installation metadata`)})),Ua=w(()=>x([`managed`,`user`,`project`,`local`])),Wa=w(()=>g({scope:Ua().describe(`Installation scope`),projectPath:_().optional().describe(`Project path (required for project/local scopes)`),installPath:_().describe(`Absolute path to the versioned plugin directory`),version:_().optional().describe(`Currently installed version`),installedAt:_().optional().describe(`ISO 8601 timestamp of installation`),lastUpdated:_().optional().describe(`ISO 8601 timestamp of last update`),gitCommitSha:_().optional().describe(`Git commit SHA for git-based plugins`)})),Ga=w(()=>g({version:y(2).describe(`Schema version 2`),plugins:h(G(),C(Wa())).describe(`Map of plugin IDs to arrays of installation entries`)})),w(()=>v([Ha(),Ga()])),Ka=w(()=>g({source:Na().describe(`Where to fetch the marketplace from`),installLocation:_().describe(`Local cache path where marketplace manifest is stored`),lastUpdated:_().describe(`ISO 8601 timestamp of last marketplace refresh`),autoUpdate:S().optional().describe(`Whether to automatically update this marketplace and its installed plugins on startup`)})),qa=w(()=>h(_(),Ka()))}));function Ya(e){let t=e.replace(/[^a-zA-Z0-9_-]/g,`_`);return e.startsWith(Xa)&&(t=t.replace(/_+/g,`_`).replace(/^_|_$/g,``)),t}var Xa,Za=t((()=>{Xa=`claude.ai `}));function Qa(e){let[t,n,...r]=e.split(`__`);return t!==`mcp`||!n?null:{serverName:n,toolName:r.length>0?r.join(`__`):void 0}}function $a(e){return`mcp__${Ya(e)}__`}function eo(e,t){return`${$a(e)}${Ya(t)}`}function to(e){return e.mcpInfo?eo(e.mcpInfo.serverName,e.mcpInfo.toolName):e.name}function no(e,t){let n=`mcp__${Ya(t)}__`;return e.replace(n,``)}function ro(e){let t=e.replace(/\s*\(MCP\)\s*$/,``);t=t.trim();let n=t.indexOf(` - `);return n===-1?t:t.substring(n+3).trim()}var io=t((()=>{Za()})),ao,oo,so,co,lo=t((()=>{ao=`Agent`,oo=`Task`,so=`verification`,co=new Set([`Explore`,`Plan`])})),uo,fo=t((()=>{uo=`TaskOutput`})),po,mo,ho=t((()=>{po=`TaskStop`,mo=`
2
- - Stops a running background task by its ID
3
- - Takes a task_id parameter identifying the task to stop
4
- - Returns a success or failure status
5
- - Use this tool when you need to terminate a long-running task
6
- `})),go=n({BRIEF_PROACTIVE_SECTION:()=>bo,BRIEF_TOOL_NAME:()=>K,BRIEF_TOOL_PROMPT:()=>yo,DESCRIPTION:()=>vo,LEGACY_BRIEF_TOOL_NAME:()=>_o}),K,_o,vo,yo,bo,xo=t((()=>{K=`SendUserMessage`,_o=`Brief`,vo=`Send a message to the user`,yo="Send a message the user will read. Text outside this tool is visible in the detail view, but most won't open it — the answer lives here.\n\n`message` supports markdown. `attachments` takes file paths (absolute or cwd-relative) for images, diffs, logs.\n\n`status` labels intent: 'normal' when replying to what they just asked; 'proactive' when you're initiating — a scheduled task finished, a blocker surfaced during background work, you need input on something they haven't asked about. Set it honestly; downstream routing uses it.",bo=`## Talking to the user
7
-
8
- ${K} is where your replies go. Text outside it is visible if the user expands the detail view, but most won't — assume unread. Anything you want them to actually see goes through ${K}. The failure mode: the real answer lives in plain text while ${K} just says "done!" — they see "done!" and miss everything.
9
-
10
- So: every time the user says something, the reply they actually read comes through ${K}. Even for "hi". Even for "thanks".
11
-
12
- If you can answer right away, send the answer. If you need to go look — run a command, read files, check something — ack first in one line ("On it — checking the test output"), then work, then send the result. Without the ack they're staring at a spinner.
13
-
14
- For longer work: ack → work → result. Between those, send a checkpoint when something useful happened — a decision you made, a surprise you hit, a phase boundary. Skip the filler ("running tests...") — a checkpoint earns its place by carrying information.
15
-
16
- Keep messages tight — the decision, the file:line, the PR number. Second person always ("your config"), never third.`}));function q(e){return Ao[e]??e}function So(e){let t=[];for(let[n,r]of Object.entries(Ao))r===e&&t.push(n);return t}function Co(e){return e.replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)}function wo(e){return e.replace(/\\\(/g,`(`).replace(/\\\)/g,`)`).replace(/\\\\/g,`\\`)}function To(e){let t=Do(e,`(`);if(t===-1)return{toolName:q(e)};let n=Oo(e,`)`);if(n===-1||n<=t||n!==e.length-1)return{toolName:q(e)};let r=e.substring(0,t),i=e.substring(t+1,n);if(!r)return{toolName:q(e)};if(i===``||i===`*`)return{toolName:q(r)};let a=wo(i);return{toolName:q(r),ruleContent:a}}function Eo(e){if(!e.ruleContent)return e.toolName;let t=Co(e.ruleContent);return`${e.toolName}(${t})`}function Do(e,t){for(let n=0;n<e.length;n++)if(e[n]===t){let t=0,r=n-1;for(;r>=0&&e[r]===`\\`;)t++,r--;if(t%2==0)return n}return-1}function Oo(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]===t){let t=0,r=n-1;for(;r>=0&&e[r]===`\\`;)t++,r--;if(t%2==0)return n}return-1}var ko,Ao,jo=t((()=>{lo(),fo(),ho(),ko=(xo(),e(go)).BRIEF_TOOL_NAME,Ao={Task:ao,KillShell:po,AgentOutputTool:uo,BashOutputTool:uo,...ko?{Brief:ko}:{}}}));function Mo(e){return Fo.filePatternTools.includes(e)}function No(e){return Fo.bashPrefixTools.includes(e)}function Po(e){return Fo.customValidation[e]}var Fo,Io=t((()=>{Fo={filePatternTools:[`Read`,`Write`,`Edit`,`Glob`,`NotebookRead`,`NotebookEdit`],bashPrefixTools:[`Bash`],customValidation:{WebSearch:e=>e.includes(`*`)||e.includes(`?`)?{valid:!1,error:`WebSearch does not support wildcards`,suggestion:`Use exact search terms without * or ?`,examples:[`WebSearch(claude ai)`,`WebSearch(typescript tutorial)`]}:{valid:!0},WebFetch:e=>e.includes(`://`)||e.startsWith(`http`)?{valid:!1,error:`WebFetch permissions use domain format, not URLs`,suggestion:`Use "domain:hostname" format`,examples:[`WebFetch(domain:example.com)`,`WebFetch(domain:github.com)`]}:e.startsWith(`domain:`)?{valid:!0}:{valid:!1,error:`WebFetch permissions must use "domain:" prefix`,suggestion:`Use "domain:hostname" format`,examples:[`WebFetch(domain:example.com)`,`WebFetch(domain:*.google.com)`]}}}}));function Lo(e,t){let n=0,r=t-1;for(;r>=0&&e[r]===`\\`;)n++,r--;return n%2!=0}function Ro(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&!Lo(e,r)&&n++;return n}function zo(e){for(let t=0;t<e.length-1;t++)if(e[t]===`(`&&e[t+1]===`)`&&!Lo(e,t))return!0;return!1}function Bo(e,t){if(!e||e.trim()===``)return{valid:!1,error:`Permission rule cannot be empty`};if(Ro(e,`(`)!==Ro(e,`)`))return{valid:!1,error:`Mismatched parentheses`,suggestion:`Ensure all opening parentheses have matching closing parentheses`};if(zo(e)){let t=e.substring(0,e.indexOf(`(`));return t?{valid:!1,error:`Empty parentheses`,suggestion:`Either specify a pattern or use just "${t}" without parentheses`,examples:[`${t}`,`${t}(some-pattern)`]}:{valid:!1,error:`Empty parentheses with no tool name`,suggestion:`Specify a tool name before the parentheses`}}let n=To(e),r=Qa(n.toolName);if(r)return n.ruleContent!==void 0||Ro(e,`(`)>0?{valid:!1,error:`MCP rules do not support patterns in parentheses`,suggestion:`Use "${n.toolName}" without parentheses, or use "mcp__${r.serverName}__*" for all tools`,examples:[`mcp__${r.serverName}`,`mcp__${r.serverName}__*`,r.toolName&&r.toolName!==`*`?`mcp__${r.serverName}__${r.toolName}`:void 0].filter(Boolean)}:{valid:!0};if(!n.toolName||n.toolName.length===0)return{valid:!1,error:`Tool name cannot be empty`};if(n.toolName[0]!==n.toolName[0]?.toUpperCase())return{valid:!1,error:`Tool names must start with uppercase`,suggestion:`Use "${Wt(String(n.toolName))}"`};let i=Po(n.toolName);if(i&&n.ruleContent!==void 0){let e=i(n.ruleContent);if(!e.valid)return e}if(No(n.toolName)&&n.ruleContent!==void 0){let e=n.ruleContent;if(e.includes(`:*`)&&!e.endsWith(`:*`))return{valid:!1,error:`The :* pattern must be at the end`,suggestion:`Move :* to the end for prefix matching, or use * for wildcard matching`,examples:[`Bash(npm run:*) - prefix matching (legacy)`,`Bash(npm run *) - wildcard matching`]};if(e===`:*`)return{valid:!1,error:`Prefix cannot be empty before :*`,suggestion:`Specify a command prefix before :*`,examples:[`Bash(npm:*)`,`Bash(git:*)`]}}if(Mo(n.toolName)&&n.ruleContent!==void 0){let e=n.ruleContent;if(e.includes(`:*`))return{valid:!1,error:`The ":*" syntax is only for Bash prefix rules`,suggestion:`Use glob patterns like "*" or "**" for file matching`,examples:[`${n.toolName}(*.ts) - matches .ts files`,`${n.toolName}(src/**) - matches all files in src`,`${n.toolName}(**/*.test.ts) - matches test files`]};if(e.includes(`*`)&&!e.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!e.includes(`**`))return{valid:!1,error:`Wildcard placement might be incorrect`,suggestion:`Wildcards are typically used at path boundaries`,examples:[`${n.toolName}(*.js) - all .js files`,`${n.toolName}(src/*) - all files directly in src`,`${n.toolName}(src/**) - all files recursively in src`]}}if(n&&n.toolName===`VaultHttpFetch`&&n.ruleContent!==void 0){let e=n.ruleContent;if(e.length>384)return{valid:!1,error:`VaultHttpFetch rule content is too long (${e.length} chars; max 384)`,suggestion:`Use a shorter key name and host, or use the wildcard form <key>@*`};if(/[\x00-\x1F\x7F]/.test(e))return{valid:!1,error:`VaultHttpFetch rule content contains control characters (only printable ASCII allowed in key@host)`,suggestion:`Remove control characters from the rule content`}}if(n&&n.toolName===`VaultHttpFetch`&&t===`deny`&&n.ruleContent!==void 0&&!/^[A-Za-z0-9._-]{1,128}@(?:\*|(?:\[[A-Fa-f0-9:]+\]|[A-Za-z0-9.-]{1,253})(?::(?:[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?)$/.test(n.ruleContent))return{valid:!1,error:`VaultHttpFetch deny rule content must be '<key>@<host>' or '<key>@*' (or whole-tool deny without parentheses for kill switch)`,suggestion:`Found '${n.ruleContent}'. Use 'VaultHttpFetch' (no parens) for kill switch, or 'VaultHttpFetch(${n.ruleContent}@*)' for any-host.`,examples:[`VaultHttpFetch — whole-tool kill switch`,`VaultHttpFetch(${n.ruleContent}@api.github.com)`,`VaultHttpFetch(${n.ruleContent}@*)`]};if(t===`allow`&&n){if(n.ruleContent===void 0&&Vo.has(n.toolName))return{valid:!1,error:`Whole-tool allow forbidden for vault tool '${n.toolName}'`,suggestion:`Use per-key + per-host allow: '${n.toolName}(your-key-name@host)'`,examples:[`${n.toolName}(github-token@api.github.com)`,`${n.toolName}(my-api@*) - allow any host (advanced)`]};if(n.toolName===`VaultHttpFetch`&&n.ruleContent!==void 0&&!/^[A-Za-z0-9._-]{1,128}@(?:\*|(?:\[[A-Fa-f0-9:]+\]|[A-Za-z0-9.-]{1,253})(?::(?:[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?)$/.test(n.ruleContent))return{valid:!1,error:`VaultHttpFetch rule content must be '<key>@<host>' or '<key>@*'`,suggestion:`Found '${n.ruleContent}'. Use e.g. 'github-token@api.github.com' or 'admin-key@127.0.0.1:8443' to bind a key to a host.`,examples:[`VaultHttpFetch(github-token@api.github.com)`,`VaultHttpFetch(local-admin@localhost:8443)`,`VaultHttpFetch(stripe-key@*) - any host (advanced)`]}}return{valid:!0}}var Vo,Ho,Uo=t((()=>{T(),io(),E(),jo(),Gt(),Io(),Vo=new Set([`LocalVaultFetch`,`VaultHttpFetch`]),Ho=w(()=>_().superRefine((e,t)=>{let n=Bo(e);if(!n.valid){let r=n.error;n.suggestion&&(r+=`. ${n.suggestion}`),n.examples&&n.examples.length>0&&(r+=`. Examples: ${n.examples.join(`, `)}`),t.addIssue({code:me.custom,message:r,params:{received:e}})}}))}));function Wo(e){return`serverName`in e&&e.serverName!==void 0}function Go(e){return`serverCommand`in e&&e.serverCommand!==void 0}function Ko(e){return`serverUrl`in e&&e.serverUrl!==void 0}var qo,Jo,Yo,Xo,Zo,Qo,J,$o=t((()=>{T(),gi(),ie(),E(),Wi(),Ja(),si(),Uo(),$i(),qr(),qo=w(()=>h(_(),ue())),Jo=w(()=>g({allow:C(Ho()).optional().describe(`List of permission rules for allowed operations`),deny:C(Ho()).optional().describe(`List of permission rules for denied operations`),ask:C(Ho()).optional().describe(`List of permission rules that should always prompt for confirmation`),defaultMode:x(Jt).optional().describe(`Default permission mode when Work Mate needs access`),disableBypassPermissionsMode:x([`disable`]).optional().describe(`Disable the ability to bypass permission prompts`),disableAutoMode:x([`disable`]).optional().describe(`Disable auto mode`),additionalDirectories:C(_()).optional().describe(`Additional directories to include in the permission scope`)}).passthrough()),Yo=w(()=>g({source:Na().describe(`Where to fetch the marketplace from`),installLocation:_().optional().describe(`Local cache path where marketplace manifest is stored (auto-generated if not provided)`),autoUpdate:S().optional().describe(`Whether to automatically update this marketplace and its installed plugins on startup`)})),Xo=w(()=>g({serverName:_().regex(/^[a-zA-Z0-9_-]+$/,`Server name can only contain letters, numbers, hyphens, and underscores`).optional().describe(`Name of the MCP server that users are allowed to configure`),serverCommand:C(_()).min(1,`Server command must have at least one element (the command)`).optional().describe(`Command array [command, ...args] to match exactly for allowed stdio servers`),serverUrl:_().optional().describe(`URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers`)}).refine(e=>Gr([e.serverName!==void 0,e.serverCommand!==void 0,e.serverUrl!==void 0],Boolean)===1,{message:`Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"`})),Zo=w(()=>g({serverName:_().regex(/^[a-zA-Z0-9_-]+$/,`Server name can only contain letters, numbers, hyphens, and underscores`).optional().describe(`Name of the MCP server that is explicitly blocked`),serverCommand:C(_()).min(1,`Server command must have at least one element (the command)`).optional().describe(`Command array [command, ...args] to match exactly for blocked stdio servers`),serverUrl:_().optional().describe(`URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers`)}).refine(e=>Gr([e.serverName!==void 0,e.serverCommand!==void 0,e.serverUrl!==void 0],Boolean)===1,{message:`Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"`})),Qo=[`skills`,`agents`,`hooks`,`mcp`],J=w(()=>g({$schema:y(oi).optional().describe(`JSON Schema reference for Work Mate settings`),apiKeyHelper:_().optional().describe(`Path to a script that outputs authentication values`),awsCredentialExport:_().optional().describe(`Path to a script that exports AWS credentials`),awsAuthRefresh:_().optional().describe(`Path to a script that refreshes AWS authentication`),gcpAuthRefresh:_().optional().describe(`Command to refresh GCP authentication (e.g., gcloud auth application-default login)`),...m(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:g({issuer:_().url().describe(`IdP issuer URL for OIDC discovery`),clientId:_().describe(`Work Mate's client_id registered at the IdP`),callbackPort:b().int().positive().optional().describe(`Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.`)}).optional().describe(`XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.`)}:{},fileSuggestion:g({type:y(`command`),command:_()}).optional().describe(`Custom file suggestion configuration for @ mentions`),respectGitignore:S().optional().describe(`Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected.`),cleanupPeriodDays:b().nonnegative().int().optional().describe(`Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup.`),env:qo().optional().describe(`Environment variables to set for Work Mate sessions`),attribution:g({commit:_().optional().describe(`Attribution text for git commits, including any trailers. Empty string hides attribution.`),pr:_().optional().describe(`Attribution text for pull request descriptions. Empty string hides attribution.`)}).optional().describe(`Customize attribution text for commits and PRs. Each field defaults to the standard Work Mate attribution if not set.`),includeCoAuthoredBy:S().optional().describe(`Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)`),includeGitInstructions:S().optional().describe(`Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)`),permissions:Jo().optional().describe(`Tool usage permissions configuration`),modelType:x([`anthropic`,`openai`,`gemini`,`grok`]).optional().describe(`API provider type. "anthropic" uses the Anthropic API (default), "openai" uses the OpenAI Chat Completions API, "gemini" uses the Gemini API, and "grok" uses the xAI Grok API (OpenAI-compatible). When set to "openai", configure OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL. When set to "gemini", configure GEMINI_API_KEY and optional GEMINI_BASE_URL. When set to "grok", configure GROK_API_KEY (or XAI_API_KEY), optional GROK_BASE_URL, GROK_MODEL, and GROK_MODEL_MAP.`),model:_().optional().describe(`Override the default model used by Work Mate`),availableModels:C(_()).optional().describe(`Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.`),modelOverrides:h(_(),_()).optional().describe(`Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.`),enableAllProjectMcpServers:S().optional().describe(`Whether to automatically approve all MCP servers in the project`),enabledMcpjsonServers:C(_()).optional().describe(`List of approved MCP servers from .mcp.json`),disabledMcpjsonServers:C(_()).optional().describe(`List of rejected MCP servers from .mcp.json`),allowedMcpServers:C(Xo()).optional().describe(`Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied.`),deniedMcpServers:C(Zo()).optional().describe(`Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied.`),hooks:V().optional().describe(`Custom commands to run before/after tool executions`),worktree:g({symlinkDirectories:C(_()).optional().describe(`Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"`),sparsePaths:C(_()).optional().describe(`Directories to include when creating worktrees, via git sparse-checkout (cone mode). Dramatically faster in large monorepos — only the listed paths are written to disk.`)}).optional().describe(`Git worktree configuration for --worktree flag.`),disableAllHooks:S().optional().describe(`Disable all hooks and statusLine execution`),defaultShell:x([`bash`,`powershell`]).optional().describe(`Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip).`),allowManagedHooksOnly:S().optional().describe(`When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored.`),allowedHttpHookUrls:C(_()).optional().describe(`Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).`),httpHookAllowedEnvVars:C(_()).optional().describe(`Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers).`),allowManagedPermissionRulesOnly:S().optional().describe(`When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored.`),allowManagedMcpServersOnly:S().optional().describe(`When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies.`),strictPluginOnlyCustomization:pe(e=>Array.isArray(e)?e.filter(e=>Qo.includes(e)):e,v([S(),C(x(Qo))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by marketplace allowlist, everything else blocked here.'),statusLine:g({type:y(`command`),command:_(),padding:b().optional(),refreshInterval:b().optional()}).optional().describe(`Custom status line display configuration`),statusLineEnabled:S().optional().describe(`Whether to render the fork built-in status line (model + ctx + 5h/7d limits + cost + cache pill). Toggled with /statusline.`),enabledPlugins:h(_(),v([C(_()),S(),he()])).optional().describe(`Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.`),extraKnownMarketplaces:h(_(),Yo()).check(e=>{for(let[t,n]of Object.entries(e.value))n.source.source===`settings`&&n.source.name!==t&&e.issues.push({code:`custom`,input:n.source.name,path:[t,`source`,`name`],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${t}" but source.name "${n.source.name}")`})}).optional().describe(`Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources.`),strictKnownMarketplaces:C(Na()).optional().describe(`Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. Note: this is a policy gate only — it does NOT register marketplaces. To pre-register allowed marketplaces for users, also set extraKnownMarketplaces.`),blockedMarketplaces:C(Na()).optional().describe(`Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem.`),forceLoginMethod:x([`claudeai`,`console`]).optional().describe(`Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing`),forceLoginOrgUUID:_().optional().describe(`Organization UUID to use for OAuth login`),otelHeadersHelper:_().optional().describe(`Path to a script that outputs OpenTelemetry headers`),outputStyle:_().optional().describe(`Controls the output style for assistant responses`),language:_().optional().describe(`Preferred language for Claude responses (e.g., "japanese", "spanish")`),skipWebFetchPreflight:S().optional().describe(`Skip the WebFetch blocklist check for enterprise environments with restrictive security policies`),webSearchAdapter:x([`api`,`bing`,`brave`,`exa`,`tavily`]).optional().describe(`Web search backend adapter. "tavily" uses Tavily Search API (default), "api" uses Anthropic server-side search, "bing" scrapes Bing HTML, "brave" uses Brave Search API, "exa" uses Exa AI.`),webFetchAdapter:x([`tavily`,`http`]).optional().describe(`Web fetch backend. "tavily" uses Tavily Extract API which returns Markdown directly (default), "http" fetches the URL directly via HTTP.`),tavilyEndpointUrl:_().optional().describe(`Custom Tavily API endpoint URL. Defaults to https://tavily.readmagic.workmate.win. Used by both WebSearch and WebFetch when tavily adapter is selected.`),braveApiKey:_().optional().describe(`Brave Search API key. Required when using the brave web search adapter.`),webFetchHttpTimeoutMs:b().int().positive().optional().describe(`HTTP timeout in milliseconds for the HTTP direct web fetch backend. Defaults to 60000 (60s).`),exaApiKey:_().optional().describe(`Exa AI API key. Required when using the exa web search adapter.`),exaEndpointUrl:_().optional().describe(`Custom Exa AI MCP endpoint URL. Defaults to https://mcp.exa.ai/mcp.`),sandbox:hi().optional(),feedbackSurveyRate:b().min(0).max(1).optional().describe(`Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point.`),spinnerTipsEnabled:S().optional().describe(`Whether to show tips in the spinner`),spinnerVerbs:g({mode:x([`append`,`replace`]),verbs:C(_())}).optional().describe(`Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.`),spinnerTipsOverride:g({excludeDefault:S().optional(),tips:C(_())}).optional().describe(`Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false).`),syntaxHighlightingDisabled:S().optional().describe(`Whether to disable syntax highlighting in diffs`),terminalTitleFromRename:S().optional().describe(`Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles.`),alwaysThinkingEnabled:S().optional().describe(`When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models.`),advisorModel:_().optional().describe(`Advisor model for the server-side advisor tool.`),fastMode:S().optional().describe(`When true, fast mode is enabled. When absent or false, fast mode is off.`),fastModePerSessionOptIn:S().optional().describe(`When true, fast mode does not persist across sessions. Each session starts with fast mode off.`),promptSuggestionEnabled:S().optional().describe(`When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled.`),poorMode:S().optional().describe(`When true, poor mode is active — extract_memories and prompt_suggestion are disabled to save tokens.`),showClearContextOnPlanAccept:S().optional().describe(`When true, the plan-approval dialog offers a "clear context" option. Defaults to false.`),agent:_().optional().describe(`Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model.`),companyAnnouncements:C(_()).optional().describe(`Company announcements to display at startup (one will be randomly selected if multiple are provided)`),pluginConfigs:h(_(),g({mcpServers:h(_(),h(_(),v([_(),b(),S(),C(_())]))).optional().describe(`User configuration values for MCP servers keyed by server name`),options:h(_(),v([_(),b(),S(),C(_())])).optional().describe(`Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.`)})).optional().describe(`Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)`),remote:g({defaultEnvironmentId:_().optional().describe(`Default environment ID to use for remote sessions`)}).optional().describe(`Remote session configuration`),autoUpdatesChannel:x([`latest`,`stable`]).optional().describe(`Release channel for auto-updates (latest or stable)`),disableDeepLinkRegistration:x([`disable`]).optional().describe(`Prevent claude-cli:// protocol handler registration with the OS`),minimumVersion:_().optional().describe(`Minimum version to stay on - prevents downgrades when switching to stable channel`),plansDirectory:_().optional().describe(`Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/`),...process.env.USER_TYPE===`ant`?{classifierPermissionsEnabled:S().optional().describe(`Enable AI-based classification for Bash(prompt:...) permission rules`)}:{},minSleepDurationMs:b().nonnegative().int().optional().describe(`Minimum duration in milliseconds that the Sleep tool must sleep for. Useful for throttling proactive tick frequency.`),maxSleepDurationMs:b().int().min(-1).optional().describe(`Maximum duration in milliseconds that the Sleep tool can sleep for. Set to -1 for indefinite sleep (waits for user input). Useful for limiting idle time in remote/managed environments.`),assistant:S().optional().describe(`Start Claude in assistant mode (custom system prompt, brief view, scheduled check-in skills)`),assistantName:_().optional().describe(`Display name for the assistant, shown in the claude.ai session list`),channelsEnabled:S().optional().describe(`Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels.`),allowedChannelPlugins:C(g({marketplace:_(),plugin:_()})).optional().describe(`Teams/Enterprise allowlist of channel plugins. When set, replaces the default Anthropic allowlist — admins decide which plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true.`),defaultView:x([`chat`,`transcript`]).optional().describe(`Default transcript view: chat (SendUserMessage checkpoints only) or transcript (full)`),prefersReducedMotion:S().optional().describe(`Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)`),autoMemoryEnabled:S().optional().describe(`Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory.`),autoMemoryDirectory:_().optional().describe(`Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/.`),autoDreamEnabled:S().optional().describe(`Enable background memory consolidation (auto-dream). When set, overrides the server-side default.`),showThinkingSummaries:S().optional().describe(`Show thinking summaries in the transcript view (ctrl+o). Default: false.`),skipDangerousModePermissionPrompt:S().optional().describe(`Whether the user has accepted the bypass permissions mode dialog`),skipAutoPermissionPrompt:S().optional().describe(`Whether the user has accepted the auto mode opt-in dialog`),useAutoModeDuringPlan:S().optional().describe(`Whether plan mode uses auto mode semantics when auto mode is available (default: true)`),autoMode:g({allow:C(_()).optional().describe(`Rules for the auto mode classifier allow section`),soft_deny:C(_()).optional().describe(`Rules for the auto mode classifier deny section`),...process.env.USER_TYPE===`ant`?{deny:C(_()).optional()}:{},environment:C(_()).optional().describe(`Entries for the auto mode classifier environment section`)}).optional().describe(`Auto mode classifier prompt customization`),disableAutoMode:x([`disable`]).optional().describe(`Disable auto mode`),sshConfigs:C(g({id:_().describe(`Unique identifier for this SSH config. Used to match configs across settings sources.`),name:_().describe(`Display name for the SSH connection`),sshHost:_().describe(`SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config`),sshPort:b().int().optional().describe(`SSH port (default: 22)`),sshIdentityFile:_().optional().describe(`Path to SSH identity file (private key)`),startDirectory:_().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe(`SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members.`),claudeMdExcludes:C(_()).optional().describe(`Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"`),cacheThreshold:b().int().min(0).max(100).optional().describe(`Prompt cache hit rate threshold (0-100). Warnings shown when cache hit rate falls below this percentage. Default: 80.`),cacheWarningEnabled:S().optional().describe(`Whether to show cache hit rate warnings in the message flow when the rate falls below cacheThreshold. Default: true.`),pluginTrustMessage:_().optional().describe(`Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").`),workspaceApiKey:_().optional().describe(`Workspace API key (sk-ant-api03-*) saved via /login UI. Stored in plaintext — keep this file gitignored and restrict its permissions. ANTHROPIC_API_KEY environment variable takes precedence when both are set.`)}).passthrough())}));function es(){return pt(se(J(),{unrepresentable:`any`}),null,2)}var ts=t((()=>{T(),st(),$o()}));function ns(e){let t=rs.find(t=>t.matches(e));if(!t)return null;let n={...t.tip};if(e.code===`invalid_value`&&e.enumValues&&!n.suggestion&&(n.suggestion=`Valid values: ${e.enumValues.map(e=>`"${e}"`).join(`, `)}`),!n.docLink&&e.path){let t=e.path.split(`.`)[0];t&&(n.docLink=is[t])}return n}var Y,rs,is,as=t((()=>{Y=`https://code.claude.com/docs/en`,rs=[{matches:e=>e.path===`permissions.defaultMode`&&e.code===`invalid_value`,tip:{suggestion:`Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)`,docLink:`${Y}/iam#permission-modes`}},{matches:e=>e.path===`apiKeyHelper`&&e.code===`invalid_type`,tip:{suggestion:`Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"`}},{matches:e=>e.path===`cleanupPeriodDays`&&e.code===`too_small`&&e.expected===`0`,tip:{suggestion:`Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup.`}},{matches:e=>e.path.startsWith(`env.`)&&e.code===`invalid_type`,tip:{suggestion:`Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"`,docLink:`${Y}/settings#environment-variables`}},{matches:e=>(e.path===`permissions.allow`||e.path===`permissions.deny`)&&e.code===`invalid_type`&&e.expected===`array`,tip:{suggestion:`Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.`}},{matches:e=>e.path.includes(`hooks`)&&e.code===`invalid_type`,tip:{suggestion:`Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}`}},{matches:e=>e.code===`invalid_type`&&e.expected===`boolean`,tip:{suggestion:`Use true or false without quotes. Example: "includeCoAuthoredBy": true`}},{matches:e=>e.code===`unrecognized_keys`,tip:{suggestion:`Check for typos or refer to the documentation for valid fields`,docLink:`${Y}/settings`}},{matches:e=>e.code===`invalid_value`&&e.enumValues!==void 0,tip:{suggestion:void 0}},{matches:e=>e.code===`invalid_type`&&e.expected===`object`&&e.received===null&&e.path===``,tip:{suggestion:`Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error.`}},{matches:e=>e.path===`permissions.additionalDirectories`&&e.code===`invalid_type`,tip:{suggestion:`Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command`,docLink:`${Y}/iam#working-directories`}}],is={permissions:`${Y}/iam#configuring-permissions`,env:`${Y}/settings#environment-variables`,hooks:`${Y}/hooks`}}));function os(e){return e.code===`invalid_type`}function ss(e){return e.code===`invalid_value`}function cs(e){return e.code===`unrecognized_keys`}function ls(e){return e.code===`too_small`}function us(e){return e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:typeof e}function ds(e){let t=e.match(/received (\w+)/);return t?t[1]:void 0}function fs(e,t){return e.issues.map(e=>{let n=e.path.map(String).join(`.`),r=e.message,i,a,o,s,c;if(ss(e))a=e.values.map(e=>String(e)),o=a.join(` | `),s=void 0,c=void 0;else if(os(e)){o=e.expected;let t=ds(e.message);s=t??us(e.input),c=t??us(e.input)}else ls(e)?o=String(e.minimum):e.code===`custom`&&`params`in e&&(s=e.params.received,c=s);let l=ns({path:n,code:e.code,expected:o,received:s,enumValues:a,message:e.message,value:s});if(ss(e))i=a?.map(e=>`"${e}"`).join(`, `),r=`Invalid value. Expected one of: ${i}`;else if(os(e)){let t=ds(e.message)??us(e.input);r=e.expected===`object`&&t===`null`&&n===``?`Invalid or malformed JSON`:`Expected ${e.expected}, but received ${t}`}else if(cs(e)){let t=e.keys.join(`, `);r=`Unrecognized ${Ut(e.keys.length,`field`)}: ${t}`}else ls(e)&&(r=`Number must be greater than or equal to ${e.minimum}`,i=String(e.minimum));return{file:t,path:n,message:r,expected:i,invalidValue:c,suggestion:l?.suggestion,docLink:l?.docLink}})}function ps(e){try{let t=at(e),n=J().strict().safeParse(t);return n.success?{isValid:!0}:{isValid:!1,error:`Settings validation failed:
17
- `+fs(n.error,`settings`).map(e=>`- ${e.path}: ${e.message}`).join(`
18
- `),fullSchema:es()}}catch(e){return{isValid:!1,error:`Invalid JSON: ${e instanceof Error?e.message:`Unknown parsing error`}`,fullSchema:es()}}}function ms(e,t){if(!e||typeof e!=`object`)return[];let n=e;if(!n.permissions||typeof n.permissions!=`object`)return[];let r=n.permissions,i=[];for(let e of[`allow`,`deny`,`ask`]){let n=r[e];Array.isArray(n)&&(r[e]=n.filter(n=>{if(typeof n!=`string`)return i.push({file:t,path:`permissions.${e}`,message:`Non-string value in ${e} array was removed`,invalidValue:n}),!1;let r=Bo(n,e);if(!r.valid){let a=`Invalid permission rule "${n}" was skipped`;return r.error&&(a+=`: ${r.error}`),r.suggestion&&(a+=`. ${r.suggestion}`),i.push({file:t,path:`permissions.${e}`,message:a,invalidValue:n}),!1}return!0}))}return i}var hs=t((()=>{st(),Gt(),Uo(),ts(),$o(),as()}));function gs(){let e=``;try{e=Zt().username}catch{}let t=[];return e&&t.push({path:`/Library/Managed Preferences/${e}/${_s}.plist`,label:`per-user managed preferences`}),t.push({path:`/Library/Managed Preferences/${_s}.plist`,label:`device-level managed preferences`}),process.env.USER_TYPE===`ant`&&t.push({path:A(Xt(),`Library`,`Preferences`,`${_s}.plist`),label:`user preferences (ant-only)`}),t}var _s,vs,ys,bs,xs,Ss,Cs,ws=t((()=>{_s=`com.anthropic.claudecode`,vs=`HKLM\\SOFTWARE\\Policies\\ClaudeCode`,ys=`HKCU\\SOFTWARE\\Policies\\ClaudeCode`,bs=`Settings`,xs=`/usr/bin/plutil`,Ss=[`-convert`,`json`,`-o`,`-`,`--`],Cs=5e3}));function Ts(e,t){return new Promise(n=>{on(e,t,{encoding:`utf-8`,timeout:Cs},(e,t)=>{n({stdout:t??``,code:+!!e})})})}function Es(){return(async()=>{if(process.platform===`darwin`){let e=gs(),t=(await Promise.all(e.map(async({path:e,label:t})=>{if(!en(e))return{stdout:``,label:t,ok:!1};let{stdout:n,code:r}=await Ts(xs,[...Ss,e]);return{stdout:n,label:t,ok:r===0&&!!n}}))).find(e=>e.ok);return{plistStdouts:t?[{stdout:t.stdout,label:t.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform===`win32`){let[e,t]=await Promise.all([Ts(`reg`,[`query`,vs,`/v`,bs]),Ts(`reg`,[`query`,ys,`/v`,bs])]);return{plistStdouts:null,hklmStdout:e.code===0?e.stdout:null,hkcuStdout:t.code===0?t.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function Ds(){ks||(ks=Es())}function Os(){return ks}var ks,As=t((()=>{ws(),ks=null}));function js(){Us||(Us=(async()=>{It(`mdm_load_start`);let e=Date.now(),{mdm:t,hkcu:n}=zs(await(Os()??Es()));Vs=t,Hs=n,It(`mdm_load_end`);let r=Date.now()-e;if(dt(`MDM settings load completed in ${r}ms`),Object.keys(t.settings).length>0){dt(`MDM settings found: ${Object.keys(t.settings).join(`, `)}`);try{gt(`info`,`mdm_settings_loaded`,{duration_ms:r,key_count:Object.keys(t.settings).length,error_count:t.errors.length})}catch{}}})())}async function Ms(){Us||js(),await Us}function Ns(){return Vs??X}function Ps(){return Hs??X}function Fs(e,t){Vs=e,Hs=t}async function Is(){return zs(await Es())}function Ls(e,t){let n=k(e,!1);if(!n||typeof n!=`object`)return{settings:{},errors:[]};let r=ms(n,t),i=J().safeParse(n);if(!i.success){let e=fs(i.error,t);return{settings:{},errors:[...r,...e]}}return{settings:i.data,errors:r}}function Rs(e,t=`Settings`){let n=e.split(/\r?\n/),r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=RegExp(`^\\s+${r}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,`i`);for(let e of n){let t=e.match(i);if(t&&t[1])return t[1].trimEnd()}return null}function zs(e){if(e.plistStdouts&&e.plistStdouts.length>0){let{stdout:t,label:n}=e.plistStdouts[0],r=Ls(t,n);if(Object.keys(r.settings).length>0)return{mdm:r,hkcu:X}}if(e.hklmStdout){let t=Rs(e.hklmStdout);if(t){let e=Ls(t,`Registry: ${vs}\\${bs}`);if(Object.keys(e.settings).length>0)return{mdm:e,hkcu:X}}}if(Bs())return{mdm:X,hkcu:X};if(e.hkcuStdout){let t=Rs(e.hkcuStdout);if(t){let e=Ls(t,`Registry: ${ys}\\${bs}`);return{mdm:X,hkcu:e}}}return{mdm:X,hkcu:X}}function Bs(){try{let e=k(O(A(F(),`managed-settings.json`)),!1);if(e&&typeof e==`object`&&Object.keys(e).length>0)return!0}catch{}try{let e=I(),t=D().readdirSync(e);for(let n of t)if(!(!(n.isFile()||n.isSymbolicLink())||!n.name.endsWith(`.json`)||n.name.startsWith(`.`)))try{let t=k(O(A(e,n.name)),!1);if(t&&typeof t==`object`&&Object.keys(t).length>0)return!0}catch{}}catch{}return!1}var X,Vs,Hs,Us,Ws=t((()=>{ut(),vt(),kt(),ft(),Ft(),Lt(),fi(),$o(),hs(),ws(),As(),X=Object.freeze({settings:{},errors:[]}),Vs=null,Hs=null,Us=null}));function Gs(){return A(F(),`managed-settings.json`)}function Ks(){let e=[],t={},n=!1,{settings:r,errors:i}=Z(Gs());e.push(...i),r&&Object.keys(r).length>0&&(t=j(t,r,$),n=!0);let a=I();try{let r=D().readdirSync(a).filter(e=>(e.isFile()||e.isSymbolicLink())&&e.name.endsWith(`.json`)&&!e.name.startsWith(`.`)).map(e=>e.name).sort();for(let i of r){let{settings:r,errors:o}=Z(A(a,i));e.push(...o),r&&Object.keys(r).length>0&&(t=j(t,r,$),n=!0)}}catch(e){let t=ot(e);t!==`ENOENT`&&t!==`ENOTDIR`&&Ct(e)}return{settings:n?t:null,errors:e}}function qs(){let{settings:e}=Z(Gs()),t=!!e&&Object.keys(e).length>0,n=!1,r=I();try{n=D().readdirSync(r).some(e=>(e.isFile()||e.isSymbolicLink())&&e.name.endsWith(`.json`)&&!e.name.startsWith(`.`))}catch{}return{hasBase:t,hasDropIns:n}}function Js(e,t){typeof e==`object`&&e&&`code`in e&&e.code===`ENOENT`?dt(`Broken symlink or missing file encountered for settings.json at path: ${t}`):Ct(e)}function Z(e){let t=$e(e);if(t)return{settings:t.settings?mt(t.settings):null,errors:t.errors};let n=Ys(e);return ve(e,n),{settings:n.settings?mt(n.settings):null,errors:n.errors}}function Ys(e){try{let{resolvedPath:t}=lt(D(),e),n=O(t);if(n.trim()===``)return{settings:{},errors:[]};let r=k(n,!1),i=ms(r,e),a=J().safeParse(r);if(!a.success){let t=fs(a.error,e);return{settings:null,errors:[...i,...t]}}return{settings:a.data,errors:i}}catch(t){return Js(t,e),{settings:null,errors:[]}}}function Xs(e){switch(e){case`userSettings`:return $t(re());case`policySettings`:case`projectSettings`:case`localSettings`:return $t(Ke());case`flagSettings`:{let e=Oe();return e?Qt($t(e)):$t(Ke())}}}function Zs(){return we()||m(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS)?`cowork_settings.json`:`settings.json`}function Qs(e){switch(e){case`userSettings`:return A(Xs(e),Zs());case`projectSettings`:case`localSettings`:return A(Xs(e),$s(e));case`policySettings`:return Gs();case`flagSettings`:return Oe()}}function $s(e){switch(e){case`projectSettings`:return A(`.claude`,`settings.json`);case`localSettings`:return A(`.claude`,`settings.local.json`)}}function Q(e){let t=Pe(e);if(t!==void 0)return t;let n=ec(e);return Ue(e,n),n}function ec(e){if(e===`policySettings`){let e=Br();if(e&&Object.keys(e).length>0)return e;let t=Ns();if(Object.keys(t.settings).length>0)return t.settings;let{settings:n}=Ks();if(n)return n;let r=Ps();return Object.keys(r.settings).length>0?r.settings:null}let t=Qs(e),{settings:n}=t?Z(t):{settings:null};if(e===`flagSettings`){let e=Ee();if(e){let t=J().safeParse(e);if(t.success)return j(n||{},t.data,$)}}return n}function tc(){let e=Br();if(e&&Object.keys(e).length>0)return`remote`;let t=Ns();if(Object.keys(t.settings).length>0)return Et()===`macos`?`plist`:`hklm`;let{settings:n}=Ks();if(n)return`file`;let r=Ps();return Object.keys(r.settings).length>0?`hkcu`:null}function nc(e,t){if(e===`policySettings`||e===`flagSettings`)return{error:null};let n=Qs(e);if(!n)return{error:null};try{D().mkdirSync(Qt(n));let r=ec(e);if(!r){let e=null;try{e=O(n)}catch(e){if(!ct(e))throw e}if(e!==null){let t=k(e);if(t===null)return{error:Error(`Invalid JSON syntax in settings file at ${n}`)};t&&typeof t==`object`&&(r=t,dt(`Using raw settings from ${n} due to validation failure`))}}let i=j(r||{},t,(e,t,n,r)=>{if(t===void 0&&r&&typeof n==`string`){delete r[n];return}if(Array.isArray(t))return t});ci(n),Ot(n,pt(i,null,2)+`
19
- `),We(),e===`localSettings`&&Xr($s(`localSettings`),Ke())}catch(e){let t=Error(`Failed to read raw settings from ${n}: ${e}`);return Ct(t),{error:t}}return{error:null}}function rc(e,t){return Kr([...e,...t])}function $(e,t){if(Array.isArray(e)&&Array.isArray(t))return rc(e,t)}function ic(e){let t=J().strip().parse(e),n=[`permissions`,`sandbox`,`hooks`],r=[],i={permissions:new Set([`allow`,`deny`,`ask`,`defaultMode`,`disableBypassPermissionsMode`,`disableAutoMode`,`additionalDirectories`]),sandbox:new Set([`enabled`,`failIfUnavailable`,`allowUnsandboxedCommands`,`network`,`filesystem`,`ignoreViolations`,`excludedCommands`,`autoAllowBashIfSandboxed`,`enableWeakerNestedSandbox`,`enableWeakerNetworkIsolation`,`ripgrep`]),hooks:new Set([`PreToolUse`,`PostToolUse`,`Notification`,`UserPromptSubmit`,`SessionStart`,`SessionEnd`,`Stop`,`SubagentStop`,`PreCompact`,`PostCompact`,`TeammateIdle`,`TaskCreated`,`TaskCompleted`])};for(let e of Object.keys(t))if(n.includes(e)&&t[e]&&typeof t[e]==`object`){let n=t[e],a=i[e];if(a)for(let t of Object.keys(n))a.has(t)&&r.push(`${e}.${t}`)}else r.push(e);return r.sort()}function ac(){if(mc)return{settings:{},errors:[]};let e=Date.now();It(`loadSettingsFromDisk_start`),gt(`info`,`settings_load_started`),mc=!0;try{let t=xe(),n={};t&&(n=j(n,t,$));let r=[],i=new Set,a=new Set;for(let e of N()){if(e===`policySettings`){let e=null,t=[],a=Br();if(a&&Object.keys(a).length>0){let n=J().safeParse(a);n.success?e=n.data:t.push(...fs(n.error,`remote managed settings`))}if(!e){let n=Ns();Object.keys(n.settings).length>0&&(e=n.settings),t.push(...n.errors)}if(!e){let{settings:n,errors:r}=Ks();n&&(e=n),t.push(...r)}if(!e){let n=Ps();Object.keys(n.settings).length>0&&(e=n.settings),t.push(...n.errors)}e&&(n=j(n,e,$));for(let e of t){let t=`${e.file}:${e.path}:${e.message}`;i.has(t)||(i.add(t),r.push(e))}continue}let t=Qs(e);if(t){let e=$t(t);if(!a.has(e)){a.add(e);let{settings:o,errors:s}=Z(t);for(let e of s){let t=`${e.file}:${e.path}:${e.message}`;i.has(t)||(i.add(t),r.push(e))}o&&(n=j(n,o,$))}}if(e===`flagSettings`){let e=Ee();if(e){let t=J().safeParse(e);t.success&&(n=j(n,t.data,$))}}}return gt(`info`,`settings_load_completed`,{duration_ms:Date.now()-e,source_count:a.size,error_count:r.length}),{settings:n,errors:r}}finally{mc=!1}}function oc(){let{settings:e}=cc();return e||{}}function sc(){We();let e=[];for(let t of N()){let n=Q(t);n&&Object.keys(n).length>0&&e.push({source:t,settings:n})}return{effective:oc(),sources:e}}function cc(){let e=be();if(e!==null)return e;let t=ac();return It(`loadSettingsFromDisk_end`),Ae(t),t}function lc(){return!!(Q(`userSettings`)?.skipDangerousModePermissionPrompt||Q(`localSettings`)?.skipDangerousModePermissionPrompt||Q(`flagSettings`)?.skipDangerousModePermissionPrompt||Q(`policySettings`)?.skipDangerousModePermissionPrompt)}function uc(){return!0}function dc(){return Q(`policySettings`)?.useAutoModeDuringPlan!==!1&&Q(`flagSettings`)?.useAutoModeDuringPlan!==!1&&Q(`userSettings`)?.useAutoModeDuringPlan!==!1&&Q(`localSettings`)?.useAutoModeDuringPlan!==!1}function fc(){{let e=g({allow:C(_()).optional(),soft_deny:C(_()).optional(),deny:C(_()).optional(),environment:C(_()).optional()}),t=[],n=[],r=[];for(let i of[`userSettings`,`localSettings`,`flagSettings`,`policySettings`]){let a=Q(i);if(!a)continue;let o=e.safeParse(a.autoMode);o.success&&(o.data.allow&&t.push(...o.data.allow),o.data.soft_deny&&n.push(...o.data.soft_deny),process.env.USER_TYPE===`ant`&&o.data.deny&&n.push(...o.data.deny),o.data.environment&&r.push(...o.data.environment))}if(t.length>0||n.length>0||r.length>0)return{...t.length>0&&{allow:t},...n.length>0&&{soft_deny:n},...r.length>0&&{environment:r}}}}function pc(e){for(let t of N()){if(t===`policySettings`)continue;let n=Qs(t);if(n)try{let{resolvedPath:t}=lt(D(),n),r=O(t);if(!r.trim())continue;let i=k(r,!1);if(i&&typeof i==`object`&&e in i)return!0}catch(e){Js(e,n)}}return!1}var mc,hc,gc=t((()=>{Pr(),T(),Be(),Ur(),qr(),ut(),vt(),ie(),ht(),At(),kt(),ft(),Zr(),Ft(),St(),Dt(),st(),Lt(),si(),di(),fi(),Ws(),je(),$o(),hs(),mc=!1,hc=oc}));export{oo as $,un as $n,I as $t,Qo as A,rr as An,Yi as At,Eo as B,jn as Bn,Bi as Bt,Ws as C,Ir as Cn,ia as Ct,Ds as D,Er as Dn,V as Dt,As as E,Dr as En,na as Et,Ko as F,Vn as Fn,Wi as Ft,xo as G,On as Gn,ji as Gt,yo as H,kn as Hn,Fi as Ht,So as I,Fn as In,Ri as It,po as J,mn as Jn,R as Jt,go as K,Sn as Kn,Ni as Kt,jo as L,In as Ln,Pi as Lt,$o as M,Kn as Mn,Ki as Mt,Go as N,qn as Nn,Hi as Nt,hs as O,gr as On,$i as Ot,Wo as P,Bn as Pn,Vi as Pt,ao as Q,ln as Qn,F as Qt,q as R,Nn as Rn,Ii as Rt,Ns as S,Ur as Sn,Ja as St,Fs as T,Fr as Tn,ea as Tt,vo as U,An as Un,Ai as Ut,K as V,Mn as Vn,Li as Vt,_o as W,Cn as Wn,Mi as Wt,uo as X,dn as Xn,bi as Xt,ho as Y,hn as Yn,xi as Yt,fo as Z,pn as Zn,ki as Zt,Z as _,qr as _n,ha as _t,tc as a,ai as an,no as at,Ms as b,Br as bn,La as bt,Q as c,ei as cn,io as ct,sc as d,si as dn,Ya as dt,fi as en,co as et,hc as f,ri as fn,H as ft,gc as g,Gr as gn,Oa as gt,lc as h,Jr as hn,qa as ht,ic as i,ii as in,ro as it,J as j,Xn as jn,Gi as jt,ps as k,mr as kn,Ji as kt,Xs as l,Qr as ln,Qa as lt,uc as m,Zr as mn,Ga as mt,oc as n,li as nn,lo as nt,$s as o,N as on,$a as ot,dc as p,ni as pn,Ha as pt,mo as q,xn as qn,Di as qt,qs as r,di as rn,eo as rt,Qs as s,ti as sn,to as st,fc as t,ui as tn,so as tt,cc as u,$r as un,Za as ut,pc as v,Wr as vn,G as vt,Is as w,Lr as wn,ra as wt,Ps as x,Rr as xn,Ra as xt,nc as y,Kr as yn,Ma as yt,To as z,Pn as zn,zi as zt};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{A as t,E as n,M as r,T as i,n as a,r as o,t as s}from"./lazySchema-DcIJE_0i.js";import{en as c}from"./state-ix0xIunV.js";import{VE as l,Za as u}from"./loadAgentsDir-Clu7Uk6a.js";import{z as d}from"./debug-BrXObCdR.js";import{g as f}from"./settings-Dlp5JTa_.js";import{g as p}from"./config-3m_9zSrj.js";import{_ as m,j as h}from"./git-Do0wJvux.js";import{u as g}from"./oauth-BqJqV-2M.js";import{Bt as _,wi as v}from"./model-BQF64tZx.js";import"path";import"fs/promises";var y,b=e((()=>{o(),s(),y=a(()=>n({entries:t(r(),r())})),a(()=>n({userId:r(),version:i(),lastModified:r(),checksum:r(),content:y()}))})),x=e((()=>{c(),g(),_(),l(),p(),h(),d(),m(),v(),f(),u(),b()}));export{x as t};
@@ -1,3 +0,0 @@
1
- import{l as e,o as t,s as n}from"./envUtils-DSxRz_kt.js";import{di as r,ui as i}from"./src-CDCSSo0U2.js";import{$n as a,Zn as o,en as s,ht as c,ot as l,vr as u,z as d}from"./state-ix0xIunV.js";import{Ci as f,Et as p,Gp as m,IE as h,Pt as g,Qi as _,RC as v,St as y,VE as b,Wp as x,XS as S,YS as ee,ZS as te,bt as ne,fb as C,jr as w,nb as T,qi as E,rb as D,ub as O,vn as k,yn as A,yt as j,zC as M}from"./loadAgentsDir-Clu7Uk6a.js";import{n as N,t as P}from"./cwd-CYmmnQVS.js";import{F,z as I}from"./debug-BrXObCdR.js";import{Jt as L,Zt as R}from"./settings-Dlp5JTa_.js";import{c as z,g as B,o as V}from"./config-3m_9zSrj.js";import{M as H,_ as U,d as W,j as G,n as K,r as re}from"./git-Do0wJvux.js";import{o as q,s as J}from"./log-BMCygSzM.js";import{n as Y,r as X}from"./analytics-BotDBGh0.js";import{i as Z,n as ie}from"./startupProfiler-xa3NmN7Z.js";import{Bt as ae,rn as oe}from"./model-BQF64tZx.js";import{ft as se,ut as Q}from"./esm-CGoYrggU.js";import{l as ce,u as le}from"./terminalSetup-D_P5iZmq.js";import{c as ue,n as de}from"./releaseNotes-CunqVlbU.js";import{s as fe,u as pe}from"./logoV2Utils-YHBJLIrC.js";import{c as $,t as me}from"./nativeInstaller-OPuO2sm_.js";import{i as he,r as ge}from"./runtimeObserver-Dm3LIUMp.js";import{n as _e,r as ve}from"./sessionMemory-btARBn8H.js";import{t as ye}from"./sinks-1hFrW9HK.js";r(),Y(),N(),ue(),x(),s(),_(),ve(),he(),M(),le(),ae(),b(),B(),G(),R(),se(),t(),I(),U(),T(),S(),A(),q(),pe(),me(),C(),w(),ie(),p();async function be(t,r,s,p,_,b,x,S,C){H(`info`,`setup_started`);let w=process.version.match(/^v(\d+)\./)?.[1];if((!w||parseInt(w,10)<18)&&(console.error(i.bold.red(`Error: Work Mate requires Node.js version 18 or higher.`)),process.exit(1)),x&&u(v(x)),n(),!d())try{let e=await ce();e.status===`restored`?console.log(i.yellow(`Detected an interrupted Terminal.app setup. Your original settings have been restored. You may need to restart Terminal.app for the changes to take effect.`)):e.status===`failed`&&console.error(i.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${e.backupPath}.`))}catch(e){J(e)}m(t);let T=Date.now();if(ee(),H(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-T}),D(t),p){let e=k(),n=await W();!e&&!n&&(process.stderr.write(i.red(`Error: Can only use --worktree in a git repository, but ${i.bold(t)} is not a git repository. Configure a WorktreeCreate hook in settings.json to use --worktree with other VCS systems.\n`)),process.exit(1));let r=S?`pr-${S}`:_??O(),s;if(n){let e=K(P());e||(process.stderr.write(i.red(`Error: Could not determine the main git repository root.
2
- `)),process.exit(1)),e!==(re(P())??P())&&(H(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),m(e)),s=b?y(e,g(r)):void 0}else s=b?y(P(),g(r)):void 0;let l;try{l=await ne(c(),r,s,S?{prNumber:S}:void 0)}catch(e){process.stderr.write(i.red(`Error creating worktree: ${F(e)}\n`)),process.exit(1)}if(X(`tengu_worktree_created`,{tmux_enabled:b}),b&&s){let e=await j(s,l.worktreePath);e.created?console.log(i.green(`Created tmux session: ${i.bold(s)}\nTo attach: ${i.bold(`tmux attach -t ${s}`)}`)):console.error(i.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(l.worktreePath),m(l.worktreePath),o(P()),a(P()),f(l),h(),te()}H(`info`,`setup_background_jobs_starting`),n()||(_e(),ge()),$(),H(`info`,`setup_background_jobs_launched`),Z(`setup_before_prefetch`),H(`info`,`setup_prefetch_starting`);let A=d()&&e(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||n();if(A||E(l()),import(`./loadPluginHooks-Cvd5VdjQ.js`).then(e=>{A||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),n()||(process.env.USER_TYPE===`ant`&&import(`./commitAttribution-D6J3NuhB.js`).then(async e=>{if(await e.isInternalModelRepo()){let{clearSystemPromptSections:e}=await import(`./systemPromptSections-CR_AoPIX.js`);e()}}),setImmediate(()=>{import(`./attributionHooks-CUAoGkU6.js`).then(({registerAttributionHooks:e})=>{e()})}),import(`./sessionFileAccessHooks-B_nNW0zE.js`).then(e=>e.registerSessionFileAccessHooks())),ye(),X(`tengu_started`,{}),oe(d()),Z(`setup_after_prefetch`),!n()){let{hasReleaseNotes:e}=await de(z().lastReleaseNotesSeen);e&&await fe()}if(r===`bypassPermissions`||s){if(process.platform!==`win32`&&typeof process.getuid==`function`&&process.getuid()===0&&process.env.IS_SANDBOX!==`1`&&!e(process.env.CLAUDE_CODE_BUBBLEWRAP))if(process.stdin.isTTY){console.error(i.bold.red(`WARNING: Running as root/sudo with bypass permissions mode is dangerous.`)),console.error(i.yellow(`Bypass mode skips ALL permission checks. Combined with root, any command (rm -rf /, chmod, dd) executes without review.`));let e=(await import(`readline`)).createInterface({input:process.stdin,output:process.stdout}),t=await new Promise(t=>{e.question(`
3
- I understand the risks. Continue? [y/N] `,t)});e.close(),t.trim().toLowerCase()!==`y`&&(console.error(`Aborted.`),process.exit(1))}else console.error(`--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons`),process.exit(1);if(process.env.USER_TYPE===`ant`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`claude-desktop`){let[e,t]=await Promise.all([Q.getIsDocker(),L.hasInternetAccess()]),n=Q.getIsBubblewrapSandbox(),r=process.env.IS_SANDBOX===`1`;(!(e||n||r)||t)&&(console.error(`--dangerously-skip-permissions can only be used in Docker/sandbox containers with no internet access but got Docker: ${e}, Bubblewrap: ${n}, IS_SANDBOX: ${r}, hasInternet: ${t}`),process.exit(1))}}let M=V();M.lastCost!==void 0&&M.lastDuration!==void 0&&X(`tengu_exit`,{last_session_cost:M.lastCost,last_session_api_duration:M.lastAPIDuration,last_session_tool_duration:M.lastToolDuration,last_session_duration:M.lastDuration,last_session_lines_added:M.lastLinesAdded,last_session_lines_removed:M.lastLinesRemoved,last_session_total_input_tokens:M.lastTotalInputTokens,last_session_total_output_tokens:M.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:M.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:M.lastTotalCacheReadInputTokens,last_session_fps_average:M.lastFpsAverage,last_session_fps_low_1_pct:M.lastFpsLow1Pct,last_session_id:M.lastSessionId,...M.lastSessionMetrics})}export{be as setup};
@@ -1 +0,0 @@
1
- import{t as e}from"./sinks-1hFrW9HK.js";export{e as initSinks};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Sr as t,Un as n,Wn as r,X as i,Zn as a,en as o,h as s,ht as c,vr as ee,xr as l}from"./state-ix0xIunV.js";import{Ac as te,Bi as ne,Cb as re,Ci as u,Cp as ie,Ct as d,Dp as ae,Ep as oe,Et as se,Gp as f,IE as p,Il as ce,It as le,Jn as ue,Mt as m,OC as de,OD as fe,Qi as pe,RC as me,Tb as he,Tp as h,VE as ge,Vi as _e,Vl as ve,Wp as ye,bi as be,db as g,fb as _,fi as v,gn as y,jr as b,kC as x,kD as S,kc as C,nd as w,op as T,pi as E,rd as D,sp as O,ti as k,vC as A,yC as j,yn as M,zC as N}from"./loadAgentsDir-Clu7Uk6a.js";import{n as xe,t as P}from"./cwd-CYmmnQVS.js";import{a as F,d as Se,l as I,nt as Ce,p as we,rt as Te}from"./debug-BrXObCdR.js";import{n as Ee,r as L}from"./analytics-BotDBGh0.js";import{C as De,_ as Oe}from"./model-BQF64tZx.js";import{Nt as ke}from"./prompt-Bg_1U0gO.js";import{f as Ae,l as je,t as Me}from"./commitAttribution-CGZr7XNO.js";import{n as R,r as Ne}from"./systemPromptSections-DN0HGVye.js";import{r as Pe}from"./asciicast-CbAjUHT_.js";import*as z from"path";import{dirname as Fe}from"path";o(),Ne(),T(),ke(),N(),ge(),je(),ce(),xe(),F(),he(),Oe(),_(),ye(),b(),de(),j(),se();function Ie(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.type!==`assistant`)continue;let r=n.message.content.find(e=>e.type===`tool_use`&&e.name===`TodoWrite`);if(!r||r.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=A().safeParse(i.todos);return a.success?a.data:[]}return[]}function Le(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&re(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),e.attributionSnapshots&&e.attributionSnapshots.length>0&&Me(e.attributionSnapshots,e=>{t(t=>({...t,attribution:e}))}),!x()&&e.messages&&e.messages.length>0){let n=Ie(e.messages);if(n.length>0){let e=c();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function Re(e){if(e.attributionSnapshots&&e.attributionSnapshots.length>0)return Ae(e.attributionSnapshots)}function B(e,t){if(!(!e&&!t))return{name:e??``,color:t==="default"?void 0:t}}function V(e,t,a){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return r(void 0),{agentDefinition:void 0,agentType:void 0};let o=a.activeAgents.find(t=>t.agentType===e);return o?(r(o.agentType),!i()&&o.model&&o.model!==`inherit`&&n(De(o.model)),{agentDefinition:o,agentType:o.agentType}):(I(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),r(void 0),{agentDefinition:void 0,agentType:void 0})}function H(e){let t=d();if(t){u(t);return}if(e){try{process.chdir(e.worktreePath)}catch{u(null);return}f(e.worktreePath),a(P()),m(e),p(),R(),g.cache.clear?.()}}function ze(){let e=d();if(e){m(null),p(),R(),g.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}f(e.originalCwd),a(P())}}async function Be(t,n,r){if(n.forkSession)t.contentReplacements?.length&&await k(t.contentReplacements);else{let e=n.sessionIdOverride??t.sessionId;e&&(ee(me(e),n.transcriptPath?Fe(n.transcriptPath):null),await Pe(),await v(),O(e))}if(E(n.forkSession?{...t,worktreeSession:void 0}:t),t.goal){let{hydrateGoalFromTranscript:r}=(D(),e(w)),i=new Map,a=n.sessionIdOverride??t.sessionId??c();i.set(a,t.goal),r(i,a)}n.forkSession||(H(t.worktreeSession),ue());let{agentDefinition:i,agentType:a}=V(t.agentSetting,r.mainThreadAgentDefinition,r.agentDefinitions);be(`normal`);let o=n.includeAttribution?Re(t):void 0,s=B(t.agentName,t.agentColor);ve(t.agentName);let l=r.agentDefinitions;return{messages:t.messages,fileHistorySnapshots:t.fileHistorySnapshots,contentReplacements:t.contentReplacements,agentName:t.agentName,agentColor:t.agentColor==="default"?void 0:t.agentColor,restoredAgentDef:i,initialState:{...r.initialState,...a&&{agent:a},...o&&{attribution:o},...s&&{standaloneAgentContext:s},agentDefinitions:l}}}S(),o(),pe(),Ee(),oe(),C(),Ce(),F(),we(),M(),t();var Ve=1e3,He=500,Ue=300,We=2e3,Ge=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=l(),Z=null;async function Ke(){if(K||q)return;K=!0,J||(J=!0,ae(()=>{ne(),X.emit()}));let e=await Je();e.length!==0&&(I(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=fe.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??Ve,pollInterval:Z?.pollInterval??He},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Ge,interval:Z?.chokidarInterval??We,atomic:!0}),U.on(`add`,$),U.on(`change`,$),U.on(`unlink`,$),Y=Te(async()=>{await Q()}))}function Q(){q=!0,Y&&(Y(),Y=null);let e=Promise.resolve();return U&&(e=U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),e}var qe=X.subscribe;async function Je(){let e=Se(),t=[],n=h(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=h(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=h(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=h(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of s()){let r=z.join(n,`.claude`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){I(`Detected skill change: ${e}`),L(`tengu_skill_file_changed`,{source:`chokidar`}),Ye(e)}function Ye(e){G.add(e),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let e=[...G];if(G.clear(),y(await le(`skills`,e[0]))){I(`ConfigChange hook blocked skill reload (${e.length} paths)`);return}ie(),_e(),te(),X.emit()},Z?.reloadDebounce??Ue)}async function Xe(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var Ze={initialize:Ke,dispose:Q,subscribe:qe,resetForTesting:Xe};export{V as a,Be as i,B as n,Le as o,ze as r,H as s,Ze as t};
@@ -1 +0,0 @@
1
- import"./featureCheck-HslM03dr.js";import"./instinctParser-Dt-lqnDe.js";import"./skillGenerator-BT8NGzXT.js";import{p as e}from"./runtimeObserver-Dm3LIUMp.js";import{o as t}from"./observationStore-DzCdXq8U.js";import{s as n}from"./projectContext-D9MDwJUF.js";import"./sessionObserver-CSOYgsvH.js";import"./toolEventObserver-BAFzvePj.js";import"./skillGapStore-DyqNKuNy.js";import{t as r}from"./skillLearning-Cn9Uw0Kd.js";r();export{e as loadInstincts,t as readObservations,n as resolveProjectContext};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Uc as t,Wc as n}from"./loadAgentsDir-Clu7Uk6a.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,t)=>e+n(`${t.agentType}: ${t.whenToUse}`),0):0}var i,a=e((()=>{t(),i=15e3}));export{r as n,a as r,i as t};
@@ -1 +0,0 @@
1
- import{Dy as e,Ey as t,Py as n,jy as r,ky as i}from"./loadAgentsDir-Clu7Uk6a.js";e();export{t as checkOutTeleportedSessionBranch,i as processMessagesForTeleportResume,r as teleportResumeCodeSession,n as validateGitState};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./thinkback-HyW_R_88.js";e();export{n as call,t as playAnimation};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{$D as t,Es as n,Ms as r,tO as i}from"./loadAgentsDir-Clu7Uk6a.js";import{n as a,r as o}from"./thinkback-HyW_R_88.js";import{join as s}from"path";function c(){return`thinkback@${process.env.USER_TYPE===`ant`?u:t}`}async function l(){let e=r(),t=c(),n=e.plugins[t];if(!n||n.length===0)return{type:`text`,value:`Thinkback plugin not installed. Run /think-back first to install it.`};let i=n[0];return i?.installPath?{type:`text`,value:(await o(s(i.installPath,`skills`,d))).message}:{type:`text`,value:`Thinkback plugin installation path not found.`}}var u,d;e((()=>{n(),i(),a(),u=`claude-code-marketplace`,d=`thinkback`}))();export{l as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{ND as t,O_ as n,PD as r,k_ as i}from"./loadAgentsDir-Clu7Uk6a.js";import{n as a,t as o}from"./partition-C8RSL3SQ.js";function s(e,t,n){let[o,s]=a(r([...e,...t],`name`),i),c=(e,t)=>e.name.localeCompare(t.name);return[...s.sort(c),...o.sort(c)]}var c=e((()=>{o(),t(),n()}));export{s as n,c as t};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./trustedDevice-Dn4rXbxT.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./undercover-CdapzvNH.js";t();export{e as shouldShowUndercoverAutoNotice};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./upgrade-BOeakAP6.js";e();export{t as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";import{n,t as r}from"./Settings-CxI_KHUj.js";var i,a;e((()=>{n(),i=t(),a=async(e,t)=>(0,i.jsx)(r,{onClose:e,context:t,defaultTab:`Usage`})}))();export{a as call};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{US as t,WS as n}from"./loadAgentsDir-Clu7Uk6a.js";import{C as r,_ as i,s as a}from"./model-BQF64tZx.js";function o(){let e=n(e=>e.mainLoopModel);return r(n(e=>e.mainLoopModelForSession)??e??a())}var s=e((()=>{t(),i()}));export{o as n,s as t};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{$_ as n,$y as r,BS as i,Cc as a,KS as o,Q_ as s,Qy as c,Sc as l,Sm as u,Tc as d,US as f,VS as p,WS as m,_m as h,fs as g,ps as _,wc as v,xm as y,ym as b}from"./loadAgentsDir-Clu7Uk6a.js";import{W as x,a as S,l as C,z as w}from"./debug-BrXObCdR.js";import{_n as T,gn as E}from"./settings-Dlp5JTa_.js";import{M as D,j as O}from"./git-Do0wJvux.js";import{o as k,s as A}from"./log-BMCygSzM.js";import{n as j,r as M}from"./analytics-BotDBGh0.js";import{n as N,r as P}from"./pluginFlagging-DNPBbJZo.js";import{t as F}from"./pluginBlocklist-5qbaTRbV.js";var I=e(t(),1);i(),j(),h(),f(),T(),S(),O(),w(),k(),v(),a(),c(),y(),s(),P(),g();function L({enabled:e=!0}={}){let t=o(),i=m(e=>e.plugins.needsRefresh),{addNotification:a}=p(),s=(0,I.useCallback)(async()=>{try{let{enabled:e,disabled:i,errors:o}=await _();await F();let s=N();Object.keys(s).length>0&&a({key:`plugin-delisted-flagged`,text:`Plugins flagged. Check /plugins`,color:`warning`,priority:`high`});let c=[],f=[];try{c=await l()}catch(e){let t=e instanceof Error?e.message:String(e);o.push({type:`generic-error`,source:`plugin-commands`,error:`Failed to load plugin commands: ${t}`})}try{f=await d()}catch(e){let t=e instanceof Error?e.message:String(e);o.push({type:`generic-error`,source:`plugin-agents`,error:`Failed to load plugin agents: ${t}`})}try{await r()}catch(e){let t=e instanceof Error?e.message:String(e);o.push({type:`generic-error`,source:`plugin-hooks`,error:`Failed to load plugin hooks: ${t}`})}let p=(await Promise.all(e.map(async e=>{if(e.mcpServers)return Object.keys(e.mcpServers).length;let t=await n(e,o);return t&&(e.mcpServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0),m=(await Promise.all(e.map(async e=>{if(e.lspServers)return Object.keys(e.lspServers).length;let t=await u(e,o);return t&&(e.lspServers=t),t?Object.keys(t).length:0}))).reduce((e,t)=>e+t,0);b(),t(t=>{let n=t.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r=new Set(o.map(e=>e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`)),a=[...n.filter(e=>{let t=e.type===`generic-error`?`generic-error:${e.source}:${e.error}`:`${e.type}:${e.source}`;return!r.has(t)}),...o];return{...t,plugins:{...t.plugins,enabled:e,disabled:i,commands:c,errors:a}}}),C(`Loaded plugins - Enabled: ${e.length}, Disabled: ${i.length}, Commands: ${c.length}, Agents: ${f.length}, Errors: ${o.length}`);let h=e.reduce((e,t)=>t.hooksConfig?e+Object.values(t.hooksConfig).reduce((e,t)=>e+(t?.reduce((e,t)=>e+t.hooks.length,0)??0),0):e,0);return{enabled_count:e.length,disabled_count:i.length,inline_count:E(e,e=>e.source.endsWith(`@inline`)),marketplace_count:E(e,e=>!e.source.endsWith(`@inline`)),error_count:o.length,skill_count:c.length,agent_count:f.length,hook_count:h,mcp_count:p,lsp_count:m,ant_enabled_names:process.env.USER_TYPE===`ant`&&e.length>0?e.map(e=>e.name).sort().join(`,`):void 0}}catch(e){let n=x(e);return A(n),C(`Error loading plugins: ${e}`),t(e=>{let t=e.plugins.errors.filter(e=>e.source===`lsp-manager`||e.source.startsWith(`plugin:`)),r={type:`generic-error`,source:`plugin-system`,error:n.message};return{...e,plugins:{...e.plugins,enabled:[],disabled:[],commands:[],errors:[...t,r]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[t,a]);(0,I.useEffect)(()=>{e&&s().then(e=>{let{ant_enabled_names:t,...n}=e,r={...n,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};M(`tengu_plugins_loaded`,{...r,...t!==void 0&&{enabled_names:t}}),D(`info`,`tengu_plugins_loaded`,r)})},[s,e]),(0,I.useEffect)(()=>{!e||!i||a({key:`plugin-reload-pending`,text:`Plugins changed. Run /reload-plugins to activate.`,color:`suggestion`,priority:`low`})},[e,i,a])}export{L as t};
@@ -1 +0,0 @@
1
- import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as n}from"./src-CDCSSo0U2.js";import{Ku as r,Xu as i}from"./loadAgentsDir-Clu7Uk6a.js";import{n as a,t as o}from"./toolPool-CR61XXm3.js";function s(e,t,n){return(0,c.useMemo)(()=>a(e,r(n,t),n.mode),[e,t,n,!1,!1])}var c,l=e((()=>{c=t(n(),1),i(),o()}));export{s as n,l as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{h as r,r as i}from"./lazySchema-DcIJE_0i.js";import{CO as a,DO as o,EO as s,QD as c,XD as l,ZD as u,_D as d,gD as f,wO as ee}from"./loadAgentsDir-Clu7Uk6a.js";import{C as p,F as m,I as h,S as g,V as _,a as v,d as y,l as b,p as x,w as te,z as S}from"./debug-BrXObCdR.js";import{St as C,_t as w,bt as T,xt as E,yt as D}from"./settings-Dlp5JTa_.js";import{o as ne,s as O}from"./log-BMCygSzM.js";import{homedir as re}from"os";import*as k from"path";import{join as ie,resolve as ae}from"path";import{randomBytes as oe}from"crypto";import{readFile as A,readdir as j,rename as M,stat as N,unlink as P,writeFile as F}from"fs/promises";function I(){return ie(f(),U)}async function L(){let e=I();try{let t=p(await A(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return b(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==H)return b(`Install counts cache version mismatch (got ${n.version}, expected ${H})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return b(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(b(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>G?(b(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(b(`Install counts cache has malformed entries`),null)}catch(e){return h(e)!==`ENOENT`&&b(`Failed to load install counts cache: ${m(e)}`),null}}async function R(e){let t=I(),n=`${t}.${oe(8).toString(`hex`)}.tmp`;try{let r=f();await y().mkdir(r),await F(n,te(e,null,2),{encoding:`utf-8`,mode:384}),await M(n,t),b(`Install counts cache saved successfully`)}catch(e){O(e);try{await P(n)}catch{}}}async function z(){b(`Fetching install counts from ${W}`);let e=performance.now();try{let n=await t.get(W,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return c(`install_counts`,W,`success`,performance.now()-e),n.data.plugins}catch(t){throw c(`install_counts`,W,`failure`,performance.now()-e,l(t)),t}}async function B(){let e=await L();if(e){b(`Using cached install counts`),c(`install_counts`,W,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await z();await R({version:H,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return O(e),b(`Failed to fetch install counts: ${m(e)}`),null}}function V(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var H,U,W,G,K=e((()=>{n(),v(),S(),x(),ne(),g(),u(),d(),H=1,U=`install-counts-cache.json`,W=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,G=1440*60*1e3}));async function se(e){let t=e.trim(),n=y(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=ae(t.startsWith(`~`)?t.replace(/^~/,re()):t),r;try{r=await n.stat(e)}catch(t){let n=h(t);return{error:n===`ENOENT`?`Path does not exist: ${e}`:`Cannot access path: ${e} (${n??t})`}}return r.isFile()?e.endsWith(`.json`)?{source:`file`,path:e}:{error:`File path must point to a .json file (marketplace.json), but got: ${e}`}:r.isDirectory()?{source:`directory`,path:e}:{error:`Path is neither a file nor a directory: ${e}`}}if(t.includes(`/`)&&!t.startsWith(`@`)){if(t.includes(`:`))return null;let e=t.match(/^([^#@]+)(?:[#@](.+))?$/),n=e?.[1]||t,r=e?.[2];return r?{source:`github`,repo:n,ref:r}:{source:`github`,repo:n}}return null}var ce=e((()=>{S(),x()}));function le(e){let t=k.basename(e),n=k.basename(k.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=k.resolve(e),i;try{i=await A(r,{encoding:`utf-8`})}catch(e){let t=h(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${m(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=p(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${m(e)}`}],warnings:[],filePath:r,fileType:`plugin`}}if(a&&typeof a==`object`){let e=a;e.commands&&(Array.isArray(e.commands)?e.commands:[e.commands]).forEach((e,n)=>{typeof e==`string`&&J(e,`commands[${n}]`,t)}),e.agents&&(Array.isArray(e.agents)?e.agents:[e.agents]).forEach((e,n)=>{typeof e==`string`&&J(e,`agents[${n}]`,t)}),e.skills&&(Array.isArray(e.skills)?e.skills:[e.skills]).forEach((e,n)=>{typeof e==`string`&&J(e,`skills[${n}]`,t)})}let o=a;if(typeof a==`object`&&a){let e=a,t=Object.keys(e).filter(e=>$.has(e));if(t.length>0){let r={...e};for(let e of t)delete r[e],n.push({path:e,message:`Field '${e}' belongs in the marketplace entry (marketplace.json), not plugin.json. It's harmless here but unused — Work Mate ignores it at load time.`});o=r}}let s=D().strict().safeParse(o);if(s.success||t.push(...q(s.error)),s.success){let e=s.data;/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e.name)||n.push({path:`name`,message:`Plugin name "${e.name}" is not kebab-case. Work Mate accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`}),e.version||n.push({path:`version`,message:`No version specified. Consider adding a version following semver (e.g., "1.0.0")`}),e.description||n.push({path:`description`,message:`No description provided. Adding a description helps users understand what your plugin does`}),e.author||n.push({path:`author`,message:`No author information provided. Consider adding author details for plugin attribution`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`plugin`}}async function X(e){let t=[],n=[],i=k.resolve(e),a;try{a=await A(i,{encoding:`utf-8`})}catch(e){let t=h(e),n;return n=t===`ENOENT`?`File not found: ${i}`:t===`EISDIR`?`Path is not a file: ${i}`:`Failed to read file: ${m(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:i,fileType:`marketplace`}}let o;try{o=p(a)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${m(e)}`}],warnings:[],filePath:i,fileType:`marketplace`}}if(o&&typeof o==`object`){let e=o;Array.isArray(e.plugins)&&e.plugins.forEach((e,n)=>{if(e&&typeof e==`object`&&`source`in e){let r=e.source;typeof r==`string`&&J(r,`plugins[${n}].source`,t,ue(r)),r&&typeof r==`object`&&`path`in r&&typeof r.path==`string`&&J(r.path,`plugins[${n}].source.path`,t)}})}let s=E().extend({plugins:r(T().strict())}).strict().safeParse(o);if(s.success||t.push(...q(s.error)),s.success){let e=s.data;if((!e.plugins||e.plugins.length===0)&&n.push({path:`plugins`,message:`Marketplace has no plugins defined`}),e.plugins){e.plugins.forEach((n,r)=>{e.plugins.filter(e=>e.name===n.name).length>1&&t.push({path:`plugins[${r}].name`,message:`Duplicate plugin name "${n.name}" found in marketplace`})});let r=k.dirname(i),a=k.basename(r)===`.claude-plugin`?k.dirname(r):r;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=k.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=p(await A(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:i,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],s=t.match(a);if(!s)return i.push({path:`frontmatter`,message:`No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata.`}),{success:!0,errors:r,warnings:i,filePath:e,fileType:n};let c=s[1]||``,l;try{l=o(c)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${m(t)}. At runtime this ${n} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n}}if(typeof l!=`object`||!l||Array.isArray(l))return r.push({path:`frontmatter`,message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(l)?`an array`:l===null?`null`:typeof l}.`}),{success:!1,errors:r,warnings:i,filePath:e,fileType:n};let u=l;if(u.description!==void 0){let e=u.description;typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`&&e!==null&&r.push({path:`description`,message:`description must be a string, got ${Array.isArray(e)?`array`:typeof e}. At runtime this value is dropped.`})}else i.push({path:`description`,message:`No description in frontmatter. A description helps users and Claude understand when to use this ${n}.`});u.name!==void 0&&u.name!==null&&typeof u.name!=`string`&&r.push({path:`name`,message:`name must be a string, got ${typeof u.name}.`});let d=u[`allowed-tools`];d!=null&&(typeof d!=`string`&&!Array.isArray(d)?r.push({path:`allowed-tools`,message:`allowed-tools must be a string or array of strings, got ${typeof d}.`}):Array.isArray(d)&&d.some(e=>typeof e!=`string`)&&r.push({path:`allowed-tools`,message:`allowed-tools array must contain only strings.`}));let f=u.shell;if(f!=null)if(typeof f!=`string`)r.push({path:`shell`,message:`shell must be a string, got ${typeof f}.`});else{let e=f.trim().toLowerCase();e!==`bash`&&e!==`powershell`&&r.push({path:`shell`,message:`shell must be 'bash' or 'powershell', got '${f}'.`})}return{success:r.length===0,errors:r,warnings:i,filePath:e,fileType:n}}async function Z(e){let t;try{t=await A(e,{encoding:`utf-8`})}catch(t){return h(t)===`ENOENT`?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:[{path:`file`,message:`Failed to read file: ${m(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=p(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${m(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=w().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await j(e,{withFileTypes:!0})}catch(e){let t=h(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>k.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=k.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,k.join(e,`skills`)],[`agent`,k.join(e,`agents`)],[`command`,k.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await A(r,{encoding:`utf-8`})}catch(n){if(_(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${m(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(k.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=k.resolve(e),n=null;try{n=await N(t)}catch(e){if(!_(e))throw e}if(n?.isDirectory()){let e=await X(k.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(k.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=p(await A(t,{encoding:`utf-8`}));if(Array.isArray(n.plugins))return X(e)}catch(e){if(h(e)===`ENOENT`)return{success:!1,errors:[{path:`file`,message:`File not found: ${t}`}],warnings:[],filePath:t,fileType:`plugin`}}return Y(e)}}var $,me=e((()=>{i(),S(),ee(),g(),s(),C(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{se as a,K as c,ce as i,pe as n,V as o,fe as r,B as s,me as t};
@@ -1 +0,0 @@
1
- import{Et as e,xt as t}from"./loadAgentsDir-Clu7Uk6a.js";e();export{t as execIntoTmuxWorktree};