@readmagic/workmate 0.0.28 → 0.0.30

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 (305) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-Bmgh8VS3.js → AddWorkspaceDirectory-B03NZZuQ.js} +1 -1
  2. package/dist/chunks/AgentsMdExternalIncludesDialog-45Ize2zR.js +1 -0
  3. package/dist/chunks/{AgentsMdExternalIncludesDialog-BJfHqScU.js → AgentsMdExternalIncludesDialog-CIyefOzT.js} +1 -1
  4. package/dist/chunks/App-WBysAL0_.js +1 -0
  5. package/dist/chunks/{BackgroundTasksDialog-WkoL4g5Q.js → BackgroundTasksDialog-CvvrjBoq.js} +2 -2
  6. package/dist/chunks/{BypassPermissionsModeDialog-BT9yl0Qt.js → BypassPermissionsModeDialog-DdVbMyla.js} +1 -1
  7. package/dist/chunks/{CustomSelect-t4wXuXWH.js → CustomSelect-iSG1rbWU.js} +1 -1
  8. package/dist/chunks/{DiffDialog-CXZxnb7Y.js → DiffDialog-DSb46fzB.js} +5 -5
  9. package/dist/chunks/Doctor--yF3SBsD.js +1 -0
  10. package/dist/chunks/Doctor-dR71Dg_D.js +3 -0
  11. package/dist/chunks/ExitFlow-BiBi5Sqk.js +2 -0
  12. package/dist/chunks/{InvalidConfigDialog-riLYEaUP.js → InvalidConfigDialog-7MkDSXXj.js} +1 -1
  13. package/dist/chunks/{InvalidSettingsDialog-BGXl3V1A.js → InvalidSettingsDialog-D8Ves3Th.js} +1 -1
  14. package/dist/chunks/{KeybindingProviderSetup-syiDgtpB.js → KeybindingProviderSetup-DJSFdVYv.js} +1 -1
  15. package/dist/chunks/MCPConnectionManager-BZxRMdGO.js +1 -0
  16. package/dist/chunks/MCPToolListView-H_Kvvelz.js +1 -0
  17. package/dist/chunks/{McpParsingWarnings-Czze2JPd.js → McpParsingWarnings-D2xvaog9.js} +1 -1
  18. package/dist/chunks/MessageSelector-DQgIgPij.js +3 -0
  19. package/dist/chunks/Messages-DyQCr-od.js +10 -0
  20. package/dist/chunks/{Onboarding-CD_Uv5h9.js → Onboarding-DFufTPIY.js} +1 -1
  21. package/dist/chunks/{PromptInputFooterSuggestions-CHXJsTtQ.js → PromptInputFooterSuggestions-B9JRcHHE.js} +1 -1
  22. package/dist/chunks/{PromptInputHelpMenu-BZIVCV7V.js → PromptInputHelpMenu-DcGXK5lt.js} +1 -1
  23. package/dist/chunks/{ProviderSetup-CwMvjmjh.js → ProviderSetup-DJ_Z1BSe.js} +1 -1
  24. package/dist/chunks/QueryEngine-BQ5PSqKV.js +1 -0
  25. package/dist/chunks/{REPL-CtFtb35A.js → REPL-CjoJCy0g.js} +24 -24
  26. package/dist/chunks/REPL-DGieTVDl.js +1 -0
  27. package/dist/chunks/ResumeConversation-exTLviBY.js +1 -0
  28. package/dist/chunks/SearchExtraToolsTool-BBhWAuoA.js +1 -0
  29. package/dist/chunks/Settings-nM6-cXh0.js +2 -0
  30. package/dist/chunks/Spinner-ChT4lOOg.js +1 -0
  31. package/dist/chunks/{SpinnerGlyph-BR_SiV9L.js → SpinnerGlyph-4aVLQdJf.js} +1 -1
  32. package/dist/chunks/{TextInput-ou7ZhpVY.js → TextInput-CanSwT9J.js} +5 -5
  33. package/dist/chunks/{ThemePicker-CVFWqSc7.js → ThemePicker-CXzPiSy0.js} +1 -1
  34. package/dist/chunks/{TrustDialog-CGXv_LF4.js → TrustDialog-D0fJ-YIw.js} +1 -1
  35. package/dist/chunks/{ValidationErrorsList-CKeHoN2Z.js → ValidationErrorsList-29bQ0l-Q.js} +1 -1
  36. package/dist/chunks/{_baseEach-BYhqv77g.js → _baseEach-DPcnudh_.js} +1 -1
  37. package/dist/chunks/{add-dir-BSizpuef.js → add-dir-DbNz1SeY.js} +1 -1
  38. package/dist/chunks/{agentDisplay-JKfYFD1m.js → agentDisplay-Bif3eE1e.js} +1 -1
  39. package/dist/chunks/{agents-BDTCH6YB.js → agents-CbsNbPbp.js} +1 -1
  40. package/dist/chunks/{agents-MEaV8P2G.js → agents-yvC-VikU.js} +6 -6
  41. package/dist/chunks/allErrors-Bv1e8fra.js +1 -0
  42. package/dist/chunks/{appleTerminalBackup-CN8kS74J.js → appleTerminalBackup-Ct9hf1QQ.js} +1 -1
  43. package/dist/chunks/{backgroundHousekeeping-CsXlkIg3.js → backgroundHousekeeping-C75FgxW1.js} +1 -1
  44. package/dist/chunks/backgroundHousekeeping-d0qpqWHe.js +1 -0
  45. package/dist/chunks/banner-D5m9LUjl.js +2 -0
  46. package/dist/chunks/{branch-BllXcYwS.js → branch-DOQ3yNds.js} +2 -2
  47. package/dist/chunks/bridgeControl-DMUu37uO.js +2 -0
  48. package/dist/chunks/{btw-DzaRBa6o.js → btw-DUjuwyMH.js} +1 -1
  49. package/dist/chunks/{bundledMode-D9omqD3L.js → bundledMode-Dqe4pz0a.js} +1 -1
  50. package/dist/chunks/caches-BKAPMXp9.js +1 -0
  51. package/dist/chunks/caches-he4NeZSK.js +1 -0
  52. package/dist/chunks/channel-C8JmEI06.js +2 -0
  53. package/dist/chunks/{channel-Gw6skpUh.js → channel-TEYwDITo.js} +1 -1
  54. package/dist/chunks/{clear-CDQs9_5P.js → clear-BFlTcvMt.js} +1 -1
  55. package/dist/chunks/{client-pA7fKk0-.js → client-D3QmHVeI.js} +1 -1
  56. package/dist/chunks/client-dTKhXxBT.js +1 -0
  57. package/dist/chunks/{client-2w-g5kMx.js → client-q_uGYC2E.js} +1 -1
  58. package/dist/chunks/client-y_U1O4mI.js +1 -0
  59. package/dist/chunks/commands-BoGtXPAA.js +1 -0
  60. package/dist/chunks/compact-CyR7Sbo1.js +2 -0
  61. package/dist/chunks/config-B-hDBSL8.js +1 -0
  62. package/dist/chunks/config-Bjwat4P6.js +3 -0
  63. package/dist/chunks/config-DubkVeOw.js +1 -0
  64. package/dist/chunks/{context-TkdzCK3Y.js → context-Cm_gyngQ.js} +1 -1
  65. package/dist/chunks/{context-noninteractive-BcBo64vo.js → context-noninteractive-BDmFfPRt.js} +2 -2
  66. package/dist/chunks/context-noninteractive-CmOFpwwP.js +1 -0
  67. package/dist/chunks/conversation-B7YCvyCD.js +1 -0
  68. package/dist/chunks/conversation-CYZKYlWc.js +1 -0
  69. package/dist/chunks/{conversationRecovery-_hWC7JBO.js → conversationRecovery-BUqpxLl-.js} +1 -1
  70. package/dist/chunks/crossProjectResume-BCa2l0KZ.js +40 -0
  71. package/dist/chunks/{debug-2pVES-2G.js → debug-NBJH_NxR.js} +2 -2
  72. package/dist/chunks/{detectRepository--luIRv5H.js → detectRepository-Bu0he_XM.js} +1 -1
  73. package/dist/chunks/{diff-BzVUPO4Z.js → diff-BEvpLh_b.js} +1 -1
  74. package/dist/chunks/{directoryCompletion-BC0qRmrz.js → directoryCompletion-CwKPuwrS.js} +1 -1
  75. package/dist/chunks/doctor-DYKr9Reu.js +1 -0
  76. package/dist/chunks/{entry-333L52Lo.js → entry-JGyBs1p5.js} +3 -3
  77. package/dist/chunks/{execFileNoThrow-DXSEj8ZO.js → execFileNoThrow-7Ys9mO27.js} +1 -1
  78. package/dist/chunks/exit-DU2KGyDk.js +1 -0
  79. package/dist/chunks/{extraUsage-CmgRR-zH.js → extraUsage-cZx2XLx4.js} +1 -1
  80. package/dist/chunks/extractMemories-4wbv-mTc.js +1 -0
  81. package/dist/chunks/fast-BALHWqpd.js +1 -0
  82. package/dist/chunks/{fast-D7oNjaZ3.js → fast-DUJq6-QE.js} +1 -1
  83. package/dist/chunks/{fetchModelList-Cv1vWIpC.js → fetchModelList-Dn8OahtV.js} +1 -1
  84. package/dist/chunks/fetchModelList-OZ2sLDEx.js +1 -0
  85. package/dist/chunks/{fileSuggestions-DF3HTRKr.js → fileSuggestions-XLnnVLwx.js} +3 -3
  86. package/dist/chunks/{gemini-ou7_YyXc.js → gemini-qzPNGqOX.js} +2 -2
  87. package/dist/chunks/{generateSessionName-CeN9EZNY.js → generateSessionName-CA-cc58H.js} +1 -1
  88. package/dist/chunks/{genericProcessUtils-GqURdVAv.js → genericProcessUtils-XwqvFxyn.js} +1 -1
  89. package/dist/chunks/{goal-CCxo4Wyf.js → goal-x9Pkx5nv.js} +3 -3
  90. package/dist/chunks/{grok-BMmUcNbI.js → grok-36CpLjsq.js} +1 -1
  91. package/dist/chunks/{help-CYtogTZk.js → help-DwfAEV0X.js} +1 -1
  92. package/dist/chunks/{history-CUrqO9rV.js → history-PZLMYab7.js} +1 -1
  93. package/dist/chunks/hooks-BofA8GeO.js +1 -0
  94. package/dist/chunks/{hooks-ByVkvodY.js → hooks-DBmA-DWx.js} +2 -2
  95. package/dist/chunks/{install-DIxyfdXG.js → install-DF4ep6nb.js} +1 -1
  96. package/dist/chunks/{instrumentation-BmHivmxs.js → instrumentation-BAbhrE3f.js} +3 -3
  97. package/dist/chunks/{job-D534P26R.js → job-CFWKIjNl.js} +1 -1
  98. package/dist/chunks/{keybindings-CxgQqQJe.js → keybindings-CkiE_uBG.js} +1 -1
  99. package/dist/chunks/{launchLocalMemory-CWXLb3KF.js → launchLocalMemory-Cf8l-1fz.js} +2 -2
  100. package/dist/chunks/{launchOnboarding-CocPmwzz.js → launchOnboarding-8CDef-v1.js} +1 -1
  101. package/dist/chunks/loadAgentsDir-C-qRJlXH.js +1 -0
  102. package/dist/chunks/{loadAgentsDir-bmpKLPdG.js → loadAgentsDir-DnHL_5cU.js} +358 -358
  103. package/dist/chunks/loadPluginHooks-BuunKr9m.js +1 -0
  104. package/dist/chunks/{loader-BMAtuwRa.js → loader-DsEdsMHv.js} +1 -1
  105. package/dist/chunks/localSearch-BulDBrBk.js +1 -0
  106. package/dist/chunks/{localSearch-Da8cVYoI.js → localSearch-LFCzV7VE.js} +1 -1
  107. package/dist/chunks/{log-L1kqxa_P.js → log-D98mO6yJ.js} +1 -1
  108. package/dist/chunks/{logoUtils-qNuBc2nI.js → logoUtils-B8MIA7c5.js} +1 -1
  109. package/dist/chunks/{magicDocs-BsEiBLQl.js → magicDocs-BoxJusTI.js} +2 -2
  110. package/dist/chunks/{main-B31aPMPP.js → main-B9ciFYnO.js} +22 -22
  111. package/dist/chunks/{managedEnv-EZ2IirNa.js → managedEnv-B0mj-wgE.js} +1 -1
  112. package/dist/chunks/managedEnv-BFpXdDI8.js +1 -0
  113. package/dist/chunks/mcp-B3Ewo-_h.js +1 -0
  114. package/dist/chunks/mcp-CHlAZvpV.js +2 -0
  115. package/dist/chunks/{mcp-Dd8TBfQQ.js → mcp-DVKuOqvY.js} +3 -3
  116. package/dist/chunks/memory-Cr0d-s7U.js +1 -0
  117. package/dist/chunks/{mode-SM8doWgC.js → mode-DBNBDbVP.js} +2 -2
  118. package/dist/chunks/model-B2r1Ms0g.js +1 -0
  119. package/dist/chunks/model-C9ANf1-R.js +1 -0
  120. package/dist/chunks/{modelOptions-BQL4gbNk.js → modelOptions-B4BWYms0.js} +1 -1
  121. package/dist/chunks/{nativeInstaller-DMkZdsof.js → nativeInstaller-BDJxBAPV.js} +1 -1
  122. package/dist/chunks/{notifications-BwS1XsnZ.js → notifications-BV-VeXyJ.js} +1 -1
  123. package/dist/chunks/{onChangeAppState-C9cYQJPF.js → onChangeAppState-BGWWkhBg.js} +1 -1
  124. package/dist/chunks/openai-BL_IWBTr.js +2 -0
  125. package/dist/chunks/{overlayContext-C5WPACKC.js → overlayContext-DGUFuee9.js} +1 -1
  126. package/dist/chunks/{parser-CTnaXFVJ.js → parser-D2kggQDp.js} +1 -1
  127. package/dist/chunks/parser-DZUcp40d.js +1 -0
  128. package/dist/chunks/{partition-CKgWl7p4.js → partition-B2VCm4vu.js} +1 -1
  129. package/dist/chunks/{pasteStore-njJCBMKr.js → pasteStore-2RafnH7M.js} +1 -1
  130. package/dist/chunks/permissions-Bkj1UB1h.js +3 -0
  131. package/dist/chunks/{pidLock-CqkC3-nD.js → pidLock-CawSx6hb.js} +2 -2
  132. package/dist/chunks/{plan-Ce6wfjjI.js → plan-D7Ki5ADu.js} +1 -1
  133. package/dist/chunks/plugin-D7I6VZjh.js +17 -0
  134. package/dist/chunks/{pluginAutoupdate-ByokIVEs.js → pluginAutoupdate-Cr3jw-ky.js} +1 -1
  135. package/dist/chunks/pluginBlocklist-JG_kJSSK.js +1 -0
  136. package/dist/chunks/pluginCliCommands-BWIBBFJf.js +1 -0
  137. package/dist/chunks/{pluginFlagging-B2ZX5_oB.js → pluginFlagging-yFcXMVin.js} +1 -1
  138. package/dist/chunks/pluginOperations-6QXjdPOb.js +2 -0
  139. package/dist/chunks/pluginStartupCheck-B-nYb61N.js +1 -0
  140. package/dist/chunks/{pluginStartupCheck-QG0d95dE.js → pluginStartupCheck-CkjyJ4RS.js} +1 -1
  141. package/dist/chunks/plugins-CMDfjFp-.js +4 -0
  142. package/dist/chunks/{poorMode-CG2JNTD0.js → poorMode-BvypUTur.js} +1 -1
  143. package/dist/chunks/poorMode-CP6359Sz.js +1 -0
  144. package/dist/chunks/print-B6x_8O9w.js +13 -0
  145. package/dist/chunks/process-CewWh77C.js +1 -0
  146. package/dist/chunks/process-De2crvt4.js +1 -0
  147. package/dist/chunks/processBashCommand-D0BBcBHY.js +1 -0
  148. package/dist/chunks/processSlashCommand-BvjNuNyP.js +5 -0
  149. package/dist/chunks/{projectOnboardingState-D-_ijZnG.js → projectOnboardingState-ofkjp9FJ.js} +1 -1
  150. package/dist/chunks/prompt-Cpu4meqR.js +1 -0
  151. package/dist/chunks/{prompt-BnDapYGL.js → prompt-DDlkyIzV.js} +3 -3
  152. package/dist/chunks/prompt-HO8Docca.js +1 -0
  153. package/dist/chunks/{promptEditor-14TB3MYt.js → promptEditor-CyMqa_av.js} +1 -1
  154. package/dist/chunks/{protocolHandler-CJO3CRYW.js → protocolHandler-Bjmx7OmF.js} +1 -1
  155. package/dist/chunks/{proxy--_NfbJhm.js → proxy-MzIsnPd7.js} +1 -1
  156. package/dist/chunks/{reconciler-C_HKsocm.js → reconciler-CHbint0C.js} +1 -1
  157. package/dist/chunks/refresh-yut9uEfd.js +1 -0
  158. package/dist/chunks/{reject-Tug1RmkE.js → reject-CrNfit3M.js} +1 -1
  159. package/dist/chunks/{reload-plugins-CL9LWzpq.js → reload-plugins-labKy5Eh.js} +1 -1
  160. package/dist/chunks/rename-c8tElppw.js +1 -0
  161. package/dist/chunks/{renderOptions-B0RFpjRI.js → renderOptions-B3DyIbF6.js} +1 -1
  162. package/dist/chunks/{resume-BZ42SpS2.js → resume-C8xif2lo.js} +2 -2
  163. package/dist/chunks/ripgrep-CIIzTaSI.js +1 -0
  164. package/dist/chunks/{ripgrep-67m14ImZ.js → ripgrep-CnK9qx1e.js} +1 -1
  165. package/dist/chunks/{runtimeObserver-DT5P2_XL.js → runtimeObserver-DuJ8mRfr.js} +4 -4
  166. package/dist/chunks/{runtimeObserver-BLq2guVy.js → runtimeObserver-vmPplAGH.js} +1 -1
  167. package/dist/chunks/sandbox-adapter-BKnsdtVj.js +1 -0
  168. package/dist/chunks/{sandbox-toggle-DghmaJhK.js → sandbox-toggle-USHaZHD7.js} +1 -1
  169. package/dist/chunks/searchExtraTools-DV5iZPdw.js +1 -0
  170. package/dist/chunks/{select-CaxQ-BVq.js → select-BpiKdirZ.js} +1 -1
  171. package/dist/chunks/sessionFileAccessHooks-nq8C34WL.js +1 -0
  172. package/dist/chunks/sessionObserver-CKp3uqPg.js +1 -0
  173. package/dist/chunks/{sessionObserver-DBoZUvWL.js → sessionObserver-sO6PF7mV.js} +1 -1
  174. package/dist/chunks/sessionStorage-CuQf4d1y.js +1 -0
  175. package/dist/chunks/{sessionTracing-5a7HDF4e.js → sessionTracing-Bz89tYh5.js} +1 -1
  176. package/dist/chunks/settings-B3WqnPDo.js +1 -0
  177. package/dist/chunks/{settings-D4M13toi.js → settings-CA-5Px85.js} +2 -2
  178. package/dist/chunks/setup-B-FejaeH.js +3 -0
  179. package/dist/chunks/{shadowedRuleDetection-L3tnySui.js → shadowedRuleDetection-BI6Xz0pY.js} +1 -1
  180. package/dist/chunks/{sideQuestion-BJTVma-5.js → sideQuestion-BEpCuv_7.js} +3 -3
  181. package/dist/chunks/{sinks-CV0SWuZW.js → sinks-BvOPODnl.js} +1 -1
  182. package/dist/chunks/sinks-DLALCllz.js +1 -0
  183. package/dist/chunks/skillChangeDetector-D-fxaAMH.js +1 -0
  184. package/dist/chunks/{skillGapStore-Cposc03e.js → skillGapStore-A1FCr8Mf.js} +2 -2
  185. package/dist/chunks/{skillLifecycle-RXQp0JU7.js → skillLifecycle-CTVa34xO.js} +2 -2
  186. package/dist/chunks/{skillSearchPanel-B2pjskqk.js → skillSearchPanel-CjekGkrw.js} +4 -4
  187. package/dist/chunks/{skills-D2ZjMtv4.js → skills-110JHHbj.js} +1 -1
  188. package/dist/chunks/{sleep-xKMbXTJe.js → sleep-BGewNhNx.js} +1 -1
  189. package/dist/chunks/{startupProfiler-B9Qv2QGH.js → startupProfiler-C_xcIvEA.js} +1 -1
  190. package/dist/chunks/startupProfiler-uueg2S43.js +1 -0
  191. package/dist/chunks/status-D_b3UMke.js +1 -0
  192. package/dist/chunks/statusNoticeHelpers-C5BRU3lw.js +1 -0
  193. package/dist/chunks/{stringUtils-Cs6E5f-B.js → stringUtils-CtJhTszO.js} +1 -1
  194. package/dist/chunks/switcher-BFzvv7KT.js +1 -0
  195. package/dist/chunks/{switcher-rep86o4_.js → switcher-nLHGsxLw.js} +1 -1
  196. package/dist/chunks/{tasks-B4coTfrq.js → tasks-CjYr59Ak.js} +1 -1
  197. package/dist/chunks/{templateJobs-C5ukh6H3.js → templateJobs-ECX0rRRp.js} +1 -1
  198. package/dist/chunks/{terminalSetup-CaGbEVjB.js → terminalSetup-AptBNs_i.js} +1 -1
  199. package/dist/chunks/{terminalSetup-xe_P98fY.js → terminalSetup-CKO6eWhS.js} +1 -1
  200. package/dist/chunks/{theme-7RmvErYJ.js → theme-BCSx9irC.js} +1 -1
  201. package/dist/chunks/tipRegistry-CnQB3TaA.js +2 -0
  202. package/dist/chunks/{toolEventObserver-Dzwzi5Vi.js → toolEventObserver-Bqtypnkk.js} +1 -1
  203. package/dist/chunks/toolPool-B1sXN7SK.js +1 -0
  204. package/dist/chunks/{udsClient-CWeoNrm3.js → udsClient-COYqIvvr.js} +1 -1
  205. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-BT0nexZw.js → useExitOnCtrlCDWithKeybindings-DegJrysj.js} +1 -1
  206. package/dist/chunks/useMainLoopModel-CPnigpM1.js +1 -0
  207. package/dist/chunks/useManagePlugins-BW2Zj_jf.js +1 -0
  208. package/dist/chunks/useMergedTools-CTm1AU9b.js +1 -0
  209. package/dist/chunks/{useSearchInput-j12K4wEo.js → useSearchInput-DrY4BZKy.js} +1 -1
  210. package/dist/chunks/useSettingsErrors-2uIAF6H8.js +1 -0
  211. package/dist/chunks/{util-CCEK8oze.js → util-BUgUtaUV.js} +1 -1
  212. package/dist/chunks/validatePlugin-BGB8T9Mb.js +1 -0
  213. package/dist/chunks/{vim-BlO9V5_5.js → vim-DdxGarvY.js} +1 -1
  214. package/dist/chunks/worktree-DBZ7f9Lk.js +1 -0
  215. package/dist/cli.js +1 -1
  216. package/package.json +1 -1
  217. package/dist/chunks/AgentsMdExternalIncludesDialog-BjbUilCE.js +0 -1
  218. package/dist/chunks/App-COdpsR2w.js +0 -1
  219. package/dist/chunks/Doctor-B6isid5K.js +0 -1
  220. package/dist/chunks/Doctor-COj-tZBc.js +0 -3
  221. package/dist/chunks/ExitFlow-CcMYH5iI.js +0 -2
  222. package/dist/chunks/MCPConnectionManager-C7RmKzJh.js +0 -1
  223. package/dist/chunks/MCPToolListView-CewNLJus.js +0 -1
  224. package/dist/chunks/MessageSelector-Kc6JlnDX.js +0 -3
  225. package/dist/chunks/Messages-BvFYO4Zn.js +0 -10
  226. package/dist/chunks/QueryEngine-DAwfp_ht.js +0 -1
  227. package/dist/chunks/REPL-tFT1FGQF.js +0 -1
  228. package/dist/chunks/ResumeConversation-CERzSBvg.js +0 -1
  229. package/dist/chunks/SearchExtraToolsTool-ndh4aEwQ.js +0 -1
  230. package/dist/chunks/Settings-CPaqWNdP.js +0 -2
  231. package/dist/chunks/Spinner-C0qHjfIY.js +0 -1
  232. package/dist/chunks/allErrors-Dhnf6rqg.js +0 -1
  233. package/dist/chunks/backgroundHousekeeping-Bu-zRFCx.js +0 -1
  234. package/dist/chunks/banner-BKOzHotb.js +0 -2
  235. package/dist/chunks/bridgeControl-aDnUrYZR.js +0 -2
  236. package/dist/chunks/caches-CMF-MmR-.js +0 -1
  237. package/dist/chunks/caches-CW5YnYNS.js +0 -1
  238. package/dist/chunks/channel-DVx21qde.js +0 -1
  239. package/dist/chunks/client-B0ngS4Uu.js +0 -1
  240. package/dist/chunks/client-BP4DOH3K.js +0 -1
  241. package/dist/chunks/commands-CfYMwgP7.js +0 -1
  242. package/dist/chunks/compact-6F2tuItE.js +0 -2
  243. package/dist/chunks/config-BDkzWBnL.js +0 -1
  244. package/dist/chunks/config-Bio2EjUK.js +0 -3
  245. package/dist/chunks/config-C_AEhZrn.js +0 -1
  246. package/dist/chunks/context-noninteractive-oFcnY1Er.js +0 -1
  247. package/dist/chunks/conversation-CYZyg1U1.js +0 -1
  248. package/dist/chunks/conversation-DXzlRhNw.js +0 -1
  249. package/dist/chunks/crossProjectResume-CCo3iZrB.js +0 -40
  250. package/dist/chunks/doctor-B4jQbGQr.js +0 -1
  251. package/dist/chunks/exit-D5DYnRvR.js +0 -1
  252. package/dist/chunks/extractMemories-CVUrBFMj.js +0 -1
  253. package/dist/chunks/fast-CRhW9zha.js +0 -1
  254. package/dist/chunks/fetchModelList-DIa1HwAJ.js +0 -1
  255. package/dist/chunks/hooks-CBGUcyCs.js +0 -1
  256. package/dist/chunks/loadAgentsDir-Zw648oQO.js +0 -1
  257. package/dist/chunks/loadPluginHooks-BIfM53-_.js +0 -1
  258. package/dist/chunks/localSearch-Dbj8cXyO.js +0 -1
  259. package/dist/chunks/managedEnv-DCGLDTP_.js +0 -1
  260. package/dist/chunks/mcp-BMeWtYCx.js +0 -2
  261. package/dist/chunks/mcp-CYbesbfl.js +0 -1
  262. package/dist/chunks/memory-DtQQGyPS.js +0 -1
  263. package/dist/chunks/model-C2r-PaR4.js +0 -1
  264. package/dist/chunks/model-Dd3x121y.js +0 -1
  265. package/dist/chunks/openai-Bea4I2Od.js +0 -2
  266. package/dist/chunks/parser-Diihup2V.js +0 -1
  267. package/dist/chunks/permissions-Dv_PCfY0.js +0 -3
  268. package/dist/chunks/plugin-aK4tDrVg.js +0 -17
  269. package/dist/chunks/pluginBlocklist-ByRQaVPu.js +0 -1
  270. package/dist/chunks/pluginCliCommands-Dyk4HYHs.js +0 -1
  271. package/dist/chunks/pluginOperations-BCvJvfOC.js +0 -2
  272. package/dist/chunks/pluginStartupCheck-o_TC7wIt.js +0 -1
  273. package/dist/chunks/plugins-DzsTDNWJ.js +0 -4
  274. package/dist/chunks/poorMode-eMIFCAC_.js +0 -1
  275. package/dist/chunks/print-dUT7E1g9.js +0 -13
  276. package/dist/chunks/process-CNfq37LF.js +0 -1
  277. package/dist/chunks/process-gEbdy6uY.js +0 -1
  278. package/dist/chunks/processBashCommand-DtGCgTkF.js +0 -1
  279. package/dist/chunks/processSlashCommand-wXblpK2C.js +0 -5
  280. package/dist/chunks/prompt-BdH2zk0S.js +0 -1
  281. package/dist/chunks/prompt-D0TFER0A.js +0 -1
  282. package/dist/chunks/refresh-Cm4jZzLa.js +0 -1
  283. package/dist/chunks/rename-OfKJSazJ.js +0 -1
  284. package/dist/chunks/ripgrep-DB7KB8RZ.js +0 -1
  285. package/dist/chunks/sandbox-adapter-982rx2cm.js +0 -1
  286. package/dist/chunks/searchExtraTools-B4N1bpy0.js +0 -1
  287. package/dist/chunks/sessionFileAccessHooks-BqQ58T7e.js +0 -1
  288. package/dist/chunks/sessionObserver-qYpA90El.js +0 -1
  289. package/dist/chunks/sessionStorage-CC0v4zMs.js +0 -1
  290. package/dist/chunks/settings-Dfit5gGT.js +0 -1
  291. package/dist/chunks/setup-DVLnIlse.js +0 -3
  292. package/dist/chunks/sinks-C9NdbjLo.js +0 -1
  293. package/dist/chunks/skillChangeDetector-DlodgOyC.js +0 -1
  294. package/dist/chunks/startupProfiler-DWcM4QBl.js +0 -1
  295. package/dist/chunks/status-BcSkj9nE.js +0 -1
  296. package/dist/chunks/statusNoticeHelpers-DsrqBOQt.js +0 -1
  297. package/dist/chunks/switcher-BietN6il.js +0 -1
  298. package/dist/chunks/tipRegistry-BYpJZIjR.js +0 -2
  299. package/dist/chunks/toolPool-BGfiNj6h.js +0 -1
  300. package/dist/chunks/useMainLoopModel-QuE7VkgX.js +0 -1
  301. package/dist/chunks/useManagePlugins-pGaGzsEg.js +0 -1
  302. package/dist/chunks/useMergedTools-BLsIT3R_.js +0 -1
  303. package/dist/chunks/useSettingsErrors-C8VIzdws.js +0 -1
  304. package/dist/chunks/validatePlugin-CTVnWx9H.js +0 -1
  305. package/dist/chunks/worktree-BWL0vR4o.js +0 -1
