lcclaude 1.0.0

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 (1928) hide show
  1. package/.env.example +21 -0
  2. package/README.en.md +333 -0
  3. package/README.md +333 -0
  4. package/bin/lcclaude.js +30 -0
  5. package/dist/preload.js +15 -0
  6. package/dist/runtime/bun-bundle-shim.js +10 -0
  7. package/dist/runtime/bun-wrap-shim.js +63 -0
  8. package/dist/src/QueryEngine.js +804 -0
  9. package/dist/src/Task.js +40 -0
  10. package/dist/src/Tool.js +33 -0
  11. package/dist/src/assistant/sessionHistory.js +39 -0
  12. package/dist/src/bootstrap/state.js +985 -0
  13. package/dist/src/bridge/bridgeApi.js +254 -0
  14. package/dist/src/bridge/bridgeConfig.js +14 -0
  15. package/dist/src/bridge/bridgeDebug.js +64 -0
  16. package/dist/src/bridge/bridgeEnabled.js +55 -0
  17. package/dist/src/bridge/bridgeMain.js +1547 -0
  18. package/dist/src/bridge/bridgeMessaging.js +249 -0
  19. package/dist/src/bridge/bridgePermissionCallbacks.js +7 -0
  20. package/dist/src/bridge/bridgePointer.js +105 -0
  21. package/dist/src/bridge/bridgeStatusUtil.js +81 -0
  22. package/dist/src/bridge/bridgeUI.js +375 -0
  23. package/dist/src/bridge/capacityWake.js +26 -0
  24. package/dist/src/bridge/codeSessionApi.js +78 -0
  25. package/dist/src/bridge/createSession.js +227 -0
  26. package/dist/src/bridge/debugUtils.js +80 -0
  27. package/dist/src/bridge/envLessBridgeConfig.js +61 -0
  28. package/dist/src/bridge/flushGate.js +32 -0
  29. package/dist/src/bridge/inboundAttachments.js +106 -0
  30. package/dist/src/bridge/inboundMessages.js +38 -0
  31. package/dist/src/bridge/initReplBridge.js +276 -0
  32. package/dist/src/bridge/jwtUtils.js +131 -0
  33. package/dist/src/bridge/pollConfig.js +28 -0
  34. package/dist/src/bridge/pollConfigDefaults.js +15 -0
  35. package/dist/src/bridge/remoteBridgeCore.js +511 -0
  36. package/dist/src/bridge/replBridge.js +1098 -0
  37. package/dist/src/bridge/replBridgeHandle.js +14 -0
  38. package/dist/src/bridge/replBridgeTransport.js +147 -0
  39. package/dist/src/bridge/sessionIdCompat.js +16 -0
  40. package/dist/src/bridge/sessionRunner.js +349 -0
  41. package/dist/src/bridge/trustedDevice.js +113 -0
  42. package/dist/src/bridge/types.js +6 -0
  43. package/dist/src/bridge/workSecret.js +51 -0
  44. package/dist/src/buddy/CompanionSprite.js +435 -0
  45. package/dist/src/buddy/companion.js +104 -0
  46. package/dist/src/buddy/prompt.js +31 -0
  47. package/dist/src/buddy/sprites.js +500 -0
  48. package/dist/src/buddy/types.js +85 -0
  49. package/dist/src/buddy/useBuddyNotification.js +93 -0
  50. package/dist/src/cli/exit.js +13 -0
  51. package/dist/src/cli/handlers/agents.js +55 -0
  52. package/dist/src/cli/handlers/auth.js +255 -0
  53. package/dist/src/cli/handlers/autoMode.js +117 -0
  54. package/dist/src/cli/handlers/mcp.js +304 -0
  55. package/dist/src/cli/handlers/plugins.js +538 -0
  56. package/dist/src/cli/handlers/util.js +119 -0
  57. package/dist/src/cli/ndjsonSafeStringify.js +8 -0
  58. package/dist/src/cli/print.js +3112 -0
  59. package/dist/src/cli/remoteIO.js +161 -0
  60. package/dist/src/cli/structuredIO.js +489 -0
  61. package/dist/src/cli/transports/HybridTransport.js +145 -0
  62. package/dist/src/cli/transports/SSETransport.js +403 -0
  63. package/dist/src/cli/transports/SerialBatchEventUploader.js +154 -0
  64. package/dist/src/cli/transports/WebSocketTransport.js +497 -0
  65. package/dist/src/cli/transports/WorkerStateUploader.js +69 -0
  66. package/dist/src/cli/transports/ccrClient.js +522 -0
  67. package/dist/src/cli/transports/transportUtils.js +25 -0
  68. package/dist/src/cli/update.js +361 -0
  69. package/dist/src/commands/add-dir/add-dir.js +140 -0
  70. package/dist/src/commands/add-dir/index.js +8 -0
  71. package/dist/src/commands/add-dir/validation.js +67 -0
  72. package/dist/src/commands/advisor.js +96 -0
  73. package/dist/src/commands/agents/agents.js +12 -0
  74. package/dist/src/commands/agents/index.js +7 -0
  75. package/dist/src/commands/ant-trace/index.js +1 -0
  76. package/dist/src/commands/autofix-pr/index.js +1 -0
  77. package/dist/src/commands/backfill-sessions/index.js +1 -0
  78. package/dist/src/commands/branch/branch.js +168 -0
  79. package/dist/src/commands/branch/index.js +9 -0
  80. package/dist/src/commands/break-cache/index.js +1 -0
  81. package/dist/src/commands/bridge/bridge.js +519 -0
  82. package/dist/src/commands/bridge/index.js +21 -0
  83. package/dist/src/commands/bridge-kick.js +145 -0
  84. package/dist/src/commands/brief.js +66 -0
  85. package/dist/src/commands/btw/btw.js +281 -0
  86. package/dist/src/commands/btw/index.js +9 -0
  87. package/dist/src/commands/bughunter/index.js +1 -0
  88. package/dist/src/commands/chrome/chrome.js +394 -0
  89. package/dist/src/commands/chrome/index.js +10 -0
  90. package/dist/src/commands/clear/caches.js +69 -0
  91. package/dist/src/commands/clear/clear.js +5 -0
  92. package/dist/src/commands/clear/conversation.js +156 -0
  93. package/dist/src/commands/clear/index.js +9 -0
  94. package/dist/src/commands/color/color.js +57 -0
  95. package/dist/src/commands/color/index.js +9 -0
  96. package/dist/src/commands/commit-push-pr.js +145 -0
  97. package/dist/src/commands/commit.js +83 -0
  98. package/dist/src/commands/compact/compact.js +161 -0
  99. package/dist/src/commands/compact/index.js +11 -0
  100. package/dist/src/commands/config/config.js +9 -0
  101. package/dist/src/commands/config/index.js +8 -0
  102. package/dist/src/commands/context/context-noninteractive.js +256 -0
  103. package/dist/src/commands/context/context.js +33 -0
  104. package/dist/src/commands/context/index.js +21 -0
  105. package/dist/src/commands/copy/copy.js +397 -0
  106. package/dist/src/commands/copy/index.js +7 -0
  107. package/dist/src/commands/cost/cost.js +21 -0
  108. package/dist/src/commands/cost/index.js +15 -0
  109. package/dist/src/commands/createMovedToPluginCommand.js +40 -0
  110. package/dist/src/commands/ctx_viz/index.js +1 -0
  111. package/dist/src/commands/debug-tool-call/index.js +1 -0
  112. package/dist/src/commands/desktop/desktop.js +7 -0
  113. package/dist/src/commands/desktop/index.js +22 -0
  114. package/dist/src/commands/diff/diff.js +10 -0
  115. package/dist/src/commands/diff/index.js +6 -0
  116. package/dist/src/commands/doctor/doctor.js +7 -0
  117. package/dist/src/commands/doctor/index.js +9 -0
  118. package/dist/src/commands/effort/effort.js +181 -0
  119. package/dist/src/commands/effort/index.js +11 -0
  120. package/dist/src/commands/env/index.js +1 -0
  121. package/dist/src/commands/exit/exit.js +25 -0
  122. package/dist/src/commands/exit/index.js +9 -0
  123. package/dist/src/commands/export/export.js +79 -0
  124. package/dist/src/commands/export/index.js +8 -0
  125. package/dist/src/commands/extra-usage/extra-usage-core.js +85 -0
  126. package/dist/src/commands/extra-usage/extra-usage-noninteractive.js +11 -0
  127. package/dist/src/commands/extra-usage/extra-usage.js +17 -0
  128. package/dist/src/commands/extra-usage/index.js +27 -0
  129. package/dist/src/commands/fast/fast.js +345 -0
  130. package/dist/src/commands/fast/index.js +23 -0
  131. package/dist/src/commands/feedback/feedback.js +15 -0
  132. package/dist/src/commands/feedback/index.js +13 -0
  133. package/dist/src/commands/files/files.js +13 -0
  134. package/dist/src/commands/files/index.js +9 -0
  135. package/dist/src/commands/good-claude/index.js +1 -0
  136. package/dist/src/commands/heapdump/heapdump.js +15 -0
  137. package/dist/src/commands/heapdump/index.js +9 -0
  138. package/dist/src/commands/help/help.js +12 -0
  139. package/dist/src/commands/help/index.js +7 -0
  140. package/dist/src/commands/hooks/hooks.js +14 -0
  141. package/dist/src/commands/hooks/index.js +8 -0
  142. package/dist/src/commands/ide/ide.js +702 -0
  143. package/dist/src/commands/ide/index.js +8 -0
  144. package/dist/src/commands/init-verifiers.js +258 -0
  145. package/dist/src/commands/init.js +240 -0
  146. package/dist/src/commands/insights.js +2212 -0
  147. package/dist/src/commands/install-github-app/ApiKeyStep.js +290 -0
  148. package/dist/src/commands/install-github-app/CheckExistingSecretStep.js +265 -0
  149. package/dist/src/commands/install-github-app/CheckGitHubStep.js +16 -0
  150. package/dist/src/commands/install-github-app/ChooseRepoStep.js +282 -0
  151. package/dist/src/commands/install-github-app/CreatingStep.js +87 -0
  152. package/dist/src/commands/install-github-app/ErrorStep.js +157 -0
  153. package/dist/src/commands/install-github-app/ExistingWorkflowStep.js +164 -0
  154. package/dist/src/commands/install-github-app/InstallAppStep.js +166 -0
  155. package/dist/src/commands/install-github-app/OAuthFlowStep.js +335 -0
  156. package/dist/src/commands/install-github-app/SuccessStep.js +173 -0
  157. package/dist/src/commands/install-github-app/WarningsStep.js +140 -0
  158. package/dist/src/commands/install-github-app/index.js +10 -0
  159. package/dist/src/commands/install-github-app/install-github-app.js +612 -0
  160. package/dist/src/commands/install-github-app/setupGitHubActions.js +223 -0
  161. package/dist/src/commands/install-slack-app/index.js +9 -0
  162. package/dist/src/commands/install-slack-app/install-slack-app.js +23 -0
  163. package/dist/src/commands/install.js +348 -0
  164. package/dist/src/commands/issue/index.js +1 -0
  165. package/dist/src/commands/keybindings/index.js +10 -0
  166. package/dist/src/commands/keybindings/keybindings.js +43 -0
  167. package/dist/src/commands/login/index.js +9 -0
  168. package/dist/src/commands/login/login.js +105 -0
  169. package/dist/src/commands/logout/index.js +8 -0
  170. package/dist/src/commands/logout/logout.js +68 -0
  171. package/dist/src/commands/mcp/addCommand.js +157 -0
  172. package/dist/src/commands/mcp/index.js +9 -0
  173. package/dist/src/commands/mcp/mcp.js +85 -0
  174. package/dist/src/commands/mcp/xaaIdpCommand.js +135 -0
  175. package/dist/src/commands/memory/index.js +7 -0
  176. package/dist/src/commands/memory/memory.js +95 -0
  177. package/dist/src/commands/mobile/index.js +8 -0
  178. package/dist/src/commands/mobile/mobile.js +324 -0
  179. package/dist/src/commands/mock-limits/index.js +1 -0
  180. package/dist/src/commands/model/index.js +14 -0
  181. package/dist/src/commands/model/model.js +289 -0
  182. package/dist/src/commands/oauth-refresh/index.js +1 -0
  183. package/dist/src/commands/onboarding/index.js +1 -0
  184. package/dist/src/commands/output-style/index.js +8 -0
  185. package/dist/src/commands/output-style/output-style.js +5 -0
  186. package/dist/src/commands/passes/index.js +20 -0
  187. package/dist/src/commands/passes/passes.js +23 -0
  188. package/dist/src/commands/perf-issue/index.js +1 -0
  189. package/dist/src/commands/permissions/index.js +8 -0
  190. package/dist/src/commands/permissions/permissions.js +11 -0
  191. package/dist/src/commands/plan/index.js +8 -0
  192. package/dist/src/commands/plan/plan.js +151 -0
  193. package/dist/src/commands/plugin/AddMarketplace.js +202 -0
  194. package/dist/src/commands/plugin/BrowseMarketplace.js +918 -0
  195. package/dist/src/commands/plugin/DiscoverPlugins.js +935 -0
  196. package/dist/src/commands/plugin/ManageMarketplaces.js +1018 -0
  197. package/dist/src/commands/plugin/ManagePlugins.js +2230 -0
  198. package/dist/src/commands/plugin/PluginErrors.js +118 -0
  199. package/dist/src/commands/plugin/PluginOptionsDialog.js +396 -0
  200. package/dist/src/commands/plugin/PluginOptionsFlow.js +80 -0
  201. package/dist/src/commands/plugin/PluginSettings.js +1313 -0
  202. package/dist/src/commands/plugin/PluginTrustWarning.js +50 -0
  203. package/dist/src/commands/plugin/UnifiedInstalledCell.js +749 -0
  204. package/dist/src/commands/plugin/ValidatePlugin.js +113 -0
  205. package/dist/src/commands/plugin/index.js +9 -0
  206. package/dist/src/commands/plugin/parseArgs.js +61 -0
  207. package/dist/src/commands/plugin/plugin.js +8 -0
  208. package/dist/src/commands/plugin/pluginDetailsHelpers.js +114 -0
  209. package/dist/src/commands/plugin/usePagination.js +75 -0
  210. package/dist/src/commands/pr_comments/index.js +49 -0
  211. package/dist/src/commands/privacy-settings/index.js +11 -0
  212. package/dist/src/commands/privacy-settings/privacy-settings.js +58 -0
  213. package/dist/src/commands/rate-limit-options/index.js +15 -0
  214. package/dist/src/commands/rate-limit-options/rate-limit-options.js +211 -0
  215. package/dist/src/commands/release-notes/index.js +8 -0
  216. package/dist/src/commands/release-notes/release-notes.js +38 -0
  217. package/dist/src/commands/reload-plugins/index.js +8 -0
  218. package/dist/src/commands/reload-plugins/reload-plugins.js +27 -0
  219. package/dist/src/commands/remote-env/index.js +12 -0
  220. package/dist/src/commands/remote-env/remote-env.js +7 -0
  221. package/dist/src/commands/remote-setup/api.js +121 -0
  222. package/dist/src/commands/remote-setup/index.js +14 -0
  223. package/dist/src/commands/remote-setup/remote-setup.js +173 -0
  224. package/dist/src/commands/rename/generateSessionName.js +51 -0
  225. package/dist/src/commands/rename/index.js +9 -0
  226. package/dist/src/commands/rename/rename.js +52 -0
  227. package/dist/src/commands/reset-limits/index.js +4 -0
  228. package/dist/src/commands/resume/index.js +9 -0
  229. package/dist/src/commands/resume/resume.js +281 -0
  230. package/dist/src/commands/review/UltrareviewOverageDialog.js +112 -0
  231. package/dist/src/commands/review/reviewRemote.js +193 -0
  232. package/dist/src/commands/review/ultrareviewCommand.js +50 -0
  233. package/dist/src/commands/review/ultrareviewEnabled.js +5 -0
  234. package/dist/src/commands/review.js +45 -0
  235. package/dist/src/commands/rewind/index.js +10 -0
  236. package/dist/src/commands/rewind/rewind.js +6 -0
  237. package/dist/src/commands/sandbox-toggle/index.js +35 -0
  238. package/dist/src/commands/sandbox-toggle/sandbox-toggle.js +61 -0
  239. package/dist/src/commands/security-review.js +228 -0
  240. package/dist/src/commands/session/index.js +13 -0
  241. package/dist/src/commands/session/session.js +185 -0
  242. package/dist/src/commands/share/index.js +1 -0
  243. package/dist/src/commands/skills/index.js +7 -0
  244. package/dist/src/commands/skills/skills.js +8 -0
  245. package/dist/src/commands/stats/index.js +7 -0
  246. package/dist/src/commands/stats/stats.js +7 -0
  247. package/dist/src/commands/status/index.js +8 -0
  248. package/dist/src/commands/status/status.js +9 -0
  249. package/dist/src/commands/statusline.js +20 -0
  250. package/dist/src/commands/stickers/index.js +8 -0
  251. package/dist/src/commands/stickers/stickers.js +13 -0
  252. package/dist/src/commands/summary/index.js +1 -0
  253. package/dist/src/commands/tag/index.js +9 -0
  254. package/dist/src/commands/tag/tag.js +250 -0
  255. package/dist/src/commands/tasks/index.js +8 -0
  256. package/dist/src/commands/tasks/tasks.js +8 -0
  257. package/dist/src/commands/teleport/index.js +1 -0
  258. package/dist/src/commands/terminalSetup/index.js +15 -0
  259. package/dist/src/commands/terminalSetup/terminalSetup.js +425 -0
  260. package/dist/src/commands/theme/index.js +7 -0
  261. package/dist/src/commands/theme/theme.js +58 -0
  262. package/dist/src/commands/thinkback/index.js +9 -0
  263. package/dist/src/commands/thinkback/thinkback.js +569 -0
  264. package/dist/src/commands/thinkback-play/index.js +11 -0
  265. package/dist/src/commands/thinkback-play/thinkback-play.js +31 -0
  266. package/dist/src/commands/ultraplan.js +361 -0
  267. package/dist/src/commands/upgrade/index.js +11 -0
  268. package/dist/src/commands/upgrade/upgrade.js +37 -0
  269. package/dist/src/commands/usage/index.js +7 -0
  270. package/dist/src/commands/usage/usage.js +9 -0
  271. package/dist/src/commands/version.js +15 -0
  272. package/dist/src/commands/vim/index.js +8 -0
  273. package/dist/src/commands/vim/vim.js +24 -0
  274. package/dist/src/commands/voice/index.js +17 -0
  275. package/dist/src/commands/voice/voice.js +117 -0
  276. package/dist/src/commands.js +476 -0
  277. package/dist/src/components/AgentProgressLine.js +202 -0
  278. package/dist/src/components/App.js +53 -0
  279. package/dist/src/components/ApproveApiKey.js +156 -0
  280. package/dist/src/components/AutoModeOptInDialog.js +154 -0
  281. package/dist/src/components/AutoUpdater.js +178 -0
  282. package/dist/src/components/AutoUpdaterWrapper.js +91 -0
  283. package/dist/src/components/AwsAuthStatusBox.js +119 -0
  284. package/dist/src/components/BaseTextInput.js +158 -0
  285. package/dist/src/components/BashModeProgress.js +65 -0
  286. package/dist/src/components/BridgeDialog.js +460 -0
  287. package/dist/src/components/BypassPermissionsModeDialog.js +111 -0
  288. package/dist/src/components/ChannelDowngradeDialog.js +114 -0
  289. package/dist/src/components/ClaudeCodeHint/PluginHintMenu.js +120 -0
  290. package/dist/src/components/ClaudeInChromeOnboarding.js +176 -0
  291. package/dist/src/components/ClaudeMdExternalIncludesDialog.js +172 -0
  292. package/dist/src/components/ClickableImageRef.js +74 -0
  293. package/dist/src/components/CompactSummary.js +220 -0
  294. package/dist/src/components/ConfigurableShortcutHint.js +33 -0
  295. package/dist/src/components/ConsoleOAuthFlow.js +841 -0
  296. package/dist/src/components/ContextSuggestions.js +85 -0
  297. package/dist/src/components/ContextVisualization.js +878 -0
  298. package/dist/src/components/CoordinatorAgentStatus.js +304 -0
  299. package/dist/src/components/CostThresholdDialog.js +66 -0
  300. package/dist/src/components/CtrlOToExpand.js +56 -0
  301. package/dist/src/components/CustomSelect/SelectMulti.js +246 -0
  302. package/dist/src/components/CustomSelect/index.js +2 -0
  303. package/dist/src/components/CustomSelect/option-map.js +32 -0
  304. package/dist/src/components/CustomSelect/select-input-option.js +558 -0
  305. package/dist/src/components/CustomSelect/select-option.js +39 -0
  306. package/dist/src/components/CustomSelect/select.js +803 -0
  307. package/dist/src/components/CustomSelect/use-multi-select-state.js +175 -0
  308. package/dist/src/components/CustomSelect/use-select-input.js +163 -0
  309. package/dist/src/components/CustomSelect/use-select-navigation.js +334 -0
  310. package/dist/src/components/CustomSelect/use-select-state.js +30 -0
  311. package/dist/src/components/DesktopHandoff.js +214 -0
  312. package/dist/src/components/DesktopUpsell/DesktopUpsellStartup.js +185 -0
  313. package/dist/src/components/DevBar.js +53 -0
  314. package/dist/src/components/DevChannelsDialog.js +128 -0
  315. package/dist/src/components/DiagnosticsDisplay.js +149 -0
  316. package/dist/src/components/EffortCallout.js +302 -0
  317. package/dist/src/components/EffortIndicator.js +30 -0
  318. package/dist/src/components/ExitFlow.js +45 -0
  319. package/dist/src/components/ExportDialog.js +160 -0
  320. package/dist/src/components/FallbackToolUseErrorMessage.js +149 -0
  321. package/dist/src/components/FallbackToolUseRejectedMessage.js +18 -0
  322. package/dist/src/components/FastIcon.js +49 -0
  323. package/dist/src/components/Feedback.js +589 -0
  324. package/dist/src/components/FeedbackSurvey/FeedbackSurvey.js +219 -0
  325. package/dist/src/components/FeedbackSurvey/FeedbackSurveyView.js +168 -0
  326. package/dist/src/components/FeedbackSurvey/TranscriptSharePrompt.js +147 -0
  327. package/dist/src/components/FeedbackSurvey/submitTranscriptShare.js +70 -0
  328. package/dist/src/components/FeedbackSurvey/useDebouncedDigitInput.js +45 -0
  329. package/dist/src/components/FeedbackSurvey/useFeedbackSurvey.js +242 -0
  330. package/dist/src/components/FeedbackSurvey/useMemorySurvey.js +188 -0
  331. package/dist/src/components/FeedbackSurvey/usePostCompactSurvey.js +200 -0
  332. package/dist/src/components/FeedbackSurvey/useSurveyState.js +81 -0
  333. package/dist/src/components/FileEditToolDiff.js +193 -0
  334. package/dist/src/components/FileEditToolUpdatedMessage.js +162 -0
  335. package/dist/src/components/FileEditToolUseRejectedMessage.js +215 -0
  336. package/dist/src/components/FilePathLink.js +33 -0
  337. package/dist/src/components/FullscreenLayout.js +592 -0
  338. package/dist/src/components/GlobalSearchDialog.js +371 -0
  339. package/dist/src/components/HelpV2/Commands.js +99 -0
  340. package/dist/src/components/HelpV2/General.js +48 -0
  341. package/dist/src/components/HelpV2/HelpV2.js +231 -0
  342. package/dist/src/components/HighlightedCode/Fallback.js +200 -0
  343. package/dist/src/components/HighlightedCode.js +219 -0
  344. package/dist/src/components/HistorySearchDialog.js +144 -0
  345. package/dist/src/components/IdeAutoConnectDialog.js +172 -0
  346. package/dist/src/components/IdeOnboardingDialog.js +249 -0
  347. package/dist/src/components/IdeStatusIndicator.js +68 -0
  348. package/dist/src/components/IdleReturnDialog.js +126 -0
  349. package/dist/src/components/InterruptedByUser.js +25 -0
  350. package/dist/src/components/InvalidConfigDialog.js +173 -0
  351. package/dist/src/components/InvalidSettingsDialog.js +94 -0
  352. package/dist/src/components/KeybindingWarnings.js +144 -0
  353. package/dist/src/components/LanguagePicker.js +112 -0
  354. package/dist/src/components/LogSelector.js +1775 -0
  355. package/dist/src/components/LogoV2/AnimatedAsterisk.js +49 -0
  356. package/dist/src/components/LogoV2/AnimatedClawd.js +105 -0
  357. package/dist/src/components/LogoV2/ChannelsNotice.js +334 -0
  358. package/dist/src/components/LogoV2/Clawd.js +285 -0
  359. package/dist/src/components/LogoV2/CondensedLogo.js +218 -0
  360. package/dist/src/components/LogoV2/EmergencyTip.js +47 -0
  361. package/dist/src/components/LogoV2/Feed.js +140 -0
  362. package/dist/src/components/LogoV2/FeedColumn.js +67 -0
  363. package/dist/src/components/LogoV2/GuestPassesUpsell.js +90 -0
  364. package/dist/src/components/LogoV2/LogoV2.js +774 -0
  365. package/dist/src/components/LogoV2/Opus1mMergeNotice.js +68 -0
  366. package/dist/src/components/LogoV2/OverageCreditUpsell.js +154 -0
  367. package/dist/src/components/LogoV2/VoiceModeNotice.js +75 -0
  368. package/dist/src/components/LogoV2/WelcomeV2.js +976 -0
  369. package/dist/src/components/LogoV2/feedConfigs.js +89 -0
  370. package/dist/src/components/LspRecommendation/LspRecommendationMenu.js +128 -0
  371. package/dist/src/components/MCPServerApprovalDialog.js +121 -0
  372. package/dist/src/components/MCPServerDesktopImportDialog.js +249 -0
  373. package/dist/src/components/MCPServerDialogCopy.js +24 -0
  374. package/dist/src/components/MCPServerMultiselectDialog.js +173 -0
  375. package/dist/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.js +199 -0
  376. package/dist/src/components/ManagedSettingsSecurityDialog/utils.js +75 -0
  377. package/dist/src/components/Markdown.js +200 -0
  378. package/dist/src/components/MarkdownTable.js +215 -0
  379. package/dist/src/components/MemoryUsageIndicator.js +33 -0
  380. package/dist/src/components/Message.js +638 -0
  381. package/dist/src/components/MessageModel.js +43 -0
  382. package/dist/src/components/MessageResponse.js +99 -0
  383. package/dist/src/components/MessageRow.js +350 -0
  384. package/dist/src/components/MessageSelector.js +1021 -0
  385. package/dist/src/components/MessageTimestamp.js +63 -0
  386. package/dist/src/components/Messages.js +576 -0
  387. package/dist/src/components/ModelPicker.js +582 -0
  388. package/dist/src/components/NativeAutoUpdater.js +169 -0
  389. package/dist/src/components/NotebookEditToolUseRejectedMessage.js +123 -0
  390. package/dist/src/components/OffscreenFreeze.js +21 -0
  391. package/dist/src/components/Onboarding.js +307 -0
  392. package/dist/src/components/OutputStylePicker.js +128 -0
  393. package/dist/src/components/PackageManagerAutoUpdater.js +116 -0
  394. package/dist/src/components/Passes/Passes.js +242 -0
  395. package/dist/src/components/PrBadge.js +119 -0
  396. package/dist/src/components/PressEnterToContinue.js +24 -0
  397. package/dist/src/components/PromptInput/HistorySearchInput.js +64 -0
  398. package/dist/src/components/PromptInput/IssueFlagBanner.js +6 -0
  399. package/dist/src/components/PromptInput/Notifications.js +343 -0
  400. package/dist/src/components/PromptInput/PromptInput.js +1837 -0
  401. package/dist/src/components/PromptInput/PromptInputFooter.js +192 -0
  402. package/dist/src/components/PromptInput/PromptInputFooterLeftSide.js +504 -0
  403. package/dist/src/components/PromptInput/PromptInputFooterSuggestions.js +296 -0
  404. package/dist/src/components/PromptInput/PromptInputHelpMenu.js +508 -0
  405. package/dist/src/components/PromptInput/PromptInputModeIndicator.js +92 -0
  406. package/dist/src/components/PromptInput/PromptInputQueuedCommands.js +90 -0
  407. package/dist/src/components/PromptInput/PromptInputStashNotice.js +30 -0
  408. package/dist/src/components/PromptInput/SandboxPromptFooterHint.js +80 -0
  409. package/dist/src/components/PromptInput/ShimmeredInput.js +157 -0
  410. package/dist/src/components/PromptInput/VoiceIndicator.js +138 -0
  411. package/dist/src/components/PromptInput/inputModes.js +24 -0
  412. package/dist/src/components/PromptInput/inputPaste.js +46 -0
  413. package/dist/src/components/PromptInput/useMaybeTruncateInput.js +36 -0
  414. package/dist/src/components/PromptInput/usePromptInputPlaceholder.js +39 -0
  415. package/dist/src/components/PromptInput/useShowFastIconHint.js +19 -0
  416. package/dist/src/components/PromptInput/useSwarmBanner.js +99 -0
  417. package/dist/src/components/PromptInput/utils.js +25 -0
  418. package/dist/src/components/QuickOpenDialog.js +272 -0
  419. package/dist/src/components/RemoteCallout.js +81 -0
  420. package/dist/src/components/RemoteEnvironmentDialog.js +451 -0
  421. package/dist/src/components/ResumeTask.js +361 -0
  422. package/dist/src/components/SandboxViolationExpandedView.js +134 -0
  423. package/dist/src/components/ScrollKeybindingHandler.js +589 -0
  424. package/dist/src/components/SearchBox.js +111 -0
  425. package/dist/src/components/SentryErrorBoundary.js +17 -0
  426. package/dist/src/components/SessionBackgroundHint.js +103 -0
  427. package/dist/src/components/SessionPreview.js +263 -0
  428. package/dist/src/components/Settings/Config.js +1776 -0
  429. package/dist/src/components/Settings/Settings.js +159 -0
  430. package/dist/src/components/Settings/Status.js +315 -0
  431. package/dist/src/components/Settings/Usage.js +503 -0
  432. package/dist/src/components/ShowInIDEPrompt.js +212 -0
  433. package/dist/src/components/SkillImprovementSurvey.js +204 -0
  434. package/dist/src/components/Spinner/FlashingChar.js +60 -0
  435. package/dist/src/components/Spinner/GlimmerMessage.js +391 -0
  436. package/dist/src/components/Spinner/ShimmerChar.js +30 -0
  437. package/dist/src/components/Spinner/SpinnerAnimationRow.js +248 -0
  438. package/dist/src/components/Spinner/SpinnerGlyph.js +105 -0
  439. package/dist/src/components/Spinner/TeammateSpinnerLine.js +243 -0
  440. package/dist/src/components/Spinner/TeammateSpinnerTree.js +360 -0
  441. package/dist/src/components/Spinner/index.js +7 -0
  442. package/dist/src/components/Spinner/teammateSelectHint.js +1 -0
  443. package/dist/src/components/Spinner/useShimmerAnimation.js +17 -0
  444. package/dist/src/components/Spinner/useStalledAnimation.js +47 -0
  445. package/dist/src/components/Spinner/utils.js +65 -0
  446. package/dist/src/components/Spinner.js +596 -0
  447. package/dist/src/components/Stats.js +1415 -0
  448. package/dist/src/components/StatusLine.js +264 -0
  449. package/dist/src/components/StatusNotices.js +50 -0
  450. package/dist/src/components/StructuredDiff/Fallback.js +379 -0
  451. package/dist/src/components/StructuredDiff/colorDiff.js +21 -0
  452. package/dist/src/components/StructuredDiff.js +170 -0
  453. package/dist/src/components/StructuredDiffList.js +30 -0
  454. package/dist/src/components/TagTabs.js +124 -0
  455. package/dist/src/components/TaskListV2.js +430 -0
  456. package/dist/src/components/TeammateViewHeader.js +112 -0
  457. package/dist/src/components/TeleportError.js +200 -0
  458. package/dist/src/components/TeleportProgress.js +175 -0
  459. package/dist/src/components/TeleportRepoMismatchDialog.js +160 -0
  460. package/dist/src/components/TeleportResumeWrapper.js +207 -0
  461. package/dist/src/components/TeleportStash.js +159 -0
  462. package/dist/src/components/TextInput.js +94 -0
  463. package/dist/src/components/ThemePicker.js +428 -0
  464. package/dist/src/components/ThinkingToggle.js +233 -0
  465. package/dist/src/components/TokenWarning.js +165 -0
  466. package/dist/src/components/ToolUseLoader.js +44 -0
  467. package/dist/src/components/TrustDialog/TrustDialog.js +337 -0
  468. package/dist/src/components/TrustDialog/utils.js +149 -0
  469. package/dist/src/components/ValidationErrorsList.js +169 -0
  470. package/dist/src/components/VimTextInput.js +142 -0
  471. package/dist/src/components/VirtualMessageList.js +745 -0
  472. package/dist/src/components/WorkflowMultiselectDialog.js +173 -0
  473. package/dist/src/components/WorktreeExitDialog.js +228 -0
  474. package/dist/src/components/agents/AgentDetail.js +371 -0
  475. package/dist/src/components/agents/AgentEditor.js +191 -0
  476. package/dist/src/components/agents/AgentNavigationFooter.js +28 -0
  477. package/dist/src/components/agents/AgentsList.js +623 -0
  478. package/dist/src/components/agents/AgentsMenu.js +897 -0
  479. package/dist/src/components/agents/ColorPicker.js +170 -0
  480. package/dist/src/components/agents/ModelSelector.js +79 -0
  481. package/dist/src/components/agents/ToolSelector.js +581 -0
  482. package/dist/src/components/agents/agentFileUtils.js +142 -0
  483. package/dist/src/components/agents/generateAgent.js +160 -0
  484. package/dist/src/components/agents/new-agent-creation/CreateAgentWizard.js +101 -0
  485. package/dist/src/components/agents/new-agent-creation/wizard-steps/ColorStep.js +108 -0
  486. package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStep.js +551 -0
  487. package/dist/src/components/agents/new-agent-creation/wizard-steps/ConfirmStepWrapper.js +73 -0
  488. package/dist/src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.js +176 -0
  489. package/dist/src/components/agents/new-agent-creation/wizard-steps/GenerateStep.js +176 -0
  490. package/dist/src/components/agents/new-agent-creation/wizard-steps/LocationStep.js +104 -0
  491. package/dist/src/components/agents/new-agent-creation/wizard-steps/MemoryStep.js +136 -0
  492. package/dist/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +105 -0
  493. package/dist/src/components/agents/new-agent-creation/wizard-steps/ModelStep.js +75 -0
  494. package/dist/src/components/agents/new-agent-creation/wizard-steps/PromptStep.js +185 -0
  495. package/dist/src/components/agents/new-agent-creation/wizard-steps/ToolsStep.js +81 -0
  496. package/dist/src/components/agents/new-agent-creation/wizard-steps/TypeStep.js +146 -0
  497. package/dist/src/components/agents/types.js +4 -0
  498. package/dist/src/components/agents/utils.js +14 -0
  499. package/dist/src/components/agents/validateAgent.js +66 -0
  500. package/dist/src/components/design-system/Byline.js +53 -0
  501. package/dist/src/components/design-system/Dialog.js +171 -0
  502. package/dist/src/components/design-system/Divider.js +107 -0
  503. package/dist/src/components/design-system/FuzzyPicker.js +316 -0
  504. package/dist/src/components/design-system/KeyboardShortcutHint.js +63 -0
  505. package/dist/src/components/design-system/ListItem.js +186 -0
  506. package/dist/src/components/design-system/LoadingState.js +72 -0
  507. package/dist/src/components/design-system/Pane.js +67 -0
  508. package/dist/src/components/design-system/ProgressBar.js +67 -0
  509. package/dist/src/components/design-system/Ratchet.js +83 -0
  510. package/dist/src/components/design-system/StatusIcon.js +60 -0
  511. package/dist/src/components/design-system/Tabs.js +332 -0
  512. package/dist/src/components/design-system/ThemeProvider.js +117 -0
  513. package/dist/src/components/design-system/ThemedBox.js +123 -0
  514. package/dist/src/components/design-system/ThemedText.js +68 -0
  515. package/dist/src/components/design-system/color.js +13 -0
  516. package/dist/src/components/diff/DiffDetailView.js +388 -0
  517. package/dist/src/components/diff/DiffDialog.js +489 -0
  518. package/dist/src/components/diff/DiffFileList.js +359 -0
  519. package/dist/src/components/grove/Grove.js +710 -0
  520. package/dist/src/components/hooks/HooksConfigMenu.js +626 -0
  521. package/dist/src/components/hooks/PromptDialog.js +96 -0
  522. package/dist/src/components/hooks/SelectEventMode.js +169 -0
  523. package/dist/src/components/hooks/SelectHookMode.js +127 -0
  524. package/dist/src/components/hooks/SelectMatcherMode.js +156 -0
  525. package/dist/src/components/hooks/ViewHookMode.js +275 -0
  526. package/dist/src/components/mcp/CapabilitiesSection.js +68 -0
  527. package/dist/src/components/mcp/ElicitationDialog.js +1330 -0
  528. package/dist/src/components/mcp/MCPAgentServerMenu.js +275 -0
  529. package/dist/src/components/mcp/MCPListPanel.js +671 -0
  530. package/dist/src/components/mcp/MCPReconnect.js +210 -0
  531. package/dist/src/components/mcp/MCPRemoteServerMenu.js +906 -0
  532. package/dist/src/components/mcp/MCPSettings.js +415 -0
  533. package/dist/src/components/mcp/MCPStdioServerMenu.js +276 -0
  534. package/dist/src/components/mcp/MCPToolDetailView.js +316 -0
  535. package/dist/src/components/mcp/MCPToolListView.js +169 -0
  536. package/dist/src/components/mcp/McpParsingWarnings.js +319 -0
  537. package/dist/src/components/mcp/index.js +8 -0
  538. package/dist/src/components/mcp/utils/reconnectHelpers.js +28 -0
  539. package/dist/src/components/memory/MemoryFileSelector.js +459 -0
  540. package/dist/src/components/memory/MemoryUpdateNotification.js +51 -0
  541. package/dist/src/components/messageActions.js +464 -0
  542. package/dist/src/components/messages/AdvisorMessage.js +202 -0
  543. package/dist/src/components/messages/AssistantRedactedThinkingMessage.js +34 -0
  544. package/dist/src/components/messages/AssistantTextMessage.js +373 -0
  545. package/dist/src/components/messages/AssistantThinkingMessage.js +105 -0
  546. package/dist/src/components/messages/AssistantToolUseMessage.js +414 -0
  547. package/dist/src/components/messages/AttachmentMessage.js +764 -0
  548. package/dist/src/components/messages/CollapsedReadSearchContent.js +651 -0
  549. package/dist/src/components/messages/CompactBoundaryMessage.js +27 -0
  550. package/dist/src/components/messages/GroupedToolUseContent.js +42 -0
  551. package/dist/src/components/messages/HighlightedThinkingText.js +215 -0
  552. package/dist/src/components/messages/HookProgressMessage.js +150 -0
  553. package/dist/src/components/messages/PlanApprovalMessage.js +294 -0
  554. package/dist/src/components/messages/RateLimitMessage.js +164 -0
  555. package/dist/src/components/messages/ShutdownMessage.js +180 -0
  556. package/dist/src/components/messages/SystemAPIErrorMessage.js +162 -0
  557. package/dist/src/components/messages/SystemTextMessage.js +1145 -0
  558. package/dist/src/components/messages/TaskAssignmentMessage.js +100 -0
  559. package/dist/src/components/messages/UserAgentNotificationMessage.js +89 -0
  560. package/dist/src/components/messages/UserBashInputMessage.js +67 -0
  561. package/dist/src/components/messages/UserBashOutputMessage.js +56 -0
  562. package/dist/src/components/messages/UserChannelMessage.js +145 -0
  563. package/dist/src/components/messages/UserCommandMessage.js +146 -0
  564. package/dist/src/components/messages/UserImageMessage.js +59 -0
  565. package/dist/src/components/messages/UserLocalCommandOutputMessage.js +226 -0
  566. package/dist/src/components/messages/UserMemoryInputMessage.js +101 -0
  567. package/dist/src/components/messages/UserPlanMessage.js +56 -0
  568. package/dist/src/components/messages/UserPromptMessage.js +54 -0
  569. package/dist/src/components/messages/UserResourceUpdateMessage.js +131 -0
  570. package/dist/src/components/messages/UserTeammateMessage.js +215 -0
  571. package/dist/src/components/messages/UserTextMessage.js +207 -0
  572. package/dist/src/components/messages/UserToolResultMessage/RejectedPlanMessage.js +46 -0
  573. package/dist/src/components/messages/UserToolResultMessage/RejectedToolUseMessage.js +21 -0
  574. package/dist/src/components/messages/UserToolResultMessage/UserToolCanceledMessage.js +18 -0
  575. package/dist/src/components/messages/UserToolResultMessage/UserToolErrorMessage.js +90 -0
  576. package/dist/src/components/messages/UserToolResultMessage/UserToolRejectMessage.js +80 -0
  577. package/dist/src/components/messages/UserToolResultMessage/UserToolResultMessage.js +116 -0
  578. package/dist/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +73 -0
  579. package/dist/src/components/messages/UserToolResultMessage/utils.js +41 -0
  580. package/dist/src/components/messages/nullRenderingAttachments.js +40 -0
  581. package/dist/src/components/messages/teamMemCollapsed.js +160 -0
  582. package/dist/src/components/messages/teamMemSaved.js +9 -0
  583. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/AskUserQuestionPermissionRequest.js +696 -0
  584. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.js +263 -0
  585. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js +384 -0
  586. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.js +228 -0
  587. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/QuestionView.js +611 -0
  588. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/SubmitQuestionsView.js +218 -0
  589. package/dist/src/components/permissions/AskUserQuestionPermissionRequest/use-multiple-choice-state.js +98 -0
  590. package/dist/src/components/permissions/BashPermissionRequest/BashPermissionRequest.js +458 -0
  591. package/dist/src/components/permissions/BashPermissionRequest/bashToolUseOptions.js +90 -0
  592. package/dist/src/components/permissions/ComputerUseApproval/ComputerUseApproval.js +567 -0
  593. package/dist/src/components/permissions/EnterPlanModePermissionRequest/EnterPlanModePermissionRequest.js +175 -0
  594. package/dist/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.js +728 -0
  595. package/dist/src/components/permissions/FallbackPermissionRequest.js +385 -0
  596. package/dist/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +205 -0
  597. package/dist/src/components/permissions/FilePermissionDialog/FilePermissionDialog.js +188 -0
  598. package/dist/src/components/permissions/FilePermissionDialog/ideDiffConfig.js +13 -0
  599. package/dist/src/components/permissions/FilePermissionDialog/permissionOptions.js +159 -0
  600. package/dist/src/components/permissions/FilePermissionDialog/useFilePermissionDialog.js +129 -0
  601. package/dist/src/components/permissions/FilePermissionDialog/usePermissionHandler.js +100 -0
  602. package/dist/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +186 -0
  603. package/dist/src/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +110 -0
  604. package/dist/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +143 -0
  605. package/dist/src/components/permissions/NotebookEditPermissionRequest/NotebookEditPermissionRequest.js +194 -0
  606. package/dist/src/components/permissions/NotebookEditPermissionRequest/NotebookEditToolDiff.js +278 -0
  607. package/dist/src/components/permissions/PermissionDecisionDebugInfo.js +709 -0
  608. package/dist/src/components/permissions/PermissionDialog.js +90 -0
  609. package/dist/src/components/permissions/PermissionExplanation.js +298 -0
  610. package/dist/src/components/permissions/PermissionPrompt.js +327 -0
  611. package/dist/src/components/permissions/PermissionRequest.js +164 -0
  612. package/dist/src/components/permissions/PermissionRequestTitle.js +85 -0
  613. package/dist/src/components/permissions/PermissionRuleExplanation.js +112 -0
  614. package/dist/src/components/permissions/PowerShellPermissionRequest/PowerShellPermissionRequest.js +263 -0
  615. package/dist/src/components/permissions/PowerShellPermissionRequest/powershellToolUseOptions.js +70 -0
  616. package/dist/src/components/permissions/SandboxPermissionRequest.js +205 -0
  617. package/dist/src/components/permissions/SedEditPermissionRequest/SedEditPermissionRequest.js +259 -0
  618. package/dist/src/components/permissions/SkillPermissionRequest/SkillPermissionRequest.js +424 -0
  619. package/dist/src/components/permissions/WebFetchPermissionRequest/WebFetchPermissionRequest.js +299 -0
  620. package/dist/src/components/permissions/WorkerBadge.js +56 -0
  621. package/dist/src/components/permissions/WorkerPendingPermission.js +158 -0
  622. package/dist/src/components/permissions/hooks.js +128 -0
  623. package/dist/src/components/permissions/rules/AddPermissionRules.js +203 -0
  624. package/dist/src/components/permissions/rules/AddWorkspaceDirectory.js +437 -0
  625. package/dist/src/components/permissions/rules/PermissionRuleDescription.js +101 -0
  626. package/dist/src/components/permissions/rules/PermissionRuleInput.js +208 -0
  627. package/dist/src/components/permissions/rules/PermissionRuleList.js +1382 -0
  628. package/dist/src/components/permissions/rules/RecentDenialsTab.js +229 -0
  629. package/dist/src/components/permissions/rules/RemoveWorkspaceDirectory.js +123 -0
  630. package/dist/src/components/permissions/rules/WorkspaceTab.js +161 -0
  631. package/dist/src/components/permissions/shellPermissionHelpers.js +219 -0
  632. package/dist/src/components/permissions/useShellPermissionFeedback.js +98 -0
  633. package/dist/src/components/permissions/utils.js +18 -0
  634. package/dist/src/components/sandbox/SandboxConfigTab.js +195 -0
  635. package/dist/src/components/sandbox/SandboxDependenciesTab.js +265 -0
  636. package/dist/src/components/sandbox/SandboxDoctorSection.js +80 -0
  637. package/dist/src/components/sandbox/SandboxOverridesTab.js +272 -0
  638. package/dist/src/components/sandbox/SandboxSettings.js +374 -0
  639. package/dist/src/components/shell/ExpandShellOutputContext.js +25 -0
  640. package/dist/src/components/shell/OutputLine.js +107 -0
  641. package/dist/src/components/shell/ShellProgressMessage.js +189 -0
  642. package/dist/src/components/shell/ShellTimeDisplay.js +78 -0
  643. package/dist/src/components/skills/SkillsMenu.js +310 -0
  644. package/dist/src/components/tasks/AsyncAgentDetailDialog.js +353 -0
  645. package/dist/src/components/tasks/BackgroundTask.js +428 -0
  646. package/dist/src/components/tasks/BackgroundTaskStatus.js +522 -0
  647. package/dist/src/components/tasks/BackgroundTasksDialog.js +784 -0
  648. package/dist/src/components/tasks/DreamDetailDialog.js +353 -0
  649. package/dist/src/components/tasks/InProcessTeammateDetailDialog.js +393 -0
  650. package/dist/src/components/tasks/RemoteSessionDetailDialog.js +1188 -0
  651. package/dist/src/components/tasks/RemoteSessionProgress.js +310 -0
  652. package/dist/src/components/tasks/ShellDetailDialog.js +511 -0
  653. package/dist/src/components/tasks/ShellProgress.js +93 -0
  654. package/dist/src/components/tasks/renderToolActivity.js +34 -0
  655. package/dist/src/components/tasks/taskStatusUtils.js +77 -0
  656. package/dist/src/components/teams/TeamStatus.js +95 -0
  657. package/dist/src/components/teams/TeamsDialog.js +734 -0
  658. package/dist/src/components/ui/OrderedList.js +74 -0
  659. package/dist/src/components/ui/OrderedListItem.js +53 -0
  660. package/dist/src/components/ui/TreeSelect.js +307 -0
  661. package/dist/src/components/wizard/WizardDialogLayout.js +71 -0
  662. package/dist/src/components/wizard/WizardNavigationFooter.js +36 -0
  663. package/dist/src/components/wizard/WizardProvider.js +211 -0
  664. package/dist/src/components/wizard/index.js +4 -0
  665. package/dist/src/components/wizard/useWizard.js +9 -0
  666. package/dist/src/constants/apiLimits.js +11 -0
  667. package/dist/src/constants/betas.js +28 -0
  668. package/dist/src/constants/common.js +16 -0
  669. package/dist/src/constants/cyberRiskInstruction.js +1 -0
  670. package/dist/src/constants/errorIds.js +1 -0
  671. package/dist/src/constants/figures.js +31 -0
  672. package/dist/src/constants/files.js +115 -0
  673. package/dist/src/constants/github-app.js +139 -0
  674. package/dist/src/constants/keys.js +4 -0
  675. package/dist/src/constants/messages.js +1 -0
  676. package/dist/src/constants/oauth.js +141 -0
  677. package/dist/src/constants/outputStyles.js +155 -0
  678. package/dist/src/constants/product.js +25 -0
  679. package/dist/src/constants/prompts.js +544 -0
  680. package/dist/src/constants/spinnerVerbs.js +201 -0
  681. package/dist/src/constants/system.js +46 -0
  682. package/dist/src/constants/systemPromptSections.js +27 -0
  683. package/dist/src/constants/toolLimits.js +6 -0
  684. package/dist/src/constants/tools.js +75 -0
  685. package/dist/src/constants/turnCompletionVerbs.js +10 -0
  686. package/dist/src/constants/xml.js +54 -0
  687. package/dist/src/context/QueuedMessageContext.js +57 -0
  688. package/dist/src/context/fpsMetrics.js +26 -0
  689. package/dist/src/context/mailbox.js +37 -0
  690. package/dist/src/context/modalContext.js +26 -0
  691. package/dist/src/context/notifications.js +176 -0
  692. package/dist/src/context/overlayContext.js +92 -0
  693. package/dist/src/context/promptOverlayContext.js +99 -0
  694. package/dist/src/context/stats.js +203 -0
  695. package/dist/src/context/voice.js +62 -0
  696. package/dist/src/context.js +119 -0
  697. package/dist/src/coordinator/coordinatorMode.js +323 -0
  698. package/dist/src/cost-tracker.js +234 -0
  699. package/dist/src/costHook.js +19 -0
  700. package/dist/src/dialogLaunchers.js +92 -0
  701. package/dist/src/entrypoints/agentSdkTypes.js +51 -0
  702. package/dist/src/entrypoints/cli.js +92 -0
  703. package/dist/src/entrypoints/init.js +199 -0
  704. package/dist/src/entrypoints/mcp.js +132 -0
  705. package/dist/src/entrypoints/npm-bin.js +6 -0
  706. package/dist/src/entrypoints/sandboxTypes.js +34 -0
  707. package/dist/src/entrypoints/sdk/controlSchemas.js +347 -0
  708. package/dist/src/entrypoints/sdk/coreSchemas.js +1019 -0
  709. package/dist/src/entrypoints/sdk/coreTypes.generated.js +1 -0
  710. package/dist/src/entrypoints/sdk/coreTypes.js +38 -0
  711. package/dist/src/entrypoints/sdk/runtimeTypes.js +1 -0
  712. package/dist/src/entrypoints/sdk/settingsTypes.generated.js +1 -0
  713. package/dist/src/entrypoints/sdk/toolTypes.js +1 -0
  714. package/dist/src/history.js +297 -0
  715. package/dist/src/hooks/fileSuggestions.js +460 -0
  716. package/dist/src/hooks/notifs/useAutoModeUnavailableNotification.js +39 -0
  717. package/dist/src/hooks/notifs/useCanSwitchToExistingSubscription.js +64 -0
  718. package/dist/src/hooks/notifs/useDeprecationWarningNotification.js +43 -0
  719. package/dist/src/hooks/notifs/useFastModeNotification.js +161 -0
  720. package/dist/src/hooks/notifs/useIDEStatusIndicator.js +187 -0
  721. package/dist/src/hooks/notifs/useInstallMessages.js +25 -0
  722. package/dist/src/hooks/notifs/useLspInitializationNotification.js +147 -0
  723. package/dist/src/hooks/notifs/useMcpConnectivityStatus.js +154 -0
  724. package/dist/src/hooks/notifs/useModelMigrationNotifications.js +45 -0
  725. package/dist/src/hooks/notifs/useNpmDeprecationNotification.js +24 -0
  726. package/dist/src/hooks/notifs/usePluginAutoupdateNotification.js +93 -0
  727. package/dist/src/hooks/notifs/usePluginInstallationStatus.js +143 -0
  728. package/dist/src/hooks/notifs/useRateLimitWarningNotification.js +118 -0
  729. package/dist/src/hooks/notifs/useSettingsErrors.js +67 -0
  730. package/dist/src/hooks/notifs/useStartupNotification.js +24 -0
  731. package/dist/src/hooks/notifs/useTeammateShutdownNotification.js +61 -0
  732. package/dist/src/hooks/renderPlaceholder.js +27 -0
  733. package/dist/src/hooks/toolPermission/PermissionContext.js +186 -0
  734. package/dist/src/hooks/toolPermission/handlers/coordinatorHandler.js +22 -0
  735. package/dist/src/hooks/toolPermission/handlers/interactiveHandler.js +194 -0
  736. package/dist/src/hooks/toolPermission/handlers/swarmWorkerHandler.js +79 -0
  737. package/dist/src/hooks/toolPermission/permissionLogging.js +114 -0
  738. package/dist/src/hooks/unifiedSuggestions.js +115 -0
  739. package/dist/src/hooks/useAfterFirstRender.js +12 -0
  740. package/dist/src/hooks/useApiKeyVerification.js +58 -0
  741. package/dist/src/hooks/useArrowKeyHistory.js +176 -0
  742. package/dist/src/hooks/useAssistantHistory.js +150 -0
  743. package/dist/src/hooks/useAwaySummary.js +95 -0
  744. package/dist/src/hooks/useBackgroundTaskNavigation.js +163 -0
  745. package/dist/src/hooks/useBlink.js +10 -0
  746. package/dist/src/hooks/useCanUseTool.js +144 -0
  747. package/dist/src/hooks/useCancelRequest.js +165 -0
  748. package/dist/src/hooks/useChromeExtensionNotification.js +55 -0
  749. package/dist/src/hooks/useClaudeCodeHintRecommendation.js +113 -0
  750. package/dist/src/hooks/useClipboardImageHint.js +45 -0
  751. package/dist/src/hooks/useCommandKeybindings.js +81 -0
  752. package/dist/src/hooks/useCommandQueue.js +8 -0
  753. package/dist/src/hooks/useCopyOnSelect.js +44 -0
  754. package/dist/src/hooks/useDeferredHookMessages.js +35 -0
  755. package/dist/src/hooks/useDiffData.js +62 -0
  756. package/dist/src/hooks/useDiffInIDE.js +197 -0
  757. package/dist/src/hooks/useDirectConnect.js +154 -0
  758. package/dist/src/hooks/useDoublePress.js +36 -0
  759. package/dist/src/hooks/useDynamicConfig.js +10 -0
  760. package/dist/src/hooks/useElapsedTime.js +12 -0
  761. package/dist/src/hooks/useExitOnCtrlCD.js +27 -0
  762. package/dist/src/hooks/useExitOnCtrlCDWithKeybindings.js +5 -0
  763. package/dist/src/hooks/useFileHistorySnapshotInit.js +17 -0
  764. package/dist/src/hooks/useGlobalKeybindings.js +132 -0
  765. package/dist/src/hooks/useHistorySearch.js +219 -0
  766. package/dist/src/hooks/useIDEIntegration.js +60 -0
  767. package/dist/src/hooks/useIdeAtMentioned.js +42 -0
  768. package/dist/src/hooks/useIdeConnectionStatus.js +18 -0
  769. package/dist/src/hooks/useIdeLogging.js +26 -0
  770. package/dist/src/hooks/useIdeSelection.js +78 -0
  771. package/dist/src/hooks/useInboxPoller.js +626 -0
  772. package/dist/src/hooks/useInputBuffer.js +69 -0
  773. package/dist/src/hooks/useIssueFlagBanner.js +101 -0
  774. package/dist/src/hooks/useLogMessages.js +47 -0
  775. package/dist/src/hooks/useLspPluginRecommendation.js +163 -0
  776. package/dist/src/hooks/useMailboxBridge.js +15 -0
  777. package/dist/src/hooks/useMainLoopModel.js +15 -0
  778. package/dist/src/hooks/useManagePlugins.js +195 -0
  779. package/dist/src/hooks/useMemoryUsage.js +17 -0
  780. package/dist/src/hooks/useMergedClients.js +11 -0
  781. package/dist/src/hooks/useMergedCommands.js +10 -0
  782. package/dist/src/hooks/useMergedTools.js +18 -0
  783. package/dist/src/hooks/useMinDisplayTime.js +19 -0
  784. package/dist/src/hooks/useNotifyAfterTimeout.js +34 -0
  785. package/dist/src/hooks/useOfficialMarketplaceNotification.js +50 -0
  786. package/dist/src/hooks/usePasteHandler.js +129 -0
  787. package/dist/src/hooks/usePluginRecommendationBase.js +98 -0
  788. package/dist/src/hooks/usePrStatus.js +77 -0
  789. package/dist/src/hooks/usePromptSuggestion.js +124 -0
  790. package/dist/src/hooks/usePromptsFromClaudeInChrome.js +60 -0
  791. package/dist/src/hooks/useQueueProcessor.js +29 -0
  792. package/dist/src/hooks/useRemoteSession.js +313 -0
  793. package/dist/src/hooks/useReplBridge.js +59 -0
  794. package/dist/src/hooks/useSSHSession.js +161 -0
  795. package/dist/src/hooks/useScheduledTasks.js +68 -0
  796. package/dist/src/hooks/useSearchInput.js +285 -0
  797. package/dist/src/hooks/useSessionBackgrounding.js +120 -0
  798. package/dist/src/hooks/useSettings.js +4 -0
  799. package/dist/src/hooks/useSettingsChange.js +10 -0
  800. package/dist/src/hooks/useSkillImprovementSurvey.js +61 -0
  801. package/dist/src/hooks/useSkillsChange.js +39 -0
  802. package/dist/src/hooks/useSwarmInitialization.js +39 -0
  803. package/dist/src/hooks/useSwarmPermissionPoller.js +141 -0
  804. package/dist/src/hooks/useTaskListWatcher.js +124 -0
  805. package/dist/src/hooks/useTasksV2.js +161 -0
  806. package/dist/src/hooks/useTeammateViewAutoExit.js +35 -0
  807. package/dist/src/hooks/useTeleportResume.js +75 -0
  808. package/dist/src/hooks/useTerminalSize.js +11 -0
  809. package/dist/src/hooks/useTextInput.js +353 -0
  810. package/dist/src/hooks/useTimeout.js +10 -0
  811. package/dist/src/hooks/useTurnDiffs.js +131 -0
  812. package/dist/src/hooks/useTypeahead.js +993 -0
  813. package/dist/src/hooks/useUpdateNotification.js +21 -0
  814. package/dist/src/hooks/useVimInput.js +210 -0
  815. package/dist/src/hooks/useVirtualScroll.js +282 -0
  816. package/dist/src/hooks/useVoice.js +675 -0
  817. package/dist/src/hooks/useVoiceEnabled.js +12 -0
  818. package/dist/src/hooks/useVoiceIntegration.js +391 -0
  819. package/dist/src/ink/Ansi.js +290 -0
  820. package/dist/src/ink/bidi.js +72 -0
  821. package/dist/src/ink/clearTerminal.js +42 -0
  822. package/dist/src/ink/colorize.js +119 -0
  823. package/dist/src/ink/components/AlternateScreen.js +60 -0
  824. package/dist/src/ink/components/App.js +375 -0
  825. package/dist/src/ink/components/AppContext.js +6 -0
  826. package/dist/src/ink/components/Box.js +181 -0
  827. package/dist/src/ink/components/Button.js +167 -0
  828. package/dist/src/ink/components/ClockContext.js +100 -0
  829. package/dist/src/ink/components/CursorDeclarationContext.js +3 -0
  830. package/dist/src/ink/components/ErrorOverview.js +152 -0
  831. package/dist/src/ink/components/Link.js +42 -0
  832. package/dist/src/ink/components/Newline.js +29 -0
  833. package/dist/src/ink/components/NoSelect.js +40 -0
  834. package/dist/src/ink/components/RawAnsi.js +36 -0
  835. package/dist/src/ink/components/ScrollBox.js +139 -0
  836. package/dist/src/ink/components/Spacer.js +16 -0
  837. package/dist/src/ink/components/StdinContext.js +12 -0
  838. package/dist/src/ink/components/TerminalFocusContext.js +43 -0
  839. package/dist/src/ink/components/TerminalSizeContext.js +2 -0
  840. package/dist/src/ink/components/Text.js +196 -0
  841. package/dist/src/ink/constants.js +1 -0
  842. package/dist/src/ink/dom.js +230 -0
  843. package/dist/src/ink/events/click-event.js +15 -0
  844. package/dist/src/ink/events/dispatcher.js +126 -0
  845. package/dist/src/ink/events/emitter.js +26 -0
  846. package/dist/src/ink/events/event-handlers.js +22 -0
  847. package/dist/src/ink/events/event.js +9 -0
  848. package/dist/src/ink/events/focus-event.js +9 -0
  849. package/dist/src/ink/events/input-event.js +83 -0
  850. package/dist/src/ink/events/keyboard-event.js +31 -0
  851. package/dist/src/ink/events/terminal-event.js +60 -0
  852. package/dist/src/ink/events/terminal-focus-event.js +9 -0
  853. package/dist/src/ink/focus.js +127 -0
  854. package/dist/src/ink/frame.js +22 -0
  855. package/dist/src/ink/get-max-width.js +5 -0
  856. package/dist/src/ink/hit-test.js +76 -0
  857. package/dist/src/ink/hooks/use-animation-frame.js +23 -0
  858. package/dist/src/ink/hooks/use-app.js +4 -0
  859. package/dist/src/ink/hooks/use-declared-cursor.js +27 -0
  860. package/dist/src/ink/hooks/use-input.js +31 -0
  861. package/dist/src/ink/hooks/use-interval.js +38 -0
  862. package/dist/src/ink/hooks/use-search-highlight.js +21 -0
  863. package/dist/src/ink/hooks/use-selection.js +47 -0
  864. package/dist/src/ink/hooks/use-stdin.js +4 -0
  865. package/dist/src/ink/hooks/use-tab-status.js +48 -0
  866. package/dist/src/ink/hooks/use-terminal-focus.js +6 -0
  867. package/dist/src/ink/hooks/use-terminal-title.js +17 -0
  868. package/dist/src/ink/hooks/use-terminal-viewport.js +40 -0
  869. package/dist/src/ink/ink.js +978 -0
  870. package/dist/src/ink/instances.js +2 -0
  871. package/dist/src/ink/layout/engine.js +4 -0
  872. package/dist/src/ink/layout/geometry.js +55 -0
  873. package/dist/src/ink/layout/node.js +60 -0
  874. package/dist/src/ink/layout/yoga.js +232 -0
  875. package/dist/src/ink/line-width-cache.js +14 -0
  876. package/dist/src/ink/log-update.js +408 -0
  877. package/dist/src/ink/measure-element.js +5 -0
  878. package/dist/src/ink/measure-text.js +30 -0
  879. package/dist/src/ink/node-cache.js +19 -0
  880. package/dist/src/ink/optimizer.js +52 -0
  881. package/dist/src/ink/output.js +399 -0
  882. package/dist/src/ink/parse-keypress.js +525 -0
  883. package/dist/src/ink/reconciler.js +359 -0
  884. package/dist/src/ink/render-border.js +110 -0
  885. package/dist/src/ink/render-node-to-output.js +710 -0
  886. package/dist/src/ink/render-to-screen.js +124 -0
  887. package/dist/src/ink/renderer.js +73 -0
  888. package/dist/src/ink/root.js +73 -0
  889. package/dist/src/ink/screen.js +823 -0
  890. package/dist/src/ink/searchHighlight.js +48 -0
  891. package/dist/src/ink/selection.js +507 -0
  892. package/dist/src/ink/squash-text-nodes.js +40 -0
  893. package/dist/src/ink/stringWidth.js +134 -0
  894. package/dist/src/ink/styles.js +279 -0
  895. package/dist/src/ink/supports-hyperlinks.js +29 -0
  896. package/dist/src/ink/tabstops.js +35 -0
  897. package/dist/src/ink/terminal-focus-state.js +33 -0
  898. package/dist/src/ink/terminal-querier.js +89 -0
  899. package/dist/src/ink/terminal.js +128 -0
  900. package/dist/src/ink/termio/ansi.js +53 -0
  901. package/dist/src/ink/termio/csi.js +158 -0
  902. package/dist/src/ink/termio/dec.js +31 -0
  903. package/dist/src/ink/termio/esc.js +36 -0
  904. package/dist/src/ink/termio/osc.js +275 -0
  905. package/dist/src/ink/termio/parser.js +293 -0
  906. package/dist/src/ink/termio/sgr.js +264 -0
  907. package/dist/src/ink/termio/tokenize.js +176 -0
  908. package/dist/src/ink/termio/types.js +33 -0
  909. package/dist/src/ink/termio.js +2 -0
  910. package/dist/src/ink/useTerminalNotification.js +61 -0
  911. package/dist/src/ink/warn.js +10 -0
  912. package/dist/src/ink/widest-line.js +15 -0
  913. package/dist/src/ink/wrap-text.js +50 -0
  914. package/dist/src/ink/wrapAnsi.js +5 -0
  915. package/dist/src/ink.js +55 -0
  916. package/dist/src/interactiveHelpers.js +231 -0
  917. package/dist/src/keybindings/KeybindingContext.js +170 -0
  918. package/dist/src/keybindings/KeybindingProviderSetup.js +225 -0
  919. package/dist/src/keybindings/defaultBindings.js +228 -0
  920. package/dist/src/keybindings/loadUserBindings.js +276 -0
  921. package/dist/src/keybindings/match.js +73 -0
  922. package/dist/src/keybindings/parser.js +152 -0
  923. package/dist/src/keybindings/reservedShortcuts.js +82 -0
  924. package/dist/src/keybindings/resolver.js +116 -0
  925. package/dist/src/keybindings/schema.js +143 -0
  926. package/dist/src/keybindings/shortcutFormat.js +24 -0
  927. package/dist/src/keybindings/template.js +28 -0
  928. package/dist/src/keybindings/useKeybinding.js +100 -0
  929. package/dist/src/keybindings/useShortcutDisplay.js +24 -0
  930. package/dist/src/keybindings/validate.js +313 -0
  931. package/dist/src/localRecoveryCli.js +256 -0
  932. package/dist/src/main.js +2489 -0
  933. package/dist/src/memdir/findRelevantMemories.js +76 -0
  934. package/dist/src/memdir/memdir.js +264 -0
  935. package/dist/src/memdir/memoryAge.js +24 -0
  936. package/dist/src/memdir/memoryScan.js +36 -0
  937. package/dist/src/memdir/memoryTypes.js +190 -0
  938. package/dist/src/memdir/paths.js +106 -0
  939. package/dist/src/memdir/teamMemPaths.js +133 -0
  940. package/dist/src/memdir/teamMemPrompts.js +87 -0
  941. package/dist/src/migrations/migrateAutoUpdatesToSettings.js +41 -0
  942. package/dist/src/migrations/migrateBypassPermissionsAcceptedToSettings.js +29 -0
  943. package/dist/src/migrations/migrateEnableAllProjectMcpServersToSettings.js +70 -0
  944. package/dist/src/migrations/migrateFennecToOpus.js +27 -0
  945. package/dist/src/migrations/migrateLegacyOpusToCurrent.js +30 -0
  946. package/dist/src/migrations/migrateOpusToOpus1m.js +23 -0
  947. package/dist/src/migrations/migrateReplBridgeEnabledToRemoteControlAtStartup.js +13 -0
  948. package/dist/src/migrations/migrateSonnet1mToSonnet45.js +29 -0
  949. package/dist/src/migrations/migrateSonnet45ToSonnet46.js +41 -0
  950. package/dist/src/migrations/resetAutoModeOptInForDefaultOffer.js +11 -0
  951. package/dist/src/migrations/resetProToOpusDefault.js +42 -0
  952. package/dist/src/moreright/useMoreRight.js +7 -0
  953. package/dist/src/native-ts/color-diff/index.js +729 -0
  954. package/dist/src/native-ts/file-index/index.js +246 -0
  955. package/dist/src/native-ts/yoga-layout/enums.js +96 -0
  956. package/dist/src/native-ts/yoga-layout/index.js +1638 -0
  957. package/dist/src/outputStyles/loadOutputStylesDir.js +47 -0
  958. package/dist/src/plugins/builtinPlugins.js +86 -0
  959. package/dist/src/plugins/bundled/index.js +1 -0
  960. package/dist/src/projectOnboardingState.js +56 -0
  961. package/dist/src/query/config.js +14 -0
  962. package/dist/src/query/deps.js +12 -0
  963. package/dist/src/query/stopHooks.js +251 -0
  964. package/dist/src/query/tokenBudget.js +47 -0
  965. package/dist/src/query.js +813 -0
  966. package/dist/src/remote/RemoteSessionManager.js +144 -0
  967. package/dist/src/remote/SessionsWebSocket.js +231 -0
  968. package/dist/src/remote/remotePermissionBridge.js +57 -0
  969. package/dist/src/remote/sdkMessageAdapter.js +161 -0
  970. package/dist/src/replLauncher.js +15 -0
  971. package/dist/src/schemas/hooks.js +71 -0
  972. package/dist/src/screens/Doctor.js +988 -0
  973. package/dist/src/screens/REPL.js +3588 -0
  974. package/dist/src/screens/ResumeConversation.js +396 -0
  975. package/dist/src/server/createDirectConnectSession.js +55 -0
  976. package/dist/src/server/directConnectManager.js +131 -0
  977. package/dist/src/server/types.js +7 -0
  978. package/dist/src/services/AgentSummary/agentSummary.js +114 -0
  979. package/dist/src/services/MagicDocs/magicDocs.js +151 -0
  980. package/dist/src/services/MagicDocs/prompts.js +85 -0
  981. package/dist/src/services/PromptSuggestion/promptSuggestion.js +350 -0
  982. package/dist/src/services/PromptSuggestion/speculation.js +590 -0
  983. package/dist/src/services/SessionMemory/prompts.js +220 -0
  984. package/dist/src/services/SessionMemory/sessionMemory.js +277 -0
  985. package/dist/src/services/SessionMemory/sessionMemoryUtils.js +94 -0
  986. package/dist/src/services/analytics/config.js +8 -0
  987. package/dist/src/services/analytics/datadog.js +217 -0
  988. package/dist/src/services/analytics/firstPartyEventLogger.js +223 -0
  989. package/dist/src/services/analytics/firstPartyEventLoggingExporter.js +500 -0
  990. package/dist/src/services/analytics/growthbook.js +597 -0
  991. package/dist/src/services/analytics/index.js +56 -0
  992. package/dist/src/services/analytics/metadata.js +507 -0
  993. package/dist/src/services/analytics/sink.js +44 -0
  994. package/dist/src/services/analytics/sinkKillswitch.js +6 -0
  995. package/dist/src/services/api/adminRequests.js +40 -0
  996. package/dist/src/services/api/bootstrap.js +104 -0
  997. package/dist/src/services/api/claude.js +1851 -0
  998. package/dist/src/services/api/client.js +209 -0
  999. package/dist/src/services/api/dumpPrompts.js +145 -0
  1000. package/dist/src/services/api/emptyUsage.js +15 -0
  1001. package/dist/src/services/api/errorUtils.js +137 -0
  1002. package/dist/src/services/api/errors.js +641 -0
  1003. package/dist/src/services/api/filesApi.js +409 -0
  1004. package/dist/src/services/api/firstTokenDate.js +42 -0
  1005. package/dist/src/services/api/grove.js +222 -0
  1006. package/dist/src/services/api/logging.js +478 -0
  1007. package/dist/src/services/api/metricsOptOut.js +87 -0
  1008. package/dist/src/services/api/overageCreditGrant.js +83 -0
  1009. package/dist/src/services/api/promptCacheBreakDetection.js +411 -0
  1010. package/dist/src/services/api/referral.js +178 -0
  1011. package/dist/src/services/api/sessionIngress.js +264 -0
  1012. package/dist/src/services/api/ultrareviewQuota.js +23 -0
  1013. package/dist/src/services/api/usage.js +34 -0
  1014. package/dist/src/services/api/withRetry.js +454 -0
  1015. package/dist/src/services/autoDream/autoDream.js +197 -0
  1016. package/dist/src/services/autoDream/config.js +9 -0
  1017. package/dist/src/services/autoDream/consolidationLock.js +76 -0
  1018. package/dist/src/services/autoDream/consolidationPrompt.js +61 -0
  1019. package/dist/src/services/awaySummary.js +58 -0
  1020. package/dist/src/services/claudeAiLimits.js +269 -0
  1021. package/dist/src/services/claudeAiLimitsHook.js +18 -0
  1022. package/dist/src/services/compact/apiMicrocompact.js +82 -0
  1023. package/dist/src/services/compact/autoCompact.js +151 -0
  1024. package/dist/src/services/compact/compact.js +957 -0
  1025. package/dist/src/services/compact/compactWarningHook.js +5 -0
  1026. package/dist/src/services/compact/compactWarningState.js +8 -0
  1027. package/dist/src/services/compact/grouping.js +20 -0
  1028. package/dist/src/services/compact/microCompact.js +265 -0
  1029. package/dist/src/services/compact/postCompactCleanup.js +23 -0
  1030. package/dist/src/services/compact/prompt.js +303 -0
  1031. package/dist/src/services/compact/sessionMemoryCompact.js +316 -0
  1032. package/dist/src/services/compact/timeBasedMCConfig.js +9 -0
  1033. package/dist/src/services/diagnosticTracking.js +195 -0
  1034. package/dist/src/services/extractMemories/extractMemories.js +309 -0
  1035. package/dist/src/services/extractMemories/prompts.js +113 -0
  1036. package/dist/src/services/internalLogging.js +53 -0
  1037. package/dist/src/services/lsp/LSPClient.js +252 -0
  1038. package/dist/src/services/lsp/LSPDiagnosticRegistry.js +179 -0
  1039. package/dist/src/services/lsp/LSPServerInstance.js +245 -0
  1040. package/dist/src/services/lsp/LSPServerManager.js +217 -0
  1041. package/dist/src/services/lsp/config.js +38 -0
  1042. package/dist/src/services/lsp/manager.js +132 -0
  1043. package/dist/src/services/lsp/passiveFeedback.js +150 -0
  1044. package/dist/src/services/mcp/InProcessTransport.js +37 -0
  1045. package/dist/src/services/mcp/MCPConnectionManager.js +56 -0
  1046. package/dist/src/services/mcp/SdkControlTransport.js +54 -0
  1047. package/dist/src/services/mcp/auth.js +1419 -0
  1048. package/dist/src/services/mcp/channelAllowlist.js +24 -0
  1049. package/dist/src/services/mcp/channelNotification.js +118 -0
  1050. package/dist/src/services/mcp/channelPermissions.js +89 -0
  1051. package/dist/src/services/mcp/claudeai.js +95 -0
  1052. package/dist/src/services/mcp/client.js +1896 -0
  1053. package/dist/src/services/mcp/config.js +942 -0
  1054. package/dist/src/services/mcp/elicitationHandler.js +171 -0
  1055. package/dist/src/services/mcp/envExpansion.js +19 -0
  1056. package/dist/src/services/mcp/headersHelper.js +64 -0
  1057. package/dist/src/services/mcp/mcpStringUtils.js +33 -0
  1058. package/dist/src/services/mcp/normalization.js +8 -0
  1059. package/dist/src/services/mcp/oauthPort.js +47 -0
  1060. package/dist/src/services/mcp/officialRegistry.js +42 -0
  1061. package/dist/src/services/mcp/types.js +82 -0
  1062. package/dist/src/services/mcp/useManageMCPConnections.js +536 -0
  1063. package/dist/src/services/mcp/utils.js +284 -0
  1064. package/dist/src/services/mcp/vscodeSdkMcp.js +55 -0
  1065. package/dist/src/services/mcp/xaa.js +237 -0
  1066. package/dist/src/services/mcp/xaaIdpLogin.js +286 -0
  1067. package/dist/src/services/mcpServerApproval.js +39 -0
  1068. package/dist/src/services/mockRateLimits.js +548 -0
  1069. package/dist/src/services/notifier.js +112 -0
  1070. package/dist/src/services/oauth/auth-code-listener.js +129 -0
  1071. package/dist/src/services/oauth/client.js +341 -0
  1072. package/dist/src/services/oauth/crypto.js +15 -0
  1073. package/dist/src/services/oauth/getOauthProfile.js +44 -0
  1074. package/dist/src/services/oauth/index.js +98 -0
  1075. package/dist/src/services/plugins/PluginInstallationManager.js +111 -0
  1076. package/dist/src/services/plugins/pluginCliCommands.js +173 -0
  1077. package/dist/src/services/plugins/pluginOperations.js +597 -0
  1078. package/dist/src/services/policyLimits/index.js +418 -0
  1079. package/dist/src/services/policyLimits/types.js +5 -0
  1080. package/dist/src/services/preventSleep.js +95 -0
  1081. package/dist/src/services/rateLimitMessages.js +194 -0
  1082. package/dist/src/services/rateLimitMocking.js +58 -0
  1083. package/dist/src/services/remoteManagedSettings/index.js +368 -0
  1084. package/dist/src/services/remoteManagedSettings/securityCheck.js +52 -0
  1085. package/dist/src/services/remoteManagedSettings/syncCache.js +50 -0
  1086. package/dist/src/services/remoteManagedSettings/syncCacheState.js +48 -0
  1087. package/dist/src/services/remoteManagedSettings/types.js +7 -0
  1088. package/dist/src/services/settingsSync/index.js +368 -0
  1089. package/dist/src/services/settingsSync/types.js +18 -0
  1090. package/dist/src/services/teamMemorySync/index.js +731 -0
  1091. package/dist/src/services/teamMemorySync/secretScanner.js +210 -0
  1092. package/dist/src/services/teamMemorySync/teamMemSecretGuard.js +4 -0
  1093. package/dist/src/services/teamMemorySync/types.js +23 -0
  1094. package/dist/src/services/teamMemorySync/watcher.js +197 -0
  1095. package/dist/src/services/tips/tipHistory.js +17 -0
  1096. package/dist/src/services/tips/tipRegistry.js +578 -0
  1097. package/dist/src/services/tips/tipScheduler.js +37 -0
  1098. package/dist/src/services/tokenEstimation.js +283 -0
  1099. package/dist/src/services/toolUseSummary/toolUseSummaryGenerator.js +75 -0
  1100. package/dist/src/services/tools/StreamingToolExecutor.js +311 -0
  1101. package/dist/src/services/tools/toolExecution.js +1009 -0
  1102. package/dist/src/services/tools/toolHooks.js +384 -0
  1103. package/dist/src/services/tools/toolOrchestration.js +96 -0
  1104. package/dist/src/services/vcr.js +233 -0
  1105. package/dist/src/services/voice.js +315 -0
  1106. package/dist/src/services/voiceKeyterms.js +57 -0
  1107. package/dist/src/services/voiceStreamSTT.js +265 -0
  1108. package/dist/src/setup.js +235 -0
  1109. package/dist/src/skills/bundled/batch.js +114 -0
  1110. package/dist/src/skills/bundled/claudeApi.js +149 -0
  1111. package/dist/src/skills/bundled/claudeApiContent.js +63 -0
  1112. package/dist/src/skills/bundled/claudeInChrome.js +31 -0
  1113. package/dist/src/skills/bundled/debug.js +89 -0
  1114. package/dist/src/skills/bundled/index.js +22 -0
  1115. package/dist/src/skills/bundled/keybindings.js +303 -0
  1116. package/dist/src/skills/bundled/loop.js +86 -0
  1117. package/dist/src/skills/bundled/loremIpsum.js +257 -0
  1118. package/dist/src/skills/bundled/remember.js +78 -0
  1119. package/dist/src/skills/bundled/scheduleRemoteAgents.js +360 -0
  1120. package/dist/src/skills/bundled/simplify.js +70 -0
  1121. package/dist/src/skills/bundled/skillify.js +179 -0
  1122. package/dist/src/skills/bundled/stuck.js +76 -0
  1123. package/dist/src/skills/bundled/updateConfig.js +471 -0
  1124. package/dist/src/skills/bundled/verify/SKILL.md.js +1 -0
  1125. package/dist/src/skills/bundled/verify/examples/cli.md.js +1 -0
  1126. package/dist/src/skills/bundled/verify/examples/server.md.js +1 -0
  1127. package/dist/src/skills/bundled/verify.js +27 -0
  1128. package/dist/src/skills/bundled/verifyContent.js +8 -0
  1129. package/dist/src/skills/bundledSkills.js +114 -0
  1130. package/dist/src/skills/loadSkillsDir.js +583 -0
  1131. package/dist/src/skills/mcpSkillBuilders.js +10 -0
  1132. package/dist/src/state/AppState.js +153 -0
  1133. package/dist/src/state/AppStateStore.js +115 -0
  1134. package/dist/src/state/onChangeAppState.js +94 -0
  1135. package/dist/src/state/selectors.js +29 -0
  1136. package/dist/src/state/store.js +21 -0
  1137. package/dist/src/state/teammateViewHelpers.js +89 -0
  1138. package/dist/src/tasks/DreamTask/DreamTask.js +79 -0
  1139. package/dist/src/tasks/InProcessTeammateTask/InProcessTeammateTask.js +70 -0
  1140. package/dist/src/tasks/InProcessTeammateTask/types.js +15 -0
  1141. package/dist/src/tasks/LocalAgentTask/LocalAgentTask.js +444 -0
  1142. package/dist/src/tasks/LocalMainSessionTask.js +262 -0
  1143. package/dist/src/tasks/LocalShellTask/LocalShellTask.js +419 -0
  1144. package/dist/src/tasks/LocalShellTask/guards.js +3 -0
  1145. package/dist/src/tasks/LocalShellTask/killShellTasks.js +44 -0
  1146. package/dist/src/tasks/RemoteAgentTask/RemoteAgentTask.js +550 -0
  1147. package/dist/src/tasks/pillLabel.js +53 -0
  1148. package/dist/src/tasks/stopTask.js +53 -0
  1149. package/dist/src/tasks/types.js +9 -0
  1150. package/dist/src/tasks.js +22 -0
  1151. package/dist/src/tools/AgentTool/AgentTool.js +919 -0
  1152. package/dist/src/tools/AgentTool/UI.js +912 -0
  1153. package/dist/src/tools/AgentTool/agentColorManager.js +42 -0
  1154. package/dist/src/tools/AgentTool/agentDisplay.js +45 -0
  1155. package/dist/src/tools/AgentTool/agentMemory.js +85 -0
  1156. package/dist/src/tools/AgentTool/agentMemorySnapshot.js +109 -0
  1157. package/dist/src/tools/AgentTool/agentToolUtils.js +387 -0
  1158. package/dist/src/tools/AgentTool/built-in/claudeCodeGuideAgent.js +159 -0
  1159. package/dist/src/tools/AgentTool/built-in/exploreAgent.js +66 -0
  1160. package/dist/src/tools/AgentTool/built-in/generalPurposeAgent.js +26 -0
  1161. package/dist/src/tools/AgentTool/built-in/planAgent.js +81 -0
  1162. package/dist/src/tools/AgentTool/built-in/statuslineSetup.js +140 -0
  1163. package/dist/src/tools/AgentTool/built-in/verificationAgent.js +146 -0
  1164. package/dist/src/tools/AgentTool/builtInAgents.js +32 -0
  1165. package/dist/src/tools/AgentTool/constants.js +7 -0
  1166. package/dist/src/tools/AgentTool/forkSubagent.js +108 -0
  1167. package/dist/src/tools/AgentTool/loadAgentsDir.js +409 -0
  1168. package/dist/src/tools/AgentTool/prompt.js +194 -0
  1169. package/dist/src/tools/AgentTool/resumeAgent.js +169 -0
  1170. package/dist/src/tools/AgentTool/runAgent.js +457 -0
  1171. package/dist/src/tools/AskUserQuestionTool/AskUserQuestionTool.js +282 -0
  1172. package/dist/src/tools/AskUserQuestionTool/prompt.js +38 -0
  1173. package/dist/src/tools/BashTool/BashTool.js +867 -0
  1174. package/dist/src/tools/BashTool/BashToolResultMessage.js +208 -0
  1175. package/dist/src/tools/BashTool/UI.js +189 -0
  1176. package/dist/src/tools/BashTool/bashCommandHelpers.js +145 -0
  1177. package/dist/src/tools/BashTool/bashPermissions.js +1193 -0
  1178. package/dist/src/tools/BashTool/bashSecurity.js +1464 -0
  1179. package/dist/src/tools/BashTool/commandSemantics.js +70 -0
  1180. package/dist/src/tools/BashTool/commentLabel.js +8 -0
  1181. package/dist/src/tools/BashTool/destructiveCommandWarning.js +74 -0
  1182. package/dist/src/tools/BashTool/modeValidation.js +65 -0
  1183. package/dist/src/tools/BashTool/pathValidation.js +771 -0
  1184. package/dist/src/tools/BashTool/prompt.js +307 -0
  1185. package/dist/src/tools/BashTool/readOnlyValidation.js +1312 -0
  1186. package/dist/src/tools/BashTool/sedEditParser.js +179 -0
  1187. package/dist/src/tools/BashTool/sedValidation.js +379 -0
  1188. package/dist/src/tools/BashTool/shouldUseSandbox.js +102 -0
  1189. package/dist/src/tools/BashTool/toolName.js +1 -0
  1190. package/dist/src/tools/BashTool/utils.js +145 -0
  1191. package/dist/src/tools/BriefTool/BriefTool.js +106 -0
  1192. package/dist/src/tools/BriefTool/UI.js +158 -0
  1193. package/dist/src/tools/BriefTool/attachments.js +54 -0
  1194. package/dist/src/tools/BriefTool/prompt.js +19 -0
  1195. package/dist/src/tools/BriefTool/upload.js +37 -0
  1196. package/dist/src/tools/ConfigTool/ConfigTool.js +304 -0
  1197. package/dist/src/tools/ConfigTool/UI.js +76 -0
  1198. package/dist/src/tools/ConfigTool/constants.js +1 -0
  1199. package/dist/src/tools/ConfigTool/prompt.js +76 -0
  1200. package/dist/src/tools/ConfigTool/supportedSettings.js +141 -0
  1201. package/dist/src/tools/EnterPlanModeTool/EnterPlanModeTool.js +91 -0
  1202. package/dist/src/tools/EnterPlanModeTool/UI.js +49 -0
  1203. package/dist/src/tools/EnterPlanModeTool/constants.js +1 -0
  1204. package/dist/src/tools/EnterPlanModeTool/prompt.js +154 -0
  1205. package/dist/src/tools/EnterWorktreeTool/EnterWorktreeTool.js +97 -0
  1206. package/dist/src/tools/EnterWorktreeTool/UI.js +25 -0
  1207. package/dist/src/tools/EnterWorktreeTool/constants.js +1 -0
  1208. package/dist/src/tools/EnterWorktreeTool/prompt.js +30 -0
  1209. package/dist/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.js +287 -0
  1210. package/dist/src/tools/ExitPlanModeTool/UI.js +128 -0
  1211. package/dist/src/tools/ExitPlanModeTool/constants.js +2 -0
  1212. package/dist/src/tools/ExitPlanModeTool/prompt.js +25 -0
  1213. package/dist/src/tools/ExitWorktreeTool/ExitWorktreeTool.js +217 -0
  1214. package/dist/src/tools/ExitWorktreeTool/UI.js +36 -0
  1215. package/dist/src/tools/ExitWorktreeTool/constants.js +1 -0
  1216. package/dist/src/tools/ExitWorktreeTool/prompt.js +32 -0
  1217. package/dist/src/tools/FileEditTool/FileEditTool.js +447 -0
  1218. package/dist/src/tools/FileEditTool/UI.js +289 -0
  1219. package/dist/src/tools/FileEditTool/constants.js +4 -0
  1220. package/dist/src/tools/FileEditTool/prompt.js +22 -0
  1221. package/dist/src/tools/FileEditTool/types.js +37 -0
  1222. package/dist/src/tools/FileEditTool/utils.js +411 -0
  1223. package/dist/src/tools/FileReadTool/FileReadTool.js +759 -0
  1224. package/dist/src/tools/FileReadTool/UI.js +232 -0
  1225. package/dist/src/tools/FileReadTool/imageProcessor.js +34 -0
  1226. package/dist/src/tools/FileReadTool/limits.js +28 -0
  1227. package/dist/src/tools/FileReadTool/prompt.js +25 -0
  1228. package/dist/src/tools/FileWriteTool/FileWriteTool.js +300 -0
  1229. package/dist/src/tools/FileWriteTool/UI.js +460 -0
  1230. package/dist/src/tools/FileWriteTool/prompt.js +16 -0
  1231. package/dist/src/tools/GlobTool/GlobTool.js +155 -0
  1232. package/dist/src/tools/GlobTool/UI.js +58 -0
  1233. package/dist/src/tools/GlobTool/prompt.js +6 -0
  1234. package/dist/src/tools/GrepTool/GrepTool.js +390 -0
  1235. package/dist/src/tools/GrepTool/UI.js +254 -0
  1236. package/dist/src/tools/GrepTool/prompt.js +16 -0
  1237. package/dist/src/tools/LSPTool/LSPTool.js +541 -0
  1238. package/dist/src/tools/LSPTool/UI.js +275 -0
  1239. package/dist/src/tools/LSPTool/formatters.js +353 -0
  1240. package/dist/src/tools/LSPTool/prompt.js +20 -0
  1241. package/dist/src/tools/LSPTool/schemas.js +82 -0
  1242. package/dist/src/tools/LSPTool/symbolContext.js +43 -0
  1243. package/dist/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.js +91 -0
  1244. package/dist/src/tools/ListMcpResourcesTool/UI.js +26 -0
  1245. package/dist/src/tools/ListMcpResourcesTool/prompt.js +18 -0
  1246. package/dist/src/tools/MCPTool/MCPTool.js +57 -0
  1247. package/dist/src/tools/MCPTool/UI.js +433 -0
  1248. package/dist/src/tools/MCPTool/classifyForCollapse.js +509 -0
  1249. package/dist/src/tools/MCPTool/prompt.js +2 -0
  1250. package/dist/src/tools/McpAuthTool/McpAuthTool.js +139 -0
  1251. package/dist/src/tools/NotebookEditTool/NotebookEditTool.js +364 -0
  1252. package/dist/src/tools/NotebookEditTool/UI.js +115 -0
  1253. package/dist/src/tools/NotebookEditTool/constants.js +1 -0
  1254. package/dist/src/tools/NotebookEditTool/prompt.js +2 -0
  1255. package/dist/src/tools/PowerShellTool/PowerShellTool.js +700 -0
  1256. package/dist/src/tools/PowerShellTool/UI.js +154 -0
  1257. package/dist/src/tools/PowerShellTool/clmTypes.js +147 -0
  1258. package/dist/src/tools/PowerShellTool/commandSemantics.js +37 -0
  1259. package/dist/src/tools/PowerShellTool/commonParameters.js +17 -0
  1260. package/dist/src/tools/PowerShellTool/destructiveCommandWarning.js +70 -0
  1261. package/dist/src/tools/PowerShellTool/gitSafety.js +102 -0
  1262. package/dist/src/tools/PowerShellTool/modeValidation.js +203 -0
  1263. package/dist/src/tools/PowerShellTool/pathValidation.js +1259 -0
  1264. package/dist/src/tools/PowerShellTool/powershellPermissions.js +791 -0
  1265. package/dist/src/tools/PowerShellTool/powershellSecurity.js +612 -0
  1266. package/dist/src/tools/PowerShellTool/prompt.js +130 -0
  1267. package/dist/src/tools/PowerShellTool/readOnlyValidation.js +1000 -0
  1268. package/dist/src/tools/PowerShellTool/toolName.js +1 -0
  1269. package/dist/src/tools/REPLTool/constants.js +27 -0
  1270. package/dist/src/tools/REPLTool/primitiveTools.js +21 -0
  1271. package/dist/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.js +115 -0
  1272. package/dist/src/tools/ReadMcpResourceTool/UI.js +37 -0
  1273. package/dist/src/tools/ReadMcpResourceTool/prompt.js +15 -0
  1274. package/dist/src/tools/RemoteTriggerTool/RemoteTriggerTool.js +138 -0
  1275. package/dist/src/tools/RemoteTriggerTool/UI.js +28 -0
  1276. package/dist/src/tools/RemoteTriggerTool/prompt.js +12 -0
  1277. package/dist/src/tools/ScheduleCronTool/CronCreateTool.js +117 -0
  1278. package/dist/src/tools/ScheduleCronTool/CronDeleteTool.js +83 -0
  1279. package/dist/src/tools/ScheduleCronTool/CronListTool.js +77 -0
  1280. package/dist/src/tools/ScheduleCronTool/UI.js +73 -0
  1281. package/dist/src/tools/ScheduleCronTool/prompt.js +67 -0
  1282. package/dist/src/tools/SendMessageTool/SendMessageTool.js +561 -0
  1283. package/dist/src/tools/SendMessageTool/UI.js +30 -0
  1284. package/dist/src/tools/SendMessageTool/constants.js +1 -0
  1285. package/dist/src/tools/SendMessageTool/prompt.js +32 -0
  1286. package/dist/src/tools/SkillTool/SkillTool.js +614 -0
  1287. package/dist/src/tools/SkillTool/UI.js +141 -0
  1288. package/dist/src/tools/SkillTool/constants.js +1 -0
  1289. package/dist/src/tools/SkillTool/prompt.js +161 -0
  1290. package/dist/src/tools/SleepTool/prompt.js +14 -0
  1291. package/dist/src/tools/SyntheticOutputTool/SyntheticOutputTool.js +120 -0
  1292. package/dist/src/tools/TaskCreateTool/TaskCreateTool.js +106 -0
  1293. package/dist/src/tools/TaskCreateTool/constants.js +1 -0
  1294. package/dist/src/tools/TaskCreateTool/prompt.js +48 -0
  1295. package/dist/src/tools/TaskGetTool/TaskGetTool.js +110 -0
  1296. package/dist/src/tools/TaskGetTool/constants.js +1 -0
  1297. package/dist/src/tools/TaskGetTool/prompt.js +23 -0
  1298. package/dist/src/tools/TaskListTool/TaskListTool.js +92 -0
  1299. package/dist/src/tools/TaskListTool/constants.js +1 -0
  1300. package/dist/src/tools/TaskListTool/prompt.js +38 -0
  1301. package/dist/src/tools/TaskOutputTool/TaskOutputTool.js +688 -0
  1302. package/dist/src/tools/TaskOutputTool/constants.js +1 -0
  1303. package/dist/src/tools/TaskStopTool/TaskStopTool.js +97 -0
  1304. package/dist/src/tools/TaskStopTool/UI.js +39 -0
  1305. package/dist/src/tools/TaskStopTool/prompt.js +7 -0
  1306. package/dist/src/tools/TaskUpdateTool/TaskUpdateTool.js +279 -0
  1307. package/dist/src/tools/TaskUpdateTool/constants.js +1 -0
  1308. package/dist/src/tools/TaskUpdateTool/prompt.js +76 -0
  1309. package/dist/src/tools/TeamCreateTool/TeamCreateTool.js +161 -0
  1310. package/dist/src/tools/TeamCreateTool/UI.js +4 -0
  1311. package/dist/src/tools/TeamCreateTool/constants.js +1 -0
  1312. package/dist/src/tools/TeamCreateTool/prompt.js +113 -0
  1313. package/dist/src/tools/TeamDeleteTool/TeamDeleteTool.js +96 -0
  1314. package/dist/src/tools/TeamDeleteTool/UI.js +14 -0
  1315. package/dist/src/tools/TeamDeleteTool/constants.js +1 -0
  1316. package/dist/src/tools/TeamDeleteTool/prompt.js +16 -0
  1317. package/dist/src/tools/TodoWriteTool/TodoWriteTool.js +86 -0
  1318. package/dist/src/tools/TodoWriteTool/constants.js +1 -0
  1319. package/dist/src/tools/TodoWriteTool/prompt.js +181 -0
  1320. package/dist/src/tools/ToolSearchTool/ToolSearchTool.js +266 -0
  1321. package/dist/src/tools/ToolSearchTool/constants.js +1 -0
  1322. package/dist/src/tools/ToolSearchTool/prompt.js +40 -0
  1323. package/dist/src/tools/TungstenTool/TungstenLiveMonitor.js +4 -0
  1324. package/dist/src/tools/TungstenTool/TungstenTool.js +39 -0
  1325. package/dist/src/tools/WebFetchTool/UI.js +91 -0
  1326. package/dist/src/tools/WebFetchTool/WebFetchTool.js +234 -0
  1327. package/dist/src/tools/WebFetchTool/preapproved.js +122 -0
  1328. package/dist/src/tools/WebFetchTool/prompt.js +37 -0
  1329. package/dist/src/tools/WebFetchTool/utils.js +303 -0
  1330. package/dist/src/tools/WebSearchTool/UI.js +109 -0
  1331. package/dist/src/tools/WebSearchTool/WebSearchTool.js +313 -0
  1332. package/dist/src/tools/WebSearchTool/prompt.js +32 -0
  1333. package/dist/src/tools/WorkflowTool/constants.js +1 -0
  1334. package/dist/src/tools/shared/gitOperationTracking.js +158 -0
  1335. package/dist/src/tools/shared/spawnMultiAgent.js +630 -0
  1336. package/dist/src/tools/testing/TestingPermissionTool.js +66 -0
  1337. package/dist/src/tools/utils.js +15 -0
  1338. package/dist/src/tools.js +184 -0
  1339. package/dist/src/types/command.js +6 -0
  1340. package/dist/src/types/connectorText.js +3 -0
  1341. package/dist/src/types/generated/events_mono/claude_code/v1/claude_code_internal_event.js +525 -0
  1342. package/dist/src/types/generated/events_mono/common/v1/auth.js +38 -0
  1343. package/dist/src/types/generated/events_mono/growthbook/v1/growthbook_experiment_event.js +112 -0
  1344. package/dist/src/types/generated/google/protobuf/timestamp.js +33 -0
  1345. package/dist/src/types/hooks.js +121 -0
  1346. package/dist/src/types/ids.js +10 -0
  1347. package/dist/src/types/logs.js +9 -0
  1348. package/dist/src/types/permissions.js +12 -0
  1349. package/dist/src/types/plugin.js +64 -0
  1350. package/dist/src/types/textInputTypes.js +10 -0
  1351. package/dist/src/upstreamproxy/relay.js +274 -0
  1352. package/dist/src/upstreamproxy/upstreamproxy.js +161 -0
  1353. package/dist/src/utils/CircularBuffer.js +51 -0
  1354. package/dist/src/utils/Cursor.js +1006 -0
  1355. package/dist/src/utils/QueryGuard.js +57 -0
  1356. package/dist/src/utils/Shell.js +260 -0
  1357. package/dist/src/utils/ShellCommand.js +277 -0
  1358. package/dist/src/utils/abortController.js +31 -0
  1359. package/dist/src/utils/activityManager.js +91 -0
  1360. package/dist/src/utils/advisor.js +63 -0
  1361. package/dist/src/utils/agentContext.js +36 -0
  1362. package/dist/src/utils/agentId.js +36 -0
  1363. package/dist/src/utils/agentSwarmsEnabled.js +17 -0
  1364. package/dist/src/utils/agenticSessionSearch.js +194 -0
  1365. package/dist/src/utils/analyzeContext.js +692 -0
  1366. package/dist/src/utils/ansiToPng.js +211 -0
  1367. package/dist/src/utils/ansiToSvg.js +171 -0
  1368. package/dist/src/utils/api.js +435 -0
  1369. package/dist/src/utils/apiPreconnect.js +19 -0
  1370. package/dist/src/utils/appleTerminalBackup.js +91 -0
  1371. package/dist/src/utils/argumentSubstitution.js +58 -0
  1372. package/dist/src/utils/array.js +12 -0
  1373. package/dist/src/utils/asciicast.js +149 -0
  1374. package/dist/src/utils/attachments.js +1854 -0
  1375. package/dist/src/utils/attribution.js +215 -0
  1376. package/dist/src/utils/auth.js +1197 -0
  1377. package/dist/src/utils/authFileDescriptor.js +106 -0
  1378. package/dist/src/utils/authPortable.js +14 -0
  1379. package/dist/src/utils/autoModeDenials.js +10 -0
  1380. package/dist/src/utils/autoRunIssue.js +126 -0
  1381. package/dist/src/utils/autoUpdater.js +339 -0
  1382. package/dist/src/utils/aws.js +30 -0
  1383. package/dist/src/utils/awsAuthStatusManager.js +55 -0
  1384. package/dist/src/utils/background/remote/preconditions.js +134 -0
  1385. package/dist/src/utils/background/remote/remoteSession.js +42 -0
  1386. package/dist/src/utils/backgroundHousekeeping.js +47 -0
  1387. package/dist/src/utils/bash/ParsedCommand.js +194 -0
  1388. package/dist/src/utils/bash/ShellSnapshot.js +333 -0
  1389. package/dist/src/utils/bash/ast.js +1422 -0
  1390. package/dist/src/utils/bash/bashParser.js +3625 -0
  1391. package/dist/src/utils/bash/bashPipeCommand.js +138 -0
  1392. package/dist/src/utils/bash/commands.js +668 -0
  1393. package/dist/src/utils/bash/heredoc.js +288 -0
  1394. package/dist/src/utils/bash/parser.js +110 -0
  1395. package/dist/src/utils/bash/prefix.js +119 -0
  1396. package/dist/src/utils/bash/registry.js +20 -0
  1397. package/dist/src/utils/bash/shellCompletion.js +127 -0
  1398. package/dist/src/utils/bash/shellPrefix.js +11 -0
  1399. package/dist/src/utils/bash/shellQuote.js +159 -0
  1400. package/dist/src/utils/bash/shellQuoting.js +43 -0
  1401. package/dist/src/utils/bash/specs/alias.js +11 -0
  1402. package/dist/src/utils/bash/specs/index.js +16 -0
  1403. package/dist/src/utils/bash/specs/nohup.js +10 -0
  1404. package/dist/src/utils/bash/specs/pyright.js +88 -0
  1405. package/dist/src/utils/bash/specs/sleep.js +10 -0
  1406. package/dist/src/utils/bash/specs/srun.js +28 -0
  1407. package/dist/src/utils/bash/specs/time.js +10 -0
  1408. package/dist/src/utils/bash/specs/timeout.js +17 -0
  1409. package/dist/src/utils/bash/treeSitterAnalysis.js +259 -0
  1410. package/dist/src/utils/betas.js +199 -0
  1411. package/dist/src/utils/billing.js +47 -0
  1412. package/dist/src/utils/binaryCheck.js +25 -0
  1413. package/dist/src/utils/browser.js +47 -0
  1414. package/dist/src/utils/bufferedWriter.js +73 -0
  1415. package/dist/src/utils/bundledMode.js +6 -0
  1416. package/dist/src/utils/caCerts.js +47 -0
  1417. package/dist/src/utils/caCertsConfig.js +32 -0
  1418. package/dist/src/utils/cachePaths.js +22 -0
  1419. package/dist/src/utils/classifierApprovals.js +61 -0
  1420. package/dist/src/utils/classifierApprovalsHook.js +8 -0
  1421. package/dist/src/utils/claudeCodeHints.js +83 -0
  1422. package/dist/src/utils/claudeDesktop.js +87 -0
  1423. package/dist/src/utils/claudeInChrome/chromeNativeHost.js +353 -0
  1424. package/dist/src/utils/claudeInChrome/common.js +416 -0
  1425. package/dist/src/utils/claudeInChrome/mcpServer.js +190 -0
  1426. package/dist/src/utils/claudeInChrome/prompt.js +60 -0
  1427. package/dist/src/utils/claudeInChrome/setup.js +239 -0
  1428. package/dist/src/utils/claudeInChrome/setupPortable.js +133 -0
  1429. package/dist/src/utils/claudeInChrome/toolRendering.js +224 -0
  1430. package/dist/src/utils/claudemd.js +727 -0
  1431. package/dist/src/utils/cleanup.js +423 -0
  1432. package/dist/src/utils/cleanupRegistry.js +8 -0
  1433. package/dist/src/utils/cliArgs.js +21 -0
  1434. package/dist/src/utils/cliHighlight.js +27 -0
  1435. package/dist/src/utils/codeIndexing.js +92 -0
  1436. package/dist/src/utils/collapseBackgroundBashNotifications.js +58 -0
  1437. package/dist/src/utils/collapseHookSummaries.js +38 -0
  1438. package/dist/src/utils/collapseReadSearch.js +569 -0
  1439. package/dist/src/utils/collapseTeammateShutdowns.js +34 -0
  1440. package/dist/src/utils/combinedAbortSignal.js +28 -0
  1441. package/dist/src/utils/commandLifecycle.js +7 -0
  1442. package/dist/src/utils/commitAttribution.js +510 -0
  1443. package/dist/src/utils/completionCache.js +126 -0
  1444. package/dist/src/utils/computerUse/appNames.js +104 -0
  1445. package/dist/src/utils/computerUse/cleanup.js +37 -0
  1446. package/dist/src/utils/computerUse/common.js +25 -0
  1447. package/dist/src/utils/computerUse/computerUseLock.js +117 -0
  1448. package/dist/src/utils/computerUse/drainRunLoop.js +44 -0
  1449. package/dist/src/utils/computerUse/escHotkey.js +33 -0
  1450. package/dist/src/utils/computerUse/executor.js +303 -0
  1451. package/dist/src/utils/computerUse/gates.js +40 -0
  1452. package/dist/src/utils/computerUse/hostAdapter.js +48 -0
  1453. package/dist/src/utils/computerUse/inputLoader.js +10 -0
  1454. package/dist/src/utils/computerUse/mcpServer.js +61 -0
  1455. package/dist/src/utils/computerUse/setup.js +25 -0
  1456. package/dist/src/utils/computerUse/swiftLoader.js +7 -0
  1457. package/dist/src/utils/computerUse/toolRendering.js +96 -0
  1458. package/dist/src/utils/computerUse/wrapper.js +242 -0
  1459. package/dist/src/utils/concurrentSessions.js +108 -0
  1460. package/dist/src/utils/config.js +801 -0
  1461. package/dist/src/utils/configConstants.js +11 -0
  1462. package/dist/src/utils/contentArray.js +19 -0
  1463. package/dist/src/utils/context.js +135 -0
  1464. package/dist/src/utils/contextAnalysis.js +152 -0
  1465. package/dist/src/utils/contextSuggestions.js +141 -0
  1466. package/dist/src/utils/controlMessageCompat.js +17 -0
  1467. package/dist/src/utils/conversationRecovery.js +278 -0
  1468. package/dist/src/utils/cron.js +182 -0
  1469. package/dist/src/utils/cronJitterConfig.js +22 -0
  1470. package/dist/src/utils/cronScheduler.js +295 -0
  1471. package/dist/src/utils/cronTasks.js +183 -0
  1472. package/dist/src/utils/cronTasksLock.js +116 -0
  1473. package/dist/src/utils/crossProjectResume.js +36 -0
  1474. package/dist/src/utils/crypto.js +3 -0
  1475. package/dist/src/utils/cwd.js +16 -0
  1476. package/dist/src/utils/debug.js +170 -0
  1477. package/dist/src/utils/debugFilter.js +69 -0
  1478. package/dist/src/utils/deepLink/banner.js +52 -0
  1479. package/dist/src/utils/deepLink/parseDeepLink.js +68 -0
  1480. package/dist/src/utils/deepLink/protocolHandler.js +66 -0
  1481. package/dist/src/utils/deepLink/registerProtocol.js +206 -0
  1482. package/dist/src/utils/deepLink/terminalLauncher.js +321 -0
  1483. package/dist/src/utils/deepLink/terminalPreference.js +26 -0
  1484. package/dist/src/utils/desktopDeepLink.js +154 -0
  1485. package/dist/src/utils/detectRepository.js +98 -0
  1486. package/dist/src/utils/diagLogs.js +47 -0
  1487. package/dist/src/utils/diff.js +92 -0
  1488. package/dist/src/utils/directMemberMessage.js +27 -0
  1489. package/dist/src/utils/displayTags.js +12 -0
  1490. package/dist/src/utils/doctorContextWarnings.js +151 -0
  1491. package/dist/src/utils/doctorDiagnostic.js +388 -0
  1492. package/dist/src/utils/dxt/helpers.js +36 -0
  1493. package/dist/src/utils/dxt/zip.js +112 -0
  1494. package/dist/src/utils/earlyInput.js +98 -0
  1495. package/dist/src/utils/editor.js +105 -0
  1496. package/dist/src/utils/effort.js +188 -0
  1497. package/dist/src/utils/embeddedTools.js +10 -0
  1498. package/dist/src/utils/env.js +284 -0
  1499. package/dist/src/utils/envDynamic.js +91 -0
  1500. package/dist/src/utils/envUtils.js +88 -0
  1501. package/dist/src/utils/envValidation.js +26 -0
  1502. package/dist/src/utils/errorLogSink.js +142 -0
  1503. package/dist/src/utils/errors.js +123 -0
  1504. package/dist/src/utils/exampleCommands.js +133 -0
  1505. package/dist/src/utils/execFileNoThrow.js +82 -0
  1506. package/dist/src/utils/execFileNoThrowPortable.js +52 -0
  1507. package/dist/src/utils/execSyncWrapper.js +16 -0
  1508. package/dist/src/utils/exportRenderer.js +78 -0
  1509. package/dist/src/utils/extraUsage.js +16 -0
  1510. package/dist/src/utils/fastMode.js +331 -0
  1511. package/dist/src/utils/file.js +318 -0
  1512. package/dist/src/utils/fileHistory.js +662 -0
  1513. package/dist/src/utils/fileOperationAnalytics.js +23 -0
  1514. package/dist/src/utils/filePersistence/filePersistence.js +165 -0
  1515. package/dist/src/utils/filePersistence/outputsScanner.js +72 -0
  1516. package/dist/src/utils/filePersistence/types.js +3 -0
  1517. package/dist/src/utils/fileRead.js +53 -0
  1518. package/dist/src/utils/fileReadCache.js +54 -0
  1519. package/dist/src/utils/fileStateCache.js +79 -0
  1520. package/dist/src/utils/findExecutable.js +5 -0
  1521. package/dist/src/utils/fingerprint.js +30 -0
  1522. package/dist/src/utils/forkedAgent.js +253 -0
  1523. package/dist/src/utils/format.js +200 -0
  1524. package/dist/src/utils/formatBriefTimestamp.js +49 -0
  1525. package/dist/src/utils/fpsTracker.js +32 -0
  1526. package/dist/src/utils/frontmatterParser.js +159 -0
  1527. package/dist/src/utils/fsOperations.js +548 -0
  1528. package/dist/src/utils/fullscreen.js +83 -0
  1529. package/dist/src/utils/generatedFiles.js +96 -0
  1530. package/dist/src/utils/generators.js +60 -0
  1531. package/dist/src/utils/genericProcessUtils.js +96 -0
  1532. package/dist/src/utils/getWorktreePaths.js +30 -0
  1533. package/dist/src/utils/getWorktreePathsPortable.js +14 -0
  1534. package/dist/src/utils/ghPrStatus.js +51 -0
  1535. package/dist/src/utils/git/gitConfigParser.js +166 -0
  1536. package/dist/src/utils/git/gitFilesystem.js +413 -0
  1537. package/dist/src/utils/git/gitignore.js +52 -0
  1538. package/dist/src/utils/git.js +520 -0
  1539. package/dist/src/utils/gitDiff.js +291 -0
  1540. package/dist/src/utils/gitSettings.js +10 -0
  1541. package/dist/src/utils/github/ghAuthStatus.js +15 -0
  1542. package/dist/src/utils/githubRepoPathMapping.js +92 -0
  1543. package/dist/src/utils/glob.js +65 -0
  1544. package/dist/src/utils/gracefulShutdown.js +274 -0
  1545. package/dist/src/utils/groupToolUses.js +107 -0
  1546. package/dist/src/utils/handlePromptSubmit.js +323 -0
  1547. package/dist/src/utils/hash.js +21 -0
  1548. package/dist/src/utils/headlessProfiler.js +95 -0
  1549. package/dist/src/utils/heapDumpService.js +157 -0
  1550. package/dist/src/utils/heatmap.js +118 -0
  1551. package/dist/src/utils/highlightMatch.js +28 -0
  1552. package/dist/src/utils/hooks/AsyncHookRegistry.js +190 -0
  1553. package/dist/src/utils/hooks/apiQueryHookHelper.js +67 -0
  1554. package/dist/src/utils/hooks/execAgentHook.js +216 -0
  1555. package/dist/src/utils/hooks/execHttpHook.js +106 -0
  1556. package/dist/src/utils/hooks/execPromptHook.js +153 -0
  1557. package/dist/src/utils/hooks/fileChangedWatcher.js +154 -0
  1558. package/dist/src/utils/hooks/hookEvents.js +92 -0
  1559. package/dist/src/utils/hooks/hookHelpers.js +43 -0
  1560. package/dist/src/utils/hooks/hooksConfigManager.js +386 -0
  1561. package/dist/src/utils/hooks/hooksConfigSnapshot.js +52 -0
  1562. package/dist/src/utils/hooks/hooksSettings.js +175 -0
  1563. package/dist/src/utils/hooks/postSamplingHooks.js +26 -0
  1564. package/dist/src/utils/hooks/registerFrontmatterHooks.js +34 -0
  1565. package/dist/src/utils/hooks/registerSkillHooks.js +24 -0
  1566. package/dist/src/utils/hooks/sessionHooks.js +176 -0
  1567. package/dist/src/utils/hooks/skillImprovement.js +200 -0
  1568. package/dist/src/utils/hooks/ssrfGuard.js +157 -0
  1569. package/dist/src/utils/hooks.js +2879 -0
  1570. package/dist/src/utils/horizontalScroll.js +72 -0
  1571. package/dist/src/utils/http.js +80 -0
  1572. package/dist/src/utils/hyperlink.js +13 -0
  1573. package/dist/src/utils/iTermBackup.js +46 -0
  1574. package/dist/src/utils/ide.js +938 -0
  1575. package/dist/src/utils/idePathConversion.js +47 -0
  1576. package/dist/src/utils/idleTimeout.js +33 -0
  1577. package/dist/src/utils/imagePaste.js +190 -0
  1578. package/dist/src/utils/imageResizer.js +459 -0
  1579. package/dist/src/utils/imageStore.js +109 -0
  1580. package/dist/src/utils/imageValidation.js +61 -0
  1581. package/dist/src/utils/immediateCommand.js +4 -0
  1582. package/dist/src/utils/inProcessTeammateHelpers.js +28 -0
  1583. package/dist/src/utils/ink.js +14 -0
  1584. package/dist/src/utils/intl.js +61 -0
  1585. package/dist/src/utils/jetbrains.js +130 -0
  1586. package/dist/src/utils/json.js +182 -0
  1587. package/dist/src/utils/jsonRead.js +4 -0
  1588. package/dist/src/utils/keyboardShortcuts.js +8 -0
  1589. package/dist/src/utils/lazySchema.js +4 -0
  1590. package/dist/src/utils/listSessionsImpl.js +219 -0
  1591. package/dist/src/utils/localInstaller.js +86 -0
  1592. package/dist/src/utils/lockfile.js +19 -0
  1593. package/dist/src/utils/log.js +164 -0
  1594. package/dist/src/utils/logoV2Utils.js +192 -0
  1595. package/dist/src/utils/mailbox.js +51 -0
  1596. package/dist/src/utils/managedEnv.js +90 -0
  1597. package/dist/src/utils/managedEnvConstants.js +136 -0
  1598. package/dist/src/utils/markdown.js +216 -0
  1599. package/dist/src/utils/markdownConfigLoader.js +293 -0
  1600. package/dist/src/utils/mcp/dateTimeParser.js +73 -0
  1601. package/dist/src/utils/mcp/elicitationValidation.js +208 -0
  1602. package/dist/src/utils/mcpInstructionsDelta.js +71 -0
  1603. package/dist/src/utils/mcpOutputStorage.js +124 -0
  1604. package/dist/src/utils/mcpValidation.js +138 -0
  1605. package/dist/src/utils/mcpWebSocketTransport.js +152 -0
  1606. package/dist/src/utils/memoize.js +125 -0
  1607. package/dist/src/utils/memory/types.js +8 -0
  1608. package/dist/src/utils/memory/versions.js +4 -0
  1609. package/dist/src/utils/memoryFileDetection.js +151 -0
  1610. package/dist/src/utils/messagePredicates.js +3 -0
  1611. package/dist/src/utils/messageQueueManager.js +267 -0
  1612. package/dist/src/utils/messages/mappers.js +198 -0
  1613. package/dist/src/utils/messages/systemInit.js +47 -0
  1614. package/dist/src/utils/messages.js +3450 -0
  1615. package/dist/src/utils/model/agent.js +91 -0
  1616. package/dist/src/utils/model/aliases.js +16 -0
  1617. package/dist/src/utils/model/antModels.js +23 -0
  1618. package/dist/src/utils/model/bedrock.js +158 -0
  1619. package/dist/src/utils/model/check1mAccess.js +49 -0
  1620. package/dist/src/utils/model/configs.js +81 -0
  1621. package/dist/src/utils/model/contextWindowUpgradeCheck.js +32 -0
  1622. package/dist/src/utils/model/deprecation.js +56 -0
  1623. package/dist/src/utils/model/model.js +377 -0
  1624. package/dist/src/utils/model/modelAllowlist.js +91 -0
  1625. package/dist/src/utils/model/modelCapabilities.js +97 -0
  1626. package/dist/src/utils/model/modelOptions.js +403 -0
  1627. package/dist/src/utils/model/modelStrings.js +112 -0
  1628. package/dist/src/utils/model/modelSupportOverrides.js +32 -0
  1629. package/dist/src/utils/model/providers.js +23 -0
  1630. package/dist/src/utils/model/validateModel.js +108 -0
  1631. package/dist/src/utils/modelCost.js +135 -0
  1632. package/dist/src/utils/modifiers.js +22 -0
  1633. package/dist/src/utils/mtls.js +101 -0
  1634. package/dist/src/utils/nativeInstaller/download.js +309 -0
  1635. package/dist/src/utils/nativeInstaller/index.js +9 -0
  1636. package/dist/src/utils/nativeInstaller/installer.js +1104 -0
  1637. package/dist/src/utils/nativeInstaller/packageManagers.js +174 -0
  1638. package/dist/src/utils/nativeInstaller/pidLock.js +230 -0
  1639. package/dist/src/utils/notebook.js +170 -0
  1640. package/dist/src/utils/objectGroupBy.js +12 -0
  1641. package/dist/src/utils/pasteStore.js +61 -0
  1642. package/dist/src/utils/path.js +65 -0
  1643. package/dist/src/utils/pdf.js +199 -0
  1644. package/dist/src/utils/pdfUtils.js +36 -0
  1645. package/dist/src/utils/peerAddress.js +9 -0
  1646. package/dist/src/utils/permissions/PermissionMode.js +82 -0
  1647. package/dist/src/utils/permissions/PermissionPromptToolResultSchema.js +62 -0
  1648. package/dist/src/utils/permissions/PermissionResult.js +10 -0
  1649. package/dist/src/utils/permissions/PermissionRule.js +7 -0
  1650. package/dist/src/utils/permissions/PermissionUpdate.js +219 -0
  1651. package/dist/src/utils/permissions/PermissionUpdateSchema.js +49 -0
  1652. package/dist/src/utils/permissions/autoModeState.js +26 -0
  1653. package/dist/src/utils/permissions/bashClassifier.js +29 -0
  1654. package/dist/src/utils/permissions/bypassPermissionsKillswitch.js +69 -0
  1655. package/dist/src/utils/permissions/classifierDecision.js +56 -0
  1656. package/dist/src/utils/permissions/classifierShared.js +14 -0
  1657. package/dist/src/utils/permissions/dangerousPatterns.js +44 -0
  1658. package/dist/src/utils/permissions/denialTracking.js +28 -0
  1659. package/dist/src/utils/permissions/filesystem.js +889 -0
  1660. package/dist/src/utils/permissions/getNextPermissionMode.js +51 -0
  1661. package/dist/src/utils/permissions/pathValidation.js +230 -0
  1662. package/dist/src/utils/permissions/permissionExplainer.js +162 -0
  1663. package/dist/src/utils/permissions/permissionRuleParser.js +90 -0
  1664. package/dist/src/utils/permissions/permissionSetup.js +770 -0
  1665. package/dist/src/utils/permissions/permissions.js +585 -0
  1666. package/dist/src/utils/permissions/permissionsLoader.js +160 -0
  1667. package/dist/src/utils/permissions/shadowedRuleDetection.js +81 -0
  1668. package/dist/src/utils/permissions/shellRuleMatching.js +108 -0
  1669. package/dist/src/utils/permissions/yoloClassifier.js +868 -0
  1670. package/dist/src/utils/planModeV2.js +45 -0
  1671. package/dist/src/utils/plans.js +232 -0
  1672. package/dist/src/utils/platform.js +102 -0
  1673. package/dist/src/utils/plugins/addDirPluginSettings.js +30 -0
  1674. package/dist/src/utils/plugins/cacheUtils.js +144 -0
  1675. package/dist/src/utils/plugins/dependencyResolver.js +118 -0
  1676. package/dist/src/utils/plugins/fetchTelemetry.js +65 -0
  1677. package/dist/src/utils/plugins/gitAvailability.js +18 -0
  1678. package/dist/src/utils/plugins/headlessPluginInstall.js +92 -0
  1679. package/dist/src/utils/plugins/hintRecommendation.js +95 -0
  1680. package/dist/src/utils/plugins/installCounts.js +144 -0
  1681. package/dist/src/utils/plugins/installedPluginsManager.js +645 -0
  1682. package/dist/src/utils/plugins/loadPluginAgents.js +197 -0
  1683. package/dist/src/utils/plugins/loadPluginCommands.js +488 -0
  1684. package/dist/src/utils/plugins/loadPluginHooks.js +170 -0
  1685. package/dist/src/utils/plugins/loadPluginOutputStyles.js +98 -0
  1686. package/dist/src/utils/plugins/lspPluginIntegration.js +216 -0
  1687. package/dist/src/utils/plugins/lspRecommendation.js +193 -0
  1688. package/dist/src/utils/plugins/managedPlugins.js +18 -0
  1689. package/dist/src/utils/plugins/marketplaceHelpers.js +309 -0
  1690. package/dist/src/utils/plugins/marketplaceManager.js +1225 -0
  1691. package/dist/src/utils/plugins/mcpPluginIntegration.js +336 -0
  1692. package/dist/src/utils/plugins/mcpbHandler.js +487 -0
  1693. package/dist/src/utils/plugins/officialMarketplace.js +5 -0
  1694. package/dist/src/utils/plugins/officialMarketplaceGcs.js +118 -0
  1695. package/dist/src/utils/plugins/officialMarketplaceStartupCheck.js +267 -0
  1696. package/dist/src/utils/plugins/orphanedPluginFilter.js +47 -0
  1697. package/dist/src/utils/plugins/parseMarketplaceInput.js +75 -0
  1698. package/dist/src/utils/plugins/performStartupChecks.js +34 -0
  1699. package/dist/src/utils/plugins/pluginAutoupdate.js +130 -0
  1700. package/dist/src/utils/plugins/pluginBlocklist.js +66 -0
  1701. package/dist/src/utils/plugins/pluginDirectories.js +78 -0
  1702. package/dist/src/utils/plugins/pluginFlagging.js +122 -0
  1703. package/dist/src/utils/plugins/pluginIdentifier.js +37 -0
  1704. package/dist/src/utils/plugins/pluginInstallationHelpers.js +281 -0
  1705. package/dist/src/utils/plugins/pluginLoader.js +1596 -0
  1706. package/dist/src/utils/plugins/pluginOptionsStorage.js +162 -0
  1707. package/dist/src/utils/plugins/pluginPolicy.js +5 -0
  1708. package/dist/src/utils/plugins/pluginStartupCheck.js +176 -0
  1709. package/dist/src/utils/plugins/pluginVersioning.js +53 -0
  1710. package/dist/src/utils/plugins/reconciler.js +133 -0
  1711. package/dist/src/utils/plugins/refresh.js +96 -0
  1712. package/dist/src/utils/plugins/schemas.js +411 -0
  1713. package/dist/src/utils/plugins/validatePlugin.js +573 -0
  1714. package/dist/src/utils/plugins/walkPluginMarkdown.js +30 -0
  1715. package/dist/src/utils/plugins/zipCache.js +211 -0
  1716. package/dist/src/utils/plugins/zipCacheAdapters.js +93 -0
  1717. package/dist/src/utils/powershell/dangerousCmdlets.js +97 -0
  1718. package/dist/src/utils/powershell/parser.js +929 -0
  1719. package/dist/src/utils/powershell/staticPrefix.js +142 -0
  1720. package/dist/src/utils/preflightChecks.js +196 -0
  1721. package/dist/src/utils/privacyLevel.js +21 -0
  1722. package/dist/src/utils/process.js +42 -0
  1723. package/dist/src/utils/processUserInput/processBashCommand.js +109 -0
  1724. package/dist/src/utils/processUserInput/processSlashCommand.js +600 -0
  1725. package/dist/src/utils/processUserInput/processTextPrompt.js +54 -0
  1726. package/dist/src/utils/processUserInput/processUserInput.js +272 -0
  1727. package/dist/src/utils/profilerBase.js +15 -0
  1728. package/dist/src/utils/promptCategory.js +21 -0
  1729. package/dist/src/utils/promptEditor.js +115 -0
  1730. package/dist/src/utils/promptShellExecution.js +76 -0
  1731. package/dist/src/utils/proxy.js +228 -0
  1732. package/dist/src/utils/queryContext.js +83 -0
  1733. package/dist/src/utils/queryHelpers.js +329 -0
  1734. package/dist/src/utils/queryProfiler.js +177 -0
  1735. package/dist/src/utils/queueProcessor.js +41 -0
  1736. package/dist/src/utils/readEditContext.js +131 -0
  1737. package/dist/src/utils/readFileInRange.js +212 -0
  1738. package/dist/src/utils/releaseNotes.js +186 -0
  1739. package/dist/src/utils/renderOptions.js +45 -0
  1740. package/dist/src/utils/ripgrep.js +383 -0
  1741. package/dist/src/utils/sandbox/sandbox-adapter.js +505 -0
  1742. package/dist/src/utils/sandbox/sandbox-ui-utils.js +3 -0
  1743. package/dist/src/utils/sanitization.js +33 -0
  1744. package/dist/src/utils/screenshotClipboard.js +73 -0
  1745. package/dist/src/utils/sdkEventQueue.js +36 -0
  1746. package/dist/src/utils/secureStorage/fallbackStorage.js +45 -0
  1747. package/dist/src/utils/secureStorage/index.js +9 -0
  1748. package/dist/src/utils/secureStorage/keychainPrefetch.js +43 -0
  1749. package/dist/src/utils/secureStorage/macOsKeychainHelpers.js +42 -0
  1750. package/dist/src/utils/secureStorage/macOsKeychainStorage.js +147 -0
  1751. package/dist/src/utils/secureStorage/plainTextStorage.js +77 -0
  1752. package/dist/src/utils/semanticBoolean.js +4 -0
  1753. package/dist/src/utils/semanticNumber.js +11 -0
  1754. package/dist/src/utils/semver.js +43 -0
  1755. package/dist/src/utils/sequential.js +30 -0
  1756. package/dist/src/utils/sessionActivity.js +95 -0
  1757. package/dist/src/utils/sessionEnvVars.js +13 -0
  1758. package/dist/src/utils/sessionEnvironment.js +113 -0
  1759. package/dist/src/utils/sessionFileAccessHooks.js +150 -0
  1760. package/dist/src/utils/sessionIngressAuth.js +79 -0
  1761. package/dist/src/utils/sessionRestore.js +205 -0
  1762. package/dist/src/utils/sessionStart.js +119 -0
  1763. package/dist/src/utils/sessionState.js +48 -0
  1764. package/dist/src/utils/sessionStorage.js +2891 -0
  1765. package/dist/src/utils/sessionStoragePortable.js +486 -0
  1766. package/dist/src/utils/sessionTitle.js +89 -0
  1767. package/dist/src/utils/sessionUrl.js +33 -0
  1768. package/dist/src/utils/set.js +38 -0
  1769. package/dist/src/utils/settings/allErrors.js +11 -0
  1770. package/dist/src/utils/settings/applySettingsChange.js +40 -0
  1771. package/dist/src/utils/settings/changeDetector.js +279 -0
  1772. package/dist/src/utils/settings/constants.js +119 -0
  1773. package/dist/src/utils/settings/internalWrites.js +15 -0
  1774. package/dist/src/utils/settings/managedPath.js +19 -0
  1775. package/dist/src/utils/settings/mdm/constants.js +33 -0
  1776. package/dist/src/utils/settings/mdm/rawRead.js +72 -0
  1777. package/dist/src/utils/settings/mdm/settings.js +160 -0
  1778. package/dist/src/utils/settings/permissionValidation.js +169 -0
  1779. package/dist/src/utils/settings/pluginOnlyPolicy.js +19 -0
  1780. package/dist/src/utils/settings/schemaOutput.js +7 -0
  1781. package/dist/src/utils/settings/settings.js +530 -0
  1782. package/dist/src/utils/settings/settingsCache.js +36 -0
  1783. package/dist/src/utils/settings/toolValidationConfig.js +58 -0
  1784. package/dist/src/utils/settings/types.js +224 -0
  1785. package/dist/src/utils/settings/validateEditTool.js +26 -0
  1786. package/dist/src/utils/settings/validation.js +160 -0
  1787. package/dist/src/utils/settings/validationTips.js +94 -0
  1788. package/dist/src/utils/shell/bashProvider.js +123 -0
  1789. package/dist/src/utils/shell/outputLimits.js +7 -0
  1790. package/dist/src/utils/shell/powershellDetection.js +50 -0
  1791. package/dist/src/utils/shell/powershellProvider.js +50 -0
  1792. package/dist/src/utils/shell/prefix.js +183 -0
  1793. package/dist/src/utils/shell/readOnlyCommandValidation.js +1347 -0
  1794. package/dist/src/utils/shell/resolveDefaultShell.js +4 -0
  1795. package/dist/src/utils/shell/shellProvider.js +2 -0
  1796. package/dist/src/utils/shell/shellToolUtils.js +10 -0
  1797. package/dist/src/utils/shell/specPrefix.js +152 -0
  1798. package/dist/src/utils/shellConfig.js +88 -0
  1799. package/dist/src/utils/sideQuery.js +108 -0
  1800. package/dist/src/utils/sideQuestion.js +78 -0
  1801. package/dist/src/utils/signal.js +18 -0
  1802. package/dist/src/utils/sinks.js +6 -0
  1803. package/dist/src/utils/skills/skillChangeDetector.js +184 -0
  1804. package/dist/src/utils/slashCommandParsing.js +25 -0
  1805. package/dist/src/utils/sleep.js +43 -0
  1806. package/dist/src/utils/sliceAnsi.js +48 -0
  1807. package/dist/src/utils/slowOperations.js +165 -0
  1808. package/dist/src/utils/standaloneAgent.js +7 -0
  1809. package/dist/src/utils/startupProfiler.js +106 -0
  1810. package/dist/src/utils/staticRender.js +78 -0
  1811. package/dist/src/utils/stats.js +598 -0
  1812. package/dist/src/utils/statsCache.js +223 -0
  1813. package/dist/src/utils/status.js +361 -0
  1814. package/dist/src/utils/statusNoticeDefinitions.js +280 -0
  1815. package/dist/src/utils/statusNoticeHelpers.js +10 -0
  1816. package/dist/src/utils/stream.js +72 -0
  1817. package/dist/src/utils/streamJsonStdoutGuard.js +73 -0
  1818. package/dist/src/utils/streamlinedTransform.js +130 -0
  1819. package/dist/src/utils/stringUtils.js +108 -0
  1820. package/dist/src/utils/subprocessEnv.js +42 -0
  1821. package/dist/src/utils/suggestions/commandSuggestions.js +301 -0
  1822. package/dist/src/utils/suggestions/directoryCompletion.js +134 -0
  1823. package/dist/src/utils/suggestions/shellHistoryCompletion.js +65 -0
  1824. package/dist/src/utils/suggestions/skillUsageTracking.js +33 -0
  1825. package/dist/src/utils/suggestions/slackChannelSuggestions.js +141 -0
  1826. package/dist/src/utils/swarm/It2SetupPrompt.js +537 -0
  1827. package/dist/src/utils/swarm/backends/ITermBackend.js +153 -0
  1828. package/dist/src/utils/swarm/backends/InProcessBackend.js +160 -0
  1829. package/dist/src/utils/swarm/backends/PaneBackendExecutor.js +171 -0
  1830. package/dist/src/utils/swarm/backends/TmuxBackend.js +458 -0
  1831. package/dist/src/utils/swarm/backends/detection.js +43 -0
  1832. package/dist/src/utils/swarm/backends/it2Setup.js +134 -0
  1833. package/dist/src/utils/swarm/backends/registry.js +220 -0
  1834. package/dist/src/utils/swarm/backends/teammateModeSnapshot.js +33 -0
  1835. package/dist/src/utils/swarm/backends/types.js +3 -0
  1836. package/dist/src/utils/swarm/constants.js +11 -0
  1837. package/dist/src/utils/swarm/inProcessRunner.js +818 -0
  1838. package/dist/src/utils/swarm/leaderPermissionBridge.js +20 -0
  1839. package/dist/src/utils/swarm/permissionSync.js +474 -0
  1840. package/dist/src/utils/swarm/reconnection.js +55 -0
  1841. package/dist/src/utils/swarm/spawnInProcess.js +164 -0
  1842. package/dist/src/utils/swarm/spawnUtils.js +76 -0
  1843. package/dist/src/utils/swarm/teamHelpers.js +320 -0
  1844. package/dist/src/utils/swarm/teammateInit.js +65 -0
  1845. package/dist/src/utils/swarm/teammateLayoutManager.js +40 -0
  1846. package/dist/src/utils/swarm/teammateModel.js +5 -0
  1847. package/dist/src/utils/swarm/teammatePromptAddendum.js +11 -0
  1848. package/dist/src/utils/systemDirectories.js +42 -0
  1849. package/dist/src/utils/systemPrompt.js +41 -0
  1850. package/dist/src/utils/systemPromptType.js +3 -0
  1851. package/dist/src/utils/systemTheme.js +61 -0
  1852. package/dist/src/utils/taggedId.js +27 -0
  1853. package/dist/src/utils/task/TaskOutput.js +244 -0
  1854. package/dist/src/utils/task/diskOutput.js +267 -0
  1855. package/dist/src/utils/task/framework.js +178 -0
  1856. package/dist/src/utils/task/outputFormatting.js +21 -0
  1857. package/dist/src/utils/task/sdkProgress.js +18 -0
  1858. package/dist/src/utils/tasks.js +481 -0
  1859. package/dist/src/utils/teamDiscovery.js +33 -0
  1860. package/dist/src/utils/teamMemoryOps.js +40 -0
  1861. package/dist/src/utils/teammate.js +132 -0
  1862. package/dist/src/utils/teammateContext.js +17 -0
  1863. package/dist/src/utils/teammateMailbox.js +541 -0
  1864. package/dist/src/utils/telemetry/betaSessionTracing.js +255 -0
  1865. package/dist/src/utils/telemetry/bigqueryExporter.js +162 -0
  1866. package/dist/src/utils/telemetry/events.js +46 -0
  1867. package/dist/src/utils/telemetry/instrumentation.js +534 -0
  1868. package/dist/src/utils/telemetry/logger.js +26 -0
  1869. package/dist/src/utils/telemetry/perfettoTracing.js +636 -0
  1870. package/dist/src/utils/telemetry/pluginTelemetry.js +99 -0
  1871. package/dist/src/utils/telemetry/sessionTracing.js +564 -0
  1872. package/dist/src/utils/telemetry/skillLoadedEvent.js +22 -0
  1873. package/dist/src/utils/telemetryAttributes.js +50 -0
  1874. package/dist/src/utils/teleport/api.js +236 -0
  1875. package/dist/src/utils/teleport/environmentSelection.js +42 -0
  1876. package/dist/src/utils/teleport/environments.js +74 -0
  1877. package/dist/src/utils/teleport/gitBundle.js +153 -0
  1878. package/dist/src/utils/teleport.js +856 -0
  1879. package/dist/src/utils/tempfile.js +7 -0
  1880. package/dist/src/utils/terminal.js +65 -0
  1881. package/dist/src/utils/terminalPanel.js +133 -0
  1882. package/dist/src/utils/textHighlighting.js +109 -0
  1883. package/dist/src/utils/theme.js +465 -0
  1884. package/dist/src/utils/thinking.js +92 -0
  1885. package/dist/src/utils/timeouts.js +22 -0
  1886. package/dist/src/utils/tmuxSocket.js +216 -0
  1887. package/dist/src/utils/todo/types.js +9 -0
  1888. package/dist/src/utils/tokenBudget.js +54 -0
  1889. package/dist/src/utils/tokens.js +123 -0
  1890. package/dist/src/utils/toolErrors.js +87 -0
  1891. package/dist/src/utils/toolPool.js +22 -0
  1892. package/dist/src/utils/toolResultStorage.js +444 -0
  1893. package/dist/src/utils/toolSchemaCache.js +7 -0
  1894. package/dist/src/utils/toolSearch.js +314 -0
  1895. package/dist/src/utils/transcriptSearch.js +143 -0
  1896. package/dist/src/utils/treeify.js +89 -0
  1897. package/dist/src/utils/truncate.js +113 -0
  1898. package/dist/src/utils/ultraplan/ccrSession.js +187 -0
  1899. package/dist/src/utils/ultraplan/keyword.js +81 -0
  1900. package/dist/src/utils/ultraplan/prompt.txt.js +1 -0
  1901. package/dist/src/utils/unaryLogging.js +15 -0
  1902. package/dist/src/utils/undercover.js +57 -0
  1903. package/dist/src/utils/user.js +111 -0
  1904. package/dist/src/utils/userAgent.js +3 -0
  1905. package/dist/src/utils/userPromptKeywords.js +13 -0
  1906. package/dist/src/utils/uuid.js +11 -0
  1907. package/dist/src/utils/warningHandler.js +74 -0
  1908. package/dist/src/utils/which.js +50 -0
  1909. package/dist/src/utils/windowsPaths.js +104 -0
  1910. package/dist/src/utils/withResolvers.js +9 -0
  1911. package/dist/src/utils/words.js +763 -0
  1912. package/dist/src/utils/workloadContext.js +9 -0
  1913. package/dist/src/utils/worktree.js +841 -0
  1914. package/dist/src/utils/worktreeModeEnabled.js +3 -0
  1915. package/dist/src/utils/xdg.js +24 -0
  1916. package/dist/src/utils/xml.js +6 -0
  1917. package/dist/src/utils/yaml.js +6 -0
  1918. package/dist/src/utils/zodToJsonSchema.js +10 -0
  1919. package/dist/src/vim/motions.js +54 -0
  1920. package/dist/src/vim/operators.js +329 -0
  1921. package/dist/src/vim/textObjects.js +137 -0
  1922. package/dist/src/vim/transitions.js +324 -0
  1923. package/dist/src/vim/types.js +60 -0
  1924. package/dist/src/voice/voiceModeEnabled.js +18 -0
  1925. package/dist/stubs/ant-claude-for-chrome-mcp.js +6 -0
  1926. package/dist/stubs/color-diff-napi.js +30 -0
  1927. package/litellm.yaml +25 -0
  1928. package/package.json +93 -0
