@readmagic/workmate 0.0.14 → 0.0.16

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 (312) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-DAtfMH4o.js +1 -0
  2. package/dist/chunks/{AgentsMdExternalIncludesDialog-D58Vn3SK.js → AgentsMdExternalIncludesDialog-BTYgjY5c.js} +1 -1
  3. package/dist/chunks/AgentsMdExternalIncludesDialog-C6VH6JG6.js +1 -0
  4. package/dist/chunks/{App-CeC-2dzL.js → App-HF0bvxi_.js} +1 -1
  5. package/dist/chunks/ApproveApiKey-B7mKgSqY.js +1 -0
  6. package/dist/chunks/{ApproveApiKey-DFpddLyp.js → ApproveApiKey-BBFLw2B7.js} +1 -1
  7. package/dist/chunks/{BackgroundTasksDialog-9ruzl1jm.js → BackgroundTasksDialog-Coc0ecUd.js} +1 -1
  8. package/dist/chunks/BypassPermissionsModeDialog--Gx9ARd4.js +1 -0
  9. package/dist/chunks/{DiffDialog-LTdtTqsC.js → DiffDialog-tlINuFS1.js} +1 -1
  10. package/dist/chunks/Doctor-BJf49FWX.js +1 -0
  11. package/dist/chunks/{Doctor-Yvrzcrvx.js → Doctor-Wh7z6CnF.js} +2 -2
  12. package/dist/chunks/ExitFlow-B1zHTqQt.js +2 -0
  13. package/dist/chunks/Grove-1Kf7xxIV.js +11 -0
  14. package/dist/chunks/{HybridTransport-CEWG9ZRi.js → HybridTransport-DWqWUZCH.js} +1 -1
  15. package/dist/chunks/{InvalidConfigDialog-Ue3kJUPJ.js → InvalidConfigDialog-OZPFQSnC.js} +1 -1
  16. package/dist/chunks/{InvalidSettingsDialog-BO2AOTVf.js → InvalidSettingsDialog-BNCm-eyC.js} +1 -1
  17. package/dist/chunks/MCPConnectionManager-7H84oi5n.js +1 -0
  18. package/dist/chunks/MCPToolListView-CVgtg3Iq.js +1 -0
  19. package/dist/chunks/{McpParsingWarnings-BsCDFWci.js → McpParsingWarnings-CN8f449l.js} +1 -1
  20. package/dist/chunks/{MessageSelector-DY5K0NHd.js → MessageSelector-B9j6zZ5w.js} +1 -1
  21. package/dist/chunks/Messages-yz1m39eI.js +10 -0
  22. package/dist/chunks/{Onboarding-w0-VVsDz.js → Onboarding-bFbgae8m.js} +1 -1
  23. package/dist/chunks/{PromptInputFooterSuggestions-OEXx0Abp.js → PromptInputFooterSuggestions-CE_yVun1.js} +1 -1
  24. package/dist/chunks/PromptInputHelpMenu-TPWuGwAy.js +1 -0
  25. package/dist/chunks/QueryEngine-CRobcENE.js +1 -0
  26. package/dist/chunks/REPL-BhCC0JP6.js +1 -0
  27. package/dist/chunks/REPL-C33mMf_q.js +128 -0
  28. package/dist/chunks/RemoteSessionManager-BjVD918g.js +2 -0
  29. package/dist/chunks/{ResumeConversation-BbNrpSFB.js → ResumeConversation-CXd8d8po.js} +1 -1
  30. package/dist/chunks/{SSETransport-CLiI2qnD.js → SSETransport-BSilVN9e.js} +1 -1
  31. package/dist/chunks/SearchExtraToolsTool-DoiCI2uJ.js +1 -0
  32. package/dist/chunks/Settings-ClcLl0C1.js +2 -0
  33. package/dist/chunks/{TeleportProgress-IB--CbqZ.js → TeleportProgress-DonJUoPc.js} +1 -1
  34. package/dist/chunks/{TeleportRepoMismatchDialog-KjdlS_gA.js → TeleportRepoMismatchDialog-ByOuSVVz.js} +1 -1
  35. package/dist/chunks/TeleportResumeWrapper-BBtELwF1.js +1 -0
  36. package/dist/chunks/{ThemePicker-BrD_T7xF.js → ThemePicker-1QQJFOEv.js} +1 -1
  37. package/dist/chunks/{TrustDialog-L0rvvpit.js → TrustDialog-DwJ9L_u4.js} +1 -1
  38. package/dist/chunks/{ValidationErrorsList-QZvtUrAy.js → ValidationErrorsList-Cuq6W2yc.js} +1 -1
  39. package/dist/chunks/{add-dir-CpWXReCi.js → add-dir-DOKdPFT2.js} +1 -1
  40. package/dist/chunks/{agentDisplay-CrQvGkTT.js → agentDisplay-TX1bh-lX.js} +1 -1
  41. package/dist/chunks/{agents-C99yMsVF.js → agents-C58tRxpi.js} +1 -1
  42. package/dist/chunks/agents-CbRjX9Pj.js +101 -0
  43. package/dist/chunks/{allErrors-uyOMiF9U.js → allErrors-DRiW7i6Y.js} +1 -1
  44. package/dist/chunks/api-C8uOHD-v.js +1 -0
  45. package/dist/chunks/{api-C5I2xwgd.js → api-CazVavfB.js} +1 -1
  46. package/dist/chunks/auth-BL238vgr.js +1 -0
  47. package/dist/chunks/auth-CfrCl9BZ.js +10 -0
  48. package/dist/chunks/auth-D3GkU6d7.js +1 -0
  49. package/dist/chunks/{backgroundHousekeeping-CjD8bACB.js → backgroundHousekeeping-CPLlaWcV.js} +2 -2
  50. package/dist/chunks/backgroundHousekeeping-Du2tN2WE.js +1 -0
  51. package/dist/chunks/{branch-BOWBZo5K.js → branch-pAa0oBaj.js} +1 -1
  52. package/dist/chunks/{bridgeConfig-CgAVrQfz.js → bridgeConfig-DnFfCpGd.js} +1 -1
  53. package/dist/chunks/bridgeConfig-joBqeK0j.js +1 -0
  54. package/dist/chunks/{bridgeMessaging-cOFtbkf_.js → bridgeMessaging-B_hnuUHb.js} +1 -1
  55. package/dist/chunks/bridgeStatusUtil-Dwz4YHNA.js +1 -0
  56. package/dist/chunks/{btw-B0UmiVKl.js → btw-CkVkYeRr.js} +1 -1
  57. package/dist/chunks/{caches-wN3JyvNE.js → caches-BLQUkrIG.js} +1 -1
  58. package/dist/chunks/caches-DsFl83sh.js +1 -0
  59. package/dist/chunks/{ccrClient-wtUIz75R.js → ccrClient-AfdUbWzY.js} +1 -1
  60. package/dist/chunks/claudeDesktop-CB3UCt7U.js +1 -0
  61. package/dist/chunks/{clear-CNzBoL7O.js → clear-Ac3qYi_-.js} +1 -1
  62. package/dist/chunks/client-BX0r6K3I.js +1 -0
  63. package/dist/chunks/client-Bb2eZnuq.js +1 -0
  64. package/dist/chunks/client-DNEVh6Wu.js +1 -0
  65. package/dist/chunks/client-Pap_HyZZ.js +1 -0
  66. package/dist/chunks/client-zhozU2ws.js +1 -0
  67. package/dist/chunks/commands-BKLsl6gK.js +1 -0
  68. package/dist/chunks/{compact-Bj8mdDYN.js → compact-CXuDr5qM.js} +1 -1
  69. package/dist/chunks/{config-BkbL2e5Q.js → config-BSkuQZNf.js} +1 -1
  70. package/dist/chunks/{config-WMxn2jLl.js → config-D78R57VA.js} +1 -1
  71. package/dist/chunks/config-DrY1SvhQ.js +1 -0
  72. package/dist/chunks/{context-DB1Ar85E.js → context-C2plOqH4.js} +1 -1
  73. package/dist/chunks/context-noninteractive-DpVlZ-wP.js +1 -0
  74. package/dist/chunks/{context-noninteractive-CqnJTDcI.js → context-noninteractive-fVQtwEkw.js} +1 -1
  75. package/dist/chunks/conversation-C0yysXds.js +1 -0
  76. package/dist/chunks/{conversation-DOgBzrm0.js → conversation-DQpS6nvg.js} +1 -1
  77. package/dist/chunks/{createSSHSession-Cf2tOgK_.js → createSSHSession-CfyFuJMH.js} +1 -1
  78. package/dist/chunks/createSession-CmBawnsh.js +1 -0
  79. package/dist/chunks/{createSession-DD5YaQKM.js → createSession-qk9C66lK.js} +1 -1
  80. package/dist/chunks/{crossProjectResume-CkiPQYYE.js → crossProjectResume-DY1ZBO5P.js} +1 -1
  81. package/dist/chunks/{datadog-DcLf1QpG.js → datadog-Cr0VKbct.js} +1 -1
  82. package/dist/chunks/{diff-dfXWiuLA.js → diff-BNjcCXDr.js} +1 -1
  83. package/dist/chunks/{directoryCompletion-BtlRKLzw.js → directoryCompletion-i2oWpaUe.js} +1 -1
  84. package/dist/chunks/doctor-BkCtT7H1.js +1 -0
  85. package/dist/chunks/{entry-wISucmYc.js → entry-o9IZPS4g.js} +3 -3
  86. package/dist/chunks/{esm-CrJVXrKW.js → esm-BI3tFLyy.js} +1 -1
  87. package/dist/chunks/exit-Dlyj7nY8.js +1 -0
  88. package/dist/chunks/extraUsage-5Ueiyw6W.js +1 -0
  89. package/dist/chunks/extractMemories-DnTBWFOW.js +1 -0
  90. package/dist/chunks/fast-B3fRp1xO.js +1 -0
  91. package/dist/chunks/fast-ClOKONyD.js +1 -0
  92. package/dist/chunks/fetchModelList-B8KG79EK.js +1 -0
  93. package/dist/chunks/fetchModelList-gh_jFYai.js +1 -0
  94. package/dist/chunks/{fileSuggestions-Dy2BUZzd.js → fileSuggestions-DK7W8kLF.js} +1 -1
  95. package/dist/chunks/{firstPartyEventLogger-D4yuDP-n.js → firstPartyEventLogger-BMnXb9cv.js} +2 -2
  96. package/dist/chunks/firstPartyEventLogger-YYOb8aIo.js +1 -0
  97. package/dist/chunks/{flushGate-B6ecrC4j.js → flushGate-n4kK6H1U.js} +1 -1
  98. package/dist/chunks/{gemini-BC-BxZmj.js → gemini-C8-QHnsC.js} +1 -1
  99. package/dist/chunks/{generateSessionName-JTR8nPYD.js → generateSessionName-C8DnAVaa.js} +1 -1
  100. package/dist/chunks/{githubRepoPathMapping-Bk4FZrng.js → githubRepoPathMapping-Px3_GeD1.js} +1 -1
  101. package/dist/chunks/{goal-B09SOyra.js → goal-DMmzlZOF.js} +1 -1
  102. package/dist/chunks/grok-LLjpAwP_.js +1 -0
  103. package/dist/chunks/{grove-DsAIY-rZ.js → grove-CQBCzeHf.js} +1 -1
  104. package/dist/chunks/help-JH7WzjZP.js +1 -0
  105. package/dist/chunks/hooks-COhKt_pF.js +1 -0
  106. package/dist/chunks/{hooks-BI4NY5IC.js → hooks-DD2jpRfx.js} +7 -7
  107. package/dist/chunks/initReplBridge-BDaN0hpY.js +1 -0
  108. package/dist/chunks/install-CD4or0vj.js +1 -0
  109. package/dist/chunks/{instrumentation-5cSwEKaF.js → instrumentation-n-otwpYf.js} +4 -4
  110. package/dist/chunks/{job-rW1mEYtm.js → job-B-pEWgXI.js} +1 -1
  111. package/dist/chunks/keybindings-qed9q9tx.js +1 -0
  112. package/dist/chunks/{launchLocalMemory-CPucX8Xj.js → launchLocalMemory-cBovdGMT.js} +1 -1
  113. package/dist/chunks/{launchOnboarding--GCJWeeS.js → launchOnboarding-B__wtt7p.js} +1 -1
  114. package/dist/chunks/{loadAgentsDir-JrGMJN05.js → loadAgentsDir-PPiD2Mfq.js} +574 -574
  115. package/dist/chunks/loadAgentsDir-qvqrTVuS.js +1 -0
  116. package/dist/chunks/{loadPluginHooks-C4zrlV0u.js → loadPluginHooks-DUCuU3_8.js} +1 -1
  117. package/dist/chunks/localSearch-CDk_stXJ.js +1 -0
  118. package/dist/chunks/{localSearch-C-stDP9C.js → localSearch-Cvs9WfoX.js} +1 -1
  119. package/dist/chunks/{logoV2Utils-J2Sqfube.js → logoV2Utils-Bkj74dtY.js} +1 -1
  120. package/dist/chunks/{magicDocs-Dpe3YhyL.js → magicDocs-3U6peChg.js} +2 -2
  121. package/dist/chunks/main-DkjxhBIC.js +356 -0
  122. package/dist/chunks/{managedEnv-C8SisyLk.js → managedEnv-BUrzwaD3.js} +1 -1
  123. package/dist/chunks/managedEnv-XOUMOtEF.js +1 -0
  124. package/dist/chunks/{mappers-CMJorgSL.js → mappers-ZGgwqDOK.js} +1 -1
  125. package/dist/chunks/mcp-COZxwgJZ.js +6 -0
  126. package/dist/chunks/{mcp-SuAh71Ht.js → mcp-CdyNeNzh.js} +1 -1
  127. package/dist/chunks/{mcp-_tBxhPV-.js → mcp-CysOyBIn.js} +1 -1
  128. package/dist/chunks/{memory-DK8bOrUr.js → memory-B5h2TTSS.js} +1 -1
  129. package/dist/chunks/{mode-BhfhEpnW.js → mode-D3yY1fdK.js} +1 -1
  130. package/dist/chunks/model-Bz4JHoU0.js +1 -0
  131. package/dist/chunks/model-g6XBcNAG.js +1 -0
  132. package/dist/chunks/model-sviY1inu.js +1 -0
  133. package/dist/chunks/modelOptions-DYQqTLPi.js +1 -0
  134. package/dist/chunks/{nativeInstaller-xxyUjXbl.js → nativeInstaller-N1xiUpCP.js} +1 -1
  135. package/dist/chunks/{omit-od_CYp5o.js → omit-BOILu8jW.js} +1 -1
  136. package/dist/chunks/{onChangeAppState-CqTb0yEa.js → onChangeAppState-COFFZAXb.js} +1 -1
  137. package/dist/chunks/{openai-qW8mATAs.js → openai-BHM5kEFo.js} +2 -2
  138. package/dist/chunks/openai-CR3CcjCE.js +17 -0
  139. package/dist/chunks/{partition-CYoWXLNU.js → partition-C1SFDk_L.js} +1 -1
  140. package/dist/chunks/{permissions--iKUbWBw.js → permissions-uy_NFbfy.js} +3 -3
  141. package/dist/chunks/{pidLock-BR4hzYgp.js → pidLock-DuMVSwnN.js} +2 -2
  142. package/dist/chunks/{plan-DiHCGXhM.js → plan-DF9YSB5M.js} +1 -1
  143. package/dist/chunks/{plugin-BeC4D7XF.js → plugin-GRPzqgTr.js} +1 -1
  144. package/dist/chunks/{pluginAutoupdate-Bj-CrFuO.js → pluginAutoupdate-AMD-FvKB.js} +1 -1
  145. package/dist/chunks/{pluginBlocklist-DzOs-RS1.js → pluginBlocklist-DNxkAxH6.js} +1 -1
  146. package/dist/chunks/{pluginCliCommands-DwIGn58t.js → pluginCliCommands-BFoR1ZXx.js} +1 -1
  147. package/dist/chunks/{pluginFlagging-BzuymJuf.js → pluginFlagging-CW2IZWSI.js} +1 -1
  148. package/dist/chunks/{pluginOperations-CP1v-nu0.js → pluginOperations-DlWE0idP.js} +1 -1
  149. package/dist/chunks/{pluginStartupCheck-BUeBiYVq.js → pluginStartupCheck-AQGV0DCS.js} +1 -1
  150. package/dist/chunks/pluginStartupCheck-DWpquqxx.js +1 -0
  151. package/dist/chunks/{plugins-D1N31THW.js → plugins-CwUSTE4E.js} +1 -1
  152. package/dist/chunks/poorMode-DD88nPJ4.js +1 -0
  153. package/dist/chunks/{poorMode-D4L_-yWS.js → poorMode-wm2WkPF0.js} +1 -1
  154. package/dist/chunks/print-9wR_ijrL.js +14 -0
  155. package/dist/chunks/{processBashCommand-BGCIqxc9.js → processBashCommand-Deqwq1IE.js} +1 -1
  156. package/dist/chunks/{processSlashCommand-qR_j1DE8.js → processSlashCommand-U9LJ4Keq.js} +2 -2
  157. package/dist/chunks/prompt-BBeDQXIs.js +1 -0
  158. package/dist/chunks/{prompt-DnPppVz8.js → prompt-CQmEvnKN.js} +1 -1
  159. package/dist/chunks/prompt-CXhdqgB7.js +1 -0
  160. package/dist/chunks/{promptEditor-Cilc9N3L.js → promptEditor-Bf72KNF-.js} +1 -1
  161. package/dist/chunks/{protocolHandler-DdbiucQa.js → protocolHandler--eQQuSyx.js} +1 -1
  162. package/dist/chunks/{reconciler-Bte4gdP-.js → reconciler-Css9bs07.js} +1 -1
  163. package/dist/chunks/{refresh-MiZ0acBm.js → refresh-B87z39Zs.js} +1 -1
  164. package/dist/chunks/{registerProtocol-Bpte9dly.js → registerProtocol-DrWIX3Lb.js} +1 -1
  165. package/dist/chunks/{reload-plugins-GdqFZblC.js → reload-plugins-BpmUIkfm.js} +1 -1
  166. package/dist/chunks/{remoteBridgeCore-CAl3_H-O.js → remoteBridgeCore-BCLIIygk.js} +1 -1
  167. package/dist/chunks/{remoteManagedSettings-BcLJLEr7.js → remoteManagedSettings-Ahgn2e80.js} +1 -1
  168. package/dist/chunks/{rename-BDo5qIK0.js → rename-BUt3PliQ.js} +1 -1
  169. package/dist/chunks/{resume-Bbweh2hA.js → resume-uZI9p_FE.js} +1 -1
  170. package/dist/chunks/ripgrep-Di-2j8Ws.js +1 -0
  171. package/dist/chunks/{ripgrep-X5m4gJ-3.js → ripgrep-DsLUmulz.js} +1 -1
  172. package/dist/chunks/{runtimeObserver-CxXxUcrm.js → runtimeObserver-AKOWfdZ_.js} +1 -1
  173. package/dist/chunks/{runtimeObserver-Hjbo43xj.js → runtimeObserver-By59MZKJ.js} +2 -2
  174. package/dist/chunks/sandbox-adapter-D4Uho1vF.js +1 -0
  175. package/dist/chunks/sandbox-toggle-BdvylnWS.js +1 -0
  176. package/dist/chunks/searchExtraTools-BHMkqGBf.js +1 -0
  177. package/dist/chunks/{session-CkuTMD_4.js → session-Tm2-rzBY.js} +1 -1
  178. package/dist/chunks/sessionFileAccessHooks-BaWZ8sqn.js +1 -0
  179. package/dist/chunks/{sessionObserver-CvQ6oyoj.js → sessionObserver-BAr8AWeL.js} +1 -1
  180. package/dist/chunks/sessionObserver-KB1UL_n2.js +1 -0
  181. package/dist/chunks/{sessionState-C2REgUrs.js → sessionState-BTFowSpR.js} +2 -2
  182. package/dist/chunks/sessionStorage-D6nlmaI-.js +1 -0
  183. package/dist/chunks/{sessionTitle-2IWcNB8H.js → sessionTitle-SCqmSDYM.js} +1 -1
  184. package/dist/chunks/{sessionTracing-Bm7hQKHA.js → sessionTracing-CvY4udYI.js} +1 -1
  185. package/dist/chunks/settings-BgHApyGL.js +1 -0
  186. package/dist/chunks/{settings-aUygByiZ.js → settings-CvhsRFaT.js} +1 -1
  187. package/dist/chunks/{settingsSync-DgzCU1BZ.js → settingsSync-nxeaGM2-.js} +1 -1
  188. package/dist/chunks/setup-D4FPeBnM.js +3 -0
  189. package/dist/chunks/{shadowedRuleDetection-CWCQ5dZ0.js → shadowedRuleDetection-Co8m1q1D.js} +1 -1
  190. package/dist/chunks/{sideQuestion-BoW-xYkh.js → sideQuestion-4TJYn-Az.js} +1 -1
  191. package/dist/chunks/{sinks-ZHKfs6gv.js → sinks-Bb2i50kz.js} +1 -1
  192. package/dist/chunks/sinks-D1opmy_x.js +1 -0
  193. package/dist/chunks/skillChangeDetector-BU9AFG0i.js +1 -0
  194. package/dist/chunks/{skillGapStore-CCNeSjIb.js → skillGapStore-BcVP3ZUb.js} +2 -2
  195. package/dist/chunks/{skillLifecycle-wU4JDNYQ.js → skillLifecycle-CG2XmS8f.js} +2 -2
  196. package/dist/chunks/{skillSearchPanel-Cxr1QQn4.js → skillSearchPanel-DOJmUBXB.js} +4 -4
  197. package/dist/chunks/{skills-BghnKnNo.js → skills-DIgCWvzX.js} +1 -1
  198. package/dist/chunks/{stats-unp6R0Ah.js → stats-Dq-5qizS.js} +1 -1
  199. package/dist/chunks/status-Ber2xOXc.js +2 -0
  200. package/dist/chunks/status-CVcXPoOZ.js +1 -0
  201. package/dist/chunks/{statusNoticeHelpers-Dm1aiibR.js → statusNoticeHelpers-CYkrPUpN.js} +1 -1
  202. package/dist/chunks/{switcher-BUNSEJ-7.js → switcher-BIP3rbQn.js} +1 -1
  203. package/dist/chunks/switcher-zbG6T9dN.js +1 -0
  204. package/dist/chunks/syncCache-AMQMQ_HR.js +1 -0
  205. package/dist/chunks/{tasks-BjFot03S.js → tasks-BKERIO4G.js} +1 -1
  206. package/dist/chunks/{teleport-Dj2Kvbmx.js → teleport-DOXbf2sQ.js} +1 -1
  207. package/dist/chunks/{templateJobs-CY7GNRo5.js → templateJobs-dg2F45ZJ.js} +1 -1
  208. package/dist/chunks/{terminalSetup-Ty8T8ePM.js → terminalSetup-DDvQ0K5e.js} +1 -1
  209. package/dist/chunks/{terminalSetup-CpMNk6dc.js → terminalSetup-JJiXmszo.js} +1 -1
  210. package/dist/chunks/{theme-c6grxWNn.js → theme-BGxytGjA.js} +1 -1
  211. package/dist/chunks/{toolEventObserver-D7WbjgFR.js → toolEventObserver-CJhg_p3P.js} +1 -1
  212. package/dist/chunks/toolPool-C0d7Bznl.js +1 -0
  213. package/dist/chunks/{trustedDevice-BF78PNK8.js → trustedDevice-BtXHXu-T.js} +1 -1
  214. package/dist/chunks/trustedDevice-hw3iq84W.js +1 -0
  215. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-qLfN0tc-.js → useExitOnCtrlCDWithKeybindings-C9orgrub.js} +1 -1
  216. package/dist/chunks/useMainLoopModel-BigVcn2T.js +1 -0
  217. package/dist/chunks/{useManagePlugins-E0Qzj-ws.js → useManagePlugins-Bt-DYAnX.js} +1 -1
  218. package/dist/chunks/{useMergedTools-B7iYaNwM.js → useMergedTools-CZeQBdky.js} +1 -1
  219. package/dist/chunks/{useSearchInput-CsxiM9i0.js → useSearchInput-DdKrVHJS.js} +1 -1
  220. package/dist/chunks/{useSettingsErrors-DdVTahNa.js → useSettingsErrors-BR9Wws7D.js} +1 -1
  221. package/dist/chunks/{userAgent-BggRZ-ZE.js → userAgent-DUt0q-Vl.js} +1 -1
  222. package/dist/chunks/{util-Xdy1nOjj.js → util-h-Hmdke_.js} +1 -1
  223. package/dist/chunks/validatePlugin-mWVKNtJa.js +1 -0
  224. package/dist/chunks/{vim-cFcxfuac.js → vim-s-wmybpU.js} +1 -1
  225. package/dist/chunks/{workerRegistry-GrD7IAVQ.js → workerRegistry-dlfqtySm.js} +2 -2
  226. package/dist/chunks/worktree-IxcFe7g-.js +1 -0
  227. package/dist/cli.js +1 -1
  228. package/package.json +1 -1
  229. package/dist/chunks/AddWorkspaceDirectory-m2d3nOQJ.js +0 -1
  230. package/dist/chunks/AgentsMdExternalIncludesDialog-BRXGkHO4.js +0 -1
  231. package/dist/chunks/ApproveApiKey-NXTWIAMj.js +0 -1
  232. package/dist/chunks/BypassPermissionsModeDialog-C4QGpcBT.js +0 -1
  233. package/dist/chunks/Doctor-DmiDH-lg.js +0 -1
  234. package/dist/chunks/ExitFlow-DH0L3tyY.js +0 -2
  235. package/dist/chunks/Grove-BhhnrFX9.js +0 -11
  236. package/dist/chunks/MCPConnectionManager-Ciy9y9VV.js +0 -1
  237. package/dist/chunks/MCPToolListView-Ddmu2UcL.js +0 -1
  238. package/dist/chunks/Messages-LD6ZO301.js +0 -10
  239. package/dist/chunks/PromptInputHelpMenu-DyaUsvNx.js +0 -1
  240. package/dist/chunks/QueryEngine-sH-KjJIq.js +0 -1
  241. package/dist/chunks/REPL-BMH_RItw.js +0 -128
  242. package/dist/chunks/REPL-DkPd3vk5.js +0 -1
  243. package/dist/chunks/RemoteSessionManager-DJhrR1dz.js +0 -2
  244. package/dist/chunks/SearchExtraToolsTool-DupzA6Vm.js +0 -1
  245. package/dist/chunks/Settings-B1EI5LOU.js +0 -2
  246. package/dist/chunks/TeleportResumeWrapper-DnHTI39O.js +0 -1
  247. package/dist/chunks/agents-BYQO6DbG.js +0 -101
  248. package/dist/chunks/api-j0iE1mkR.js +0 -1
  249. package/dist/chunks/auth-BYCRa_mb.js +0 -10
  250. package/dist/chunks/auth-C9FUZzpW.js +0 -1
  251. package/dist/chunks/auth-DwPrlTHv.js +0 -1
  252. package/dist/chunks/backgroundHousekeeping-BxcVB3By.js +0 -1
  253. package/dist/chunks/bridgeConfig-Bxs5dqjH.js +0 -1
  254. package/dist/chunks/bridgeStatusUtil-BQF0AJDO.js +0 -1
  255. package/dist/chunks/caches-C9--b9a7.js +0 -1
  256. package/dist/chunks/claudeDesktop-DPIJpc1V.js +0 -1
  257. package/dist/chunks/client-B7WkO81L.js +0 -17
  258. package/dist/chunks/client-BCzhAEd0.js +0 -1
  259. package/dist/chunks/client-Dr9AYB-r.js +0 -1
  260. package/dist/chunks/commands-DTB0Qzd5.js +0 -1
  261. package/dist/chunks/config-B1kYcRIP.js +0 -1
  262. package/dist/chunks/context-noninteractive-Bno2Xsmp.js +0 -1
  263. package/dist/chunks/conversation-hNXWaswI.js +0 -1
  264. package/dist/chunks/createSession-BZx-2UIB.js +0 -1
  265. package/dist/chunks/doctor-aKE2bG5C.js +0 -1
  266. package/dist/chunks/exit-pjN4EJHV.js +0 -1
  267. package/dist/chunks/extraUsage-CwDhpClH.js +0 -1
  268. package/dist/chunks/extractMemories-WmPLOLUT.js +0 -1
  269. package/dist/chunks/fast-BVABmasw.js +0 -1
  270. package/dist/chunks/fast-Cuj3bfFm.js +0 -1
  271. package/dist/chunks/firstPartyEventLogger-CabA8fu0.js +0 -1
  272. package/dist/chunks/grok-BBo3jGfP.js +0 -1
  273. package/dist/chunks/help-CELr6oJZ.js +0 -1
  274. package/dist/chunks/hooks-9rkDD2iw.js +0 -1
  275. package/dist/chunks/initReplBridge-BYrL6ou1.js +0 -1
  276. package/dist/chunks/install-Dn3_M1Ui.js +0 -1
  277. package/dist/chunks/keybindings-B5kUoxvg.js +0 -1
  278. package/dist/chunks/loadAgentsDir-D-a1uUb5.js +0 -1
  279. package/dist/chunks/localSearch-hOERAH9v.js +0 -1
  280. package/dist/chunks/main-C_PDzJdv.js +0 -356
  281. package/dist/chunks/managedEnv-AEhH_HUs.js +0 -1
  282. package/dist/chunks/mcp-B2mJmWKt.js +0 -6
  283. package/dist/chunks/model-BCM7RpVk.js +0 -1
  284. package/dist/chunks/model-BWR43D3c.js +0 -1
  285. package/dist/chunks/model-CmDF8O9G.js +0 -1
  286. package/dist/chunks/modelOptions-DEQat7lU.js +0 -1
  287. package/dist/chunks/pluginStartupCheck-BGN6Je6d.js +0 -1
  288. package/dist/chunks/poorMode-XDBnxTiF.js +0 -1
  289. package/dist/chunks/print-DaJi1wF_.js +0 -14
  290. package/dist/chunks/prompt-B0gADAvI.js +0 -1
  291. package/dist/chunks/prompt-DqyEtC_I2.js +0 -1
  292. package/dist/chunks/ripgrep-DrpZ79Pp.js +0 -1
  293. package/dist/chunks/sandbox-adapter-DQ_fJSIo.js +0 -1
  294. package/dist/chunks/sandbox-toggle-DmNSThQK.js +0 -1
  295. package/dist/chunks/searchExtraTools-C7b2x2p_.js +0 -1
  296. package/dist/chunks/sessionFileAccessHooks-CQvGAbvL.js +0 -1
  297. package/dist/chunks/sessionObserver-BoQY7nOa.js +0 -1
  298. package/dist/chunks/sessionStorage-BeaEgnaa.js +0 -1
  299. package/dist/chunks/settings-Da6ax5aI.js +0 -1
  300. package/dist/chunks/setup-CvaG4nl5.js +0 -3
  301. package/dist/chunks/sinks-B_ehGpvp.js +0 -1
  302. package/dist/chunks/skillChangeDetector-C-HWR_8v.js +0 -1
  303. package/dist/chunks/status-BraYBx4N.js +0 -2
  304. package/dist/chunks/status-DwyWiaVc.js +0 -1
  305. package/dist/chunks/switcher-DDUnWU_4.js +0 -1
  306. package/dist/chunks/syncCache-1s9xV8WV.js +0 -1
  307. package/dist/chunks/toolPool-O5nkEFb1.js +0 -1
  308. package/dist/chunks/trustedDevice-D_z7bAQh.js +0 -1
  309. package/dist/chunks/updateCCB-ts7Joyve.js +0 -5
  310. package/dist/chunks/useMainLoopModel-DkjG_ikT.js +0 -1
  311. package/dist/chunks/validatePlugin-Be5aSSnP.js +0 -1
  312. package/dist/chunks/worktree-V7xiUAtl.js +0 -1