@@ -0,0 +1 @@
1
+ import{f_ as e,l_ as t,u_ as n}from"./loadAgentsDir-DnHL_5cU.js";t();export{n as loadPluginHooks,e as setupPluginHookHotReload};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-QyzA_cFM.js";import{Fi as r,Vi as i,Wi as a,oa as o,ta as s}from"./settings-D4M13toi.js";import{o as c,s as l}from"./log-L1kqxa_P.js";import{dirname as u,join as d}from"path";import{existsSync as f,readFileSync as p,renameSync as m,unlinkSync as h,writeFileSync as g}from"fs";import{randomBytes as _}from"node:crypto";var v=e((()=>{r(),r()})),y,b,x,S=e((()=>{v(),y=i([`openai-compat`,`anthropic-compat`]),b=s({id:o().min(1).regex(/^[a-z0-9-]+$/,`id must be kebab-case`),kind:y,baseUrl:o().url(),apiKey:o().min(1).optional(),apiKeyEnv:o().min(1).optional(),defaultModel:o().min(1).default(`gpt-4o-mini`)}).refine(e=>!!e.apiKey||!!e.apiKeyEnv,`either apiKey or apiKeyEnv is required`),x=a(b)}));function C(){return d(t(),`providers.json`)}function w(){k=null}function T(){if(k!==null)return k;let e=E();return k=e.providers,e.providers}function E(){let e=C();if(!f(e))return{providers:[]};let t;try{t=p(e,`utf-8`)}catch(t){let n=`loadProviders: failed to read ${e}: ${t instanceof Error?t.message:String(t)}`;return l(Error(n)),{providers:[],error:n}}if(!t.trim())return{providers:[]};let n;try{n=JSON.parse(t)}catch{let t=`loadProviders: ${e} is not valid JSON. Ignoring.`;return l(Error(t)),{providers:[],error:t}}let r=x.safeParse(n);if(!r.success){let t=`loadProviders: ${e} failed schema validation: ${r.error.message}. Ignoring.`;return l(Error(t)),{providers:[],error:t}}return{providers:r.data}}function D(e,t){return(t??T()).find(t=>t.id===e)}function O(e){let t=C(),n=d(u(t),`.providers-${_(8).toString(`hex`)}.tmp`);try{g(n,JSON.stringify(e,null,2),`utf-8`),m(n,t)}catch(e){try{h(n)}catch{}throw e}return w(),e}var k,A=e((()=>{c(),n(),S(),k=null}));export{v as a,O as i,A as n,T as r,D as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-QyzA_cFM.js";import{Gi as r,Hi as i,Ii as a,na as o,sa as s}from"./settings-CA-5Px85.js";import{o as c,s as l}from"./log-D98mO6yJ.js";import{dirname as u,join as d}from"path";import{existsSync as f,readFileSync as p,renameSync as m,unlinkSync as h,writeFileSync as g}from"fs";import{randomBytes as _}from"node:crypto";var v=e((()=>{a(),a()})),y,b,x,S=e((()=>{v(),y=i([`openai-compat`,`anthropic-compat`]),b=o({id:s().min(1).regex(/^[a-z0-9-]+$/,`id must be kebab-case`),kind:y,baseUrl:s().url(),apiKey:s().min(1).optional(),apiKeyEnv:s().min(1).optional(),defaultModel:s().min(1).default(`gpt-4o-mini`)}).refine(e=>!!e.apiKey||!!e.apiKeyEnv,`either apiKey or apiKeyEnv is required`),x=r(b)}));function C(){return d(t(),`providers.json`)}function w(){k=null}function T(){if(k!==null)return k;let e=E();return k=e.providers,e.providers}function E(){let e=C();if(!f(e))return{providers:[]};let t;try{t=p(e,`utf-8`)}catch(t){let n=`loadProviders: failed to read ${e}: ${t instanceof Error?t.message:String(t)}`;return l(Error(n)),{providers:[],error:n}}if(!t.trim())return{providers:[]};let n;try{n=JSON.parse(t)}catch{let t=`loadProviders: ${e} is not valid JSON. Ignoring.`;return l(Error(t)),{providers:[],error:t}}let r=x.safeParse(n);if(!r.success){let t=`loadProviders: ${e} failed schema validation: ${r.error.message}. Ignoring.`;return l(Error(t)),{providers:[],error:t}}return{providers:r.data}}function D(e,t){return(t??T()).find(t=>t.id===e)}function O(e){let t=C(),n=d(u(t),`.providers-${_(8).toString(`hex`)}.tmp`);try{g(n,JSON.stringify(e,null,2),`utf-8`),m(n,t)}catch(e){try{h(n)}catch{}throw e}return w(),e}var k,A=e((()=>{c(),n(),S(),k=null}));export{v as a,O as i,A as n,T as r,D as t};
@@ -0,0 +1 @@
1
+ import{a as e,o as t,s as n,t as r}from"./localSearch-LFCzV7VE.js";t();export{r as clearSkillIndexCache,e as getSkillIndex,n as searchSkills};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n}from"./debug-2pVES-2G.js";function r(e){return g.test(e)}function i(e){let t=[],n=e.toLowerCase(),i=0;for(;i<n.length;)if(r(n[i])){let e=``;for(;i<n.length&&r(n[i]);)e+=n[i],i++;for(let n=0;n<e.length-1;n++)t.push(e.slice(n,n+2))}else if(/[a-z0-9]/.test(n[i])){let e=``;for(;i<n.length&&/[a-z0-9\-_]/.test(n[i]);)e+=n[i],i++;let r=e.replace(/^[-_]+|[-_]+$/g,``);r&&!h.has(r)&&t.push(r)}else i++;return t}function a(e){if(r(e[0]??``))return e;let t=e;return t.endsWith(`ing`)&&t.length>5?t=t.slice(0,-3):t.endsWith(`tion`)&&t.length>5||t.endsWith(`ness`)&&t.length>5||t.endsWith(`ment`)&&t.length>5?t=t.slice(0,-4):t.endsWith(`ers`)&&t.length>4?t=t.slice(0,-1):t.endsWith(`er`)&&t.length>4||t.endsWith(`es`)&&t.length>4?t=t.slice(0,-2):t.endsWith(`s`)&&t.length>3&&!t.endsWith(`ss`)?t=t.slice(0,-1):(t.endsWith(`ed`)&&t.length>4||t.endsWith(`ly`)&&t.length>4)&&(t=t.slice(0,-2)),t}function o(e){return i(e).map(a)}function s(e){let t=new Map;for(let n of e){let e=new Map;for(let t of n.tokens)e.set(t,(e.get(t)??0)+1);let r=1;for(let t of e.values())t>r&&(r=t);for(let[i,a]of e){let e=a/r*n.weight;e>(t.get(i)??0)&&t.set(i,e)}}return t}function c(e){let t=new Map;for(let n of e){let e=new Set;for(let r of n.tokens)e.has(r)||(t.set(r,(t.get(r)??0)+1),e.add(r))}let n=e.length,r=new Map;for(let[e,i]of t)r.set(e,Math.log(n/i));return r}function l(e,t){let n=0,r=0,i=0;for(let[i,a]of e){let e=t.get(i)??0;n+=a*e,r+=a*a}for(let e of t.values())i+=e*e;let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}function u(e){return e.toLowerCase().replace(/[-_]/g,` `)}function d(e){return e.toLowerCase().split(/[-_]/).filter(e=>e.length>=3)}function f(){x=null,S=null,C=null,t(`[skill-search] index cache cleared`)}async function p(e){if(x&&C===e)return x;let{getCommands:n}=await import(`./commands-CfYMwgP7.js`),r=await n(e),i=[];for(let e of r){if(e.type!==`prompt`||e.disableModelInvocation)continue;let t=e.name,n=e.description??``,r=e.whenToUse,c=e.allowedTools?.join(` `)??``,l=o(t),f=d(t),p=[...l,...f.map(a).filter(e=>!h.has(e))],m=o(n),g=o(r??``),v=o(c),y=[...new Set([...p,...m,...g,...v])],b=s([{tokens:p,weight:_.name},{tokens:g,weight:_.whenToUse},{tokens:m,weight:_.description},{tokens:v,weight:_.allowedTools}]);i.push({name:t,normalizedName:u(t),description:n,whenToUse:r,source:e.source??`unknown`,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength,tokens:y,tfVector:b})}let l=c(i);for(let e of i)for(let[t,n]of e.tfVector)e.tfVector.set(t,n*(l.get(t)??0));return x=i,S=l,C=e,t(`[skill-search] indexed ${i.length} skills from ${r.length} commands`),i}function m(e,t,n=5){if(t.length===0||!e?.trim())return[];let i=o(e);if(i.length===0)return[];let a=new Map,s=new Map;for(let e of i)s.set(e,(s.get(e)??0)+1);let u=1;for(let e of s.values())e>u&&(u=e);for(let[e,t]of s)a.set(e,t/u);let d=x===t&&S?S:c(t),f=new Map;for(let[e,t]of a)f.set(e,t*(d.get(e)??0));let p=i.filter(e=>r(e[0]??``)),m=i.filter(e=>!r(e[0]??``)),h=e.toLowerCase().replace(/[-_]/g,` `),g=[];for(let e of t){let t=l(f,e.tfVector);p.length>0&&t>0&&p.filter(t=>e.tfVector.has(t)).length<b&&(m.some(t=>e.tfVector.has(t))||(t=0)),e.name.length>=y&&h.includes(e.normalizedName)&&(t=Math.max(t,.75)),t>=v&&g.push({name:e.name,description:e.description,score:t,source:e.source,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength})}return g.sort((e,t)=>t.score-e.score),g.slice(0,n)}var h,g,_,v,y,b,x,S,C,w=e((()=>{n(),h=new Set(`a.an.the.is.are.was.were.be.been.being.have.has.had.do.does.did.will.would.could.should.may.might.shall.can.need.dare.ought.used.to.of.in.for.on.with.at.by.from.as.into.through.during.before.after.above.below.between.out.off.over.under.again.further.then.once.here.there.when.where.why.how.all.each.every.both.few.more.most.other.some.such.no.nor.not.only.own.same.so.than.too.very.just.because.but.and.or.if.while.this.that.these.those.it.its.i.me.my.we.our.you.your.he.him.his.she.her.they.them.their.what.which.who.whom.use.using.used`.split(`.`)),g=/[\u4e00-\u9fff\u3400-\u4dbf]/,_={name:3,whenToUse:2,description:1,allowedTools:.3},v=Number(process.env.SKILL_SEARCH_DISPLAY_MIN_SCORE??`0.10`),y=4,b=2,x=null,S=null,C=null}));export{p as a,i as c,l as i,o as l,c as n,w as o,s as r,m as s,f as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{c as t,i as n}from"./debug-NBJH_NxR.js";function r(e){return g.test(e)}function i(e){let t=[],n=e.toLowerCase(),i=0;for(;i<n.length;)if(r(n[i])){let e=``;for(;i<n.length&&r(n[i]);)e+=n[i],i++;for(let n=0;n<e.length-1;n++)t.push(e.slice(n,n+2))}else if(/[a-z0-9]/.test(n[i])){let e=``;for(;i<n.length&&/[a-z0-9\-_]/.test(n[i]);)e+=n[i],i++;let r=e.replace(/^[-_]+|[-_]+$/g,``);r&&!h.has(r)&&t.push(r)}else i++;return t}function a(e){if(r(e[0]??``))return e;let t=e;return t.endsWith(`ing`)&&t.length>5?t=t.slice(0,-3):t.endsWith(`tion`)&&t.length>5||t.endsWith(`ness`)&&t.length>5||t.endsWith(`ment`)&&t.length>5?t=t.slice(0,-4):t.endsWith(`ers`)&&t.length>4?t=t.slice(0,-1):t.endsWith(`er`)&&t.length>4||t.endsWith(`es`)&&t.length>4?t=t.slice(0,-2):t.endsWith(`s`)&&t.length>3&&!t.endsWith(`ss`)?t=t.slice(0,-1):(t.endsWith(`ed`)&&t.length>4||t.endsWith(`ly`)&&t.length>4)&&(t=t.slice(0,-2)),t}function o(e){return i(e).map(a)}function s(e){let t=new Map;for(let n of e){let e=new Map;for(let t of n.tokens)e.set(t,(e.get(t)??0)+1);let r=1;for(let t of e.values())t>r&&(r=t);for(let[i,a]of e){let e=a/r*n.weight;e>(t.get(i)??0)&&t.set(i,e)}}return t}function c(e){let t=new Map;for(let n of e){let e=new Set;for(let r of n.tokens)e.has(r)||(t.set(r,(t.get(r)??0)+1),e.add(r))}let n=e.length,r=new Map;for(let[e,i]of t)r.set(e,Math.log(n/i));return r}function l(e,t){let n=0,r=0,i=0;for(let[i,a]of e){let e=t.get(i)??0;n+=a*e,r+=a*a}for(let e of t.values())i+=e*e;let a=Math.sqrt(r)*Math.sqrt(i);return a===0?0:n/a}function u(e){return e.toLowerCase().replace(/[-_]/g,` `)}function d(e){return e.toLowerCase().split(/[-_]/).filter(e=>e.length>=3)}function f(){x=null,S=null,C=null,t(`[skill-search] index cache cleared`)}async function p(e){if(x&&C===e)return x;let{getCommands:n}=await import(`./commands-BoGtXPAA.js`),r=await n(e),i=[];for(let e of r){if(e.type!==`prompt`||e.disableModelInvocation)continue;let t=e.name,n=e.description??``,r=e.whenToUse,c=e.allowedTools?.join(` `)??``,l=o(t),f=d(t),p=[...l,...f.map(a).filter(e=>!h.has(e))],m=o(n),g=o(r??``),v=o(c),y=[...new Set([...p,...m,...g,...v])],b=s([{tokens:p,weight:_.name},{tokens:g,weight:_.whenToUse},{tokens:m,weight:_.description},{tokens:v,weight:_.allowedTools}]);i.push({name:t,normalizedName:u(t),description:n,whenToUse:r,source:e.source??`unknown`,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength,tokens:y,tfVector:b})}let l=c(i);for(let e of i)for(let[t,n]of e.tfVector)e.tfVector.set(t,n*(l.get(t)??0));return x=i,S=l,C=e,t(`[skill-search] indexed ${i.length} skills from ${r.length} commands`),i}function m(e,t,n=5){if(t.length===0||!e?.trim())return[];let i=o(e);if(i.length===0)return[];let a=new Map,s=new Map;for(let e of i)s.set(e,(s.get(e)??0)+1);let u=1;for(let e of s.values())e>u&&(u=e);for(let[e,t]of s)a.set(e,t/u);let d=x===t&&S?S:c(t),f=new Map;for(let[e,t]of a)f.set(e,t*(d.get(e)??0));let p=i.filter(e=>r(e[0]??``)),m=i.filter(e=>!r(e[0]??``)),h=e.toLowerCase().replace(/[-_]/g,` `),g=[];for(let e of t){let t=l(f,e.tfVector);p.length>0&&t>0&&p.filter(t=>e.tfVector.has(t)).length<b&&(m.some(t=>e.tfVector.has(t))||(t=0)),e.name.length>=y&&h.includes(e.normalizedName)&&(t=Math.max(t,.75)),t>=v&&g.push({name:e.name,description:e.description,score:t,source:e.source,loadedFrom:e.loadedFrom,skillRoot:e.skillRoot,contentLength:e.contentLength})}return g.sort((e,t)=>t.score-e.score),g.slice(0,n)}var h,g,_,v,y,b,x,S,C,w=e((()=>{n(),h=new Set(`a.an.the.is.are.was.were.be.been.being.have.has.had.do.does.did.will.would.could.should.may.might.shall.can.need.dare.ought.used.to.of.in.for.on.with.at.by.from.as.into.through.during.before.after.above.below.between.out.off.over.under.again.further.then.once.here.there.when.where.why.how.all.each.every.both.few.more.most.other.some.such.no.nor.not.only.own.same.so.than.too.very.just.because.but.and.or.if.while.this.that.these.those.it.its.i.me.my.we.our.you.your.he.him.his.she.her.they.them.their.what.which.who.whom.use.using.used`.split(`.`)),g=/[\u4e00-\u9fff\u3400-\u4dbf]/,_={name:3,whenToUse:2,description:1,allowedTools:.3},v=Number(process.env.SKILL_SEARCH_DISPLAY_MIN_SCORE??`0.10`),y=4,b=2,x=null,S=null,C=null}));export{p as a,i as c,l as i,o as l,c as n,w as o,s as r,m as s,f as t};
@@ -1 +1 @@
1
- import{i as e,n as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{l as i,o as ee}from"./envUtils-QyzA_cFM.js";import{Pt as te,dn as ne,un as re}from"./state-CXY-q5gr.js";import{B as ie,I as ae,V as oe,f as se,u as a,x as ce}from"./debug-2pVES-2G.js";import{join as o}from"path";import s from"node:process";import c from"node:path";import le from"node:os";import"fs/promises";var ue,de,fe,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,pe=t((()=>{ue=`command-name`,de=`command-message`,fe=`command-args`,l=`bash-input`,u=`bash-stdout`,d=`bash-stderr`,f=`local-command-stdout`,p=`local-command-stderr`,m=`local-command-caveat`,h=`tick`,g=`task-notification`,_=`task-id`,v=`tool-use-id`,y=`task-type`,b=`output-file`,x=`status`,S=`summary`,C=`worktree`,w=`worktreePath`,T=`worktreeBranch`,E=`fork-boilerplate`,D=`Your directive: `,O=[`help`,`-h`,`--help`],k=[`list`,`show`,`display`,`current`,`view`,`get`,`check`,`describe`,`print`,`version`,`about`,`status`,`?`]}));function me(e){if(typeof e!=`string`)return!1;let t=e.trim();return t!==``&&t!==`.`&&t!==`..`&&!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`\0`)}function A(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);if(!me(e))throw Error(`Unsafe filename: ${JSON.stringify(e)}`)}var he=t((()=>{Object.freeze([``,` `,`.`,`..`,` .`,`. `,` ..`,`.. `,`../`,`../foo`,`foo/../bar`,`foo/bar`,`foo\\bar`,`foo\0bar`])}));function ge(e,{suffix:t=`nodejs`}={}){return A(e),t&&(e+=`-${t}`),A(e),s.platform===`darwin`?P(e):s.platform===`win32`?F(e):I(e)}var j,M,N,P,F,I,_e=t((()=>{he(),j=le.homedir(),M=le.tmpdir(),{env:N}=s,P=e=>{let t=c.join(j,`Library`);return{data:c.join(t,`Application Support`,e),config:c.join(t,`Preferences`,e),cache:c.join(t,`Caches`,e),log:c.join(t,`Logs`,e),temp:c.join(M,e)}},F=e=>{let t=N.APPDATA||c.join(j,`AppData`,`Roaming`),n=N.LOCALAPPDATA||c.join(j,`AppData`,`Local`);return{data:c.join(n,e,`Data`),config:c.join(t,e,`Config`),cache:c.join(n,e,`Cache`),log:c.join(n,e,`Log`),temp:c.join(M,e)}},I=e=>{let t=c.basename(j);return{data:c.join(N.XDG_DATA_HOME||c.join(j,`.local`,`share`),e),config:c.join(N.XDG_CONFIG_HOME||c.join(j,`.config`),e),cache:c.join(N.XDG_CACHE_HOME||c.join(j,`.cache`),e),log:c.join(N.XDG_STATE_HOME||c.join(j,`.local`,`state`),e),temp:c.join(M,t,e)}}}));function L(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function ve(t){return typeof Bun<`u`?Bun.hash(t).toString():e(`crypto`).createHash(`sha256`).update(t).digest(`hex`)}function ye(t,n){return typeof Bun<`u`?Bun.hash(n,Bun.hash(t)).toString():e(`crypto`).createHash(`sha256`).update(t).update(`\0`).update(n).digest(`hex`)}var R=t((()=>{}));function z(e){let t=e.replace(/[^a-zA-Z0-9]/g,`-`);return t.length<=H?t:`${t.slice(0,H)}-${Math.abs(L(e)).toString(36)}`}function B(e){return z(e)}var V,H,U,W=t((()=>{_e(),se(),R(),V=ge(`claude-cli`),H=200,U={baseLogs:()=>o(V.cache,B(a().cwd())),errors:()=>o(V.cache,B(a().cwd()),`errors`),messages:()=>o(V.cache,B(a().cwd()),`messages`),mcpLogs:e=>o(V.cache,B(a().cwd()),`mcp-logs-${z(e)}`)}}));function G(e){return e.replace(K,``).trim()||e}function be(e){return e.replace(K,``).trim()}function xe(e){return e.replace(q,``).trim()}var K,q,J=t((()=>{K=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g,q=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g}));function Y(){return process.env.WORKMATE_DISABLE_NONESSENTIAL_TRAFFIC?`essential-traffic`:process.env.DISABLE_TELEMETRY?`no-telemetry`:`default`}function X(){return Y()===`essential-traffic`}function Se(){return Y()!=="default"}function Ce(){return process.env.WORKMATE_DISABLE_NONESSENTIAL_TRAFFIC?`WORKMATE_DISABLE_NONESSENTIAL_TRAFFIC`:null}var we=t((()=>{}));function Te(e,t){let n=e.firstPrompt?.startsWith(`<${h}>`),r=e.firstPrompt?be(e.firstPrompt):``,i=r&&!n;return G(e.agentName||e.customTitle||e.summary||(i?r:void 0)||t||(n?`Autonomous session`:void 0)||(e.sessionId?e.sessionId.slice(0,8):``)||``).trim()}function Ee(e){return e.toISOString().replace(/[:.]/g,`-`)}function De(e){Z.length>=Pe&&Z.shift(),Z.push(e)}function Oe(e){if($===null&&($=e,Q.length>0)){let e=[...Q];Q.length=0;for(let t of e)switch(t.type){case`error`:$.logError(t.error);break;case`mcpError`:$.logMCPError(t.serverName,t.error);break;case`mcpDebug`:$.logMCPDebug(t.serverName,t.message);break}}}function ke(e){let t=oe(e);try{if(i(process.env.WORKMATE_USE_BEDROCK)||i(process.env.WORKMATE_USE_VERTEX)||i(process.env.WORKMATE_USE_FOUNDRY)||process.env.DISABLE_ERROR_REPORTING||X())return;if(De({error:ie(t),timestamp:new Date().toISOString()}),$===null){Q.push({type:`error`,error:t});return}$.logError(t)}catch{}}function Ae(){return[...Z]}function je(e,t){try{if($===null){Q.push({type:`mcpError`,serverName:e,error:t});return}$.logMCPError(e,t)}catch{}}function Me(e,t){try{if($===null){Q.push({type:`mcpDebug`,serverName:e,message:t});return}$.logMCPDebug(e,t)}catch{}}function Ne(e,t){if(!t?.startsWith(`repl_main_thread`))return;let{messages:n,...r}=e;re(r),ne(null)}var Pe,Z,Q,$,Fe=t((()=>{r(),te(),pe(),W(),J(),ee(),ae(),we(),ce(),Pe=100,Z=[],Q=[],$=null,n(()=>process.argv.includes(`--hard-fail`))}));export{k as A,g as B,l as C,de as D,fe as E,f as F,w as G,h as H,b as I,C as K,x as L,D as M,m as N,ue as O,p as P,S as R,R as S,u as T,v as U,y as V,T as W,U as _,Te as a,ve as b,Me as c,we as d,X as f,xe as g,G as h,Ae as i,E as j,O as k,je as l,J as m,Ne as n,Fe as o,Se as p,pe as q,Ee as r,ke as s,Oe as t,Ce as u,W as v,d as w,ye as x,L as y,_ as z};
1
+ import{i as e,n as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{l as i,o as ee}from"./envUtils-QyzA_cFM.js";import{Pt as te,dn as ne,un as re}from"./state-CXY-q5gr.js";import{B as ie,I as ae,V as oe,f as se,u as a,x as ce}from"./debug-NBJH_NxR.js";import{join as o}from"path";import s from"node:process";import c from"node:path";import le from"node:os";import"fs/promises";var ue,de,fe,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,pe=t((()=>{ue=`command-name`,de=`command-message`,fe=`command-args`,l=`bash-input`,u=`bash-stdout`,d=`bash-stderr`,f=`local-command-stdout`,p=`local-command-stderr`,m=`local-command-caveat`,h=`tick`,g=`task-notification`,_=`task-id`,v=`tool-use-id`,y=`task-type`,b=`output-file`,x=`status`,S=`summary`,C=`worktree`,w=`worktreePath`,T=`worktreeBranch`,E=`fork-boilerplate`,D=`Your directive: `,O=[`help`,`-h`,`--help`],k=[`list`,`show`,`display`,`current`,`view`,`get`,`check`,`describe`,`print`,`version`,`about`,`status`,`?`]}));function me(e){if(typeof e!=`string`)return!1;let t=e.trim();return t!==``&&t!==`.`&&t!==`..`&&!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`\0`)}function A(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);if(!me(e))throw Error(`Unsafe filename: ${JSON.stringify(e)}`)}var he=t((()=>{Object.freeze([``,` `,`.`,`..`,` .`,`. `,` ..`,`.. `,`../`,`../foo`,`foo/../bar`,`foo/bar`,`foo\\bar`,`foo\0bar`])}));function ge(e,{suffix:t=`nodejs`}={}){return A(e),t&&(e+=`-${t}`),A(e),s.platform===`darwin`?P(e):s.platform===`win32`?F(e):I(e)}var j,M,N,P,F,I,_e=t((()=>{he(),j=le.homedir(),M=le.tmpdir(),{env:N}=s,P=e=>{let t=c.join(j,`Library`);return{data:c.join(t,`Application Support`,e),config:c.join(t,`Preferences`,e),cache:c.join(t,`Caches`,e),log:c.join(t,`Logs`,e),temp:c.join(M,e)}},F=e=>{let t=N.APPDATA||c.join(j,`AppData`,`Roaming`),n=N.LOCALAPPDATA||c.join(j,`AppData`,`Local`);return{data:c.join(n,e,`Data`),config:c.join(t,e,`Config`),cache:c.join(n,e,`Cache`),log:c.join(n,e,`Log`),temp:c.join(M,e)}},I=e=>{let t=c.basename(j);return{data:c.join(N.XDG_DATA_HOME||c.join(j,`.local`,`share`),e),config:c.join(N.XDG_CONFIG_HOME||c.join(j,`.config`),e),cache:c.join(N.XDG_CACHE_HOME||c.join(j,`.cache`),e),log:c.join(N.XDG_STATE_HOME||c.join(j,`.local`,`state`),e),temp:c.join(M,t,e)}}}));function L(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function ve(t){return typeof Bun<`u`?Bun.hash(t).toString():e(`crypto`).createHash(`sha256`).update(t).digest(`hex`)}function ye(t,n){return typeof Bun<`u`?Bun.hash(n,Bun.hash(t)).toString():e(`crypto`).createHash(`sha256`).update(t).update(`\0`).update(n).digest(`hex`)}var R=t((()=>{}));function z(e){let t=e.replace(/[^a-zA-Z0-9]/g,`-`);return t.length<=H?t:`${t.slice(0,H)}-${Math.abs(L(e)).toString(36)}`}function B(e){return z(e)}var V,H,U,W=t((()=>{_e(),se(),R(),V=ge(`claude-cli`),H=200,U={baseLogs:()=>o(V.cache,B(a().cwd())),errors:()=>o(V.cache,B(a().cwd()),`errors`),messages:()=>o(V.cache,B(a().cwd()),`messages`),mcpLogs:e=>o(V.cache,B(a().cwd()),`mcp-logs-${z(e)}`)}}));function G(e){return e.replace(K,``).trim()||e}function be(e){return e.replace(K,``).trim()}function xe(e){return e.replace(q,``).trim()}var K,q,J=t((()=>{K=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g,q=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g}));function Y(){return process.env.WORKMATE_DISABLE_NONESSENTIAL_TRAFFIC?`essential-traffic`:process.env.DISABLE_TELEMETRY?`no-telemetry`:`default`}function X(){return Y()===`essential-traffic`}function Se(){return Y()!=="default"}function Ce(){return process.env.WORKMATE_DISABLE_NONESSENTIAL_TRAFFIC?`WORKMATE_DISABLE_NONESSENTIAL_TRAFFIC`:null}var we=t((()=>{}));function Te(e,t){let n=e.firstPrompt?.startsWith(`<${h}>`),r=e.firstPrompt?be(e.firstPrompt):``,i=r&&!n;return G(e.agentName||e.customTitle||e.summary||(i?r:void 0)||t||(n?`Autonomous session`:void 0)||(e.sessionId?e.sessionId.slice(0,8):``)||``).trim()}function Ee(e){return e.toISOString().replace(/[:.]/g,`-`)}function De(e){Z.length>=Pe&&Z.shift(),Z.push(e)}function Oe(e){if($===null&&($=e,Q.length>0)){let e=[...Q];Q.length=0;for(let t of e)switch(t.type){case`error`:$.logError(t.error);break;case`mcpError`:$.logMCPError(t.serverName,t.error);break;case`mcpDebug`:$.logMCPDebug(t.serverName,t.message);break}}}function ke(e){let t=oe(e);try{if(i(process.env.WORKMATE_USE_BEDROCK)||i(process.env.WORKMATE_USE_VERTEX)||i(process.env.WORKMATE_USE_FOUNDRY)||process.env.DISABLE_ERROR_REPORTING||X())return;if(De({error:ie(t),timestamp:new Date().toISOString()}),$===null){Q.push({type:`error`,error:t});return}$.logError(t)}catch{}}function Ae(){return[...Z]}function je(e,t){try{if($===null){Q.push({type:`mcpError`,serverName:e,error:t});return}$.logMCPError(e,t)}catch{}}function Me(e,t){try{if($===null){Q.push({type:`mcpDebug`,serverName:e,message:t});return}$.logMCPDebug(e,t)}catch{}}function Ne(e,t){if(!t?.startsWith(`repl_main_thread`))return;let{messages:n,...r}=e;re(r),ne(null)}var Pe,Z,Q,$,Fe=t((()=>{r(),te(),pe(),W(),J(),ee(),ae(),we(),ce(),Pe=100,Z=[],Q=[],$=null,n(()=>process.argv.includes(`--hard-fail`))}));export{k as A,g as B,l as C,de as D,fe as E,f as F,w as G,h as H,b as I,C as K,x as L,D as M,m as N,ue as O,p as P,S as R,R as S,u as T,v as U,y as V,T as W,U as _,Te as a,ve as b,Me as c,we as d,X as f,xe as g,G as h,Ae as i,E as j,O as k,je as l,J as m,Ne as n,Fe as o,Se as p,pe as q,Ee as r,ke as s,Oe as t,Ce as u,W as v,d as w,ye as x,L as y,_ as z};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as t,t as n}from"./src-BX54x08P.js";import{In as r,Nn as i,m as a,t as o}from"./settings-D4M13toi.js";import{Pt as s,at as c}from"./state-CXY-q5gr.js";import{gr as l,kr as u}from"./loadAgentsDir-bmpKLPdG.js";import{n as d,t as f}from"./cwd-DrEEb4f5.js";import{C as p,S as m,_ as h,y as g}from"./startupProfiler-B9Qv2QGH.js";function _(e){return e>=70?`horizontal`:`compact`}function v(e,t,n){if(t===`horizontal`){let t=n,r=e-(7+t),i=Math.max(30,r),a=Math.min(t+i+k+A,e-O);return a<t+i+k+A&&(i=a-t-k-A),{leftWidth:t,rightWidth:i,totalWidth:a}}let r=Math.min(e-O,70);return{leftWidth:r,rightWidth:r,totalWidth:r}}function y(e,n,r){let i=Math.max(t(e),t(n),t(r),20);return Math.min(i+4,E)}function b(e){return!e||e.length>D?`Welcome back!`:`Welcome back ${e}!`}function x(e,n){if(t(e)<=n)return e;let r=e.split(`/`),i=r[0]||``,a=r[r.length-1]||``,o=t(i),s=t(a);if(r.length===1)return m(e,n);if(i===``&&2+s>=n)return`/${m(a,Math.max(1,n-1))}`;if(i!==``&&3+s>=n)return`…/${m(a,Math.max(1,n-1-1))}`;if(r.length===2)return`${p(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${p(i,Math.max(0,n-s-1-2))}/…/${a}`;let l=[];for(let e=r.length-2;e>0;e--){let n=r[e];if(n&&t(n)+1<=c)l.unshift(n),c-=t(n)+1;else break}return l.length===0?`${i}/…/${a}`:`${i}/…/${l.join(`/`)}/${a}`}async function S(){if(M)return M;let e=c();return M=u(10).then(t=>(j=t.filter(t=>{if(t.isSidechain||t.sessionId===e||t.summary?.includes(`I apologize`))return!1;let n=t.summary&&t.summary!==`No prompt`,r=t.firstPrompt&&t.firstPrompt!==`No prompt`;return n||r}).slice(0,3),j)).catch(()=>(j=[],j)),M}function C(){return j}function w(){return{version:process.env.DEMO_VERSION??`0.0.28`,cwd:process.env.DEMO_VERSION?`/code/claude`:i(f()),billingType:`API Usage Billing`,agentName:o().agent}}function T(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:g(e,r),truncatedBilling:g(n,r)}:{shouldSplit:!1,truncatedModel:g(e,Math.max(r-t(n)-3,10)),truncatedBilling:n}}var E,D,O,k,A,j,M,N=e((()=>{s(),n(),d(),r(),h(),l(),a(),E=50,D=20,O=4,k=1,A=2,j=[],M=null}));export{_ as a,C as c,b as i,N as l,y as n,w as o,T as r,S as s,v as t,x as u};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as t,t as n}from"./src-BX54x08P.js";import{In as r,Nn as i,m as a,t as o}from"./settings-CA-5Px85.js";import{Pt as s,at as c}from"./state-CXY-q5gr.js";import{jr as l,vr as u}from"./loadAgentsDir-DnHL_5cU.js";import{n as d,t as f}from"./cwd-DrEEb4f5.js";import{C as p,S as m,_ as h,y as g}from"./startupProfiler-C_xcIvEA.js";function _(e){return e>=70?`horizontal`:`compact`}function v(e,t,n){if(t===`horizontal`){let t=n,r=e-(7+t),i=Math.max(30,r),a=Math.min(t+i+k+A,e-O);return a<t+i+k+A&&(i=a-t-k-A),{leftWidth:t,rightWidth:i,totalWidth:a}}let r=Math.min(e-O,70);return{leftWidth:r,rightWidth:r,totalWidth:r}}function y(e,n,r){let i=Math.max(t(e),t(n),t(r),20);return Math.min(i+4,E)}function b(e){return!e||e.length>D?`Welcome back!`:`Welcome back ${e}!`}function x(e,n){if(t(e)<=n)return e;let r=e.split(`/`),i=r[0]||``,a=r[r.length-1]||``,o=t(i),s=t(a);if(r.length===1)return m(e,n);if(i===``&&2+s>=n)return`/${m(a,Math.max(1,n-1))}`;if(i!==``&&3+s>=n)return`…/${m(a,Math.max(1,n-1-1))}`;if(r.length===2)return`${p(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${p(i,Math.max(0,n-s-1-2))}/…/${a}`;let l=[];for(let e=r.length-2;e>0;e--){let n=r[e];if(n&&t(n)+1<=c)l.unshift(n),c-=t(n)+1;else break}return l.length===0?`${i}/…/${a}`:`${i}/…/${l.join(`/`)}/${a}`}async function S(){if(M)return M;let e=c();return M=l(10).then(t=>(j=t.filter(t=>{if(t.isSidechain||t.sessionId===e||t.summary?.includes(`I apologize`))return!1;let n=t.summary&&t.summary!==`No prompt`,r=t.firstPrompt&&t.firstPrompt!==`No prompt`;return n||r}).slice(0,3),j)).catch(()=>(j=[],j)),M}function C(){return j}function w(){return{version:process.env.DEMO_VERSION??`0.0.30`,cwd:process.env.DEMO_VERSION?`/code/claude`:i(f()),billingType:`API Usage Billing`,agentName:o().agent}}function T(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:g(e,r),truncatedBilling:g(n,r)}:{shouldSplit:!1,truncatedModel:g(e,Math.max(r-t(n)-3,10)),truncatedBilling:n}}var E,D,O,k,A,j,M,N=e((()=>{s(),n(),d(),r(),h(),u(),a(),E=50,D=20,O=4,k=1,A=2,j=[],M=null}));export{_ as a,C as c,b as i,N as l,y as n,w as o,T as r,S as s,v as t,x as u};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-QyzA_cFM.js";import{$x as r,By as i,Gv as a,Ji as o,Uv as s,_d as c,gd as l,ya as u,zy as d}from"./loadAgentsDir-bmpKLPdG.js";import{I as f,f as p,u as m,z as h}from"./debug-2pVES-2G.js";import{X as g,Y as _,f as v,s as y}from"./model-Dd3x121y.js";import{ln as b,pn as x}from"./prompt-BnDapYGL.js";import{join as S}from"path";function C(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,o as n}from"./envUtils-QyzA_cFM.js";import{Gv as r,Hy as i,Vy as a,Xi as o,qv as s,tS as c,vd as l,xa as u,yd as d}from"./loadAgentsDir-DnHL_5cU.js";import{I as f,f as p,u as m,z as h}from"./debug-NBJH_NxR.js";import{X as g,Y as _,f as v,s as y}from"./model-C9ANf1-R.js";import{ln as b,pn as x}from"./prompt-DDlkyIzV.js";import{join as S}from"path";function C(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
2
2
 