@@ -0,0 +1,411 @@
1
+ import { z } from "zod/v4";
2
+ import { HooksSchema } from "../../schemas/hooks.js";
3
+ import { McpServerConfigSchema } from "../../services/mcp/types.js";
4
+ import { lazySchema } from "../lazySchema.js";
5
+ export const ALLOWED_OFFICIAL_MARKETPLACE_NAMES = new Set([
6
+ "claude-code-marketplace",
7
+ "claude-code-plugins",
8
+ "claude-plugins-official",
9
+ "anthropic-marketplace",
10
+ "anthropic-plugins",
11
+ "agent-skills",
12
+ "life-sciences",
13
+ "knowledge-work-plugins"
14
+ ]);
15
+ const NO_AUTO_UPDATE_OFFICIAL_MARKETPLACES = new Set(["knowledge-work-plugins"]);
16
+ export function isMarketplaceAutoUpdate(marketplaceName, entry) {
17
+ const normalizedName = marketplaceName.toLowerCase();
18
+ return entry.autoUpdate ?? (ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(normalizedName) && !NO_AUTO_UPDATE_OFFICIAL_MARKETPLACES.has(normalizedName));
19
+ }
20
+ export const BLOCKED_OFFICIAL_NAME_PATTERN = /(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i;
21
+ const NON_ASCII_PATTERN = /[^\u0020-\u007E]/;
22
+ export function isBlockedOfficialName(name) {
23
+ if (ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(name.toLowerCase())) {
24
+ return false;
25
+ }
26
+ if (NON_ASCII_PATTERN.test(name)) {
27
+ return true;
28
+ }
29
+ return BLOCKED_OFFICIAL_NAME_PATTERN.test(name);
30
+ }
31
+ export const OFFICIAL_GITHUB_ORG = "anthropics";
32
+ export function validateOfficialNameSource(name, source) {
33
+ const normalizedName = name.toLowerCase();
34
+ if (!ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(normalizedName)) {
35
+ return null;
36
+ }
37
+ if (source.source === "github") {
38
+ const repo = source.repo || "";
39
+ if (!repo.toLowerCase().startsWith(`${OFFICIAL_GITHUB_ORG}/`)) {
40
+ return `The name '${name}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${OFFICIAL_GITHUB_ORG}/' can use this name.`;
41
+ }
42
+ return null;
43
+ }
44
+ if (source.source === "git" && source.url) {
45
+ const url = source.url.toLowerCase();
46
+ const isHttpsAnthropics = url.includes("github.com/anthropics/");
47
+ const isSshAnthropics = url.includes("git@github.com:anthropics/");
48
+ if (isHttpsAnthropics || isSshAnthropics) {
49
+ return null;
50
+ }
51
+ return `The name '${name}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${OFFICIAL_GITHUB_ORG}/' can use this name.`;
52
+ }
53
+ return `The name '${name}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${OFFICIAL_GITHUB_ORG}' organization.`;
54
+ }
55
+ const RelativePath = lazySchema(() => z.string().startsWith("./"));
56
+ const RelativeJSONPath = lazySchema(() => RelativePath().endsWith(".json"));
57
+ const McpbPath = lazySchema(() => z.union([
58
+ RelativePath().refine((path) => path.endsWith(".mcpb") || path.endsWith(".dxt"), {
59
+ message: "MCPB file path must end with .mcpb or .dxt"
60
+ }).describe("Path to MCPB file relative to plugin root"),
61
+ z.string().url().refine((url) => url.endsWith(".mcpb") || url.endsWith(".dxt"), {
62
+ message: "MCPB URL must end with .mcpb or .dxt"
63
+ }).describe("URL to MCPB file")
64
+ ]));
65
+ const RelativeMarkdownPath = lazySchema(() => RelativePath().endsWith(".md"));
66
+ const RelativeCommandPath = lazySchema(() => z.union([
67
+ RelativeMarkdownPath(),
68
+ RelativePath()
69
+ ]));
70
+ const MarketplaceNameSchema = lazySchema(() => z.string().min(1, "Marketplace must have a name").refine((name) => !name.includes(" "), {
71
+ message: 'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'
72
+ }).refine((name) => !name.includes("/") && !name.includes("\\") && !name.includes("..") && name !== ".", {
73
+ message: 'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'
74
+ }).refine((name) => !isBlockedOfficialName(name), {
75
+ message: "Marketplace name impersonates an official Anthropic/Claude marketplace"
76
+ }).refine((name) => name.toLowerCase() !== "inline", {
77
+ message: 'Marketplace name "inline" is reserved for --plugin-dir session plugins'
78
+ }).refine((name) => name.toLowerCase() !== "builtin", {
79
+ message: 'Marketplace name "builtin" is reserved for built-in plugins'
80
+ }));
81
+ export const PluginAuthorSchema = lazySchema(() => z.object({
82
+ name: z.string().min(1, "Author name cannot be empty").describe("Display name of the plugin author or organization"),
83
+ email: z.string().optional().describe("Contact email for support or feedback"),
84
+ url: z.string().optional().describe("Website, GitHub profile, or organization URL")
85
+ }));
86
+ const PluginManifestMetadataSchema = lazySchema(() => z.object({
87
+ name: z.string().min(1, "Plugin name cannot be empty").refine((name) => !name.includes(" "), {
88
+ message: 'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'
89
+ }).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),
90
+ version: z.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),
91
+ description: z.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),
92
+ author: PluginAuthorSchema().optional().describe("Information about the plugin creator or maintainer"),
93
+ homepage: z.string().url().optional().describe("Plugin homepage or documentation URL"),
94
+ repository: z.string().optional().describe("Source code repository URL"),
95
+ license: z.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),
96
+ keywords: z.array(z.string()).optional().describe("Tags for plugin discovery and categorization"),
97
+ dependencies: z.array(DependencyRefSchema()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)
98
+ }));
99
+ export const PluginHooksSchema = lazySchema(() => z.object({
100
+ description: z.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),
101
+ hooks: z.lazy(() => HooksSchema()).describe("The hooks provided by the plugin, in the same format as the one used for settings")
102
+ }));
103
+ const PluginManifestHooksSchema = lazySchema(() => z.object({
104
+ hooks: z.union([
105
+ RelativeJSONPath().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),
106
+ z.lazy(() => HooksSchema()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),
107
+ z.array(z.union([
108
+ RelativeJSONPath().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),
109
+ z.lazy(() => HooksSchema()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")
110
+ ]))
111
+ ])
112
+ }));
113
+ export const CommandMetadataSchema = lazySchema(() => z.object({
114
+ source: RelativeCommandPath().optional().describe("Path to command markdown file, relative to plugin root"),
115
+ content: z.string().optional().describe("Inline markdown content for the command"),
116
+ description: z.string().optional().describe("Command description override"),
117
+ argumentHint: z.string().optional().describe('Hint for command arguments (e.g., "[file]")'),
118
+ model: z.string().optional().describe("Default model for this command"),
119
+ allowedTools: z.array(z.string()).optional().describe("Tools allowed when command runs")
120
+ }).refine((data) => data.source && !data.content || !data.source && data.content, {
121
+ message: 'Command must have either "source" (file path) or "content" (inline markdown), but not both'
122
+ }));
123
+ const PluginManifestCommandsSchema = lazySchema(() => z.object({
124
+ commands: z.union([
125
+ RelativeCommandPath().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),
126
+ z.array(RelativeCommandPath().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),
127
+ z.record(z.string(), CommandMetadataSchema()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')
128
+ ])
129
+ }));
130
+ const PluginManifestAgentsSchema = lazySchema(() => z.object({
131
+ agents: z.union([
132
+ RelativeMarkdownPath().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),
133
+ z.array(RelativeMarkdownPath().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")
134
+ ])
135
+ }));
136
+ const PluginManifestSkillsSchema = lazySchema(() => z.object({
137
+ skills: z.union([
138
+ RelativePath().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),
139
+ z.array(RelativePath().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")
140
+ ])
141
+ }));
142
+ const PluginManifestOutputStylesSchema = lazySchema(() => z.object({
143
+ outputStyles: z.union([
144
+ RelativePath().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),
145
+ z.array(RelativePath().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")
146
+ ])
147
+ }));
148
+ const nonEmptyString = lazySchema(() => z.string().min(1));
149
+ const fileExtension = lazySchema(() => z.string().min(2).refine((ext) => ext.startsWith("."), {
150
+ message: 'File extensions must start with dot (e.g., ".ts", not "ts")'
151
+ }));
152
+ const PluginManifestMcpServerSchema = lazySchema(() => z.object({
153
+ mcpServers: z.union([
154
+ RelativeJSONPath().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),
155
+ McpbPath().describe("Path or URL to MCPB file containing MCP server configuration"),
156
+ z.record(z.string(), McpServerConfigSchema()).describe("MCP server configurations keyed by server name"),
157
+ z.array(z.union([
158
+ RelativeJSONPath().describe("Path to MCP servers configuration file"),
159
+ McpbPath().describe("Path or URL to MCPB file"),
160
+ z.record(z.string(), McpServerConfigSchema()).describe("Inline MCP server configurations")
161
+ ])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")
162
+ ])
163
+ }));
164
+ const PluginUserConfigOptionSchema = lazySchema(() => z.object({
165
+ type: z.enum(["string", "number", "boolean", "directory", "file"]).describe("Type of the configuration value"),
166
+ title: z.string().describe("Human-readable label shown in the config dialog"),
167
+ description: z.string().describe("Help text shown beneath the field in the config dialog"),
168
+ required: z.boolean().optional().describe("If true, validation fails when this field is empty"),
169
+ default: z.union([z.string(), z.number(), z.boolean(), z.array(z.string())]).optional().describe("Default value used when the user provides nothing"),
170
+ multiple: z.boolean().optional().describe("For string type: allow an array of strings"),
171
+ sensitive: z.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),
172
+ min: z.number().optional().describe("Minimum value (number type only)"),
173
+ max: z.number().optional().describe("Maximum value (number type only)")
174
+ }).strict());
175
+ const PluginManifestUserConfigSchema = lazySchema(() => z.object({
176
+ userConfig: z.record(z.string().regex(/^[A-Za-z_]\w*$/, "Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks"), PluginUserConfigOptionSchema()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. " + "Non-sensitive values saved to settings.json; sensitive values to secure storage " + "(macOS keychain or .credentials.json). Available as ${user_config.KEY} in " + "MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. " + "Note: sensitive values share a single keychain entry with OAuth tokens — keep " + "secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")
177
+ }));
178
+ const PluginManifestChannelsSchema = lazySchema(() => z.object({
179
+ channels: z.array(z.object({
180
+ server: z.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),
181
+ displayName: z.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),
182
+ userConfig: z.record(z.string(), PluginUserConfigOptionSchema()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. " + "Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")
183
+ }).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel " + "and optionally specifies user configuration to prompt for at enable time.")
184
+ }));
185
+ export const LspServerConfigSchema = lazySchema(() => z.strictObject({
186
+ command: z.string().min(1).refine((cmd) => {
187
+ if (cmd.includes(" ") && !cmd.startsWith("/")) {
188
+ return false;
189
+ }
190
+ return true;
191
+ }, {
192
+ message: "Command should not contain spaces. Use args array for arguments."
193
+ }).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),
194
+ args: z.array(nonEmptyString()).optional().describe("Command-line arguments to pass to the server"),
195
+ extensionToLanguage: z.record(fileExtension(), nonEmptyString()).refine((record) => Object.keys(record).length > 0, {
196
+ message: "extensionToLanguage must have at least one mapping"
197
+ }).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),
198
+ transport: z.enum(["stdio", "socket"]).default("stdio").describe("Communication transport mechanism"),
199
+ env: z.record(z.string(), z.string()).optional().describe("Environment variables to set when starting the server"),
200
+ initializationOptions: z.unknown().optional().describe("Initialization options passed to the server during initialization"),
201
+ settings: z.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),
202
+ workspaceFolder: z.string().optional().describe("Workspace folder path to use for the server"),
203
+ startupTimeout: z.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),
204
+ shutdownTimeout: z.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),
205
+ restartOnCrash: z.boolean().optional().describe("Whether to restart the server if it crashes"),
206
+ maxRestarts: z.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")
207
+ }));
208
+ const PluginManifestLspServerSchema = lazySchema(() => z.object({
209
+ lspServers: z.union([
210
+ RelativeJSONPath().describe("Path to .lsp.json configuration file relative to plugin root"),
211
+ z.record(z.string(), LspServerConfigSchema()).describe("LSP server configurations keyed by server name"),
212
+ z.array(z.union([
213
+ RelativeJSONPath().describe("Path to LSP configuration file"),
214
+ z.record(z.string(), LspServerConfigSchema()).describe("Inline LSP server configurations")
215
+ ])).describe("Array of LSP server configurations (paths or inline definitions)")
216
+ ])
217
+ }));
218
+ const NpmPackageNameSchema = lazySchema(() => z.string().refine((name) => !name.includes("..") && !name.includes("//"), "Package name cannot contain path traversal patterns").refine((name) => {
219
+ const scopedPackageRegex = /^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/;
220
+ const regularPackageRegex = /^[a-z0-9][a-z0-9-._]*$/;
221
+ return scopedPackageRegex.test(name) || regularPackageRegex.test(name);
222
+ }, "Invalid npm package name format"));
223
+ const PluginManifestSettingsSchema = lazySchema(() => z.object({
224
+ settings: z.record(z.string(), z.unknown()).optional().describe("Settings to merge when plugin is enabled. " + "Only allowlisted keys are kept (currently: agent)")
225
+ }));
226
+ export const PluginManifestSchema = lazySchema(() => z.object({
227
+ ...PluginManifestMetadataSchema().shape,
228
+ ...PluginManifestHooksSchema().partial().shape,
229
+ ...PluginManifestCommandsSchema().partial().shape,
230
+ ...PluginManifestAgentsSchema().partial().shape,
231
+ ...PluginManifestSkillsSchema().partial().shape,
232
+ ...PluginManifestOutputStylesSchema().partial().shape,
233
+ ...PluginManifestChannelsSchema().partial().shape,
234
+ ...PluginManifestMcpServerSchema().partial().shape,
235
+ ...PluginManifestLspServerSchema().partial().shape,
236
+ ...PluginManifestSettingsSchema().partial().shape,
237
+ ...PluginManifestUserConfigSchema().partial().shape
238
+ }));
239
+ export const MarketplaceSourceSchema = lazySchema(() => z.discriminatedUnion("source", [
240
+ z.object({
241
+ source: z.literal("url"),
242
+ url: z.string().url().describe("Direct URL to marketplace.json file"),
243
+ headers: z.record(z.string(), z.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")
244
+ }),
245
+ z.object({
246
+ source: z.literal("github"),
247
+ repo: z.string().describe("GitHub repository in owner/repo format"),
248
+ ref: z.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),
249
+ path: z.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),
250
+ sparsePaths: z.array(z.string()).optional().describe("Directories to include via git sparse-checkout (cone mode). " + "Use for monorepos where the marketplace lives in a subdirectory. " + 'Example: [".claude-plugin", "plugins"]. ' + "If omitted, the full repository is cloned.")
251
+ }),
252
+ z.object({
253
+ source: z.literal("git"),
254
+ url: z.string().describe("Full git repository URL"),
255
+ ref: z.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),
256
+ path: z.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),
257
+ sparsePaths: z.array(z.string()).optional().describe("Directories to include via git sparse-checkout (cone mode). " + "Use for monorepos where the marketplace lives in a subdirectory. " + 'Example: [".claude-plugin", "plugins"]. ' + "If omitted, the full repository is cloned.")
258
+ }),
259
+ z.object({
260
+ source: z.literal("npm"),
261
+ package: NpmPackageNameSchema().describe("NPM package containing marketplace.json")
262
+ }),
263
+ z.object({
264
+ source: z.literal("file"),
265
+ path: z.string().describe("Local file path to marketplace.json")
266
+ }),
267
+ z.object({
268
+ source: z.literal("directory"),
269
+ path: z.string().describe("Local directory containing .claude-plugin/marketplace.json")
270
+ }),
271
+ z.object({
272
+ source: z.literal("hostPattern"),
273
+ hostPattern: z.string().describe("Regex pattern to match the host/domain extracted from any marketplace source type. " + 'For github sources, matches against "github.com". For git sources (SSH or HTTPS), ' + "extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all " + 'marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')
274
+ }),
275
+ z.object({
276
+ source: z.literal("pathPattern"),
277
+ pathPattern: z.string().describe("Regex pattern matched against the .path field of file and directory sources. " + "Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside " + 'hostPattern restrictions for network sources. Use ".*" to allow all filesystem ' + 'paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific ' + "directories.")
278
+ }),
279
+ z.object({
280
+ source: z.literal("settings"),
281
+ name: MarketplaceNameSchema().refine((name) => !ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(name.toLowerCase()), {
282
+ message: "Reserved official marketplace names cannot be used with settings sources. " + "validateOfficialNameSource only accepts github/git sources from anthropics/* " + "for these names; a settings source would be rejected after " + "loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."
283
+ }).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); " + "the synthetic manifest is written under this name. Same validation " + "as PluginMarketplaceSchema plus reserved-name rejection — " + "validateOfficialNameSource runs after the disk write, too late to clean up."),
284
+ plugins: z.array(SettingsMarketplacePluginSchema()).describe("Plugin entries declared inline in settings.json"),
285
+ owner: PluginAuthorSchema().optional()
286
+ }).describe("Inline marketplace manifest defined directly in settings.json. " + "The reconciler writes a synthetic marketplace.json to the cache; " + "diffMarketplaces detects edits via isEqual on the stored source " + "(the plugins array is inside this object, so edits surface as sourceChanged).")
287
+ ]));
288
+ export const gitSha = lazySchema(() => z.string().length(40).regex(/^[a-f0-9]{40}$/, "Must be a full 40-character lowercase git commit SHA"));
289
+ export const PluginSourceSchema = lazySchema(() => z.union([
290
+ RelativePath().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),
291
+ z.object({
292
+ source: z.literal("npm"),
293
+ package: NpmPackageNameSchema().or(z.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),
294
+ version: z.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),
295
+ registry: z.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")
296
+ }).describe("NPM package as plugin source"),
297
+ z.object({
298
+ source: z.literal("pip"),
299
+ package: z.string().describe("Python package name as it appears on PyPI"),
300
+ version: z.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),
301
+ registry: z.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")
302
+ }).describe("Python package as plugin source"),
303
+ z.object({
304
+ source: z.literal("url"),
305
+ url: z.string().describe("Full git repository URL (https:// or git@)"),
306
+ ref: z.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),
307
+ sha: gitSha().optional().describe("Specific commit SHA to use")
308
+ }),
309
+ z.object({
310
+ source: z.literal("github"),
311
+ repo: z.string().describe("GitHub repository in owner/repo format"),
312
+ ref: z.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),
313
+ sha: gitSha().optional().describe("Specific commit SHA to use")
314
+ }),
315
+ z.object({
316
+ source: z.literal("git-subdir"),
317
+ url: z.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),
318
+ path: z.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). ' + "Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos."),
319
+ ref: z.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),
320
+ sha: gitSha().optional().describe("Specific commit SHA to use")
321
+ }).describe("Plugin located in a subdirectory of a larger repository (monorepo). " + "Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")
322
+ ]));
323
+ const SettingsMarketplacePluginSchema = lazySchema(() => z.object({
324
+ name: z.string().min(1, "Plugin name cannot be empty").refine((name) => !name.includes(" "), {
325
+ message: 'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'
326
+ }).describe("Plugin name as it appears in the target repository"),
327
+ source: PluginSourceSchema().describe("Where to fetch the plugin from. Must be a remote source — relative " + "paths have no marketplace repository to resolve against."),
328
+ description: z.string().optional(),
329
+ version: z.string().optional(),
330
+ strict: z.boolean().optional()
331
+ }).refine((p) => typeof p.source !== "string", {
332
+ message: "Plugins in a settings-sourced marketplace must use remote sources " + '(github, git-subdir, npm, url, pip). Relative-path sources like "./foo" ' + "have no marketplace repository to resolve against."
333
+ }));
334
+ export function isLocalPluginSource(source) {
335
+ return typeof source === "string" && source.startsWith("./");
336
+ }
337
+ export function isLocalMarketplaceSource(source) {
338
+ return source.source === "file" || source.source === "directory";
339
+ }
340
+ export const PluginMarketplaceEntrySchema = lazySchema(() => PluginManifestSchema().partial().extend({
341
+ name: z.string().min(1, "Plugin name cannot be empty").refine((name) => !name.includes(" "), {
342
+ message: 'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'
343
+ }).describe("Unique identifier matching the plugin name"),
344
+ source: PluginSourceSchema().describe("Where to fetch the plugin from"),
345
+ category: z.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),
346
+ tags: z.array(z.string()).optional().describe("Tags for searchability and discovery"),
347
+ strict: z.boolean().optional().default(true).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")
348
+ }));
349
+ export const PluginMarketplaceSchema = lazySchema(() => z.object({
350
+ name: MarketplaceNameSchema(),
351
+ owner: PluginAuthorSchema().describe("Marketplace maintainer or curator information"),
352
+ plugins: z.array(PluginMarketplaceEntrySchema()).describe("Collection of available plugins in this marketplace"),
353
+ forceRemoveDeletedPlugins: z.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),
354
+ metadata: z.object({
355
+ pluginRoot: z.string().optional().describe("Base path for relative plugin sources"),
356
+ version: z.string().optional().describe("Marketplace version"),
357
+ description: z.string().optional().describe("Marketplace description")
358
+ }).optional().describe("Optional marketplace metadata"),
359
+ allowCrossMarketplaceDependenciesOn: z.array(z.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")
360
+ }));
361
+ export const PluginIdSchema = lazySchema(() => z.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i, "Plugin ID must be in format: plugin@marketplace"));
362
+ const DEP_REF_REGEX = /^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i;
363
+ export const DependencyRefSchema = lazySchema(() => z.union([
364
+ z.string().regex(DEP_REF_REGEX, "Dependency must be a plugin name, optionally qualified with @marketplace").transform((s) => s.replace(/@\^[^@]*$/, "")),
365
+ z.object({
366
+ name: z.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),
367
+ marketplace: z.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()
368
+ }).loose().transform((o) => o.marketplace ? `${o.name}@${o.marketplace}` : o.name)
369
+ ]));
370
+ export const SettingsPluginEntrySchema = lazySchema(() => z.union([
371
+ PluginIdSchema(),
372
+ z.object({
373
+ id: PluginIdSchema().describe('Plugin identifier (e.g., "formatter@tools")'),
374
+ version: z.string().optional().describe('Version constraint (e.g., "^2.0.0")'),
375
+ required: z.boolean().optional().describe("If true, cannot be disabled"),
376
+ config: z.record(z.string(), z.unknown()).optional().describe("Plugin-specific configuration")
377
+ })
378
+ ]));
379
+ export const InstalledPluginSchema = lazySchema(() => z.object({
380
+ version: z.string().describe("Currently installed version"),
381
+ installedAt: z.string().describe("ISO 8601 timestamp of installation"),
382
+ lastUpdated: z.string().optional().describe("ISO 8601 timestamp of last update"),
383
+ installPath: z.string().describe("Absolute path to the installed plugin directory"),
384
+ gitCommitSha: z.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")
385
+ }));
386
+ export const InstalledPluginsFileSchemaV1 = lazySchema(() => z.object({
387
+ version: z.literal(1).describe("Schema version 1"),
388
+ plugins: z.record(PluginIdSchema(), InstalledPluginSchema()).describe("Map of plugin IDs to their installation metadata")
389
+ }));
390
+ export const PluginScopeSchema = lazySchema(() => z.enum(["managed", "user", "project", "local"]));
391
+ export const PluginInstallationEntrySchema = lazySchema(() => z.object({
392
+ scope: PluginScopeSchema().describe("Installation scope"),
393
+ projectPath: z.string().optional().describe("Project path (required for project/local scopes)"),
394
+ installPath: z.string().describe("Absolute path to the versioned plugin directory"),
395
+ version: z.string().optional().describe("Currently installed version"),
396
+ installedAt: z.string().optional().describe("ISO 8601 timestamp of installation"),
397
+ lastUpdated: z.string().optional().describe("ISO 8601 timestamp of last update"),
398
+ gitCommitSha: z.string().optional().describe("Git commit SHA for git-based plugins")
399
+ }));
400
+ export const InstalledPluginsFileSchemaV2 = lazySchema(() => z.object({
401
+ version: z.literal(2).describe("Schema version 2"),
402
+ plugins: z.record(PluginIdSchema(), z.array(PluginInstallationEntrySchema())).describe("Map of plugin IDs to arrays of installation entries")
403
+ }));
404
+ export const InstalledPluginsFileSchema = lazySchema(() => z.union([InstalledPluginsFileSchemaV1(), InstalledPluginsFileSchemaV2()]));
405
+ export const KnownMarketplaceSchema = lazySchema(() => z.object({
406
+ source: MarketplaceSourceSchema().describe("Where to fetch the marketplace from"),
407
+ installLocation: z.string().describe("Local cache path where marketplace manifest is stored"),
408
+ lastUpdated: z.string().describe("ISO 8601 timestamp of last marketplace refresh"),
409
+ autoUpdate: z.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")
410
+ }));
411
+ export const KnownMarketplacesFileSchema = lazySchema(() => z.record(z.string(), KnownMarketplaceSchema()));