@@ -1,3 +0,0 @@
1
- import{n as e,t}from"./memoize-BK3gG5ob.js";import{l as n,o as r,s as i}from"./envUtils-DcaKZlRU.js";import{$S as a,At as o,Dm as s,Dv as c,Em as l,Ev as u,FC as d,Fa as f,HC as p,Ig as ee,Ky as m,La as h,Lg as g,Li as te,Mi as ne,Mm as re,Mn as ie,Nm as ae,Nn as oe,PC as _,RC as se,Sa as ce,St as le,UC as ue,VC as de,Vy as fe,Y_ as pe,_v as me,ac as he,br as ge,by as v,cm as y,cv as b,dc as x,di as S,dv as C,eC as w,eE as T,fv as E,gt as D,gv as O,hn as k,ht as A,hv as j,jm as M,jn as N,kv as P,lc as F,lm as I,lv as L,mn as _e,mv as ve,nE as ye,oc as be,ot as xe,pv as Se,sv as R,uv as Ce,vt as z,vv as we,yv as Te,zC as Ee}from"./loadAgentsDir-JrGMJN05.js";import{di as B,fi as De}from"./src-DL3w8VPk2.js";import{B as Oe,Bn as ke,Hn as Ae,Wt as V,it as je,or as Me,pt as Ne,z as H}from"./state-BPFYBqm1.js";import{n as Pe,t as U}from"./cwd-Besi3Os3.js";import{F as Fe,P as Ie,R as W,f as G,u as Le}from"./debug-BQj6h99Q.js";import{Kt as Re,Ln as ze,Rn as Be,Yt as Ve}from"./settings-aUygByiZ.js";import{h as He,o as Ue}from"./config-BkbL2e5Q.js";import{O as We,k as K,l as Ge,m as Ke,n as qe,r as Je}from"./git-DplvjXEY.js";import{o as Ye,s as Xe}from"./log-BlJ7CcKG.js";import{n as q,r as J}from"./analytics-DJobLaWP.js";import{n as Ze,r as Y}from"./startupProfiler-2sjXZkIP.js";import{$r as Qe,Bt as $e,ei as et,rn as tt}from"./model-CmDF8O9G.js";import{dn as X,mn as nt}from"./prompt-DnPppVz8.js";import{h as rt,l as it,p as at,u as ot}from"./terminalSetup-CpMNk6dc.js";import{ft as st,ut as Z}from"./esm-CrJVXrKW.js";import{c as ct,t as lt}from"./nativeInstaller-xxyUjXbl.js";import{l as ut,s as dt}from"./logoV2Utils-J2Sqfube.js";import{i as ft,r as pt}from"./runtimeObserver-Hjbo43xj.js";import{t as mt}from"./sinks-ZHKfs6gv.js";import{writeFile as Q}from"fs/promises";r(),De(),Pe(),We(),Ye(),Ke(),Ve(),He(),$e(),ye(),p(),se(),_(),g(),te(),ge(),k(),t(),V(),xe(),pe(),nt(),w(),Be(),F(),G(),y(),h(),oe(),Qe(),v(),c(),q(),l(),re(),E(),W();function ht(){return!1}function gt(){return{}}var $;function _t(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+=ze(e,e=>e.type===`tool_use`))}}return n}function vt(e){let t=P(e);if(!Se()){if(!Ce(t))return!1;O()}let n=C(t),r=_t(e,$)>=L(),i=f(e);if(n&&r||n&&!i){let t=e[e.length-1];return t?.uuid&&($=t.uuid),!0}return!1}async function yt(e){let t=Le(),n=N();await t.mkdir(n,{mode:448});let r=ie();try{await Q(r,``,{encoding:`utf-8`,mode:384,flag:`wx`}),await Q(r,await ae(),{encoding:`utf-8`,mode:384})}catch(e){if(Fe(e)!==`EEXIST`)throw e}e.readFileState.delete(r);let i=await a.call({file_path:r},e),o=``,s=i.data;return s.type===`text`&&(o=s.file.content),J(`tengu_session_memory_file_read`,{content_length:o.length}),{memoryPath:r,currentMemory:o}}var bt=e(()=>{let e=gt();Te({minimumMessageTokensToInit:e.minimumMessageTokensToInit&&e.minimumMessageTokensToInit>0?e.minimumMessageTokensToInit:R.minimumMessageTokensToInit,minimumTokensBetweenUpdate:e.minimumTokensBetweenUpdate&&e.minimumTokensBetweenUpdate>0?e.minimumTokensBetweenUpdate:R.minimumTokensBetweenUpdate,toolCallsBetweenUpdates:e.toolCallsBetweenUpdates&&e.toolCallsBetweenUpdates>0?e.toolCallsBetweenUpdates:R.toolCallsBetweenUpdates})}),xt=et(async e=>{let{messages:t,toolUseContext:n,querySource:r}=e;if(r!==`repl_main_thread`||!ht()||(bt(),!vt(t)))return;j();let i=be(n),{memoryPath:a,currentMemory:o}=await yt(i);await x({promptMessages:[ce({content:await M(o,a)})],cacheSafeParams:he(e),canUseTool:Ct(a),querySource:`session_memory`,forkLabel:`session_memory`,overrides:{readFileState:i.readFileState}});let s=t[t.length-1],c=s?u(s):void 0,l=b();J(`tengu_session_memory_extraction`,{input_tokens:c?.input_tokens,output_tokens:c?.output_tokens,cache_read_input_tokens:c?.cache_read_input_tokens??void 0,cache_creation_input_tokens:c?.cache_creation_input_tokens??void 0,config_min_message_tokens_to_init:l.minimumMessageTokensToInit,config_min_tokens_between_update:l.minimumTokensBetweenUpdate,config_tool_calls_between_updates:l.toolCallsBetweenUpdates}),me(P(t)),wt(t),ve()});function St(){Oe()||s()&&I(xt)}function Ct(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 ${X} on ${e} is allowed`,decisionReason:{type:`other`,reason:`only ${X} on ${e} is allowed`}}}}function wt(e){if(!f(e)){let t=e[e.length-1];t?.uuid&&we(t.uuid)}}q(),V(),ft(),ot(),m(),st(),W(),ut(),lt(),at(),Ze(),le();async function Tt(e,t,r,a,s,c,l,u,f){K(`info`,`setup_started`);let p=process.version.match(/^v(\d+)\./)?.[1];if((!p||parseInt(p,10)<18)&&(console.error(B.bold.red(`Error: Work Mate requires Node.js version 18 or higher.`)),process.exit(1)),l&&Me(ee(l)),!H())try{let e=await it();e.status===`restored`?console.log(B.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(B.red(`Failed to restore Terminal.app settings. Please manually restore your original settings with: defaults import com.apple.Terminal ${e.backupPath}.`))}catch(e){Xe(e)}d(e);let m=Date.now();if(de(),K(`info`,`setup_hooks_captured`,{duration_ms:Date.now()-m}),Ee(e),a){let t=_e(),n=await Ge();!t&&!n&&(process.stderr.write(B.red(`Error: Can only use --worktree in a git repository, but ${B.bold(e)} 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=u?`pr-${u}`:s??T(),i;if(n){let e=qe(U());e||(process.stderr.write(B.red(`Error: Could not determine the main git repository root.
2
- `)),process.exit(1)),e!==(Je(U())??U())&&(K(`info`,`worktree_resolved_to_main_repo`),process.chdir(e),d(e)),i=c?z(e,o(r)):void 0}else i=c?z(U(),o(r)):void 0;let a;try{a=await D(Ne(),r,i,u?{prNumber:u}:void 0)}catch(e){process.stderr.write(B.red(`Error creating worktree: ${Ie(e)}\n`)),process.exit(1)}if(J(`tengu_worktree_created`,{tmux_enabled:c}),c&&i){let e=await A(i,a.worktreePath);e.created?console.log(B.green(`Created tmux session: ${B.bold(i)}\nTo attach: ${B.bold(`tmux attach -t ${i}`)}`)):console.error(B.yellow(`Warning: Failed to create tmux session: ${e.error}`))}process.chdir(a.worktreePath),d(a.worktreePath),ke(U()),Ae(U()),S(a),fe(),ue()}K(`info`,`setup_background_jobs_starting`),i()||(St(),pt()),ct(),K(`info`,`setup_background_jobs_launched`),Y(`setup_before_prefetch`),K(`info`,`setup_prefetch_starting`);let h=H()&&n(process.env.CLAUDE_CODE_SYNC_PLUGIN_INSTALL)||i();if(h||ne(je()),import(`./loadPluginHooks-C4zrlV0u.js`).then(e=>{h||(e.loadPluginHooks(),e.setupPluginHookHotReload())}),i()||import(`./sessionFileAccessHooks-CQvGAbvL.js`).then(e=>e.registerSessionFileAccessHooks()),mt(),J(`tengu_started`,{}),tt(H()),Y(`setup_after_prefetch`),!i()&&rt()&&await dt(),t===`bypassPermissions`||r){if(process.platform!==`win32`&&typeof process.getuid==`function`&&process.getuid()===0&&process.env.IS_SANDBOX!==`1`&&!n(process.env.CLAUDE_CODE_BUBBLEWRAP))if(process.stdin.isTTY){console.error(B.bold.red(`WARNING: Running as root/sudo with bypass permissions mode is dangerous.`)),console.error(B.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.CLAUDE_CODE_ENTRYPOINT!==`local-agent`&&process.env.CLAUDE_CODE_ENTRYPOINT!==`claude-desktop`){let[e,t]=await Promise.all([Z.getIsDocker(),Re.hasInternetAccess()]),n=Z.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 g=Ue();g.lastCost!==void 0&&g.lastDuration!==void 0&&J(`tengu_exit`,{last_session_cost:g.lastCost,last_session_api_duration:g.lastAPIDuration,last_session_tool_duration:g.lastToolDuration,last_session_duration:g.lastDuration,last_session_lines_added:g.lastLinesAdded,last_session_lines_removed:g.lastLinesRemoved,last_session_total_input_tokens:g.lastTotalInputTokens,last_session_total_output_tokens:g.lastTotalOutputTokens,last_session_total_cache_creation_input_tokens:g.lastTotalCacheCreationInputTokens,last_session_total_cache_read_input_tokens:g.lastTotalCacheReadInputTokens,last_session_fps_average:g.lastFpsAverage,last_session_fps_low_1_pct:g.lastFpsLow1Pct,last_session_id:g.lastSessionId,...g.lastSessionMetrics})}export{Tt as setup};
@@ -1 +0,0 @@
1
- import{t as e}from"./sinks-ZHKfs6gv.js";export{e as initSinks};
@@ -1 +0,0 @@
1
- import{Di as e,Ds as t,Ei as n,FC as r,Ig as i,JT as a,Ky as o,Lg as s,Li as ee,Nt as te,Ny as ne,Os as re,Ot as c,PC as ie,Py as ae,QS as l,Rn as oe,St as se,Th as ce,Vy as u,Wr as le,Xi as ue,Yi as d,ZS as de,Zi as fe,a_ as f,bc as p,bg as m,br as h,ci as pe,di as g,eh as me,fn as he,hc as ge,hn as _e,i_ as _,nE as ve,ni as ye,qT as v,qi as y,tE as b,th as x,ti as S,vg as C,yt as w}from"./loadAgentsDir-JrGMJN05.js";import{Bn as T,J as E,Mn as D,Nn as O,Wt as k,h as A,lr as j,or as M,pt as N,ur as P}from"./state-BPFYBqm1.js";import{n as be,t as F}from"./cwd-Besi3Os3.js";import{c as I,f as xe,i as L,nt as Se,tt as R,u as Ce}from"./debug-BQj6h99Q.js";import{n as we,r as Te}from"./analytics-DJobLaWP.js";import{C as Ee,_ as De}from"./model-CmDF8O9G.js";import{Gt as Oe}from"./prompt-DnPppVz8.js";import*as z from"path";import{dirname as ke}from"path";k(),f(),ne(),Oe(),s(),o(),ce(),ge(),be(),L(),m(),De(),ve(),ie(),h(),de(),x(),se();function Ae(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?.type!==`tool_use`)continue;let i=r.input;if(typeof i!=`object`||!i)return[];let a=me().safeParse(i.todos);return a.success?a.data:[]}return[]}function je(e,t){if(e.fileHistorySnapshots&&e.fileHistorySnapshots.length>0&&C(e.fileHistorySnapshots,e=>{t(t=>({...t,fileHistory:e}))}),!l()&&e.messages&&e.messages.length>0){let n=Ae(e.messages);if(n.length>0){let e=N();t(t=>({...t,todos:{...t.todos,[e]:n}}))}}}function B(e,t){if(!(!e&&!t))return{name:e??``,color:t==="default"?void 0:t}}function V(e,t,n){if(t)return{agentDefinition:t,agentType:void 0};if(!e)return O(void 0),{agentDefinition:void 0,agentType:void 0};let r=n.activeAgents.find(t=>t.agentType===e);return r?(O(r.agentType),!E()&&r.model&&r.model!==`inherit`&&D(Ee(r.model)),{agentDefinition:r,agentType:r.agentType}):(I(`Resumed session had agent "${e}" but it is no longer available. Using default behavior.`),O(void 0),{agentDefinition:void 0,agentType:void 0})}function H(e){let t=w();if(t){g(t);return}if(e){try{process.chdir(e.worktreePath)}catch{g(null);return}r(e.worktreePath),T(F()),c(e),u(),_(),b.cache.clear?.()}}function Me(){let e=w();if(e){c(null),u(),_(),b.cache.clear?.();try{process.chdir(e.originalCwd)}catch{return}r(e.originalCwd),T(F())}}async function Ne(e,t,n){if(t.forkSession)e.contentReplacements?.length&&await le(e.contentReplacements);else{let n=t.sessionIdOverride??e.sessionId;n&&(M(i(n),t.transcriptPath?ke(t.transcriptPath):null),await S(),ae(n))}ye(t.forkSession?{...e,worktreeSession:void 0}:e),t.forkSession||(H(e.worktreeSession),oe());let{agentDefinition:r,agentType:a}=V(e.agentSetting,n.mainThreadAgentDefinition,n.agentDefinitions);pe(`normal`),t.includeAttribution;let o=B(e.agentName,e.agentColor);p(e.agentName);let s=n.agentDefinitions;return{messages:e.messages,fileHistorySnapshots:e.fileHistorySnapshots,contentReplacements:e.contentReplacements,agentName:e.agentName,agentColor:e.agentColor==="default"?void 0:e.agentColor,restoredAgentDef:r,initialState:{...n.initialState,...a&&{agent:a},...o&&{standaloneAgentContext:o},agentDefinitions:s}}}a(),k(),ee(),we(),ue(),t(),R(),L(),xe(),_e(),P();var Pe=1e3,Fe=500,Ie=300,Le=2e3,Re=typeof Bun<`u`,U=null,W=null,G=new Set,K=!1,q=!1,J=!1,Y=null,X=j(),Z=null;async function ze(){if(K||q)return;K=!0,J||(J=!0,fe(()=>{n(),X.emit()}));let e=await Ve();e.length!==0&&(I(`Watching for changes in skill/command directories: ${e.join(`, `)}...`),U=v.watch(e,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:Z?.stabilityThreshold??Pe,pollInterval:Z?.pollInterval??Fe},ignored:(e,t)=>t&&!t.isFile()&&!t.isDirectory()?!0:e.split(z.sep).some(e=>e===`.git`),ignorePermissionErrors:!0,usePolling:Re,interval:Z?.chokidarInterval??Le,atomic:!0}),U.on(`add`,$),U.on(`change`,$),U.on(`unlink`,$),Y=Se(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 Be=X.subscribe;async function Ve(){let e=Ce(),t=[],n=d(`userSettings`,`skills`);if(n)try{await e.stat(n),t.push(n)}catch{}let r=d(`userSettings`,`commands`);if(r)try{await e.stat(r),t.push(r)}catch{}let i=d(`projectSettings`,`skills`);if(i)try{let n=z.resolve(i);await e.stat(n),t.push(n)}catch{}let a=d(`projectSettings`,`commands`);if(a)try{let n=z.resolve(a);await e.stat(n),t.push(n)}catch{}for(let n of A()){let r=z.join(n,`.workmate`,`skills`);try{await e.stat(r),t.push(r)}catch{}}return t}function $(e){I(`Detected skill change: ${e}`),Te(`tengu_skill_file_changed`,{source:`chokidar`}),He(e)}function He(t){G.add(t),W&&clearTimeout(W),W=setTimeout(async()=>{W=null;let t=[...G];if(G.clear(),he(await te(`skills`,t[0]))){I(`ConfigChange hook blocked skill reload (${t.length} paths)`);return}y(),e(),re(),X.emit()},Z?.reloadDebounce??Ie)}async function Ue(e){U&&(await U.close(),U=null),W&&(clearTimeout(W),W=null),G.clear(),X.clear(),K=!1,q=!1,Z=e??null}var We={initialize:ze,dispose:Q,subscribe:Be,resetForTesting:Ue};export{V as a,Ne as i,B as n,je as o,Me as r,H as s,We as t};
@@ -1,2 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,n,o as r,t as i}from"./envUtils-DcaKZlRU.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{By as s,Ky as c,Uy as l,Wy as ee,_b as u,fb as d,lb as f,ob as p}from"./loadAgentsDir-JrGMJN05.js";import{P as m,di as h,fi as g,j as _,t as v}from"./src-DL3w8VPk2.js";import{t as y}from"./jsx-runtime-Bb4Xn-E0.js";import{a as b,an as x,c as S,g as C,in as w,ln as T,r as E,wn as D,xn as O}from"./settings-aUygByiZ.js";import{f as k,v as A}from"./startupProfiler-2sjXZkIP.js";import{Bt as j,Gt as M,_ as N,bt as te,i as P,ii as F,oi as I,x as L}from"./model-CmDF8O9G.js";import{h as R,l as z,o as B,p as V}from"./proxy-C0j74LqT.js";import{g as H,h as U}from"./pidLock-BR4hzYgp.js";import{n as W,t as G}from"./nativeInstaller-xxyUjXbl.js";import{n as K,t as q}from"./allErrors-uyOMiF9U.js";function J(){return[]}function Y(e,t=null,n){let r=e?.find(e=>e.name===`ide`);if(t){let e=u(t.ideType),i=d(t.ideType)?`plugin`:`extension`;if(t.error)return[{label:`IDE`,value:(0,$.jsxs)(m,{children:[_(`error`,n)(o.cross),` Error installing `,e,` `,i,`:`,` `,t.error,`
2
- `,`Please restart your IDE and try again.`]})}];if(t.installed)return r&&r.type===`connected`?t.installedVersion===r.serverInfo?.version?[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion}`}]:[{label:`IDE`,value:`Connected to ${e} ${i} version ${t.installedVersion} (server version: ${r.serverInfo?.version})`}]:[{label:`IDE`,value:`Installed ${e} ${i}`}]}else if(r){let e=p(r)??`IDE`;return r.type===`connected`?[{label:`IDE`,value:`Connected to ${e} extension`}]:[{label:`IDE`,value:`${_(`error`,n)(o.cross)} Not connected to ${e}`}]}return[]}function X(e=[],t){let n=e.filter(e=>e.name!==`ide`);if(!n.length)return[];let r={connected:0,pending:0,needsAuth:0,failed:0};for(let e of n)e.type===`connected`?r.connected++:e.type===`pending`?r.pending++:e.type===`needs-auth`?r.needsAuth++:r.failed++;let i=[];return r.connected&&i.push(_(`success`,t)(`${r.connected} connected`)),r.needsAuth&&i.push(_(`warning`,t)(`${r.needsAuth} need auth`)),r.pending&&i.push(_(`inactive`,t)(`${r.pending} pending`)),r.failed&&i.push(_(`error`,t)(`${r.failed} failed`)),[{label:`MCP servers`,value:`${i.join(`, `)} ${_(`inactive`,t)(`· /mcp`)}`}]}async function Z(){let e=l(await ee()),t=[];return e.forEach(e=>{let n=O(e.path);t.push(`Large ${n} will impact performance (${k(e.content.length)} chars > ${k(s)})`)}),t}function Q(){return[{label:`Setting sources`,value:w().filter(e=>{let t=S(e);return t!==null&&Object.keys(t).length>0}).map(e=>{if(e===`policySettings`){let e=b();if(e===null)return null;switch(e){case`remote`:return`Enterprise managed settings (remote)`;case`plist`:return`Enterprise managed settings (plist)`;case`hklm`:return`Enterprise managed settings (HKLM)`;case`file`:{let{hasBase:e,hasDropIns:t}=E();return e&&t?`Enterprise managed settings (file + drop-ins)`:t?`Enterprise managed settings (drop-ins)`:`Enterprise managed settings (file)`}case`hkcu`:return`Enterprise managed settings (HKCU)`}}return x(e)}).filter(e=>e!==null)}]}async function ne(){return(await W()).map(e=>e.message)}async function re(){let e=await U(),t=[],{errors:n}=q();if(n.length>0){let e=Array.from(new Set(n.map(e=>e.file))).join(`, `);t.push(`Found invalid settings files: ${e}. They will be ignored.`)}return e.warnings.forEach(e=>{t.push(e.issue)}),e.hasUpdatePermissions===!1&&t.push(`No write permissions for auto-updates (requires sudo)`),t}function ie(){let e=te();if(!e)return[];let t=[];return e.subscription&&t.push({label:`Login method`,value:`${e.subscription} Account`}),e.tokenSource&&t.push({label:`Auth token`,value:e.tokenSource}),e.apiKeySource&&t.push({label:`API key`,value:e.apiKeySource}),e.organization&&!process.env.IS_DEMO&&t.push({label:`Organization`,value:e.organization}),e.email&&!process.env.IS_DEMO&&t.push({label:`Email`,value:e.email}),t}function ae(){let e=F(),r=[];if(e!==`firstParty`){let t={bedrock:`AWS Bedrock`,vertex:`Google Vertex AI`,foundry:`Microsoft Foundry`,gemini:`Gemini API`,grok:`Grok API`,openai:`OpenAI API`}[e];r.push({label:`API provider`,value:t})}if(e===`firstParty`){let e=process.env.ANTHROPIC_BASE_URL;e&&r.push({label:`API base URL`,value:e})}else if(e===`bedrock`){let e=process.env.BEDROCK_BASE_URL;e&&r.push({label:`Bedrock base URL`,value:e}),r.push({label:`AWS region`,value:i()}),t(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)&&r.push({value:`AWS auth skipped`})}else if(e===`vertex`){let e=process.env.VERTEX_BASE_URL;e&&r.push({label:`Vertex base URL`,value:e});let i=process.env.ANTHROPIC_VERTEX_PROJECT_ID;i&&r.push({label:`GCP project`,value:i}),r.push({label:`Default region`,value:n()}),t(process.env.CLAUDE_CODE_SKIP_VERTEX_AUTH)&&r.push({value:`GCP auth skipped`})}else if(e===`foundry`){let e=process.env.ANTHROPIC_FOUNDRY_BASE_URL;e&&r.push({label:`Microsoft Foundry base URL`,value:e});let n=process.env.ANTHROPIC_FOUNDRY_RESOURCE;n&&r.push({label:`Microsoft Foundry resource`,value:n}),t(process.env.CLAUDE_CODE_SKIP_FOUNDRY_AUTH)&&r.push({value:`Microsoft Foundry auth skipped`})}else if(e===`gemini`){let e=process.env.GEMINI_BASE_URL||`https://generativelanguage.googleapis.com/v1beta`;r.push({label:`Gemini base URL`,value:e})}else if(e===`grok`){let e=process.env.GROK_BASE_URL;r.push({label:`Grok base URL`,value:e})}else if(e===`openai`){let e=process.env.OPENAI_BASE_URL;r.push({label:`OpenAI base URL`,value:e})}let a=B();a&&r.push({label:`Proxy`,value:a});let o=V();return process.env.NODE_EXTRA_CA_CERTS&&r.push({label:`Additional CA cert(s)`,value:process.env.NODE_EXTRA_CA_CERTS}),o&&(o.cert&&process.env.CLAUDE_CODE_CLIENT_CERT&&r.push({label:`mTLS client cert`,value:process.env.CLAUDE_CODE_CLIENT_CERT}),o.key&&process.env.CLAUDE_CODE_CLIENT_KEY&&r.push({label:`mTLS client key`,value:process.env.CLAUDE_CODE_CLIENT_KEY})),r}function oe(e){let t=L(e);if(e===null&&M()){let e=P();t=`${h.bold(`Default`)} ${e}`}return t}var $,se=e((()=>{g(),a(),v(),j(),c(),H(),r(),D(),A(),f(),N(),I(),R(),G(),z(),K(),T(),C(),$=y()}));export{re as a,J as c,se as d,ne as i,Q as l,ie as n,X as o,Y as r,Z as s,ae as t,oe as u};
@@ -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-B1EI5LOU.js";async function i(e,t){return(0,a.jsx)(r,{onClose:e,context:t,defaultTab:`Status`})}var a;e((()=>{n(),a=t()}))();export{i as call};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./switcher-BUNSEJ-7.js";e();export{t as restoreActiveProvider};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gn as t,Un as n,Wn as r}from"./settings-aUygByiZ.js";import{u as i}from"./oauth-D38aRTUb.js";import{Bt as a,Ot as o,St as s,ii as c,oi as l,si as u}from"./model-CmDF8O9G.js";function d(){p=void 0,r()}function f(){if(p!==void 0)return p;if(c()!==`firstParty`||!u()||process.env.CLAUDE_CODE_ENTRYPOINT===`local-agent`)return p=t(!1);let e=o();if(e?.accessToken&&e.subscriptionType===null||e?.accessToken&&e.scopes?.includes(`user:inference`)&&(e.subscriptionType===`enterprise`||e.subscriptionType===`team`))return p=t(!0);try{let{key:e}=s({skipRetrievingKeyFromApiKeyHelper:!0});if(e)return p=t(!0)}catch{}return p=t(!1)}var p,m=e((()=>{i(),a(),l(),n()}));export{f as n,d as r,m as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Cx as t,_T as n,vT as r,wx as i}from"./loadAgentsDir-JrGMJN05.js";import{n as a,t as o}from"./partition-CYoWXLNU.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(),n(),t()}));export{s as n,c as t};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./trustedDevice-BF78PNK8.js";export{t as clearTrustedDeviceToken,e as enrollTrustedDevice};
@@ -1,5 +0,0 @@
1
- import{$d as e,Zd as t}from"./loadAgentsDir-JrGMJN05.js";import{di as n,fi as r}from"./src-DL3w8VPk2.js";import{c as i,i as a}from"./debug-BQj6h99Q.js";import{n as o,o as s}from"./process-gEbdy6uY.js";import{n as c,r as l}from"./execFileNoThrow-DYm1GeGn.js";import{l as u,u as d}from"./ripgrep-X5m4gJ-3.js";import{join as f}from"node:path";import{execSync as p}from"node:child_process";import{existsSync as m,readFileSync as h}from"node:fs";import{homedir as g}from"node:os";r(),a(),d(),l(),e(),o();var _=`@readmagic/workmate`;function v(){try{let e=f(u,`..`,`package.json`);if(m(e)){let t=JSON.parse(h(e,`utf-8`));if(t.version)return t.version}}catch{}return`0.0.14`}function y(e){try{return p(`which ${e} 2>/dev/null`,{stdio:`pipe`}),!0}catch{return!1}}function b(){return!!(process.execPath.includes(`bun`)||m(f(f(g(),`.bun`,`install`,`global`),`node_modules`,_)))}async function x(){let e=await c(`npm`,[`view`,`${_}@latest`,`version`,`--prefer-online`],{abortSignal:AbortSignal.timeout(1e4),cwd:g()});return e.code===0?e.stdout.trim():(i(`npm view failed: ${e.stderr}`),null)}function S(e,t){let n=e=>e.replace(/^\D/,``).split(`.`).map(Number),r=n(e),i=n(t);for(let e=0;e<3;e++){if((r[e]??0)>(i[e]??0))return!0;if((r[e]??0)<(i[e]??0))return!1}return!0}async function C(){let e=v();s(`Current version: ${e}\n`);let r=y(`bun`),i=b()&&r?`bun`:`npm`;s(`Package manager: ${i}\n`),s(`Checking for updates...
2
- `);let a=await x();if(!a){process.stderr.write(`${n.red(`Failed to check for updates`)}\n`),process.stderr.write(`Unable to fetch latest version from npm registry.
3
- `),await t(1);return}if(a===e||S(e,a)){s(`${n.green(`ccb is up to date (${e})`)}\n`),await t(0);return}s(`New version available: ${a} (current: ${e})\n`),s(`Installing update via ${i}...\n`);try{p(i===`bun`?`bun install -g ${_}@latest`:`npm install -g ${_}@latest`,{stdio:`inherit`,cwd:g(),timeout:12e4}),s(`${n.green(`Successfully updated from ${e} to ${a}`)}\n`)}catch(e){process.stderr.write(`${n.red(`Update failed`)}\n`),process.stderr.write(`${e}\n`),process.stderr.write(`
4
- `),process.stderr.write(`Try manually updating with:
5
- `),i===`bun`?process.stderr.write(`${n.bold(` bun install -g ${_}@latest`)}\n`):process.stderr.write(`${n.bold(` npm install -g ${_}@latest`)}\n`),await t(1)}await t(0)}export{C as updateCCB};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Xh as t,Zh as n}from"./loadAgentsDir-JrGMJN05.js";import{C as r,_ as i,s as a}from"./model-CmDF8O9G.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{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{Ew as r,Tw as i,_E as a,gE as o,mE as s,pE as c,vw as l,ww as u,yw as d}from"./loadAgentsDir-JrGMJN05.js";import{p as f}from"./external-CEp-aPkt.js";import{r as p}from"./lazySchema-B4D4qJVE.js";import{B as m,C as ee,F as h,P as g,R as _,S as v,c as y,f as b,i as te,u as x,x as S}from"./debug-BQj6h99Q.js";import{_t as C,gt as w,ht as T,pt as ne,vt as re}from"./settings-aUygByiZ.js";import{o as ie,s as E}from"./log-BlJ7CcKG.js";import{homedir as ae}from"os";import*as D from"path";import{join as oe,resolve as se}from"path";import{randomBytes as O}from"crypto";import{readFile as k,readdir as A,rename as j,stat as M,unlink as N,writeFile as P}from"fs/promises";function F(){return oe(l(),H)}async function I(){let e=F();try{let t=v(await k(e,{encoding:`utf-8`}));if(typeof t!=`object`||!t||!(`version`in t)||!(`fetchedAt`in t)||!(`counts`in t))return y(`Install counts cache has invalid structure`),null;let n=t;if(n.version!==V)return y(`Install counts cache version mismatch (got ${n.version}, expected ${V})`),null;if(typeof n.fetchedAt!=`string`||!Array.isArray(n.counts))return y(`Install counts cache has invalid structure`),null;let r=new Date(n.fetchedAt).getTime();return Number.isNaN(r)?(y(`Install counts cache has invalid fetchedAt timestamp`),null):n.counts.every(e=>typeof e==`object`&&!!e&&typeof e.plugin==`string`&&typeof e.unique_installs==`number`)?Date.now()-r>W?(y(`Install counts cache is stale (>24h old)`),null):{version:n.version,fetchedAt:n.fetchedAt,counts:n.counts}:(y(`Install counts cache has malformed entries`),null)}catch(e){return h(e)!==`ENOENT`&&y(`Failed to load install counts cache: ${g(e)}`),null}}async function L(e){let t=F(),n=`${t}.${O(8).toString(`hex`)}.tmp`;try{let r=l();await x().mkdir(r),await P(n,ee(e,null,2),{encoding:`utf-8`,mode:384}),await j(n,t),y(`Install counts cache saved successfully`)}catch(e){E(e);try{await N(n)}catch{}}}async function R(){y(`Fetching install counts from ${U}`);let e=performance.now();try{let n=await t.get(U,{timeout:1e4});if(!n.data?.plugins||!Array.isArray(n.data.plugins))throw Error(`Invalid response format from install counts API`);return r(`install_counts`,U,`success`,performance.now()-e),n.data.plugins}catch(t){throw r(`install_counts`,U,`failure`,performance.now()-e,u(t)),t}}async function z(){let e=await I();if(e){y(`Using cached install counts`),r(`install_counts`,U,`cache_hit`,0);let t=new Map;for(let n of e.counts)t.set(n.plugin,n.unique_installs);return t}try{let e=await R();await L({version:V,fetchedAt:new Date().toISOString(),counts:e});let t=new Map;for(let n of e)t.set(n.plugin,n.unique_installs);return t}catch(e){return E(e),y(`Failed to fetch install counts: ${g(e)}`),null}}function B(e){if(e<1e3)return String(e);if(e<1e6){let t=(e/1e3).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}K`:`${t}K`}let t=(e/1e6).toFixed(1);return t.endsWith(`.0`)?`${t.slice(0,-2)}M`:`${t}M`}var V,H,U,W,G=e((()=>{n(),te(),_(),b(),ie(),S(),i(),d(),V=1,H=`install-counts-cache.json`,U=`https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json`,W=1440*60*1e3}));async function K(e){let t=e.trim(),n=x(),r=t.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(r?.[1]){let e=r[1],t=r[3];return t?{source:`git`,url:e,ref:t}:{source:`git`,url:e}}if(t.startsWith(`http://`)||t.startsWith(`https://`)){let e=t.match(/^([^#]+)(#(.+))?$/),n=e?.[1]||t,r=e?.[3];if(n.endsWith(`.git`)||n.includes(`/_git/`))return r?{source:`git`,url:n,ref:r}:{source:`git`,url:n};let i;try{i=new URL(n)}catch{return{source:`url`,url:n}}if((i.hostname===`github.com`||i.hostname===`www.github.com`)&&i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let e=n.endsWith(`.git`)?n:`${n}.git`;return r?{source:`git`,url:e,ref:r}:{source:`git`,url:e}}return{source:`url`,url:n}}let i=process.platform===`win32`&&(t.startsWith(`.\\`)||t.startsWith(`..\\`)||/^[a-zA-Z]:[/\\]/.test(t));if(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`/`)||t.startsWith(`~`)||i){let e=se(t.startsWith(`~`)?t.replace(/^~/,ae()):t),r;try{r=await n.stat(e)}catch(t){let n=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((()=>{_(),b()}));function le(e){let t=D.basename(e),n=D.basename(D.dirname(e));return t===`plugin.json`?`plugin`:t===`marketplace.json`?`marketplace`:n===`.claude-plugin`?`plugin`:`unknown`}function q(e){return e.issues.map(e=>({path:e.path.join(`.`)||`root`,message:e.message,code:e.code}))}function J(e,t,n,r){e.includes(`..`)&&n.push({path:t,message:r?`Path contains "..": ${e}. ${r}`:`Path contains ".." which could be a path traversal attempt: ${e}`})}function ue(e){let t=e.replace(/^(\.\.\/)+/,``);return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${t===e?`./plugins/my-plugin`:`./${t}`}" instead of "${e}".`}async function Y(e){let t=[],n=[],r=D.resolve(e),i;try{i=await k(r,{encoding:`utf-8`})}catch(e){let t=h(e),n;return n=t===`ENOENT`?`File not found: ${r}`:t===`EISDIR`?`Path is not a file: ${r}`:`Failed to read file: ${g(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`plugin`}}let a;try{a=v(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${g(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=T().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=[],r=D.resolve(e),i;try{i=await k(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: ${g(e)}`,{success:!1,errors:[{path:`file`,message:n,code:t}],warnings:[],filePath:r,fileType:`marketplace`}}let a;try{a=v(i)}catch(e){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${g(e)}`}],warnings:[],filePath:r,fileType:`marketplace`}}if(a&&typeof a==`object`){let e=a;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 o=C().extend({plugins:f(w().strict())}).strict().safeParse(a);if(o.success||t.push(...q(o.error)),o.success){let e=o.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 i=D.dirname(r),a=D.basename(i)===`.claude-plugin`?D.dirname(i):i;for(let[t,r]of e.plugins.entries()){if(!r.version||typeof r.source!=`string`||!r.source.startsWith(`./`))continue;let e=D.join(a,r.source,`.claude-plugin`,`plugin.json`),i;try{let t=v(await k(e,{encoding:`utf-8`}));typeof t.version==`string`&&(i=t.version)}catch{continue}i&&i!==r.version&&n.push({path:`plugins[${t}].version`,message:`Entry declares version "${r.version}" but ${r.source}/.claude-plugin/plugin.json says "${i}". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "${i}" to match.`})}}e.metadata?.description||n.push({path:`metadata.description`,message:`No marketplace description provided. Adding a description helps users understand what this marketplace offers`})}return{success:t.length===0,errors:t,warnings:n,filePath:r,fileType:`marketplace`}}function de(e,t,n){let r=[],i=[],o=t.match(c);if(!o)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 s=o[1]||``,l;try{l=a(s)}catch(t){return r.push({path:`frontmatter`,message:`YAML frontmatter failed to parse: ${g(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 k(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: ${g(t)}`}],warnings:[],filePath:e,fileType:`hooks`}}let n;try{n=v(t)}catch(t){return{success:!1,errors:[{path:`json`,message:`Invalid JSON syntax: ${g(t)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:e,fileType:`hooks`}}let r=ne().safeParse(n);return r.success?{success:!0,errors:[],warnings:[],filePath:e,fileType:`hooks`}:{success:!1,errors:q(r.error),warnings:[],filePath:e,fileType:`hooks`}}async function Q(e,t){let n;try{n=await A(e,{withFileTypes:!0})}catch(e){let t=h(e);if(t===`ENOENT`||t===`ENOTDIR`)return[];throw e}if(t)return n.filter(e=>e.isDirectory()).map(t=>D.join(e,t.name,`SKILL.md`));let r=[];for(let t of n){let n=D.join(e,t.name);t.isDirectory()?r.push(...await Q(n,!1)):t.isFile()&&t.name.toLowerCase().endsWith(`.md`)&&r.push(n)}return r}async function fe(e){let t=[],n=[[`skill`,D.join(e,`skills`)],[`agent`,D.join(e,`agents`)],[`command`,D.join(e,`commands`)]];for(let[e,r]of n){let n=await Q(r,e===`skill`);for(let r of n){let n;try{n=await k(r,{encoding:`utf-8`})}catch(n){if(m(n))continue;t.push({success:!1,errors:[{path:`file`,message:`Failed to read: ${g(n)}`}],warnings:[],filePath:r,fileType:e});continue}let i=de(r,n,e);(i.errors.length>0||i.warnings.length>0)&&t.push(i)}}let r=await Z(D.join(e,`hooks`,`hooks.json`));return(r.errors.length>0||r.warnings.length>0)&&t.push(r),t}async function pe(e){let t=D.resolve(e),n=null;try{n=await M(t)}catch(e){if(!m(e))throw e}if(n?.isDirectory()){let e=await X(D.join(t,`.claude-plugin`,`marketplace.json`));if(e.errors[0]?.code!==`ENOENT`)return e;let n=await Y(D.join(t,`.claude-plugin`,`plugin.json`));return n.errors[0]?.code===`ENOENT`?{success:!1,errors:[{path:`directory`,message:`No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json`}],warnings:[],filePath:t,fileType:`plugin`}:n}switch(le(e)){case`plugin`:return Y(e);case`marketplace`:return X(e);case`unknown`:try{let n=v(await k(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((()=>{p(),_(),s(),S(),o(),re(),$=new Set([`category`,`source`,`tags`,`strict`,`id`])}));export{K as a,G as c,ce as i,pe as n,B as o,fe as r,z as s,me as t};
@@ -1 +0,0 @@
1
- import{St as e,_t as t}from"./loadAgentsDir-JrGMJN05.js";e();export{t as execIntoTmuxWorktree};