3
3
  Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
4
4
 
@@ -54,4 +54,4 @@ The document author has provided specific instructions for how this file should
54
54
 
55
55
  "${r}"
56
56
 
57
- These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:``,CLAUDE_MODEL:y(),CLAUDE_CWD:process.cwd()})}var D=e((()=>{n(),p(),v()}));function O(){F.clear()}function k(e){let t=e.match(N);if(!t?.[1])return null;let n=t[1].trim(),r=t.index+t[0].length,i=e.slice(r).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(i?.[1]){let e=i[1].match(P);if(e?.[1])return{title:n,instructions:e[1].trim()}}return{title:n}}function A(){return{agentType:`magic-docs`,whenToUse:`Update Magic Docs`,tools:[b],model:`sonnet`,source:`built-in`,baseDir:`built-in`,getSystemPrompt:()=>``}}async function j(e,t){let{messages:n,systemPrompt:i,userContext:a,systemContext:o,toolUseContext:l}=t,u=s(l.readFileState);u.delete(e.path);let f={...l,readFileState:u},p=``;try{let t=(await d.call({file_path:e.path},f)).data;t.type===`text`&&(p=t.file.content)}catch(t){if(h(t)||t instanceof Error&&t.message.startsWith(`File does not exist`)){F.delete(e.path);return}throw t}let m=k(p);if(!m){F.delete(e.path);return}let g=await E(p,e.path,m.title,m.instructions),_=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.path)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${b} is allowed for ${e.path}`,decisionReason:{type:`other`,reason:`only ${b} is allowed`}}};for await(let e of c({agentDefinition:A(),promptMessages:[r({content:g})],toolUseContext:f,canUseTool:_,isAsync:!0,forkContextMessages:n,querySource:`magic_docs`,override:{systemPrompt:i,userContext:a,systemContext:o},availableTools:f.options.tools}));}async function M(){}var N,P,F,I=e((()=>{l(),x(),i(),f(),a(),o(),_(),D(),N=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,P=/^[_*](.+?)[_*]\s*$/m,F=new Map,g(async e=>{let{messages:t,querySource:n}=e;if(n===`repl_main_thread`&&!u(t)&&F.size!==0)for(let t of Array.from(F.values()))await j(t,e)})}));export{M as n,I as r,O as t};
57
+ These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:``,CLAUDE_MODEL:y(),CLAUDE_CWD:process.cwd()})}var D=e((()=>{n(),p(),v()}));function O(){F.clear()}function k(e){let t=e.match(N);if(!t?.[1])return null;let n=t[1].trim(),r=t.index+t[0].length,i=e.slice(r).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(i?.[1]){let e=i[1].match(P);if(e?.[1])return{title:n,instructions:e[1].trim()}}return{title:n}}function A(){return{agentType:`magic-docs`,whenToUse:`Update Magic Docs`,tools:[b],model:`sonnet`,source:`built-in`,baseDir:`built-in`,getSystemPrompt:()=>``}}async function j(e,t){let{messages:n,systemPrompt:i,userContext:o,systemContext:s,toolUseContext:l}=t,u=r(l.readFileState);u.delete(e.path);let f={...l,readFileState:u},p=``;try{let t=(await a.call({file_path:e.path},f)).data;t.type===`text`&&(p=t.file.content)}catch(t){if(h(t)||t instanceof Error&&t.message.startsWith(`File does not exist`)){F.delete(e.path);return}throw t}let m=k(p);if(!m){F.delete(e.path);return}let g=await E(p,e.path,m.title,m.instructions),_=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.path)return{behavior:`allow`,updatedInput:n}}return{behavior:`deny`,message:`only ${b} is allowed for ${e.path}`,decisionReason:{type:`other`,reason:`only ${b} is allowed`}}};for await(let e of d({agentDefinition:A(),promptMessages:[c({content:g})],toolUseContext:f,canUseTool:_,isAsync:!0,forkContextMessages:n,querySource:`magic_docs`,override:{systemPrompt:i,userContext:o,systemContext:s},availableTools:f.options.tools}));}async function M(){}var N,P,F,I=e((()=>{l(),x(),i(),f(),s(),o(),_(),D(),N=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,P=/^[_*](.+?)[_*]\s*$/m,F=new Map,g(async e=>{let{messages:t,querySource:n}=e;if(n===`repl_main_thread`&&!u(t)&&F.size!==0)for(let t of Array.from(F.values()))await j(t,e)})}));export{M as n,I as r,O as t};