@within-7/minto 0.1.6 → 0.2.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 (487) hide show
  1. package/cli.js +155 -37
  2. package/dist/Tool.js +38 -0
  3. package/dist/Tool.js.map +3 -3
  4. package/dist/commands/agents/AgentsCommand.js +52 -26
  5. package/dist/commands/agents/AgentsCommand.js.map +2 -2
  6. package/dist/commands/agents/constants.js +1 -1
  7. package/dist/commands/agents/constants.js.map +1 -1
  8. package/dist/commands/agents/index.js +1 -1
  9. package/dist/commands/bug.js +74 -7
  10. package/dist/commands/bug.js.map +3 -3
  11. package/dist/commands/clear.js +3 -0
  12. package/dist/commands/clear.js.map +2 -2
  13. package/dist/commands/compact.js +37 -0
  14. package/dist/commands/compact.js.map +2 -2
  15. package/dist/commands/context.js +84 -0
  16. package/dist/commands/context.js.map +7 -0
  17. package/dist/commands/ctx_viz.js +18 -10
  18. package/dist/commands/ctx_viz.js.map +2 -2
  19. package/dist/commands/doctor.js +158 -12
  20. package/dist/commands/doctor.js.map +2 -2
  21. package/dist/commands/export.js +156 -0
  22. package/dist/commands/export.js.map +7 -0
  23. package/dist/commands/mcp-interactive.js +21 -12
  24. package/dist/commands/mcp-interactive.js.map +2 -2
  25. package/dist/commands/model.js +6 -5
  26. package/dist/commands/model.js.map +2 -2
  27. package/dist/commands/permissions.js +86 -0
  28. package/dist/commands/permissions.js.map +7 -0
  29. package/dist/commands/quit.js +3 -1
  30. package/dist/commands/quit.js.map +2 -2
  31. package/dist/commands/sandbox.js +104 -0
  32. package/dist/commands/sandbox.js.map +7 -0
  33. package/dist/commands/status.js +58 -0
  34. package/dist/commands/status.js.map +7 -0
  35. package/dist/commands/tasks.js +108 -0
  36. package/dist/commands/tasks.js.map +7 -0
  37. package/dist/commands/todos.js +123 -0
  38. package/dist/commands/todos.js.map +7 -0
  39. package/dist/commands.js +20 -2
  40. package/dist/commands.js.map +2 -2
  41. package/dist/components/AgentThinkingBlock.js +10 -18
  42. package/dist/components/AgentThinkingBlock.js.map +2 -2
  43. package/dist/components/BackgroundTasksPanel.js +78 -29
  44. package/dist/components/BackgroundTasksPanel.js.map +2 -2
  45. package/dist/components/BashStreamingProgress.js +24 -0
  46. package/dist/components/BashStreamingProgress.js.map +7 -0
  47. package/dist/components/CollapsibleHint.js +14 -0
  48. package/dist/components/CollapsibleHint.js.map +7 -0
  49. package/dist/components/FileEditToolUpdatedMessage.js +1 -1
  50. package/dist/components/FileEditToolUpdatedMessage.js.map +2 -2
  51. package/dist/components/HotkeyHelpPanel.js +137 -0
  52. package/dist/components/HotkeyHelpPanel.js.map +7 -0
  53. package/dist/components/Logo.js +5 -5
  54. package/dist/components/Logo.js.map +2 -2
  55. package/dist/components/Message.js +23 -7
  56. package/dist/components/Message.js.map +3 -3
  57. package/dist/components/ModelConfig.js +16 -3
  58. package/dist/components/ModelConfig.js.map +2 -2
  59. package/dist/components/ModelListManager.js +3 -3
  60. package/dist/components/ModelListManager.js.map +2 -2
  61. package/dist/components/ModelSelector/ModelSelector.js +1 -1
  62. package/dist/components/Onboarding.js +19 -14
  63. package/dist/components/Onboarding.js.map +2 -2
  64. package/dist/components/ProgressBar.js +74 -0
  65. package/dist/components/ProgressBar.js.map +7 -0
  66. package/dist/components/PromptInput.js +156 -46
  67. package/dist/components/PromptInput.js.map +2 -2
  68. package/dist/components/RequestStatusIndicator.js +194 -0
  69. package/dist/components/RequestStatusIndicator.js.map +7 -0
  70. package/dist/components/Spinner.js +92 -27
  71. package/dist/components/Spinner.js.map +2 -2
  72. package/dist/components/SpinnerSymbol.js +21 -27
  73. package/dist/components/SpinnerSymbol.js.map +2 -2
  74. package/dist/components/StreamingBashOutput.js +9 -8
  75. package/dist/components/StreamingBashOutput.js.map +2 -2
  76. package/dist/components/SubagentBlock.js +1 -1
  77. package/dist/components/SubagentBlock.js.map +1 -1
  78. package/dist/components/SubagentProgress.js +10 -11
  79. package/dist/components/SubagentProgress.js.map +2 -2
  80. package/dist/components/TaskCard.js +16 -13
  81. package/dist/components/TaskCard.js.map +2 -2
  82. package/dist/components/TodoChangeBlock.js +1 -1
  83. package/dist/components/TodoChangeBlock.js.map +2 -2
  84. package/dist/components/TodoPanel.js +120 -29
  85. package/dist/components/TodoPanel.js.map +3 -3
  86. package/dist/components/TokenCounter.js +74 -0
  87. package/dist/components/TokenCounter.js.map +7 -0
  88. package/dist/components/TokenWarning.js +2 -1
  89. package/dist/components/TokenWarning.js.map +2 -2
  90. package/dist/components/TreeConnector.js +25 -0
  91. package/dist/components/TreeConnector.js.map +7 -0
  92. package/dist/components/TurnCompletionIndicator.js +18 -0
  93. package/dist/components/TurnCompletionIndicator.js.map +7 -0
  94. package/dist/components/messages/AssistantTextMessage.js +5 -2
  95. package/dist/components/messages/AssistantTextMessage.js.map +2 -2
  96. package/dist/components/messages/AssistantThinkingMessage.js +18 -3
  97. package/dist/components/messages/AssistantThinkingMessage.js.map +2 -2
  98. package/dist/components/messages/AssistantToolUseMessage.js +11 -8
  99. package/dist/components/messages/AssistantToolUseMessage.js.map +2 -2
  100. package/dist/components/messages/GroupRenderer.js +53 -0
  101. package/dist/components/messages/GroupRenderer.js.map +7 -0
  102. package/dist/components/messages/NestedTasksPreview.js +12 -0
  103. package/dist/components/messages/NestedTasksPreview.js.map +7 -0
  104. package/dist/components/messages/ParallelTasksGroupView.js +92 -0
  105. package/dist/components/messages/ParallelTasksGroupView.js.map +7 -0
  106. package/dist/components/messages/TaskInModuleView.js +198 -0
  107. package/dist/components/messages/TaskInModuleView.js.map +7 -0
  108. package/dist/components/messages/TaskOutputContent.js +53 -0
  109. package/dist/components/messages/TaskOutputContent.js.map +7 -0
  110. package/dist/components/messages/UserPromptMessage.js +1 -1
  111. package/dist/components/messages/UserPromptMessage.js.map +2 -2
  112. package/dist/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +2 -3
  113. package/dist/components/messages/UserToolResultMessage/UserToolSuccessMessage.js.map +2 -2
  114. package/dist/components/permissions/FallbackPermissionRequest.js +4 -4
  115. package/dist/components/permissions/FallbackPermissionRequest.js.map +2 -2
  116. package/dist/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +4 -4
  117. package/dist/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js.map +2 -2
  118. package/dist/constants/colors.js +48 -0
  119. package/dist/constants/colors.js.map +2 -2
  120. package/dist/constants/formatRules.js +102 -0
  121. package/dist/constants/formatRules.js.map +7 -0
  122. package/dist/constants/prompts.js +12 -34
  123. package/dist/constants/prompts.js.map +2 -2
  124. package/dist/constants/symbols.js +64 -6
  125. package/dist/constants/symbols.js.map +2 -2
  126. package/dist/constants/timing.js +5 -0
  127. package/dist/constants/timing.js.map +2 -2
  128. package/dist/core/config/defaults.js +84 -0
  129. package/dist/core/config/defaults.js.map +7 -0
  130. package/dist/core/config/index.js +111 -0
  131. package/dist/core/config/index.js.map +7 -0
  132. package/dist/core/config/loader.js +221 -0
  133. package/dist/core/config/loader.js.map +7 -0
  134. package/dist/core/config/migrations.js +128 -0
  135. package/dist/core/config/migrations.js.map +7 -0
  136. package/dist/core/config/schema.js +178 -0
  137. package/dist/core/config/schema.js.map +7 -0
  138. package/dist/core/costTracker.js +138 -0
  139. package/dist/core/costTracker.js.map +7 -0
  140. package/dist/core/index.js +5 -0
  141. package/dist/core/index.js.map +7 -0
  142. package/dist/core/permissions/auditLog.js +204 -0
  143. package/dist/core/permissions/auditLog.js.map +7 -0
  144. package/dist/core/permissions/engine/index.js +3 -0
  145. package/dist/core/permissions/engine/index.js.map +7 -0
  146. package/dist/core/permissions/engine/permissionEngine.js +106 -0
  147. package/dist/core/permissions/engine/permissionEngine.js.map +7 -0
  148. package/dist/core/permissions/engine/types.js +1 -0
  149. package/dist/core/permissions/engine/types.js.map +7 -0
  150. package/dist/core/permissions/index.js +84 -0
  151. package/dist/core/permissions/index.js.map +7 -0
  152. package/dist/core/permissions/ruleEngine.js +259 -0
  153. package/dist/core/permissions/ruleEngine.js.map +7 -0
  154. package/dist/core/permissions/rules/allowedToolsRule.js +62 -0
  155. package/dist/core/permissions/rules/allowedToolsRule.js.map +7 -0
  156. package/dist/core/permissions/rules/autoEscalationRule.js +291 -0
  157. package/dist/core/permissions/rules/autoEscalationRule.js.map +7 -0
  158. package/dist/core/permissions/rules/index.js +46 -0
  159. package/dist/core/permissions/rules/index.js.map +7 -0
  160. package/dist/core/permissions/rules/planModeRule.js +55 -0
  161. package/dist/core/permissions/rules/planModeRule.js.map +7 -0
  162. package/dist/core/permissions/rules/projectBoundaryRule.js +168 -0
  163. package/dist/core/permissions/rules/projectBoundaryRule.js.map +7 -0
  164. package/dist/core/permissions/rules/safeModeRule.js +65 -0
  165. package/dist/core/permissions/rules/safeModeRule.js.map +7 -0
  166. package/dist/core/permissions/rules/sensitivePathsRule.js +340 -0
  167. package/dist/core/permissions/rules/sensitivePathsRule.js.map +7 -0
  168. package/dist/core/permissions/types.js +127 -0
  169. package/dist/core/permissions/types.js.map +7 -0
  170. package/dist/core/tools/executor.js +143 -0
  171. package/dist/core/tools/executor.js.map +7 -0
  172. package/dist/core/tools/index.js +15 -0
  173. package/dist/core/tools/index.js.map +7 -0
  174. package/dist/core/tools/registry.js +183 -0
  175. package/dist/core/tools/registry.js.map +7 -0
  176. package/dist/core/tools/types.js +1 -0
  177. package/dist/core/tools/types.js.map +7 -0
  178. package/dist/cost-tracker.js +23 -15
  179. package/dist/cost-tracker.js.map +2 -2
  180. package/dist/entrypoints/cli.js +43 -43
  181. package/dist/entrypoints/cli.js.map +2 -2
  182. package/dist/entrypoints/mcp.js +12 -4
  183. package/dist/entrypoints/mcp.js.map +2 -2
  184. package/dist/history.js +14 -3
  185. package/dist/history.js.map +2 -2
  186. package/dist/hooks/useAgentTranscripts.js +116 -0
  187. package/dist/hooks/useAgentTranscripts.js.map +7 -0
  188. package/dist/hooks/useAnimationSync.js +53 -0
  189. package/dist/hooks/useAnimationSync.js.map +7 -0
  190. package/dist/hooks/useArrowKeyHistory.js +4 -2
  191. package/dist/hooks/useArrowKeyHistory.js.map +2 -2
  192. package/dist/hooks/useCanUseTool.js +3 -1
  193. package/dist/hooks/useCanUseTool.js.map +2 -2
  194. package/dist/hooks/useCancelRequest.js +4 -1
  195. package/dist/hooks/useCancelRequest.js.map +2 -2
  196. package/dist/hooks/useExitOnCtrlCD.js +9 -5
  197. package/dist/hooks/useExitOnCtrlCD.js.map +2 -2
  198. package/dist/hooks/useHookStatus.js +40 -0
  199. package/dist/hooks/useHookStatus.js.map +7 -0
  200. package/dist/hooks/useLogMessages.js +17 -1
  201. package/dist/hooks/useLogMessages.js.map +2 -2
  202. package/dist/hooks/useMessageGroups.js +43 -0
  203. package/dist/hooks/useMessageGroups.js.map +7 -0
  204. package/dist/hooks/useTerminalSize.js +62 -6
  205. package/dist/hooks/useTerminalSize.js.map +2 -2
  206. package/dist/hooks/useUnifiedCompletion.js +69 -0
  207. package/dist/hooks/useUnifiedCompletion.js.map +2 -2
  208. package/dist/i18n/index.js +109 -0
  209. package/dist/i18n/index.js.map +7 -0
  210. package/dist/i18n/locales/en.js +347 -0
  211. package/dist/i18n/locales/en.js.map +7 -0
  212. package/dist/i18n/locales/index.js +7 -0
  213. package/dist/i18n/locales/index.js.map +7 -0
  214. package/dist/i18n/locales/zh-CN.js +347 -0
  215. package/dist/i18n/locales/zh-CN.js.map +7 -0
  216. package/dist/i18n/types.js +8 -0
  217. package/dist/i18n/types.js.map +7 -0
  218. package/dist/query.js +175 -17
  219. package/dist/query.js.map +3 -3
  220. package/dist/screens/REPL.js +501 -192
  221. package/dist/screens/REPL.js.map +3 -3
  222. package/dist/services/adapters/chatCompletions.js +3 -1
  223. package/dist/services/adapters/chatCompletions.js.map +2 -2
  224. package/dist/services/adapters/messageNormalizer.js +354 -0
  225. package/dist/services/adapters/messageNormalizer.js.map +7 -0
  226. package/dist/services/adapters/responsesAPI.js +6 -3
  227. package/dist/services/adapters/responsesAPI.js.map +2 -2
  228. package/dist/services/checkpointManager.js +386 -0
  229. package/dist/services/checkpointManager.js.map +7 -0
  230. package/dist/services/claude.js +138 -11
  231. package/dist/services/claude.js.map +3 -3
  232. package/dist/services/compressionService.js +50 -1
  233. package/dist/services/compressionService.js.map +2 -2
  234. package/dist/services/contextMonitor.js +162 -0
  235. package/dist/services/contextMonitor.js.map +7 -0
  236. package/dist/services/customCommands.js +60 -41
  237. package/dist/services/customCommands.js.map +2 -2
  238. package/dist/services/hookExecutor.js +173 -1
  239. package/dist/services/hookExecutor.js.map +2 -2
  240. package/dist/services/intelligentCompactor.js +281 -0
  241. package/dist/services/intelligentCompactor.js.map +7 -0
  242. package/dist/services/lspConfig.js +109 -0
  243. package/dist/services/lspConfig.js.map +7 -0
  244. package/dist/services/mcpClient.js +273 -34
  245. package/dist/services/mcpClient.js.map +2 -2
  246. package/dist/services/modelOrchestrator.js +310 -0
  247. package/dist/services/modelOrchestrator.js.map +7 -0
  248. package/dist/services/openai.js +8 -1
  249. package/dist/services/openai.js.map +2 -2
  250. package/dist/services/outputStyles.js +138 -0
  251. package/dist/services/outputStyles.js.map +7 -0
  252. package/dist/services/plugins/index.js +5 -0
  253. package/dist/services/plugins/index.js.map +7 -0
  254. package/dist/services/plugins/lspServers.js +188 -0
  255. package/dist/services/plugins/lspServers.js.map +7 -0
  256. package/dist/services/plugins/pluginRuntime.js +229 -0
  257. package/dist/services/plugins/pluginRuntime.js.map +7 -0
  258. package/dist/services/plugins/pluginValidation.js +219 -0
  259. package/dist/services/plugins/pluginValidation.js.map +7 -0
  260. package/dist/services/plugins/skillMarketplace.js +556 -0
  261. package/dist/services/plugins/skillMarketplace.js.map +7 -0
  262. package/dist/services/responseStateManager.js +37 -3
  263. package/dist/services/responseStateManager.js.map +2 -2
  264. package/dist/services/sandbox/filesystemBoundary.js +300 -0
  265. package/dist/services/sandbox/filesystemBoundary.js.map +7 -0
  266. package/dist/services/sandbox/index.js +14 -0
  267. package/dist/services/sandbox/index.js.map +7 -0
  268. package/dist/services/sandbox/networkProxy.js +293 -0
  269. package/dist/services/sandbox/networkProxy.js.map +7 -0
  270. package/dist/services/sandbox/sandboxController.js +574 -0
  271. package/dist/services/sandbox/sandboxController.js.map +7 -0
  272. package/dist/services/sandbox/types.js +50 -0
  273. package/dist/services/sandbox/types.js.map +7 -0
  274. package/dist/services/sessionMemory.js +266 -0
  275. package/dist/services/sessionMemory.js.map +7 -0
  276. package/dist/services/taskRouter.js +324 -0
  277. package/dist/services/taskRouter.js.map +7 -0
  278. package/dist/tools/ArchitectTool/ArchitectTool.js +10 -3
  279. package/dist/tools/ArchitectTool/ArchitectTool.js.map +2 -2
  280. package/dist/tools/AskExpertModelTool/AskExpertModelTool.js +3 -0
  281. package/dist/tools/AskExpertModelTool/AskExpertModelTool.js.map +2 -2
  282. package/dist/tools/AskUserQuestionTool/AskUserQuestionTool.js +8 -1
  283. package/dist/tools/AskUserQuestionTool/AskUserQuestionTool.js.map +2 -2
  284. package/dist/tools/BaseTool.js +72 -0
  285. package/dist/tools/BaseTool.js.map +7 -0
  286. package/dist/tools/BashOutputTool/BashOutputToolResultMessage.js +3 -0
  287. package/dist/tools/BashOutputTool/BashOutputToolResultMessage.js.map +2 -2
  288. package/dist/tools/BashTool/BashTool.js +60 -3
  289. package/dist/tools/BashTool/BashTool.js.map +2 -2
  290. package/dist/tools/BashTool/BashToolResultMessage.js +3 -0
  291. package/dist/tools/BashTool/BashToolResultMessage.js.map +2 -2
  292. package/dist/tools/BashTool/OutputLine.js +54 -0
  293. package/dist/tools/BashTool/OutputLine.js.map +2 -2
  294. package/dist/tools/BashTool/prompt.js +192 -3
  295. package/dist/tools/BashTool/prompt.js.map +2 -2
  296. package/dist/tools/FileEditTool/FileEditTool.js +29 -4
  297. package/dist/tools/FileEditTool/FileEditTool.js.map +2 -2
  298. package/dist/tools/FileReadTool/FileReadTool.js +23 -4
  299. package/dist/tools/FileReadTool/FileReadTool.js.map +2 -2
  300. package/dist/tools/FileWriteTool/FileWriteTool.js +5 -5
  301. package/dist/tools/FileWriteTool/FileWriteTool.js.map +2 -2
  302. package/dist/tools/GlobTool/GlobTool.js +14 -3
  303. package/dist/tools/GlobTool/GlobTool.js.map +2 -2
  304. package/dist/tools/GrepTool/GrepTool.js +41 -7
  305. package/dist/tools/GrepTool/GrepTool.js.map +2 -2
  306. package/dist/tools/KillShellTool/KillShellToolResultMessage.js +3 -0
  307. package/dist/tools/KillShellTool/KillShellToolResultMessage.js.map +2 -2
  308. package/dist/tools/ListMcpResourcesTool/ListMcpResourcesTool.js +109 -0
  309. package/dist/tools/ListMcpResourcesTool/ListMcpResourcesTool.js.map +7 -0
  310. package/dist/tools/ListMcpResourcesTool/prompt.js +19 -0
  311. package/dist/tools/ListMcpResourcesTool/prompt.js.map +7 -0
  312. package/dist/tools/LspTool/LspTool.js +664 -0
  313. package/dist/tools/LspTool/LspTool.js.map +7 -0
  314. package/dist/tools/LspTool/prompt.js +27 -0
  315. package/dist/tools/LspTool/prompt.js.map +7 -0
  316. package/dist/tools/MCPTool/MCPTool.js +11 -4
  317. package/dist/tools/MCPTool/MCPTool.js.map +2 -2
  318. package/dist/tools/MemoryReadTool/MemoryReadTool.js +19 -6
  319. package/dist/tools/MemoryReadTool/MemoryReadTool.js.map +2 -2
  320. package/dist/tools/MemoryWriteTool/MemoryWriteTool.js +6 -6
  321. package/dist/tools/MemoryWriteTool/MemoryWriteTool.js.map +2 -2
  322. package/dist/tools/MultiEditTool/MultiEditTool.js +19 -2
  323. package/dist/tools/MultiEditTool/MultiEditTool.js.map +2 -2
  324. package/dist/tools/NotebookEditTool/NotebookEditTool.js +5 -1
  325. package/dist/tools/NotebookEditTool/NotebookEditTool.js.map +2 -2
  326. package/dist/tools/NotebookReadTool/NotebookReadTool.js +8 -4
  327. package/dist/tools/NotebookReadTool/NotebookReadTool.js.map +2 -2
  328. package/dist/tools/PlanModeTool/EnterPlanModeTool.js +74 -0
  329. package/dist/tools/PlanModeTool/EnterPlanModeTool.js.map +7 -0
  330. package/dist/tools/PlanModeTool/ExitPlanModeTool.js +108 -0
  331. package/dist/tools/PlanModeTool/ExitPlanModeTool.js.map +7 -0
  332. package/dist/tools/PlanModeTool/prompt.js +94 -0
  333. package/dist/tools/PlanModeTool/prompt.js.map +7 -0
  334. package/dist/tools/ReadMcpResourceTool/ReadMcpResourceTool.js +130 -0
  335. package/dist/tools/ReadMcpResourceTool/ReadMcpResourceTool.js.map +7 -0
  336. package/dist/tools/ReadMcpResourceTool/prompt.js +17 -0
  337. package/dist/tools/ReadMcpResourceTool/prompt.js.map +7 -0
  338. package/dist/tools/SkillTool/SkillTool.js +14 -3
  339. package/dist/tools/SkillTool/SkillTool.js.map +2 -2
  340. package/dist/tools/SlashCommandTool/SlashCommandTool.js +260 -0
  341. package/dist/tools/SlashCommandTool/SlashCommandTool.js.map +7 -0
  342. package/dist/tools/SlashCommandTool/prompt.js +35 -0
  343. package/dist/tools/SlashCommandTool/prompt.js.map +7 -0
  344. package/dist/tools/TaskOutputTool/TaskOutputTool.js +189 -0
  345. package/dist/tools/TaskOutputTool/TaskOutputTool.js.map +7 -0
  346. package/dist/tools/TaskOutputTool/prompt.js +15 -0
  347. package/dist/tools/TaskOutputTool/prompt.js.map +7 -0
  348. package/dist/tools/TaskTool/TaskTool.js +321 -146
  349. package/dist/tools/TaskTool/TaskTool.js.map +2 -2
  350. package/dist/tools/TaskTool/prompt.js.map +2 -2
  351. package/dist/tools/TodoWriteTool/TodoWriteTool.js +42 -73
  352. package/dist/tools/TodoWriteTool/TodoWriteTool.js.map +2 -2
  353. package/dist/tools/URLFetcherTool/URLFetcherTool.js +7 -1
  354. package/dist/tools/URLFetcherTool/URLFetcherTool.js.map +2 -2
  355. package/dist/tools/URLFetcherTool/cache.js +55 -8
  356. package/dist/tools/URLFetcherTool/cache.js.map +2 -2
  357. package/dist/tools/WebSearchTool/WebSearchTool.js +6 -1
  358. package/dist/tools/WebSearchTool/WebSearchTool.js.map +2 -2
  359. package/dist/tools.js +31 -2
  360. package/dist/tools.js.map +2 -2
  361. package/dist/types/hooks.js +4 -0
  362. package/dist/types/hooks.js.map +2 -2
  363. package/dist/types/marketplace.js.map +2 -2
  364. package/dist/types/messageGroup.js +36 -0
  365. package/dist/types/messageGroup.js.map +7 -0
  366. package/dist/types/plugin.js.map +2 -2
  367. package/dist/types/thinking.js +1 -0
  368. package/dist/types/thinking.js.map +7 -0
  369. package/dist/utils/BackgroundShellManager.js +136 -39
  370. package/dist/utils/BackgroundShellManager.js.map +2 -2
  371. package/dist/utils/MessageBatchBuffer.js +102 -0
  372. package/dist/utils/MessageBatchBuffer.js.map +7 -0
  373. package/dist/utils/PersistentShell.js +151 -1
  374. package/dist/utils/PersistentShell.js.map +2 -2
  375. package/dist/utils/agentLoader.js +1 -23
  376. package/dist/utils/agentLoader.js.map +2 -2
  377. package/dist/utils/agentTranscripts.js +641 -0
  378. package/dist/utils/agentTranscripts.js.map +7 -0
  379. package/dist/utils/animationManager.js +213 -0
  380. package/dist/utils/animationManager.js.map +7 -0
  381. package/dist/utils/animationSync.js +110 -0
  382. package/dist/utils/animationSync.js.map +7 -0
  383. package/dist/utils/asyncFile.js +215 -0
  384. package/dist/utils/asyncFile.js.map +7 -0
  385. package/dist/utils/backgroundAgentManager.js +231 -0
  386. package/dist/utils/backgroundAgentManager.js.map +7 -0
  387. package/dist/utils/config.js +63 -7
  388. package/dist/utils/config.js.map +2 -2
  389. package/dist/utils/conversationRecovery.js +19 -0
  390. package/dist/utils/conversationRecovery.js.map +2 -2
  391. package/dist/utils/exit.js +73 -0
  392. package/dist/utils/exit.js.map +7 -0
  393. package/dist/utils/format.js +73 -5
  394. package/dist/utils/format.js.map +2 -2
  395. package/dist/utils/generators.js +76 -6
  396. package/dist/utils/generators.js.map +2 -2
  397. package/dist/utils/globalErrorHandler.js +149 -0
  398. package/dist/utils/globalErrorHandler.js.map +7 -0
  399. package/dist/utils/groupHandlers/index.js +8 -0
  400. package/dist/utils/groupHandlers/index.js.map +7 -0
  401. package/dist/utils/groupHandlers/parallelTasksHandler.js +140 -0
  402. package/dist/utils/groupHandlers/parallelTasksHandler.js.map +7 -0
  403. package/dist/utils/groupHandlers/taskHandler.js +104 -0
  404. package/dist/utils/groupHandlers/taskHandler.js.map +7 -0
  405. package/dist/utils/groupHandlers/types.js +1 -0
  406. package/dist/utils/groupHandlers/types.js.map +7 -0
  407. package/dist/utils/logRotation.js +224 -0
  408. package/dist/utils/logRotation.js.map +7 -0
  409. package/dist/utils/marketplaceManager.js +3 -5
  410. package/dist/utils/marketplaceManager.js.map +2 -2
  411. package/dist/utils/memSafety.js +264 -0
  412. package/dist/utils/memSafety.js.map +7 -0
  413. package/dist/utils/messageGroupManager.js +274 -0
  414. package/dist/utils/messageGroupManager.js.map +7 -0
  415. package/dist/utils/messages.js +13 -4
  416. package/dist/utils/messages.js.map +2 -2
  417. package/dist/utils/model.js +119 -15
  418. package/dist/utils/model.js.map +3 -3
  419. package/dist/utils/permissions/filesystem.js +157 -5
  420. package/dist/utils/permissions/filesystem.js.map +2 -2
  421. package/dist/utils/plan/planMode.js +143 -0
  422. package/dist/utils/plan/planMode.js.map +7 -0
  423. package/dist/utils/pluginLoader.js +17 -21
  424. package/dist/utils/pluginLoader.js.map +2 -2
  425. package/dist/utils/ripgrep.js +55 -2
  426. package/dist/utils/ripgrep.js.map +2 -2
  427. package/dist/utils/sanitizeInput.js +32 -0
  428. package/dist/utils/sanitizeInput.js.map +7 -0
  429. package/dist/utils/secureKeyStorage.js +312 -0
  430. package/dist/utils/secureKeyStorage.js.map +7 -0
  431. package/dist/utils/session/sessionPlugins.js +67 -0
  432. package/dist/utils/session/sessionPlugins.js.map +7 -0
  433. package/dist/utils/taskDisplayUtils.js +257 -0
  434. package/dist/utils/taskDisplayUtils.js.map +7 -0
  435. package/dist/utils/teamConfig.js +2 -1
  436. package/dist/utils/teamConfig.js.map +2 -2
  437. package/dist/utils/todoStorage.js +92 -2
  438. package/dist/utils/todoStorage.js.map +2 -2
  439. package/dist/utils/toolTimeout.js +136 -0
  440. package/dist/utils/toolTimeout.js.map +7 -0
  441. package/dist/utils/tooling/safeRender.js +115 -0
  442. package/dist/utils/tooling/safeRender.js.map +7 -0
  443. package/dist/utils/userFriendlyError.js +346 -0
  444. package/dist/utils/userFriendlyError.js.map +7 -0
  445. package/dist/utils/vendor/ripgrep/arm64-darwin/rg +0 -0
  446. package/dist/version.js +2 -2
  447. package/dist/version.js.map +1 -1
  448. package/package.json +14 -4
  449. package/scripts/postinstall.js +128 -38
  450. package/dist/commands/agents.js +0 -2086
  451. package/dist/commands/agents.js.map +0 -7
  452. package/dist/commands/build.js +0 -74
  453. package/dist/commands/build.js.map +0 -7
  454. package/dist/commands/compression.js +0 -57
  455. package/dist/commands/compression.js.map +0 -7
  456. package/dist/commands/listen.js +0 -37
  457. package/dist/commands/listen.js.map +0 -7
  458. package/dist/commands/login.js +0 -37
  459. package/dist/commands/login.js.map +0 -7
  460. package/dist/commands/logout.js +0 -33
  461. package/dist/commands/logout.js.map +0 -7
  462. package/dist/commands/mcp.js +0 -40
  463. package/dist/commands/mcp.js.map +0 -7
  464. package/dist/commands/mcp_refresh.js +0 -40
  465. package/dist/commands/mcp_refresh.js.map +0 -7
  466. package/dist/commands/modelstatus.js +0 -21
  467. package/dist/commands/modelstatus.js.map +0 -7
  468. package/dist/commands/onboarding.js +0 -36
  469. package/dist/commands/onboarding.js.map +0 -7
  470. package/dist/commands/plugin-interactive.js +0 -446
  471. package/dist/commands/plugin-interactive.js.map +0 -7
  472. package/dist/commands/pr_comments.js +0 -61
  473. package/dist/commands/pr_comments.js.map +0 -7
  474. package/dist/commands/release-notes.js +0 -30
  475. package/dist/commands/release-notes.js.map +0 -7
  476. package/dist/commands/review.js +0 -51
  477. package/dist/commands/review.js.map +0 -7
  478. package/dist/components/Bug.js +0 -147
  479. package/dist/components/Bug.js.map +0 -7
  480. package/dist/components/ModelSelector.js +0 -2062
  481. package/dist/components/ModelSelector.js.map +0 -7
  482. package/dist/components/ModelStatusDisplay.js +0 -87
  483. package/dist/components/ModelStatusDisplay.js.map +0 -7
  484. package/dist/entrypoints/cli-wrapper.js +0 -61
  485. package/dist/entrypoints/cli-wrapper.js.map +0 -7
  486. package/dist/screens/Doctor.js +0 -22
  487. package/dist/screens/Doctor.js.map +0 -7
@@ -40,6 +40,49 @@ const MINTO_COLORS = {
40
40
  /** TODO 面板主色 */
41
41
  TODO_MAIN: "#D4BBFF"
42
42
  };
43
+ const SEMANTIC_COLORS = {
44
+ /** 品牌色 - Logo、欢迎信息 */
45
+ brand: "#FFC233",
46
+ /** 主要文本 - 用户输入、AI 输出 */
47
+ primary: "#FFFFFF",
48
+ /** 核心信息 - 工具名称、操作类型 */
49
+ secondary: "#CCCCCC",
50
+ /** 辅助信息 - 参数、路径 */
51
+ dim: "#888888",
52
+ /** 元信息 - 耗时、模型、时间 */
53
+ muted: "#555555",
54
+ /** 进行中状态 */
55
+ running: "#FFC107",
56
+ /** 成功状态 */
57
+ success: "#4EBA65",
58
+ /** 错误状态 */
59
+ error: "#FF6B80",
60
+ /** 信息提示 */
61
+ info: "#5DADE2"
62
+ };
63
+ function getSemanticColor(color) {
64
+ return SEMANTIC_COLORS[color];
65
+ }
66
+ const VALUE_TIER_COLORS = {
67
+ /** 核心信息 - 用户必须关注 */
68
+ core: SEMANTIC_COLORS.secondary,
69
+ /** 辅助信息 - 帮助理解上下文 */
70
+ auxiliary: SEMANTIC_COLORS.dim,
71
+ /** 元信息 - 可选参考 */
72
+ meta: SEMANTIC_COLORS.muted
73
+ };
74
+ const STATUS_COLORS = {
75
+ running: SEMANTIC_COLORS.running,
76
+ pending: SEMANTIC_COLORS.dim,
77
+ success: SEMANTIC_COLORS.success,
78
+ completed: SEMANTIC_COLORS.success,
79
+ error: SEMANTIC_COLORS.error,
80
+ failed: SEMANTIC_COLORS.error,
81
+ done: SEMANTIC_COLORS.success
82
+ };
83
+ function getStatusColorHex(status) {
84
+ return STATUS_COLORS[status] || SEMANTIC_COLORS.dim;
85
+ }
43
86
  const CLAUDE_COLORS = {
44
87
  ...TEXT_COLORS,
45
88
  ...FUNCTIONAL_COLORS,
@@ -118,9 +161,14 @@ export {
118
161
  CLAUDE_COLORS,
119
162
  FUNCTIONAL_COLORS,
120
163
  MINTO_COLORS,
164
+ SEMANTIC_COLORS,
165
+ STATUS_COLORS,
121
166
  TEXT_COLORS,
167
+ VALUE_TIER_COLORS,
122
168
  getAgentColor,
123
169
  getContrastTextColor,
170
+ getSemanticColor,
171
+ getStatusColorHex,
124
172
  recommendColorForAgent
125
173
  };
126
174
  //# sourceMappingURL=colors.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/colors.ts"],
4
- "sourcesContent": ["/**\n * Minto \u914D\u8272\u7CFB\u7EDF - Claude Code CLI \u98CE\u683C\n *\n * \u57FA\u4E8E 24-bit True Color\uFF0C\u63D0\u4F9B\u6E05\u6670\u7684\u4FE1\u606F\u5C42\u7EA7\u548C\u529F\u80FD\u72B6\u6001\u7684\u89C6\u89C9\u533A\u5206\n *\n * \u5305\u542B\uFF1A\n * 1. \u6587\u672C\u524D\u666F\u8272 - 4\u7EA7\u7070\u5EA6\u5C42\u7EA7\n * 2. \u529F\u80FD\u5F3A\u8C03\u8272 - \u72B6\u6001\u548C\u64CD\u4F5C\n * 3. \u80CC\u666F\u8272 - \u89C6\u89C9\u5206\u5272\n * 4. Agent \u989C\u8272\u7CFB\u7EDF - \u591A Agent \u53EF\u89C6\u5316\n */\n\nimport type { getTheme } from '@utils/theme'\n\n// ============================================================================\n// Claude Code CLI \u98CE\u683C\u914D\u8272\u7CFB\u7EDF\n// ============================================================================\n\n/**\n * \u6587\u672C\u524D\u666F\u8272 - \u901A\u8FC7\u4EAE\u5EA6\u5DEE\u5F02\u533A\u5206\u4FE1\u606F\u4E3B\u6B21\u5C42\u7EA7\n */\nexport const TEXT_COLORS = {\n /** \u4E3B\u8981\u6587\u672C - \u7528\u6237\u8F93\u5165\u3001AI \u6700\u7EC8\u56DE\u7B54 (#FFFFFF) */\n PRIMARY: '#FFFFFF',\n\n /** \u6B21\u8981\u6587\u672C - \u9875\u7709\u4FE1\u606F\u3001\u666E\u901A\u63D0\u793A (#CCCCCC) */\n SECONDARY: '#CCCCCC',\n\n /** \u6697\u6DE1\u6587\u672C - \u601D\u8003\u8FC7\u7A0B\u3001\u52A0\u8F7D\u72B6\u6001\u3001\u5FEB\u6377\u952E\u63D0\u793A (#888888) */\n DIMMED: '#888888',\n\n /** \u6781\u6697\u6587\u672C - \u65F6\u95F4\u6233\u3001\u6781\u6B21\u8981\u5143\u6570\u636E (#555555) */\n MUTED: '#555555',\n} as const\n\n/**\n * \u529F\u80FD\u5F3A\u8C03\u8272 - \u4F20\u8FBE\u72B6\u6001\u3001\u8EAB\u4EFD\u548C\u5173\u952E\u64CD\u4F5C\n */\nexport const FUNCTIONAL_COLORS = {\n /** \u54C1\u724C\u5F3A\u8C03\u8272 - Claude \u6807\u8BB0\u3001\u7279\u6B8A\u63D0\u793A\u7B26 (#D4BBFF \u85B0\u8863\u8349\u7D2B) */\n BRAND: '#D4BBFF',\n\n /** \u6210\u529F/\u65B0\u589E - Diff \u65B0\u589E\u884C\u3001\u6210\u529F\u6D88\u606F (#3DDC84 \u9C9C\u7EFF) */\n SUCCESS: '#3DDC84',\n\n /** \u9519\u8BEF/\u5220\u9664 - Diff \u5220\u9664\u884C\u3001\u9519\u8BEF\u6D88\u606F (#FF5555 \u9C9C\u7EA2) */\n ERROR: '#FF5555',\n\n /** \u8B66\u544A/\u786E\u8BA4 - \u786E\u8BA4\u63D0\u793A\u3001\u8B66\u544A\u4FE1\u606F (#FFB86C \u6A59\u9EC4) */\n WARNING: '#FFB86C',\n\n /** \u94FE\u63A5/\u4FE1\u606F - URL\u3001\u4FE1\u606F\u63D0\u793A (#58A6FF \u5929\u84DD) */\n INFO: '#58A6FF',\n} as const\n\n/**\n * \u80CC\u666F\u8272 - \u7528\u4E8E\u89C6\u89C9\u5206\u5272\u548C\u5185\u5BB9\u51F8\u663E\n */\nexport const BACKGROUND_COLORS = {\n /** \u9875\u7709\u80CC\u666F - \u9876\u90E8\u56FA\u5B9A\u72B6\u6001\u680F (#2E2E3E \u6DF1\u84DD\u7D2B\u77F3\u677F\u7070) */\n HEADER: '#2E2E3E',\n\n /** \u4EE3\u7801\u5757\u80CC\u666F - Markdown \u4EE3\u7801\u7247\u6BB5 (#1E1E1E \u6BD4\u7EAF\u9ED1\u7A0D\u4EAE) */\n CODE_BLOCK: '#1E1E1E',\n\n /** \u9009\u4E2D\u6001 - \u5217\u8868\u9879\u9AD8\u4EAE (#3C3C3C) */\n SELECTION: '#3C3C3C',\n\n /** \u7EC8\u7AEF\u9ED8\u8BA4\u80CC\u666F - \u900F\u660E\uFF0C\u4F9D\u8D56\u7528\u6237\u7EC8\u7AEF\u8BBE\u7F6E */\n TRANSPARENT: 'transparent',\n} as const\n\n/**\n * Minto \u7279\u8272\u529F\u80FD\u7684\u989D\u5916\u914D\u8272\n */\nexport const MINTO_COLORS = {\n /** Bash \u6A21\u5F0F\u8FB9\u6846 */\n BASH_BORDER: '#FFB86C',\n\n /** Koding \u6A21\u5F0F\u8FB9\u6846 (\u7B14\u8BB0\u6A21\u5F0F) */\n KODING_BORDER: '#58A6FF',\n\n /** Subagent \u8FDB\u5EA6\u6761 */\n SUBAGENT_PROGRESS: '#3DDC84',\n\n /** TODO \u9762\u677F\u4E3B\u8272 */\n TODO_MAIN: '#D4BBFF',\n} as const\n\n/**\n * \u7EDF\u4E00\u7684\u914D\u8272\u5BFC\u51FA\n */\nexport const CLAUDE_COLORS = {\n ...TEXT_COLORS,\n ...FUNCTIONAL_COLORS,\n ...BACKGROUND_COLORS,\n ...MINTO_COLORS,\n} as const\n\n// ============================================================================\n// Agent \u989C\u8272\u7CFB\u7EDF\n// ============================================================================\n\n/**\n * \u652F\u6301\u7684\u989C\u8272\u5173\u952E\u5B57\u4E0E\u7EC8\u7AEF\u663E\u793A\u6548\u679C\uFF1A\n * - red: \u4EAE\u7EA2\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u4EE3\u7801\u5BA1\u67E5/\u5B89\u5168\u5BA1\u8BA1\n * - blue: \u6DF1\u84DD\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u901A\u7528\u5F00\u53D1\n * - green: \u58A8\u7EFF\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6D4B\u8BD5/CI\n * - yellow: \u4EAE\u9EC4\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6570\u636E\u79D1\u5B66\n * - purple: \u7D2B\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u63A2\u7D22/\u8C03\u7814\n * - orange: \u6A59\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6784\u5EFA/\u90E8\u7F72\n * - pink: \u7C89\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6587\u6863/\u6587\u6848\n * - cyan: \u9752\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u8C03\u8BD5/\u8BCA\u65AD\n * - auto: \u7CFB\u7EDF\u9ED8\u8BA4\uFF0C\u4F7F\u7528\u4E3B\u9898\u8272\n */\n\n/**\n * Agent \u989C\u8272\u7C7B\u578B\u5B9A\u4E49\n */\nexport type AgentColor =\n | 'red'\n | 'blue'\n | 'green'\n | 'yellow'\n | 'purple'\n | 'orange'\n | 'pink'\n | 'cyan'\n | 'auto'\n\n/**\n * Agent \u989C\u8272\u6620\u5C04\u8868\uFF08Hex \u683C\u5F0F\uFF09\n */\nexport const AGENT_COLORS: Record<AgentColor, string> = {\n red: '#FF5555', // \u4EAE\u7EA2\u8272\n blue: '#5555FF', // \u6DF1\u84DD\u8272\n green: '#55FF55', // \u58A8\u7EFF\u8272\n yellow: '#FFFF55', // \u4EAE\u9EC4\u8272\n purple: '#FF55FF', // \u7D2B\u8272\n orange: '#FFA500', // \u6A59\u8272\n pink: '#FFB6C1', // \u7C89\u8272\n cyan: '#00FFFF', // \u9752\u8272\n auto: '#FFFFFF', // \u9ED8\u8BA4\u767D\u8272\n} as const\n\n/**\n * Agent \u989C\u8272\u63A8\u8350\u573A\u666F\n */\nexport const AGENT_COLOR_RECOMMENDATIONS: Record<AgentColor, string[]> = {\n red: ['\u4EE3\u7801\u5BA1\u67E5', '\u5B89\u5168\u5BA1\u8BA1', 'code-reviewer', 'security-auditor'],\n blue: [\n '\u901A\u7528\u5F00\u53D1',\n 'general-purpose',\n 'backend-developer',\n 'frontend-developer',\n ],\n green: ['\u6D4B\u8BD5', 'CI', 'test-automator', 'unit-test-builder'],\n yellow: ['\u6570\u636E\u79D1\u5B66', 'data-scientist', 'data-engineer', 'ml-engineer'],\n purple: ['\u63A2\u7D22', '\u8C03\u7814', 'research-expert', 'explorer'],\n orange: ['\u6784\u5EFA', '\u90E8\u7F72', 'deployment-engineer', 'devops-automator'],\n pink: ['\u6587\u6863', '\u6587\u6848', 'content-writer', 'docs-architect'],\n cyan: ['\u8C03\u8BD5', '\u8BCA\u65AD', 'debugger', 'performance-engineer'],\n auto: ['\u9ED8\u8BA4'],\n}\n\n/**\n * \u83B7\u53D6 Agent \u989C\u8272\n *\n * @param color - Agent \u914D\u7F6E\u4E2D\u7684\u989C\u8272\u5B57\u6BB5\n * @param theme - \u5F53\u524D\u4E3B\u9898\n * @returns \u6700\u7EC8\u4F7F\u7528\u7684\u989C\u8272 Hex \u503C\n */\nexport function getAgentColor(\n color: string | undefined,\n theme: ReturnType<typeof getTheme>,\n): string {\n // \u5982\u679C\u6CA1\u6709\u914D\u7F6E\u989C\u8272\u6216\u914D\u7F6E\u4E3A auto\uFF0C\u4F7F\u7528\u4E3B\u9898\u9ED8\u8BA4\u8272\n if (!color || color === 'auto') {\n return theme.minto\n }\n\n // \u68C0\u67E5\u662F\u5426\u4E3A\u6709\u6548\u7684\u989C\u8272\u5173\u952E\u5B57\n const normalizedColor = color.toLowerCase() as AgentColor\n if (normalizedColor in AGENT_COLORS) {\n return AGENT_COLORS[normalizedColor]\n }\n\n // \u5982\u679C\u989C\u8272\u5173\u952E\u5B57\u65E0\u6548\uFF0C\u56DE\u9000\u5230\u4E3B\u9898\u8272\n return theme.minto\n}\n\n/**\n * \u6839\u636E Agent \u7C7B\u578B\u63A8\u8350\u989C\u8272\n *\n * @param agentType - Agent \u7C7B\u578B\u540D\u79F0\n * @returns \u63A8\u8350\u7684\u989C\u8272\u5173\u952E\u5B57\n */\nexport function recommendColorForAgent(agentType: string): AgentColor {\n const lowerType = agentType.toLowerCase()\n\n for (const [color, keywords] of Object.entries(AGENT_COLOR_RECOMMENDATIONS)) {\n for (const keyword of keywords) {\n if (lowerType.includes(keyword.toLowerCase())) {\n return color as AgentColor\n }\n }\n }\n\n return 'auto'\n}\n\n/**\n * \u83B7\u53D6\u989C\u8272\u7684\u5BF9\u6BD4\u6587\u672C\u989C\u8272\uFF08\u786E\u4FDD\u53EF\u8BFB\u6027\uFF09\n *\n * @param backgroundColor - \u80CC\u666F\u989C\u8272 Hex \u503C\n * @returns 'black' \u6216 'white'\n */\nexport function getContrastTextColor(\n backgroundColor: string,\n): 'black' | 'white' {\n // \u79FB\u9664 # \u524D\u7F00\n const hex = backgroundColor.replace('#', '')\n\n // \u8F6C\u6362\u4E3A RGB\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n // \u8BA1\u7B97\u4EAE\u5EA6\uFF08YIQ \u516C\u5F0F\uFF09\n const yiq = (r * 299 + g * 587 + b * 114) / 1000\n\n // \u4EAE\u5EA6\u5927\u4E8E 128 \u65F6\u4F7F\u7528\u9ED1\u8272\u6587\u5B57\uFF0C\u5426\u5219\u4F7F\u7528\u767D\u8272\n return yiq >= 128 ? 'black' : 'white'\n}\n"],
5
- "mappings": "AAqBO,MAAM,cAAc;AAAA;AAAA,EAEzB,SAAS;AAAA;AAAA,EAGT,WAAW;AAAA;AAAA,EAGX,QAAQ;AAAA;AAAA,EAGR,OAAO;AACT;AAKO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,OAAO;AAAA;AAAA,EAGP,SAAS;AAAA;AAAA,EAGT,OAAO;AAAA;AAAA,EAGP,SAAS;AAAA;AAAA,EAGT,MAAM;AACR;AAKO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,QAAQ;AAAA;AAAA,EAGR,YAAY;AAAA;AAAA,EAGZ,WAAW;AAAA;AAAA,EAGX,aAAa;AACf;AAKO,MAAM,eAAe;AAAA;AAAA,EAE1B,aAAa;AAAA;AAAA,EAGb,eAAe;AAAA;AAAA,EAGf,mBAAmB;AAAA;AAAA,EAGnB,WAAW;AACb;AAKO,MAAM,gBAAgB;AAAA,EAC3B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAoCO,MAAM,eAA2C;AAAA,EACtD,KAAK;AAAA;AAAA,EACL,MAAM;AAAA;AAAA,EACN,OAAO;AAAA;AAAA,EACP,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AACR;AAKO,MAAM,8BAA4D;AAAA,EACvE,KAAK,CAAC,4BAAQ,4BAAQ,iBAAiB,kBAAkB;AAAA,EACzD,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO,CAAC,gBAAM,MAAM,kBAAkB,mBAAmB;AAAA,EACzD,QAAQ,CAAC,4BAAQ,kBAAkB,iBAAiB,aAAa;AAAA,EACjE,QAAQ,CAAC,gBAAM,gBAAM,mBAAmB,UAAU;AAAA,EAClD,QAAQ,CAAC,gBAAM,gBAAM,uBAAuB,kBAAkB;AAAA,EAC9D,MAAM,CAAC,gBAAM,gBAAM,kBAAkB,gBAAgB;AAAA,EACrD,MAAM,CAAC,gBAAM,gBAAM,YAAY,sBAAsB;AAAA,EACrD,MAAM,CAAC,cAAI;AACb;AASO,SAAS,cACd,OACA,OACQ;AAER,MAAI,CAAC,SAAS,UAAU,QAAQ;AAC9B,WAAO,MAAM;AAAA,EACf;AAGA,QAAM,kBAAkB,MAAM,YAAY;AAC1C,MAAI,mBAAmB,cAAc;AACnC,WAAO,aAAa,eAAe;AAAA,EACrC;AAGA,SAAO,MAAM;AACf;AAQO,SAAS,uBAAuB,WAA+B;AACpE,QAAM,YAAY,UAAU,YAAY;AAExC,aAAW,CAAC,OAAO,QAAQ,KAAK,OAAO,QAAQ,2BAA2B,GAAG;AAC3E,eAAW,WAAW,UAAU;AAC9B,UAAI,UAAU,SAAS,QAAQ,YAAY,CAAC,GAAG;AAC7C,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAQO,SAAS,qBACd,iBACmB;AAEnB,QAAM,MAAM,gBAAgB,QAAQ,KAAK,EAAE;AAG3C,QAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;AAC1C,QAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;AAC1C,QAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;AAG1C,QAAM,OAAO,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO;AAG5C,SAAO,OAAO,MAAM,UAAU;AAChC;",
4
+ "sourcesContent": ["/**\n * Minto \u914D\u8272\u7CFB\u7EDF - Claude Code CLI \u98CE\u683C\n *\n * \u57FA\u4E8E 24-bit True Color\uFF0C\u63D0\u4F9B\u6E05\u6670\u7684\u4FE1\u606F\u5C42\u7EA7\u548C\u529F\u80FD\u72B6\u6001\u7684\u89C6\u89C9\u533A\u5206\n *\n * \u5305\u542B\uFF1A\n * 1. \u6587\u672C\u524D\u666F\u8272 - 4\u7EA7\u7070\u5EA6\u5C42\u7EA7\n * 2. \u529F\u80FD\u5F3A\u8C03\u8272 - \u72B6\u6001\u548C\u64CD\u4F5C\n * 3. \u80CC\u666F\u8272 - \u89C6\u89C9\u5206\u5272\n * 4. Agent \u989C\u8272\u7CFB\u7EDF - \u591A Agent \u53EF\u89C6\u5316\n */\n\nimport type { getTheme } from '@utils/theme'\n\n// ============================================================================\n// Claude Code CLI \u98CE\u683C\u914D\u8272\u7CFB\u7EDF\n// ============================================================================\n\n/**\n * \u6587\u672C\u524D\u666F\u8272 - \u901A\u8FC7\u4EAE\u5EA6\u5DEE\u5F02\u533A\u5206\u4FE1\u606F\u4E3B\u6B21\u5C42\u7EA7\n */\nexport const TEXT_COLORS = {\n /** \u4E3B\u8981\u6587\u672C - \u7528\u6237\u8F93\u5165\u3001AI \u6700\u7EC8\u56DE\u7B54 (#FFFFFF) */\n PRIMARY: '#FFFFFF',\n\n /** \u6B21\u8981\u6587\u672C - \u9875\u7709\u4FE1\u606F\u3001\u666E\u901A\u63D0\u793A (#CCCCCC) */\n SECONDARY: '#CCCCCC',\n\n /** \u6697\u6DE1\u6587\u672C - \u601D\u8003\u8FC7\u7A0B\u3001\u52A0\u8F7D\u72B6\u6001\u3001\u5FEB\u6377\u952E\u63D0\u793A (#888888) */\n DIMMED: '#888888',\n\n /** \u6781\u6697\u6587\u672C - \u65F6\u95F4\u6233\u3001\u6781\u6B21\u8981\u5143\u6570\u636E (#555555) */\n MUTED: '#555555',\n} as const\n\n/**\n * \u529F\u80FD\u5F3A\u8C03\u8272 - \u4F20\u8FBE\u72B6\u6001\u3001\u8EAB\u4EFD\u548C\u5173\u952E\u64CD\u4F5C\n */\nexport const FUNCTIONAL_COLORS = {\n /** \u54C1\u724C\u5F3A\u8C03\u8272 - Claude \u6807\u8BB0\u3001\u7279\u6B8A\u63D0\u793A\u7B26 (#D4BBFF \u85B0\u8863\u8349\u7D2B) */\n BRAND: '#D4BBFF',\n\n /** \u6210\u529F/\u65B0\u589E - Diff \u65B0\u589E\u884C\u3001\u6210\u529F\u6D88\u606F (#3DDC84 \u9C9C\u7EFF) */\n SUCCESS: '#3DDC84',\n\n /** \u9519\u8BEF/\u5220\u9664 - Diff \u5220\u9664\u884C\u3001\u9519\u8BEF\u6D88\u606F (#FF5555 \u9C9C\u7EA2) */\n ERROR: '#FF5555',\n\n /** \u8B66\u544A/\u786E\u8BA4 - \u786E\u8BA4\u63D0\u793A\u3001\u8B66\u544A\u4FE1\u606F (#FFB86C \u6A59\u9EC4) */\n WARNING: '#FFB86C',\n\n /** \u94FE\u63A5/\u4FE1\u606F - URL\u3001\u4FE1\u606F\u63D0\u793A (#58A6FF \u5929\u84DD) */\n INFO: '#58A6FF',\n} as const\n\n/**\n * \u80CC\u666F\u8272 - \u7528\u4E8E\u89C6\u89C9\u5206\u5272\u548C\u5185\u5BB9\u51F8\u663E\n */\nexport const BACKGROUND_COLORS = {\n /** \u9875\u7709\u80CC\u666F - \u9876\u90E8\u56FA\u5B9A\u72B6\u6001\u680F (#2E2E3E \u6DF1\u84DD\u7D2B\u77F3\u677F\u7070) */\n HEADER: '#2E2E3E',\n\n /** \u4EE3\u7801\u5757\u80CC\u666F - Markdown \u4EE3\u7801\u7247\u6BB5 (#1E1E1E \u6BD4\u7EAF\u9ED1\u7A0D\u4EAE) */\n CODE_BLOCK: '#1E1E1E',\n\n /** \u9009\u4E2D\u6001 - \u5217\u8868\u9879\u9AD8\u4EAE (#3C3C3C) */\n SELECTION: '#3C3C3C',\n\n /** \u7EC8\u7AEF\u9ED8\u8BA4\u80CC\u666F - \u900F\u660E\uFF0C\u4F9D\u8D56\u7528\u6237\u7EC8\u7AEF\u8BBE\u7F6E */\n TRANSPARENT: 'transparent',\n} as const\n\n/**\n * Minto \u7279\u8272\u529F\u80FD\u7684\u989D\u5916\u914D\u8272\n */\nexport const MINTO_COLORS = {\n /** Bash \u6A21\u5F0F\u8FB9\u6846 */\n BASH_BORDER: '#FFB86C',\n\n /** Koding \u6A21\u5F0F\u8FB9\u6846 (\u7B14\u8BB0\u6A21\u5F0F) */\n KODING_BORDER: '#58A6FF',\n\n /** Subagent \u8FDB\u5EA6\u6761 */\n SUBAGENT_PROGRESS: '#3DDC84',\n\n /** TODO \u9762\u677F\u4E3B\u8272 */\n TODO_MAIN: '#D4BBFF',\n} as const\n\n// ============================================================================\n// \u8BED\u4E49\u989C\u8272\u7CFB\u7EDF (Semantic Color System)\n// \u57FA\u4E8E REPL \u663E\u793A\u89C4\u8303\uFF0C\u5B9A\u4E49 9 \u79CD\u8BED\u4E49\u989C\u8272\u53CA\u5176\u4F7F\u7528\u573A\u666F\n// ============================================================================\n\n/**\n * \u8BED\u4E49\u989C\u8272 - \u6309\u4FE1\u606F\u7C7B\u578B\u548C\u72B6\u6001\u5B9A\u4E49\u7684\u989C\u8272\n *\n * \u4F7F\u7528\u573A\u666F\uFF1A\n * - brand: Logo\u3001\u6B22\u8FCE\u4FE1\u606F\u3001\u54C1\u724C\u5F3A\u8C03\n * - primary: \u7528\u6237\u8F93\u5165\u3001AI \u4E3B\u8F93\u51FA\u3001\u91CD\u8981\u6807\u9898\n * - secondary: \u5DE5\u5177\u540D\u79F0\u3001\u64CD\u4F5C\u7C7B\u578B\u3001\u6838\u5FC3\u4FE1\u606F\n * - dim: \u53C2\u6570\u3001\u8DEF\u5F84\u3001\u8F85\u52A9\u4FE1\u606F\n * - muted: \u5143\u4FE1\u606F\uFF08\u8017\u65F6\u3001\u6A21\u578B\u3001\u65F6\u95F4\uFF09\n * - running: \u8FDB\u884C\u4E2D\u72B6\u6001\u3001\u7B49\u5F85\u4E2D\n * - success: \u5B8C\u6210\u72B6\u6001\u3001\u6210\u529F\u64CD\u4F5C\n * - error: \u5931\u8D25\u3001\u9519\u8BEF\u3001\u62D2\u7EDD\n * - info: \u4FE1\u606F\u63D0\u793A\u3001Todo \u66F4\u65B0\u3001\u94FE\u63A5\n */\nexport const SEMANTIC_COLORS = {\n /** \u54C1\u724C\u8272 - Logo\u3001\u6B22\u8FCE\u4FE1\u606F */\n brand: '#FFC233',\n\n /** \u4E3B\u8981\u6587\u672C - \u7528\u6237\u8F93\u5165\u3001AI \u8F93\u51FA */\n primary: '#FFFFFF',\n\n /** \u6838\u5FC3\u4FE1\u606F - \u5DE5\u5177\u540D\u79F0\u3001\u64CD\u4F5C\u7C7B\u578B */\n secondary: '#CCCCCC',\n\n /** \u8F85\u52A9\u4FE1\u606F - \u53C2\u6570\u3001\u8DEF\u5F84 */\n dim: '#888888',\n\n /** \u5143\u4FE1\u606F - \u8017\u65F6\u3001\u6A21\u578B\u3001\u65F6\u95F4 */\n muted: '#555555',\n\n /** \u8FDB\u884C\u4E2D\u72B6\u6001 */\n running: '#FFC107',\n\n /** \u6210\u529F\u72B6\u6001 */\n success: '#4EBA65',\n\n /** \u9519\u8BEF\u72B6\u6001 */\n error: '#FF6B80',\n\n /** \u4FE1\u606F\u63D0\u793A */\n info: '#5DADE2',\n} as const\n\n/**\n * \u8BED\u4E49\u989C\u8272\u7C7B\u578B\n */\nexport type SemanticColor = keyof typeof SEMANTIC_COLORS\n\n/**\n * \u83B7\u53D6\u8BED\u4E49\u989C\u8272\u503C\n */\nexport function getSemanticColor(color: SemanticColor): string {\n return SEMANTIC_COLORS[color]\n}\n\n/**\n * \u884C\u5185\u4FE1\u606F\u4EF7\u503C\u5C42\u6B21\u989C\u8272\n * \u7528\u4E8E\u540C\u4E00\u884C\u5185\u4E0D\u540C\u4FE1\u606F\u7684\u989C\u8272\u533A\u5206\n */\nexport const VALUE_TIER_COLORS = {\n /** \u6838\u5FC3\u4FE1\u606F - \u7528\u6237\u5FC5\u987B\u5173\u6CE8 */\n core: SEMANTIC_COLORS.secondary,\n\n /** \u8F85\u52A9\u4FE1\u606F - \u5E2E\u52A9\u7406\u89E3\u4E0A\u4E0B\u6587 */\n auxiliary: SEMANTIC_COLORS.dim,\n\n /** \u5143\u4FE1\u606F - \u53EF\u9009\u53C2\u8003 */\n meta: SEMANTIC_COLORS.muted,\n} as const\n\n/**\n * \u72B6\u6001\u989C\u8272\u6620\u5C04\n * \u7528\u4E8E\u5DE5\u5177\u8C03\u7528\u3001\u4EFB\u52A1\u7B49\u7684\u72B6\u6001\u7740\u8272\n */\nexport const STATUS_COLORS = {\n running: SEMANTIC_COLORS.running,\n pending: SEMANTIC_COLORS.dim,\n success: SEMANTIC_COLORS.success,\n completed: SEMANTIC_COLORS.success,\n error: SEMANTIC_COLORS.error,\n failed: SEMANTIC_COLORS.error,\n done: SEMANTIC_COLORS.success,\n} as const\n\n/**\n * \u83B7\u53D6\u72B6\u6001\u989C\u8272\n */\nexport function getStatusColorHex(\n status: keyof typeof STATUS_COLORS | string,\n): string {\n return (\n STATUS_COLORS[status as keyof typeof STATUS_COLORS] || SEMANTIC_COLORS.dim\n )\n}\n\n/**\n * \u7EDF\u4E00\u7684\u914D\u8272\u5BFC\u51FA\n */\nexport const CLAUDE_COLORS = {\n ...TEXT_COLORS,\n ...FUNCTIONAL_COLORS,\n ...BACKGROUND_COLORS,\n ...MINTO_COLORS,\n} as const\n\n// ============================================================================\n// Agent \u989C\u8272\u7CFB\u7EDF\n// ============================================================================\n\n/**\n * \u652F\u6301\u7684\u989C\u8272\u5173\u952E\u5B57\u4E0E\u7EC8\u7AEF\u663E\u793A\u6548\u679C\uFF1A\n * - red: \u4EAE\u7EA2\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u4EE3\u7801\u5BA1\u67E5/\u5B89\u5168\u5BA1\u8BA1\n * - blue: \u6DF1\u84DD\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u901A\u7528\u5F00\u53D1\n * - green: \u58A8\u7EFF\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6D4B\u8BD5/CI\n * - yellow: \u4EAE\u9EC4\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6570\u636E\u79D1\u5B66\n * - purple: \u7D2B\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u63A2\u7D22/\u8C03\u7814\n * - orange: \u6A59\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6784\u5EFA/\u90E8\u7F72\n * - pink: \u7C89\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u6587\u6863/\u6587\u6848\n * - cyan: \u9752\u8272\uFF0C\u63A8\u8350\u7528\u4E8E\u8C03\u8BD5/\u8BCA\u65AD\n * - auto: \u7CFB\u7EDF\u9ED8\u8BA4\uFF0C\u4F7F\u7528\u4E3B\u9898\u8272\n */\n\n/**\n * Agent \u989C\u8272\u7C7B\u578B\u5B9A\u4E49\n */\nexport type AgentColor =\n | 'red'\n | 'blue'\n | 'green'\n | 'yellow'\n | 'purple'\n | 'orange'\n | 'pink'\n | 'cyan'\n | 'auto'\n\n/**\n * Agent \u989C\u8272\u6620\u5C04\u8868\uFF08Hex \u683C\u5F0F\uFF09\n */\nexport const AGENT_COLORS: Record<AgentColor, string> = {\n red: '#FF5555', // \u4EAE\u7EA2\u8272\n blue: '#5555FF', // \u6DF1\u84DD\u8272\n green: '#55FF55', // \u58A8\u7EFF\u8272\n yellow: '#FFFF55', // \u4EAE\u9EC4\u8272\n purple: '#FF55FF', // \u7D2B\u8272\n orange: '#FFA500', // \u6A59\u8272\n pink: '#FFB6C1', // \u7C89\u8272\n cyan: '#00FFFF', // \u9752\u8272\n auto: '#FFFFFF', // \u9ED8\u8BA4\u767D\u8272\n} as const\n\n/**\n * Agent \u989C\u8272\u63A8\u8350\u573A\u666F\n */\nexport const AGENT_COLOR_RECOMMENDATIONS: Record<AgentColor, string[]> = {\n red: ['\u4EE3\u7801\u5BA1\u67E5', '\u5B89\u5168\u5BA1\u8BA1', 'code-reviewer', 'security-auditor'],\n blue: [\n '\u901A\u7528\u5F00\u53D1',\n 'general-purpose',\n 'backend-developer',\n 'frontend-developer',\n ],\n green: ['\u6D4B\u8BD5', 'CI', 'test-automator', 'unit-test-builder'],\n yellow: ['\u6570\u636E\u79D1\u5B66', 'data-scientist', 'data-engineer', 'ml-engineer'],\n purple: ['\u63A2\u7D22', '\u8C03\u7814', 'research-expert', 'explorer'],\n orange: ['\u6784\u5EFA', '\u90E8\u7F72', 'deployment-engineer', 'devops-automator'],\n pink: ['\u6587\u6863', '\u6587\u6848', 'content-writer', 'docs-architect'],\n cyan: ['\u8C03\u8BD5', '\u8BCA\u65AD', 'debugger', 'performance-engineer'],\n auto: ['\u9ED8\u8BA4'],\n}\n\n/**\n * \u83B7\u53D6 Agent \u989C\u8272\n *\n * @param color - Agent \u914D\u7F6E\u4E2D\u7684\u989C\u8272\u5B57\u6BB5\n * @param theme - \u5F53\u524D\u4E3B\u9898\n * @returns \u6700\u7EC8\u4F7F\u7528\u7684\u989C\u8272 Hex \u503C\n */\nexport function getAgentColor(\n color: string | undefined,\n theme: ReturnType<typeof getTheme>,\n): string {\n // \u5982\u679C\u6CA1\u6709\u914D\u7F6E\u989C\u8272\u6216\u914D\u7F6E\u4E3A auto\uFF0C\u4F7F\u7528\u4E3B\u9898\u9ED8\u8BA4\u8272\n if (!color || color === 'auto') {\n return theme.minto\n }\n\n // \u68C0\u67E5\u662F\u5426\u4E3A\u6709\u6548\u7684\u989C\u8272\u5173\u952E\u5B57\n const normalizedColor = color.toLowerCase() as AgentColor\n if (normalizedColor in AGENT_COLORS) {\n return AGENT_COLORS[normalizedColor]\n }\n\n // \u5982\u679C\u989C\u8272\u5173\u952E\u5B57\u65E0\u6548\uFF0C\u56DE\u9000\u5230\u4E3B\u9898\u8272\n return theme.minto\n}\n\n/**\n * \u6839\u636E Agent \u7C7B\u578B\u63A8\u8350\u989C\u8272\n *\n * @param agentType - Agent \u7C7B\u578B\u540D\u79F0\n * @returns \u63A8\u8350\u7684\u989C\u8272\u5173\u952E\u5B57\n */\nexport function recommendColorForAgent(agentType: string): AgentColor {\n const lowerType = agentType.toLowerCase()\n\n for (const [color, keywords] of Object.entries(AGENT_COLOR_RECOMMENDATIONS)) {\n for (const keyword of keywords) {\n if (lowerType.includes(keyword.toLowerCase())) {\n return color as AgentColor\n }\n }\n }\n\n return 'auto'\n}\n\n/**\n * \u83B7\u53D6\u989C\u8272\u7684\u5BF9\u6BD4\u6587\u672C\u989C\u8272\uFF08\u786E\u4FDD\u53EF\u8BFB\u6027\uFF09\n *\n * @param backgroundColor - \u80CC\u666F\u989C\u8272 Hex \u503C\n * @returns 'black' \u6216 'white'\n */\nexport function getContrastTextColor(\n backgroundColor: string,\n): 'black' | 'white' {\n // \u79FB\u9664 # \u524D\u7F00\n const hex = backgroundColor.replace('#', '')\n\n // \u8F6C\u6362\u4E3A RGB\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n // \u8BA1\u7B97\u4EAE\u5EA6\uFF08YIQ \u516C\u5F0F\uFF09\n const yiq = (r * 299 + g * 587 + b * 114) / 1000\n\n // \u4EAE\u5EA6\u5927\u4E8E 128 \u65F6\u4F7F\u7528\u9ED1\u8272\u6587\u5B57\uFF0C\u5426\u5219\u4F7F\u7528\u767D\u8272\n return yiq >= 128 ? 'black' : 'white'\n}\n"],
5
+ "mappings": "AAqBO,MAAM,cAAc;AAAA;AAAA,EAEzB,SAAS;AAAA;AAAA,EAGT,WAAW;AAAA;AAAA,EAGX,QAAQ;AAAA;AAAA,EAGR,OAAO;AACT;AAKO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,OAAO;AAAA;AAAA,EAGP,SAAS;AAAA;AAAA,EAGT,OAAO;AAAA;AAAA,EAGP,SAAS;AAAA;AAAA,EAGT,MAAM;AACR;AAKO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,QAAQ;AAAA;AAAA,EAGR,YAAY;AAAA;AAAA,EAGZ,WAAW;AAAA;AAAA,EAGX,aAAa;AACf;AAKO,MAAM,eAAe;AAAA;AAAA,EAE1B,aAAa;AAAA;AAAA,EAGb,eAAe;AAAA;AAAA,EAGf,mBAAmB;AAAA;AAAA,EAGnB,WAAW;AACb;AAqBO,MAAM,kBAAkB;AAAA;AAAA,EAE7B,OAAO;AAAA;AAAA,EAGP,SAAS;AAAA;AAAA,EAGT,WAAW;AAAA;AAAA,EAGX,KAAK;AAAA;AAAA,EAGL,OAAO;AAAA;AAAA,EAGP,SAAS;AAAA;AAAA,EAGT,SAAS;AAAA;AAAA,EAGT,OAAO;AAAA;AAAA,EAGP,MAAM;AACR;AAUO,SAAS,iBAAiB,OAA8B;AAC7D,SAAO,gBAAgB,KAAK;AAC9B;AAMO,MAAM,oBAAoB;AAAA;AAAA,EAE/B,MAAM,gBAAgB;AAAA;AAAA,EAGtB,WAAW,gBAAgB;AAAA;AAAA,EAG3B,MAAM,gBAAgB;AACxB;AAMO,MAAM,gBAAgB;AAAA,EAC3B,SAAS,gBAAgB;AAAA,EACzB,SAAS,gBAAgB;AAAA,EACzB,SAAS,gBAAgB;AAAA,EACzB,WAAW,gBAAgB;AAAA,EAC3B,OAAO,gBAAgB;AAAA,EACvB,QAAQ,gBAAgB;AAAA,EACxB,MAAM,gBAAgB;AACxB;AAKO,SAAS,kBACd,QACQ;AACR,SACE,cAAc,MAAoC,KAAK,gBAAgB;AAE3E;AAKO,MAAM,gBAAgB;AAAA,EAC3B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAoCO,MAAM,eAA2C;AAAA,EACtD,KAAK;AAAA;AAAA,EACL,MAAM;AAAA;AAAA,EACN,OAAO;AAAA;AAAA,EACP,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AAAA,EACN,MAAM;AAAA;AACR;AAKO,MAAM,8BAA4D;AAAA,EACvE,KAAK,CAAC,4BAAQ,4BAAQ,iBAAiB,kBAAkB;AAAA,EACzD,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO,CAAC,gBAAM,MAAM,kBAAkB,mBAAmB;AAAA,EACzD,QAAQ,CAAC,4BAAQ,kBAAkB,iBAAiB,aAAa;AAAA,EACjE,QAAQ,CAAC,gBAAM,gBAAM,mBAAmB,UAAU;AAAA,EAClD,QAAQ,CAAC,gBAAM,gBAAM,uBAAuB,kBAAkB;AAAA,EAC9D,MAAM,CAAC,gBAAM,gBAAM,kBAAkB,gBAAgB;AAAA,EACrD,MAAM,CAAC,gBAAM,gBAAM,YAAY,sBAAsB;AAAA,EACrD,MAAM,CAAC,cAAI;AACb;AASO,SAAS,cACd,OACA,OACQ;AAER,MAAI,CAAC,SAAS,UAAU,QAAQ;AAC9B,WAAO,MAAM;AAAA,EACf;AAGA,QAAM,kBAAkB,MAAM,YAAY;AAC1C,MAAI,mBAAmB,cAAc;AACnC,WAAO,aAAa,eAAe;AAAA,EACrC;AAGA,SAAO,MAAM;AACf;AAQO,SAAS,uBAAuB,WAA+B;AACpE,QAAM,YAAY,UAAU,YAAY;AAExC,aAAW,CAAC,OAAO,QAAQ,KAAK,OAAO,QAAQ,2BAA2B,GAAG;AAC3E,eAAW,WAAW,UAAU;AAC9B,UAAI,UAAU,SAAS,QAAQ,YAAY,CAAC,GAAG;AAC7C,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAQO,SAAS,qBACd,iBACmB;AAEnB,QAAM,MAAM,gBAAgB,QAAQ,KAAK,EAAE;AAG3C,QAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;AAC1C,QAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;AAC1C,QAAM,IAAI,SAAS,IAAI,UAAU,GAAG,CAAC,GAAG,EAAE;AAG1C,QAAM,OAAO,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO;AAG5C,SAAO,OAAO,MAAM,UAAU;AAChC;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,102 @@
1
+ const STATS_SEPARATOR = " \xB7 ";
2
+ const PREVIEW_SEPARATOR = " \xB7 ";
3
+ const SPACE_BEFORE_STATS_PAREN = true;
4
+ const SPACE_IN_TOOL_PAREN = false;
5
+ const INDENT_UNIT = 2;
6
+ const INDENT_LEVELS = {
7
+ L0: 0,
8
+ L1: INDENT_UNIT,
9
+ L2: INDENT_UNIT * 2,
10
+ L3: INDENT_UNIT * 3
11
+ };
12
+ function getIndent(level) {
13
+ const spaces = typeof level === "number" ? level : INDENT_LEVELS[level];
14
+ return " ".repeat(spaces);
15
+ }
16
+ const INDENT_LEVEL_1 = " ";
17
+ const INDENT_CHILD_FIRST = " \u23BF ";
18
+ const INDENT_CHILD_ALIGN = " ";
19
+ const VERTICAL_GAP = {
20
+ /** 同类连续操作之间 */
21
+ SAME_TYPE: 0,
22
+ /** 不同类型切换 */
23
+ TYPE_SWITCH: 1,
24
+ /** 用户输入后 */
25
+ AFTER_USER_INPUT: 1,
26
+ /** AI 输出前 */
27
+ BEFORE_AI_OUTPUT: 1
28
+ };
29
+ const MARGIN_BEFORE_USER_MESSAGE = 1;
30
+ const MARGIN_BEFORE_MODULE = 1;
31
+ const MARGIN_AFTER_MODULE = 0;
32
+ const MARGIN_BEFORE_ASSISTANT = 1;
33
+ const STATUS_SYMBOLS = {
34
+ /** Task is currently running */
35
+ RUNNING: "\u25CB",
36
+ /** Task completed successfully */
37
+ COMPLETED: "\u25CF",
38
+ /** Task is pending/queued */
39
+ PENDING: "\u25CB",
40
+ /** Task failed */
41
+ FAILED: "\u2717"
42
+ };
43
+ const TODO_SYMBOLS = {
44
+ /** Todo item completed */
45
+ COMPLETED: "\u2612",
46
+ /** Todo item pending */
47
+ PENDING: "\u2610",
48
+ /** Todo item in progress */
49
+ IN_PROGRESS: "\u2610"
50
+ };
51
+ const TREE_SYMBOLS = {
52
+ /** Connector for non-last items */
53
+ BRANCH: "\u251C\u2500",
54
+ /** Connector for last item */
55
+ LAST_BRANCH: "\u2514\u2500",
56
+ /** Vertical continuation line */
57
+ VERTICAL: "\u2502 ",
58
+ /** Empty space for alignment after last item */
59
+ EMPTY: " "
60
+ };
61
+ const ABBREVIATIONS = {
62
+ /** "characters" -> "chars" */
63
+ CHARACTERS: "chars",
64
+ /** "completed" - keep full for clarity */
65
+ COMPLETED: "completed",
66
+ /** "tokens" - keep full */
67
+ TOKENS: "tokens"
68
+ };
69
+ function formatStats(items) {
70
+ return items.filter(Boolean).join(STATS_SEPARATOR);
71
+ }
72
+ function formatCount(count, singular, plural = singular + "s") {
73
+ return `${count} ${count === 1 ? singular : plural}`;
74
+ }
75
+ function spaceBeforeParen() {
76
+ return SPACE_BEFORE_STATS_PAREN ? " " : "";
77
+ }
78
+ export {
79
+ ABBREVIATIONS,
80
+ INDENT_CHILD_ALIGN,
81
+ INDENT_CHILD_FIRST,
82
+ INDENT_LEVELS,
83
+ INDENT_LEVEL_1,
84
+ INDENT_UNIT,
85
+ MARGIN_AFTER_MODULE,
86
+ MARGIN_BEFORE_ASSISTANT,
87
+ MARGIN_BEFORE_MODULE,
88
+ MARGIN_BEFORE_USER_MESSAGE,
89
+ PREVIEW_SEPARATOR,
90
+ SPACE_BEFORE_STATS_PAREN,
91
+ SPACE_IN_TOOL_PAREN,
92
+ STATS_SEPARATOR,
93
+ STATUS_SYMBOLS,
94
+ TODO_SYMBOLS,
95
+ TREE_SYMBOLS,
96
+ VERTICAL_GAP,
97
+ formatCount,
98
+ formatStats,
99
+ getIndent,
100
+ spaceBeforeParen
101
+ };
102
+ //# sourceMappingURL=formatRules.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/constants/formatRules.ts"],
4
+ "sourcesContent": ["/**\n * REPL Output Format Rules\n *\n * Unified formatting constants for consistent CLI output.\n * All components should reference these constants for formatting decisions.\n */\n\n// ============================================================================\n// SEPARATORS\n// ============================================================================\n\n/**\n * Standard separator for statistics items\n * Example: \"1 tool \u00B7 32.8k tokens \u00B7 27s\"\n */\nexport const STATS_SEPARATOR = ' \u00B7 '\n\n/**\n * Separator for preview content\n * Example: \"(2335 chars) \u00B7 # preview text\"\n */\nexport const PREVIEW_SEPARATOR = ' \u00B7 '\n\n// ============================================================================\n// SPACING\n// ============================================================================\n\n/**\n * Whether to add space before statistics parentheses\n * true: \"Parallel Tasks (3/3 completed)\"\n * false: \"Parallel Tasks(3/3 completed)\"\n */\nexport const SPACE_BEFORE_STATS_PAREN = true\n\n/**\n * Whether to add space inside tool parameter parentheses\n * false: \"Bash(command)\"\n * true: \"Bash( command )\"\n */\nexport const SPACE_IN_TOOL_PAREN = false\n\n// ============================================================================\n// INDENTATION (\u57FA\u4E8E REPL \u663E\u793A\u89C4\u8303)\n// ============================================================================\n\n/**\n * \u57FA\u7840\u7F29\u8FDB\u5355\u4F4D (2 \u5B57\u7B26)\n * \u6240\u6709\u7F29\u8FDB\u90FD\u662F\u6B64\u5355\u4F4D\u7684\u500D\u6570\n */\nexport const INDENT_UNIT = 2\n\n/**\n * \u7F29\u8FDB\u5C42\u7EA7\u5B9A\u4E49\n * - L0: 0 \u5B57\u7B26 - \u7528\u6237\u8F93\u5165\u3001AI \u8F93\u51FA\u6807\u9898\n * - L1: 2 \u5B57\u7B26 - \u5DE5\u5177\u8C03\u7528\u3001Todo \u66F4\u65B0\u3001\u5E76\u884C\u4EFB\u52A1\u7EC4\n * - L2: 4 \u5B57\u7B26 - \u5DE5\u5177\u8F93\u51FA\u3001\u5E76\u884C\u5B50\u4EFB\u52A1\n * - L3: 6 \u5B57\u7B26 - \u5B50\u4EFB\u52A1\u7684\u8F93\u51FA\u8BE6\u60C5\n */\nexport const INDENT_LEVELS = {\n L0: 0,\n L1: INDENT_UNIT,\n L2: INDENT_UNIT * 2,\n L3: INDENT_UNIT * 3,\n} as const\n\n/**\n * \u751F\u6210\u6307\u5B9A\u5C42\u7EA7\u7684\u7F29\u8FDB\u5B57\u7B26\u4E32\n */\nexport function getIndent(level: keyof typeof INDENT_LEVELS | number): string {\n const spaces = typeof level === 'number' ? level : INDENT_LEVELS[level]\n return ' '.repeat(spaces)\n}\n\n/**\n * First-level indentation (2 spaces)\n * @deprecated \u4F7F\u7528 getIndent('L1') \u66FF\u4EE3\n */\nexport const INDENT_LEVEL_1 = ' '\n\n/**\n * Child item prefix with continuation symbol\n * Used for first child in a list\n */\nexport const INDENT_CHILD_FIRST = ' \u23BF '\n\n/**\n * Alignment spaces for subsequent children (5 spaces to align with first child)\n */\nexport const INDENT_CHILD_ALIGN = ' '\n\n// ============================================================================\n// MARGINS (vertical spacing in terminal lines)\n// \u57FA\u4E8E REPL \u663E\u793A\u89C4\u8303\uFF1A\n// - \u540C\u7C7B\u8FDE\u7EED\u64CD\u4F5C: 0 \u884C\n// - \u4E0D\u540C\u7C7B\u578B\u5207\u6362: 1 \u884C\n// - \u7528\u6237\u8F93\u5165\u540E: 1 \u884C\n// - AI \u8F93\u51FA\u524D: 1 \u884C\n// ============================================================================\n\n/**\n * \u5782\u76F4\u95F4\u8DDD\u5B9A\u4E49\n */\nexport const VERTICAL_GAP = {\n /** \u540C\u7C7B\u8FDE\u7EED\u64CD\u4F5C\u4E4B\u95F4 */\n SAME_TYPE: 0,\n /** \u4E0D\u540C\u7C7B\u578B\u5207\u6362 */\n TYPE_SWITCH: 1,\n /** \u7528\u6237\u8F93\u5165\u540E */\n AFTER_USER_INPUT: 1,\n /** AI \u8F93\u51FA\u524D */\n BEFORE_AI_OUTPUT: 1,\n} as const\n\n/**\n * Margin before user message blocks\n */\nexport const MARGIN_BEFORE_USER_MESSAGE = 1\n\n/**\n * Margin before module-level components (Parallel Tasks, Update Todos)\n */\nexport const MARGIN_BEFORE_MODULE = 1\n\n/**\n * Margin after module-level components\n */\nexport const MARGIN_AFTER_MODULE = 0\n\n/**\n * Margin before assistant response blocks\n */\nexport const MARGIN_BEFORE_ASSISTANT = 1\n\n// ============================================================================\n// STATUS SYMBOLS\n// ============================================================================\n\n/**\n * Status symbols for task states\n */\nexport const STATUS_SYMBOLS = {\n /** Task is currently running */\n RUNNING: '\u25CB',\n /** Task completed successfully */\n COMPLETED: '\u25CF',\n /** Task is pending/queued */\n PENDING: '\u25CB',\n /** Task failed */\n FAILED: '\u2717',\n} as const\n\n/**\n * Todo item status symbols\n */\nexport const TODO_SYMBOLS = {\n /** Todo item completed */\n COMPLETED: '\u2612',\n /** Todo item pending */\n PENDING: '\u2610',\n /** Todo item in progress */\n IN_PROGRESS: '\u2610',\n} as const\n\n// ============================================================================\n// TREE CONNECTORS\n// ============================================================================\n\n/**\n * Tree connector symbols for hierarchical display\n */\nexport const TREE_SYMBOLS = {\n /** Connector for non-last items */\n BRANCH: '\u251C\u2500',\n /** Connector for last item */\n LAST_BRANCH: '\u2514\u2500',\n /** Vertical continuation line */\n VERTICAL: '\u2502 ',\n /** Empty space for alignment after last item */\n EMPTY: ' ',\n} as const\n\n// ============================================================================\n// TEXT ABBREVIATIONS\n// ============================================================================\n\n/**\n * Abbreviated text for compact display\n */\nexport const ABBREVIATIONS = {\n /** \"characters\" -> \"chars\" */\n CHARACTERS: 'chars',\n /** \"completed\" - keep full for clarity */\n COMPLETED: 'completed',\n /** \"tokens\" - keep full */\n TOKENS: 'tokens',\n} as const\n\n// ============================================================================\n// HELPER FUNCTIONS\n// ============================================================================\n\n/**\n * Format statistics string with consistent separator\n * @example formatStats(['1 tool', '32.8k tokens', '27s']) => \"1 tool \u00B7 32.8k tokens \u00B7 27s\"\n */\nexport function formatStats(items: (string | null | undefined)[]): string {\n return items.filter(Boolean).join(STATS_SEPARATOR)\n}\n\n/**\n * Format a count with optional singular/plural label\n * @example formatCount(1, 'tool', 'tools') => \"1 tool\"\n * @example formatCount(3, 'tool', 'tools') => \"3 tools\"\n */\nexport function formatCount(\n count: number,\n singular: string,\n plural: string = singular + 's',\n): string {\n return `${count} ${count === 1 ? singular : plural}`\n}\n\n/**\n * Add space before parenthesis if SPACE_BEFORE_STATS_PAREN is true\n * @example spaceBeforeParen() => \" \" or \"\"\n */\nexport function spaceBeforeParen(): string {\n return SPACE_BEFORE_STATS_PAREN ? ' ' : ''\n}\n"],
5
+ "mappings": "AAeO,MAAM,kBAAkB;AAMxB,MAAM,oBAAoB;AAW1B,MAAM,2BAA2B;AAOjC,MAAM,sBAAsB;AAU5B,MAAM,cAAc;AASpB,MAAM,gBAAgB;AAAA,EAC3B,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI,cAAc;AAAA,EAClB,IAAI,cAAc;AACpB;AAKO,SAAS,UAAU,OAAoD;AAC5E,QAAM,SAAS,OAAO,UAAU,WAAW,QAAQ,cAAc,KAAK;AACtE,SAAO,IAAI,OAAO,MAAM;AAC1B;AAMO,MAAM,iBAAiB;AAMvB,MAAM,qBAAqB;AAK3B,MAAM,qBAAqB;AAc3B,MAAM,eAAe;AAAA;AAAA,EAE1B,WAAW;AAAA;AAAA,EAEX,aAAa;AAAA;AAAA,EAEb,kBAAkB;AAAA;AAAA,EAElB,kBAAkB;AACpB;AAKO,MAAM,6BAA6B;AAKnC,MAAM,uBAAuB;AAK7B,MAAM,sBAAsB;AAK5B,MAAM,0BAA0B;AAShC,MAAM,iBAAiB;AAAA;AAAA,EAE5B,SAAS;AAAA;AAAA,EAET,WAAW;AAAA;AAAA,EAEX,SAAS;AAAA;AAAA,EAET,QAAQ;AACV;AAKO,MAAM,eAAe;AAAA;AAAA,EAE1B,WAAW;AAAA;AAAA,EAEX,SAAS;AAAA;AAAA,EAET,aAAa;AACf;AASO,MAAM,eAAe;AAAA;AAAA,EAE1B,QAAQ;AAAA;AAAA,EAER,aAAa;AAAA;AAAA,EAEb,UAAU;AAAA;AAAA,EAEV,OAAO;AACT;AASO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,YAAY;AAAA;AAAA,EAEZ,WAAW;AAAA;AAAA,EAEX,QAAQ;AACV;AAUO,SAAS,YAAY,OAA8C;AACxE,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,eAAe;AACnD;AAOO,SAAS,YACd,OACA,UACA,SAAiB,WAAW,KACpB;AACR,SAAO,GAAG,KAAK,IAAI,UAAU,IAAI,WAAW,MAAM;AACpD;AAMO,SAAS,mBAA2B;AACzC,SAAO,2BAA2B,MAAM;AAC1C;",
6
+ "names": []
7
+ }
@@ -46,48 +46,22 @@ Output text to communicate with the user; all text you output outside of tool us
46
46
  If you cannot or will not help the user with something, please do not say why or what it could lead to, since this comes across as preachy and annoying. Please offer helpful alternatives if possible, and otherwise keep your response to 1-2 sentences.
47
47
  IMPORTANT: You should minimize output tokens as much as possible while maintaining helpfulness, quality, and accuracy. Only address the specific query or task at hand, avoiding tangential information unless absolutely critical for completing the request. If you can answer in 1-3 sentences or a short paragraph, please do.
48
48
  IMPORTANT: You should NOT answer with unnecessary preamble or postamble (such as explaining your code or summarizing your action), unless the user asks you to.
49
- IMPORTANT: Keep your responses short, since they will be displayed on a command line interface. You MUST answer concisely with fewer than 4 lines (not including tool use or code generation), unless user asks for detail. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as "The answer is <answer>.", "Here is the content of the file..." or "Based on the information provided, the answer is..." or "Here is what I will do next...". Here are some examples to demonstrate appropriate verbosity:
49
+ IMPORTANT: Keep your responses short, since they will be displayed on a command line interface. You MUST answer concisely with fewer than 4 lines (not including tool use or code generation), unless user asks for detail. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as "The answer is <answer>.", "Here is the content of the file..." or "Based on the information provided, the answer is..." or "Here is what I will do next...". Examples of appropriate verbosity:
50
50
  <example>
51
51
  user: 2 + 2
52
52
  assistant: 4
53
53
  </example>
54
-
55
- <example>
56
- user: what is 2+2?
57
- assistant: 4
58
- </example>
59
-
60
54
  <example>
61
- user: is 11 a prime number?
62
- assistant: Yes
63
- </example>
64
-
65
- <example>
66
- user: what command should I run to list files in the current directory?
55
+ user: what command should I run to list files?
67
56
  assistant: ls
68
57
  </example>
69
-
70
58
  <example>
71
- user: what command should I run to watch files in the current directory?
72
- assistant: [use the ls tool to list the files in the current directory, then read docs/commands in the relevant file to find out how to watch files]
73
- npm run dev
59
+ user: what files are in src/?
60
+ assistant: [runs ls] foo.c, bar.c, baz.c
74
61
  </example>
75
-
76
- <example>
77
- user: How many golf balls fit inside a jetta?
78
- assistant: 150000
79
- </example>
80
-
81
- <example>
82
- user: what files are in the directory src/?
83
- assistant: [runs ls and sees foo.c, bar.c, baz.c]
84
- user: which file contains the implementation of foo?
85
- assistant: src/foo.c
86
- </example>
87
-
88
62
  <example>
89
63
  user: write tests for new feature
90
- assistant: [uses grep and glob search tools to find where similar tests are defined, uses concurrent read file tool use blocks in one tool call to read relevant files at the same time, uses edit file tool to write new tests]
64
+ assistant: [uses search tools to find test patterns, reads relevant files concurrently, uses edit tool to write tests]
91
65
  </example>
92
66
 
93
67
  # Proactiveness
@@ -129,12 +103,16 @@ NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTAN
129
103
  - It is always better to speculatively perform multiple searches as a batch that are potentially useful.
130
104
  - For making multiple edits to the same file, prefer using the MultiEdit tool over multiple Edit tool calls.
131
105
 
106
+ # MCP Resources
107
+ If MCP (Model Context Protocol) servers are configured, you have access to MCP Resources through two specialized tools:
108
+ - ListMcpResources: Use this tool to discover available resources from connected MCP servers. Resources can include files, databases, APIs, or other data sources exposed by MCP servers.
109
+ - ReadMcpResource: Use this tool to read the content of a specific MCP resource by its URI. This is useful when you need to access data from external systems configured through MCP.
110
+ When the user mentions accessing external data sources, databases, or resources from configured services, consider using these MCP resource tools to discover and read the relevant data.
111
+
132
112
  You MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.
133
113
  `,
134
114
  `
135
- ${await getEnvInfo()}`,
136
- `IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.
137
- IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).`
115
+ ${await getEnvInfo()}`
138
116
  ];
139
117
  }
140
118
  async function getEnvInfo() {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/prompts.ts"],
4
- "sourcesContent": ["import { env } from '@utils/env'\nimport { getIsGit } from '@utils/git'\nimport {\n INTERRUPT_MESSAGE,\n INTERRUPT_MESSAGE_FOR_TOOL_USE,\n} from '@utils/messages'\nimport { getCwd } from '@utils/state'\nimport { PRODUCT_NAME, PROJECT_FILE, PRODUCT_COMMAND } from './product'\nimport { BashTool } from '@tools/BashTool/BashTool'\nimport { MACRO } from './macros'\n\n// // Security policy constant matching reference implementation\n// export const SECURITY_POLICY =\n// 'IMPORTANT: Assist with defensive security tasks only. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.'\n\nexport function getCLISyspromptPrefix(): string {\n return `You are ${PRODUCT_NAME}, ShareAI-lab's Agent AI CLI for terminal & coding.`\n}\n\nexport async function getSystemPrompt(): Promise<string[]> {\n return [\n `\nYou are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.\n\nIMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.\nIMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).\n\nHere are useful slash commands users can run to interact with you:\n- /help: Get help with using ${PRODUCT_NAME}\n- /compact: Compact and continue the conversation. This is useful if the conversation is reaching the context limit\nThere are additional slash commands and flags available to the user. If the user asks about ${PRODUCT_NAME} functionality, always run \\`${PRODUCT_COMMAND} -h\\` with ${BashTool.name} to see supported commands and flags. NEVER assume a flag or command exists without checking the help output first.\nTo give feedback, users should ${MACRO.ISSUES_EXPLAINER}.\n\n# Task Management\nYou have access to the TodoWrite tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.\nThese tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.\n\nIt is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.\n\n# Memory\nIf the current working directory contains a file called ${PROJECT_FILE}, it will be automatically added to your context. This file serves multiple purposes:\n1. Storing frequently used bash commands (build, test, lint, etc.) so you can use them without searching each time\n2. Recording the user's code style preferences (naming conventions, preferred libraries, etc.)\n3. Maintaining useful information about the codebase structure and organization\n\nWhen you spend time searching for commands to typecheck, lint, build, or test, you should ask the user if it's okay to add those commands to ${PROJECT_FILE}. Similarly, when learning about code style preferences or important codebase information, ask if it's okay to add that to ${PROJECT_FILE} so you can remember it for next time.\n\n# Tone and style\nYou should be concise, direct, and to the point. When you run a non-trivial bash command, you should explain what the command does and why you are running it, to make sure the user understands what you are doing (this is especially important when you are running a command that will make changes to the user's system).\nRemember that your output will be displayed on a command line interface. Your responses can use Github-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification.\nOutput text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like ${BashTool.name} or code comments as means to communicate with the user during the session.\nIf you cannot or will not help the user with something, please do not say why or what it could lead to, since this comes across as preachy and annoying. Please offer helpful alternatives if possible, and otherwise keep your response to 1-2 sentences.\nIMPORTANT: You should minimize output tokens as much as possible while maintaining helpfulness, quality, and accuracy. Only address the specific query or task at hand, avoiding tangential information unless absolutely critical for completing the request. If you can answer in 1-3 sentences or a short paragraph, please do.\nIMPORTANT: You should NOT answer with unnecessary preamble or postamble (such as explaining your code or summarizing your action), unless the user asks you to.\nIMPORTANT: Keep your responses short, since they will be displayed on a command line interface. You MUST answer concisely with fewer than 4 lines (not including tool use or code generation), unless user asks for detail. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as \"The answer is <answer>.\", \"Here is the content of the file...\" or \"Based on the information provided, the answer is...\" or \"Here is what I will do next...\". Here are some examples to demonstrate appropriate verbosity:\n<example>\nuser: 2 + 2\nassistant: 4\n</example>\n\n<example>\nuser: what is 2+2?\nassistant: 4\n</example>\n\n<example>\nuser: is 11 a prime number?\nassistant: Yes\n</example>\n\n<example>\nuser: what command should I run to list files in the current directory?\nassistant: ls\n</example>\n\n<example>\nuser: what command should I run to watch files in the current directory?\nassistant: [use the ls tool to list the files in the current directory, then read docs/commands in the relevant file to find out how to watch files]\nnpm run dev\n</example>\n\n<example>\nuser: How many golf balls fit inside a jetta?\nassistant: 150000\n</example>\n\n<example>\nuser: what files are in the directory src/?\nassistant: [runs ls and sees foo.c, bar.c, baz.c]\nuser: which file contains the implementation of foo?\nassistant: src/foo.c\n</example>\n\n<example>\nuser: write tests for new feature\nassistant: [uses grep and glob search tools to find where similar tests are defined, uses concurrent read file tool use blocks in one tool call to read relevant files at the same time, uses edit file tool to write new tests]\n</example>\n\n# Proactiveness\nYou are allowed to be proactive, but only when the user asks you to do something. You should strive to strike a balance between:\n1. Doing the right thing when asked, including taking actions and follow-up actions\n2. Not surprising the user with actions you take without asking\nFor example, if the user asks you how to approach something, you should do your best to answer their question first, and not immediately jump into taking actions.\n3. Do not add additional code explanation summary unless requested by the user. After working on a file, just stop, rather than providing an explanation of what you did.\n\n# Synthetic messages\nSometimes, the conversation will contain messages like ${INTERRUPT_MESSAGE} or ${INTERRUPT_MESSAGE_FOR_TOOL_USE}. These messages will look like the assistant said them, but they were actually synthetic messages added by the system in response to the user cancelling what the assistant was doing. You should not respond to these messages. You must NEVER send messages like this yourself. \n\n# Following conventions\nWhen making changes to files, first understand the file's code conventions. Mimic code style, use existing libraries and utilities, and follow existing patterns.\n- NEVER assume that a given library is available, even if it is well known. Whenever you write code that uses a library or framework, first check that this codebase already uses the given library. For example, you might look at neighboring files, or check the package.json (or cargo.toml, and so on depending on the language).\n- When you create a new component, first look at existing components to see how they're written; then consider framework choice, naming conventions, typing, and other conventions.\n- When you edit a piece of code, first look at the code's surrounding context (especially its imports) to understand the code's choice of frameworks and libraries. Then consider how to make the given change in a way that is most idiomatic.\n- Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository.\n\n# Code style\n- Do not add comments to the code you write, unless the user asks you to, or the code is complex and requires additional context.\n\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- Use the TodoWrite tool to plan the task if required\n- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.\n- Implement the solution using all tools available to you\n- Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.\n- VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to ${PROJECT_FILE} so that you will know to run it next time.\nNEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are NOT part of the user's provided input or the tool result.\n\n# Tool usage policy\n- When doing file search, prefer to use the Task tool in order to reduce context usage.\n- You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance.\n- When making multiple bash tool calls, you MUST send a single message with multiple tools calls to run the calls in parallel. For example, if you need to run \"git status\" and \"git diff\", send a single message with two tool calls to run the calls in parallel.\n- It is always better to speculatively read multiple files as a batch that are potentially useful.\n- It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n- For making multiple edits to the same file, prefer using the MultiEdit tool over multiple Edit tool calls.\n\nYou MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.\n`,\n `\\n${await getEnvInfo()}`,\n `IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.\nIMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).`,\n ]\n}\n\nexport async function getEnvInfo(): Promise<string> {\n const isGit = await getIsGit()\n return `Here is useful information about the environment you are running in:\n<env>\nWorking directory: ${getCwd()}\nIs directory a git repo: ${isGit ? 'Yes' : 'No'}\nPlatform: ${env.platform}\nToday's date: ${new Date().toLocaleDateString()}\n</env>`\n}\n\nexport async function getAgentPrompt(): Promise<string[]> {\n return [\n `\nYou are an agent for ${PRODUCT_NAME}. Given the user's prompt, you should use the tools available to you to answer the user's question.\n\nNotes:\n1. IMPORTANT: You should be concise, direct, and to the point, since your responses will be displayed on a command line interface. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as \"The answer is <answer>.\", \"Here is the content of the file...\" or \"Based on the information provided, the answer is...\" or \"Here is what I will do next...\".\n2. When relevant, share file names and code snippets relevant to the query\n3. Any file paths you return in your final response MUST be absolute. DO NOT use relative paths.`,\n `${await getEnvInfo()}`,\n ]\n}\n"],
5
- "mappings": "AAAA,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,cAAc,cAAc,uBAAuB;AAC5D,SAAS,gBAAgB;AACzB,SAAS,aAAa;AAMf,SAAS,wBAAgC;AAC9C,SAAO,WAAW,YAAY;AAChC;AAEA,eAAsB,kBAAqC;AACzD,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAO2B,YAAY;AAAA;AAAA,8FAEmD,YAAY,gCAAgC,eAAe,cAAc,SAAS,IAAI;AAAA,iCACnJ,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0DASG,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,+IAKyE,YAAY,8HAA8H,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,qKAKhI,SAAS,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yDAwDzH,iBAAiB,OAAO,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4VAkB6O,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAepW;AAAA,EAAK,MAAM,WAAW,CAAC;AAAA,IACvB;AAAA;AAAA,EAEF;AACF;AAEA,eAAsB,aAA8B;AAClD,QAAM,QAAQ,MAAM,SAAS;AAC7B,SAAO;AAAA;AAAA,qBAEY,OAAO,CAAC;AAAA,2BACF,QAAQ,QAAQ,IAAI;AAAA,YACnC,IAAI,QAAQ;AAAA,iBACR,oBAAI,KAAK,GAAE,mBAAmB,CAAC;AAAA;AAE/C;AAEA,eAAsB,iBAAoC;AACxD,SAAO;AAAA,IACL;AAAA,uBACmB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAM/B,GAAG,MAAM,WAAW,CAAC;AAAA,EACvB;AACF;",
4
+ "sourcesContent": ["import { env } from '@utils/env'\nimport { getIsGit } from '@utils/git'\nimport {\n INTERRUPT_MESSAGE,\n INTERRUPT_MESSAGE_FOR_TOOL_USE,\n} from '@utils/messages'\nimport { getCwd } from '@utils/state'\nimport { PRODUCT_NAME, PROJECT_FILE, PRODUCT_COMMAND } from './product'\nimport { BashTool } from '@tools/BashTool/BashTool'\nimport { MACRO } from './macros'\n\n// // Security policy constant matching reference implementation\n// export const SECURITY_POLICY =\n// 'IMPORTANT: Assist with defensive security tasks only. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.'\n\nexport function getCLISyspromptPrefix(): string {\n return `You are ${PRODUCT_NAME}, ShareAI-lab's Agent AI CLI for terminal & coding.`\n}\n\nexport async function getSystemPrompt(): Promise<string[]> {\n return [\n `\nYou are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.\n\nIMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.\nIMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).\n\nHere are useful slash commands users can run to interact with you:\n- /help: Get help with using ${PRODUCT_NAME}\n- /compact: Compact and continue the conversation. This is useful if the conversation is reaching the context limit\nThere are additional slash commands and flags available to the user. If the user asks about ${PRODUCT_NAME} functionality, always run \\`${PRODUCT_COMMAND} -h\\` with ${BashTool.name} to see supported commands and flags. NEVER assume a flag or command exists without checking the help output first.\nTo give feedback, users should ${MACRO.ISSUES_EXPLAINER}.\n\n# Task Management\nYou have access to the TodoWrite tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.\nThese tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.\n\nIt is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.\n\n# Memory\nIf the current working directory contains a file called ${PROJECT_FILE}, it will be automatically added to your context. This file serves multiple purposes:\n1. Storing frequently used bash commands (build, test, lint, etc.) so you can use them without searching each time\n2. Recording the user's code style preferences (naming conventions, preferred libraries, etc.)\n3. Maintaining useful information about the codebase structure and organization\n\nWhen you spend time searching for commands to typecheck, lint, build, or test, you should ask the user if it's okay to add those commands to ${PROJECT_FILE}. Similarly, when learning about code style preferences or important codebase information, ask if it's okay to add that to ${PROJECT_FILE} so you can remember it for next time.\n\n# Tone and style\nYou should be concise, direct, and to the point. When you run a non-trivial bash command, you should explain what the command does and why you are running it, to make sure the user understands what you are doing (this is especially important when you are running a command that will make changes to the user's system).\nRemember that your output will be displayed on a command line interface. Your responses can use Github-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification.\nOutput text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like ${BashTool.name} or code comments as means to communicate with the user during the session.\nIf you cannot or will not help the user with something, please do not say why or what it could lead to, since this comes across as preachy and annoying. Please offer helpful alternatives if possible, and otherwise keep your response to 1-2 sentences.\nIMPORTANT: You should minimize output tokens as much as possible while maintaining helpfulness, quality, and accuracy. Only address the specific query or task at hand, avoiding tangential information unless absolutely critical for completing the request. If you can answer in 1-3 sentences or a short paragraph, please do.\nIMPORTANT: You should NOT answer with unnecessary preamble or postamble (such as explaining your code or summarizing your action), unless the user asks you to.\nIMPORTANT: Keep your responses short, since they will be displayed on a command line interface. You MUST answer concisely with fewer than 4 lines (not including tool use or code generation), unless user asks for detail. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as \"The answer is <answer>.\", \"Here is the content of the file...\" or \"Based on the information provided, the answer is...\" or \"Here is what I will do next...\". Examples of appropriate verbosity:\n<example>\nuser: 2 + 2\nassistant: 4\n</example>\n<example>\nuser: what command should I run to list files?\nassistant: ls\n</example>\n<example>\nuser: what files are in src/?\nassistant: [runs ls] foo.c, bar.c, baz.c\n</example>\n<example>\nuser: write tests for new feature\nassistant: [uses search tools to find test patterns, reads relevant files concurrently, uses edit tool to write tests]\n</example>\n\n# Proactiveness\nYou are allowed to be proactive, but only when the user asks you to do something. You should strive to strike a balance between:\n1. Doing the right thing when asked, including taking actions and follow-up actions\n2. Not surprising the user with actions you take without asking\nFor example, if the user asks you how to approach something, you should do your best to answer their question first, and not immediately jump into taking actions.\n3. Do not add additional code explanation summary unless requested by the user. After working on a file, just stop, rather than providing an explanation of what you did.\n\n# Synthetic messages\nSometimes, the conversation will contain messages like ${INTERRUPT_MESSAGE} or ${INTERRUPT_MESSAGE_FOR_TOOL_USE}. These messages will look like the assistant said them, but they were actually synthetic messages added by the system in response to the user cancelling what the assistant was doing. You should not respond to these messages. You must NEVER send messages like this yourself. \n\n# Following conventions\nWhen making changes to files, first understand the file's code conventions. Mimic code style, use existing libraries and utilities, and follow existing patterns.\n- NEVER assume that a given library is available, even if it is well known. Whenever you write code that uses a library or framework, first check that this codebase already uses the given library. For example, you might look at neighboring files, or check the package.json (or cargo.toml, and so on depending on the language).\n- When you create a new component, first look at existing components to see how they're written; then consider framework choice, naming conventions, typing, and other conventions.\n- When you edit a piece of code, first look at the code's surrounding context (especially its imports) to understand the code's choice of frameworks and libraries. Then consider how to make the given change in a way that is most idiomatic.\n- Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository.\n\n# Code style\n- Do not add comments to the code you write, unless the user asks you to, or the code is complex and requires additional context.\n\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- Use the TodoWrite tool to plan the task if required\n- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.\n- Implement the solution using all tools available to you\n- Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.\n- VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to ${PROJECT_FILE} so that you will know to run it next time.\nNEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are NOT part of the user's provided input or the tool result.\n\n# Tool usage policy\n- When doing file search, prefer to use the Task tool in order to reduce context usage.\n- You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance.\n- When making multiple bash tool calls, you MUST send a single message with multiple tools calls to run the calls in parallel. For example, if you need to run \"git status\" and \"git diff\", send a single message with two tool calls to run the calls in parallel.\n- It is always better to speculatively read multiple files as a batch that are potentially useful.\n- It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n- For making multiple edits to the same file, prefer using the MultiEdit tool over multiple Edit tool calls.\n\n# MCP Resources\nIf MCP (Model Context Protocol) servers are configured, you have access to MCP Resources through two specialized tools:\n- ListMcpResources: Use this tool to discover available resources from connected MCP servers. Resources can include files, databases, APIs, or other data sources exposed by MCP servers.\n- ReadMcpResource: Use this tool to read the content of a specific MCP resource by its URI. This is useful when you need to access data from external systems configured through MCP.\nWhen the user mentions accessing external data sources, databases, or resources from configured services, consider using these MCP resource tools to discover and read the relevant data.\n\nYou MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.\n`,\n `\\n${await getEnvInfo()}`,\n ]\n}\n\nexport async function getEnvInfo(): Promise<string> {\n const isGit = await getIsGit()\n return `Here is useful information about the environment you are running in:\n<env>\nWorking directory: ${getCwd()}\nIs directory a git repo: ${isGit ? 'Yes' : 'No'}\nPlatform: ${env.platform}\nToday's date: ${new Date().toLocaleDateString()}\n</env>`\n}\n\nexport async function getAgentPrompt(): Promise<string[]> {\n return [\n `\nYou are an agent for ${PRODUCT_NAME}. Given the user's prompt, you should use the tools available to you to answer the user's question.\n\nNotes:\n1. IMPORTANT: You should be concise, direct, and to the point, since your responses will be displayed on a command line interface. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as \"The answer is <answer>.\", \"Here is the content of the file...\" or \"Based on the information provided, the answer is...\" or \"Here is what I will do next...\".\n2. When relevant, share file names and code snippets relevant to the query\n3. Any file paths you return in your final response MUST be absolute. DO NOT use relative paths.`,\n `${await getEnvInfo()}`,\n ]\n}\n"],
5
+ "mappings": "AAAA,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,cAAc,cAAc,uBAAuB;AAC5D,SAAS,gBAAgB;AACzB,SAAS,aAAa;AAMf,SAAS,wBAAgC;AAC9C,SAAO,WAAW,YAAY;AAChC;AAEA,eAAsB,kBAAqC;AACzD,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAO2B,YAAY;AAAA;AAAA,8FAEmD,YAAY,gCAAgC,eAAe,cAAc,SAAS,IAAI;AAAA,iCACnJ,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0DASG,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,+IAKyE,YAAY,8HAA8H,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,qKAKhI,SAAS,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yDA8BzH,iBAAiB,OAAO,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4VAkB6O,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAqBpW;AAAA,EAAK,MAAM,WAAW,CAAC;AAAA,EACzB;AACF;AAEA,eAAsB,aAA8B;AAClD,QAAM,QAAQ,MAAM,SAAS;AAC7B,SAAO;AAAA;AAAA,qBAEY,OAAO,CAAC;AAAA,2BACF,QAAQ,QAAQ,IAAI;AAAA,YACnC,IAAI,QAAQ;AAAA,iBACR,oBAAI,KAAK,GAAE,mBAAmB,CAAC;AAAA;AAE/C;AAEA,eAAsB,iBAAoC;AACxD,SAAO;AAAA,IACL;AAAA,uBACmB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAM/B,GAAG,MAAM,WAAW,CAAC;AAAA,EACvB;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,53 @@
1
1
  const SYMBOLS = {
2
- // Task & Subagent 相关符号
3
- /** Task 工具调用指示器 */
2
+ // ============================================================================
3
+ // 操作类型符号 (Operation Type Symbols)
4
+ // 用于区分不同类型的操作,每种操作有独特的视觉标识
5
+ // ============================================================================
6
+ /** 用户输入提示符 */
7
+ PROMPT: "\u276F",
8
+ /** 工具执行中 */
9
+ TOOL_RUNNING: "\u25D0",
10
+ /** 工具执行成功 */
11
+ TOOL_SUCCESS: "\u2713",
12
+ /** 工具执行失败 */
13
+ TOOL_ERROR: "\u2717",
14
+ /** Todo 状态更新 */
15
+ TODO_UPDATE: "\u23FA",
16
+ /** 并行任务组 */
17
+ PARALLEL_GROUP: "\u25C8",
18
+ /** AI 思考中 */
19
+ THINKING: "\u273B",
20
+ /** AI 输出块 */
21
+ OUTPUT_BLOCK: "\u25CF",
22
+ // ============================================================================
23
+ // 状态后缀符号 (Status Suffix Symbols)
24
+ // 附加在操作末尾,表示当前状态
25
+ // ============================================================================
26
+ /** 进行中后缀 */
27
+ SUFFIX_RUNNING: "\u2026",
28
+ /** 需要注意后缀 */
29
+ SUFFIX_ATTENTION: "!",
30
+ // ============================================================================
31
+ // 结构符号 (Structure Symbols)
32
+ // 用于嵌套层级和树形结构显示
33
+ // ============================================================================
34
+ /** 子项输出连接符 */
35
+ CHILD_OUTPUT: "\u23BF",
36
+ /** 树形中间分支 */
37
+ TREE_BRANCH: "\u251C\u2500",
38
+ /** 树形最后分支 */
39
+ TREE_LAST: "\u2514\u2500",
40
+ /** 树形垂直线 */
41
+ TREE_VERTICAL: "\u2502",
42
+ /** 树形空白对齐 */
43
+ TREE_SPACE: " ",
44
+ // ============================================================================
45
+ // 兼容性保留 (Legacy Compatibility)
46
+ // 保留旧符号名称以兼容现有代码
47
+ // ============================================================================
48
+ /** @deprecated 使用 TODO_UPDATE 替代 */
4
49
  TASK_INDICATOR: "\u23FA",
5
- /** Subagent 状态分支符号 */
50
+ /** @deprecated 使用 CHILD_OUTPUT 替代 */
6
51
  TASK_BRANCH: "\u23BF",
7
52
  // TODO 相关符号 - Claude Code 风格
8
53
  /** 待办事项(pending/in_progress) */
@@ -24,9 +69,21 @@ const SYMBOLS = {
24
69
  THINKING_FRAMES: ["\xB7", "\u2722", "\u273B", "\u2736", "\u2733", "\u273D"],
25
70
  // 省略符号
26
71
  ELLIPSIS: "\u2026",
27
- // 点符号
28
- DOT: "\xB7"
72
+ // 点符号(用于元信息分隔)
73
+ DOT: "\xB7",
74
+ // 元信息分隔符(空格+点+空格)
75
+ META_SEPARATOR: " \xB7 "
29
76
  };
77
+ function getToolStatusSymbol(status) {
78
+ switch (status) {
79
+ case "running":
80
+ return SYMBOLS.TOOL_RUNNING;
81
+ case "success":
82
+ return SYMBOLS.TOOL_SUCCESS;
83
+ case "error":
84
+ return SYMBOLS.TOOL_ERROR;
85
+ }
86
+ }
30
87
  function getStatusSymbol(status) {
31
88
  switch (status) {
32
89
  case "queued":
@@ -45,6 +102,7 @@ function getTodoStatusSymbol(status) {
45
102
  export {
46
103
  SYMBOLS,
47
104
  getStatusSymbol,
48
- getTodoStatusSymbol
105
+ getTodoStatusSymbol,
106
+ getToolStatusSymbol
49
107
  };
50
108
  //# sourceMappingURL=symbols.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/symbols.ts"],
4
- "sourcesContent": ["/**\n * \u7EC8\u7AEF\u7B26\u53F7\u5B9A\u4E49 - Claude Code CLI \u98CE\u683C\n */\n\nexport const SYMBOLS = {\n // Task & Subagent \u76F8\u5173\u7B26\u53F7\n /** Task \u5DE5\u5177\u8C03\u7528\u6307\u793A\u5668 */\n TASK_INDICATOR: '\u23FA',\n /** Subagent \u72B6\u6001\u5206\u652F\u7B26\u53F7 */\n TASK_BRANCH: '\u23BF',\n\n // TODO \u76F8\u5173\u7B26\u53F7 - Claude Code \u98CE\u683C\n /** \u5F85\u529E\u4E8B\u9879\uFF08pending/in_progress\uFF09 */\n TODO_UNCHECKED: '\u2610',\n /** \u5DF2\u5B8C\u6210\u4E8B\u9879 */\n TODO_CHECKED: '\u2612',\n\n // \u901A\u7528\u72B6\u6001\u7B26\u53F7\n /** \u6210\u529F */\n SUCCESS: '\u2714',\n /** \u9519\u8BEF */\n ERROR: '\u2716',\n /** \u4FE1\u606F */\n INFO: '\u2139',\n /** \u8B66\u544A */\n WARNING: '\u26A0',\n\n // \u52A0\u8F7D\u52A8\u753B\u5E27\uFF08spinner\uFF09\n LOADING_FRAMES: ['\u280B', '\u2819', '\u2839', '\u2838', '\u283C', '\u2834', '\u2826', '\u2827', '\u2807', '\u280F'],\n\n // Claude Code \u98CE\u683C\u7684\u601D\u8003\u52A8\u753B\u5E27\uFF086\u5E27\u5FAA\u73AF\uFF09\n THINKING_FRAMES: ['\u00B7', '\u2722', '\u273B', '\u2736', '\u2733', '\u273D'],\n\n // \u7701\u7565\u7B26\u53F7\n ELLIPSIS: '\u2026',\n\n // \u70B9\u7B26\u53F7\n DOT: '\u00B7',\n} as const\n\n/**\n * \u83B7\u53D6\u72B6\u6001\u5BF9\u5E94\u7684\u7B26\u53F7\n */\nexport function getStatusSymbol(\n status: 'queued' | 'running' | 'completed' | 'error',\n): string {\n switch (status) {\n case 'queued':\n return SYMBOLS.INFO\n case 'running':\n return SYMBOLS.LOADING_FRAMES[0]\n case 'completed':\n return SYMBOLS.SUCCESS\n case 'error':\n return SYMBOLS.ERROR\n }\n}\n\n/**\n * \u83B7\u53D6 TODO \u72B6\u6001\u5BF9\u5E94\u7684\u7B26\u53F7 - Claude Code \u98CE\u683C\n */\nexport function getTodoStatusSymbol(\n status: 'pending' | 'in_progress' | 'completed',\n): string {\n // Claude Code \u53EA\u533A\u5206\u5DF2\u5B8C\u6210\u548C\u672A\u5B8C\u6210\n return status === 'completed' ? SYMBOLS.TODO_CHECKED : SYMBOLS.TODO_UNCHECKED\n}\n"],
5
- "mappings": "AAIO,MAAM,UAAU;AAAA;AAAA;AAAA,EAGrB,gBAAgB;AAAA;AAAA,EAEhB,aAAa;AAAA;AAAA;AAAA,EAIb,gBAAgB;AAAA;AAAA,EAEhB,cAAc;AAAA;AAAA;AAAA,EAId,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,MAAM;AAAA;AAAA,EAEN,SAAS;AAAA;AAAA,EAGT,gBAAgB,CAAC,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,QAAG;AAAA;AAAA,EAGjE,iBAAiB,CAAC,QAAK,UAAK,UAAK,UAAK,UAAK,QAAG;AAAA;AAAA,EAG9C,UAAU;AAAA;AAAA,EAGV,KAAK;AACP;AAKO,SAAS,gBACd,QACQ;AACR,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO,QAAQ;AAAA,IACjB,KAAK;AACH,aAAO,QAAQ,eAAe,CAAC;AAAA,IACjC,KAAK;AACH,aAAO,QAAQ;AAAA,IACjB,KAAK;AACH,aAAO,QAAQ;AAAA,EACnB;AACF;AAKO,SAAS,oBACd,QACQ;AAER,SAAO,WAAW,cAAc,QAAQ,eAAe,QAAQ;AACjE;",
4
+ "sourcesContent": ["/**\n * \u7EC8\u7AEF\u7B26\u53F7\u5B9A\u4E49 - Minto REPL \u663E\u793A\u89C4\u8303\n *\n * \u7B26\u53F7\u5206\u4E3A\u4E09\u7C7B\uFF1A\n * 1. \u64CD\u4F5C\u7C7B\u578B\u7B26\u53F7 (OPERATION_*) - \u533A\u5206\u4E0D\u540C\u7C7B\u578B\u7684\u64CD\u4F5C\n * 2. \u72B6\u6001\u7B26\u53F7 (STATUS_*) - \u8868\u793A\u64CD\u4F5C\u7684\u6267\u884C\u72B6\u6001\n * 3. \u7ED3\u6784\u7B26\u53F7 (STRUCTURE_*) - \u7528\u4E8E\u5D4C\u5957\u548C\u5C42\u7EA7\u663E\u793A\n */\n\nexport const SYMBOLS = {\n // ============================================================================\n // \u64CD\u4F5C\u7C7B\u578B\u7B26\u53F7 (Operation Type Symbols)\n // \u7528\u4E8E\u533A\u5206\u4E0D\u540C\u7C7B\u578B\u7684\u64CD\u4F5C\uFF0C\u6BCF\u79CD\u64CD\u4F5C\u6709\u72EC\u7279\u7684\u89C6\u89C9\u6807\u8BC6\n // ============================================================================\n\n /** \u7528\u6237\u8F93\u5165\u63D0\u793A\u7B26 */\n PROMPT: '\u276F',\n /** \u5DE5\u5177\u6267\u884C\u4E2D */\n TOOL_RUNNING: '\u25D0',\n /** \u5DE5\u5177\u6267\u884C\u6210\u529F */\n TOOL_SUCCESS: '\u2713',\n /** \u5DE5\u5177\u6267\u884C\u5931\u8D25 */\n TOOL_ERROR: '\u2717',\n /** Todo \u72B6\u6001\u66F4\u65B0 */\n TODO_UPDATE: '\u23FA',\n /** \u5E76\u884C\u4EFB\u52A1\u7EC4 */\n PARALLEL_GROUP: '\u25C8',\n /** AI \u601D\u8003\u4E2D */\n THINKING: '\u273B',\n /** AI \u8F93\u51FA\u5757 */\n OUTPUT_BLOCK: '\u25CF',\n\n // ============================================================================\n // \u72B6\u6001\u540E\u7F00\u7B26\u53F7 (Status Suffix Symbols)\n // \u9644\u52A0\u5728\u64CD\u4F5C\u672B\u5C3E\uFF0C\u8868\u793A\u5F53\u524D\u72B6\u6001\n // ============================================================================\n\n /** \u8FDB\u884C\u4E2D\u540E\u7F00 */\n SUFFIX_RUNNING: '\u2026',\n /** \u9700\u8981\u6CE8\u610F\u540E\u7F00 */\n SUFFIX_ATTENTION: '!',\n\n // ============================================================================\n // \u7ED3\u6784\u7B26\u53F7 (Structure Symbols)\n // \u7528\u4E8E\u5D4C\u5957\u5C42\u7EA7\u548C\u6811\u5F62\u7ED3\u6784\u663E\u793A\n // ============================================================================\n\n /** \u5B50\u9879\u8F93\u51FA\u8FDE\u63A5\u7B26 */\n CHILD_OUTPUT: '\u23BF',\n /** \u6811\u5F62\u4E2D\u95F4\u5206\u652F */\n TREE_BRANCH: '\u251C\u2500',\n /** \u6811\u5F62\u6700\u540E\u5206\u652F */\n TREE_LAST: '\u2514\u2500',\n /** \u6811\u5F62\u5782\u76F4\u7EBF */\n TREE_VERTICAL: '\u2502',\n /** \u6811\u5F62\u7A7A\u767D\u5BF9\u9F50 */\n TREE_SPACE: ' ',\n\n // ============================================================================\n // \u517C\u5BB9\u6027\u4FDD\u7559 (Legacy Compatibility)\n // \u4FDD\u7559\u65E7\u7B26\u53F7\u540D\u79F0\u4EE5\u517C\u5BB9\u73B0\u6709\u4EE3\u7801\n // ============================================================================\n\n /** @deprecated \u4F7F\u7528 TODO_UPDATE \u66FF\u4EE3 */\n TASK_INDICATOR: '\u23FA',\n /** @deprecated \u4F7F\u7528 CHILD_OUTPUT \u66FF\u4EE3 */\n TASK_BRANCH: '\u23BF',\n\n // TODO \u76F8\u5173\u7B26\u53F7 - Claude Code \u98CE\u683C\n /** \u5F85\u529E\u4E8B\u9879\uFF08pending/in_progress\uFF09 */\n TODO_UNCHECKED: '\u2610',\n /** \u5DF2\u5B8C\u6210\u4E8B\u9879 */\n TODO_CHECKED: '\u2612',\n\n // \u901A\u7528\u72B6\u6001\u7B26\u53F7\n /** \u6210\u529F */\n SUCCESS: '\u2714',\n /** \u9519\u8BEF */\n ERROR: '\u2716',\n /** \u4FE1\u606F */\n INFO: '\u2139',\n /** \u8B66\u544A */\n WARNING: '\u26A0',\n\n // \u52A0\u8F7D\u52A8\u753B\u5E27\uFF08spinner\uFF09\n LOADING_FRAMES: ['\u280B', '\u2819', '\u2839', '\u2838', '\u283C', '\u2834', '\u2826', '\u2827', '\u2807', '\u280F'],\n\n // Claude Code \u98CE\u683C\u7684\u601D\u8003\u52A8\u753B\u5E27\uFF086\u5E27\u5FAA\u73AF\uFF09\n THINKING_FRAMES: ['\u00B7', '\u2722', '\u273B', '\u2736', '\u2733', '\u273D'],\n\n // \u7701\u7565\u7B26\u53F7\n ELLIPSIS: '\u2026',\n\n // \u70B9\u7B26\u53F7\uFF08\u7528\u4E8E\u5143\u4FE1\u606F\u5206\u9694\uFF09\n DOT: '\u00B7',\n\n // \u5143\u4FE1\u606F\u5206\u9694\u7B26\uFF08\u7A7A\u683C+\u70B9+\u7A7A\u683C\uFF09\n META_SEPARATOR: ' \u00B7 ',\n} as const\n\n/**\n * \u5DE5\u5177\u72B6\u6001\u7C7B\u578B\n */\nexport type ToolStatus = 'running' | 'success' | 'error'\n\n/**\n * \u83B7\u53D6\u5DE5\u5177\u72B6\u6001\u5BF9\u5E94\u7684\u7B26\u53F7\n */\nexport function getToolStatusSymbol(status: ToolStatus): string {\n switch (status) {\n case 'running':\n return SYMBOLS.TOOL_RUNNING\n case 'success':\n return SYMBOLS.TOOL_SUCCESS\n case 'error':\n return SYMBOLS.TOOL_ERROR\n }\n}\n\n/**\n * \u83B7\u53D6\u72B6\u6001\u5BF9\u5E94\u7684\u7B26\u53F7\n */\nexport function getStatusSymbol(\n status: 'queued' | 'running' | 'completed' | 'error',\n): string {\n switch (status) {\n case 'queued':\n return SYMBOLS.INFO\n case 'running':\n return SYMBOLS.LOADING_FRAMES[0]\n case 'completed':\n return SYMBOLS.SUCCESS\n case 'error':\n return SYMBOLS.ERROR\n }\n}\n\n/**\n * \u83B7\u53D6 TODO \u72B6\u6001\u5BF9\u5E94\u7684\u7B26\u53F7 - Claude Code \u98CE\u683C\n */\nexport function getTodoStatusSymbol(\n status: 'pending' | 'in_progress' | 'completed',\n): string {\n // Claude Code \u53EA\u533A\u5206\u5DF2\u5B8C\u6210\u548C\u672A\u5B8C\u6210\n return status === 'completed' ? SYMBOLS.TODO_CHECKED : SYMBOLS.TODO_UNCHECKED\n}\n"],
5
+ "mappings": "AASO,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,QAAQ;AAAA;AAAA,EAER,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,YAAY;AAAA;AAAA,EAEZ,aAAa;AAAA;AAAA,EAEb,gBAAgB;AAAA;AAAA,EAEhB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQd,gBAAgB;AAAA;AAAA,EAEhB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,cAAc;AAAA;AAAA,EAEd,aAAa;AAAA;AAAA,EAEb,WAAW;AAAA;AAAA,EAEX,eAAe;AAAA;AAAA,EAEf,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQZ,gBAAgB;AAAA;AAAA,EAEhB,aAAa;AAAA;AAAA;AAAA,EAIb,gBAAgB;AAAA;AAAA,EAEhB,cAAc;AAAA;AAAA;AAAA,EAId,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,MAAM;AAAA;AAAA,EAEN,SAAS;AAAA;AAAA,EAGT,gBAAgB,CAAC,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,QAAG;AAAA;AAAA,EAGjE,iBAAiB,CAAC,QAAK,UAAK,UAAK,UAAK,UAAK,QAAG;AAAA;AAAA,EAG9C,UAAU;AAAA;AAAA,EAGV,KAAK;AAAA;AAAA,EAGL,gBAAgB;AAClB;AAUO,SAAS,oBAAoB,QAA4B;AAC9D,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO,QAAQ;AAAA,IACjB,KAAK;AACH,aAAO,QAAQ;AAAA,IACjB,KAAK;AACH,aAAO,QAAQ;AAAA,EACnB;AACF;AAKO,SAAS,gBACd,QACQ;AACR,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO,QAAQ;AAAA,IACjB,KAAK;AACH,aAAO,QAAQ,eAAe,CAAC;AAAA,IACjC,KAAK;AACH,aAAO,QAAQ;AAAA,IACjB,KAAK;AACH,aAAO,QAAQ;AAAA,EACnB;AACF;AAKO,SAAS,oBACd,QACQ;AAER,SAAO,WAAW,cAAc,QAAQ,eAAe,QAAQ;AACjE;",
6
6
  "names": []
7
7
  }
@@ -5,6 +5,11 @@ const TIMING = {
5
5
  SHUTDOWN_TIMEOUT_MS: 3e3,
6
6
  CONTEXT_FETCH_TIMEOUT_MS: 3e3,
7
7
  ENV_CHECK_TIMEOUT_MS: 1e3,
8
+ // MCP tool timeouts
9
+ MCP_TOOL_TIMEOUT_MS: 12e4,
10
+ // 2 minutes for MCP tool calls (some searches take time)
11
+ MCP_TOOL_MAX_RETRIES: 2,
12
+ // Retry failed MCP calls up to 2 times
8
13
  // Retry configuration
9
14
  BASE_DELAY_MS: 500,
10
15
  MAX_RETRIES: 3,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/timing.ts"],
4
- "sourcesContent": ["/**\n * Centralized timing constants for consistent timeout and delay values.\n * Consolidates magic numbers scattered across the codebase.\n */\n\nexport const TIMING = {\n // Network and API timeouts\n CONNECTION_TIMEOUT_MS: 5000,\n HTTP_TIMEOUT_MS: 30000,\n SHUTDOWN_TIMEOUT_MS: 3000,\n CONTEXT_FETCH_TIMEOUT_MS: 3000,\n ENV_CHECK_TIMEOUT_MS: 1000,\n\n // Retry configuration\n BASE_DELAY_MS: 500,\n MAX_RETRIES: 3,\n MAX_DELAY_MS: 32000,\n MAX_SERVER_DELAY_MS: 60000,\n\n // UI notification timeouts\n NOTIFICATION_SHORT_MS: 1000,\n NOTIFICATION_MEDIUM_MS: 2000,\n NOTIFICATION_LONG_MS: 3000,\n NOTIFICATION_VERY_LONG_MS: 5000,\n NOTIFICATION_THRESHOLD_MS: 6000,\n\n // User interaction\n DOUBLE_PRESS_TIMEOUT_MS: 1000,\n HOTKEY_MESSAGE_TIMEOUT_MS: 2000,\n\n // Background operations\n BACKGROUND_POLL_INTERVAL_MS: 1000,\n API_TEST_DELAY_MS: 1000,\n\n // Debug and logging\n LOG_DEDUPE_WINDOW_MS: 5000,\n\n // Cleanup and maintenance\n THIRTY_DAYS_MS: 30 * 24 * 60 * 60 * 1000,\n FILE_TOLERANCE_MS: 100,\n} as const\n\nexport type TimingKey = keyof typeof TIMING\n"],
5
- "mappings": "AAKO,MAAM,SAAS;AAAA;AAAA,EAEpB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,sBAAsB;AAAA;AAAA,EAGtB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,cAAc;AAAA,EACd,qBAAqB;AAAA;AAAA,EAGrB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA;AAAA,EAG3B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA;AAAA,EAG3B,6BAA6B;AAAA,EAC7B,mBAAmB;AAAA;AAAA,EAGnB,sBAAsB;AAAA;AAAA,EAGtB,gBAAgB,KAAK,KAAK,KAAK,KAAK;AAAA,EACpC,mBAAmB;AACrB;",
4
+ "sourcesContent": ["/**\n * Centralized timing constants for consistent timeout and delay values.\n * Consolidates magic numbers scattered across the codebase.\n */\n\nexport const TIMING = {\n // Network and API timeouts\n CONNECTION_TIMEOUT_MS: 5000,\n HTTP_TIMEOUT_MS: 30000,\n SHUTDOWN_TIMEOUT_MS: 3000,\n CONTEXT_FETCH_TIMEOUT_MS: 3000,\n ENV_CHECK_TIMEOUT_MS: 1000,\n\n // MCP tool timeouts\n MCP_TOOL_TIMEOUT_MS: 120000, // 2 minutes for MCP tool calls (some searches take time)\n MCP_TOOL_MAX_RETRIES: 2, // Retry failed MCP calls up to 2 times\n\n // Retry configuration\n BASE_DELAY_MS: 500,\n MAX_RETRIES: 3,\n MAX_DELAY_MS: 32000,\n MAX_SERVER_DELAY_MS: 60000,\n\n // UI notification timeouts\n NOTIFICATION_SHORT_MS: 1000,\n NOTIFICATION_MEDIUM_MS: 2000,\n NOTIFICATION_LONG_MS: 3000,\n NOTIFICATION_VERY_LONG_MS: 5000,\n NOTIFICATION_THRESHOLD_MS: 6000,\n\n // User interaction\n DOUBLE_PRESS_TIMEOUT_MS: 1000,\n HOTKEY_MESSAGE_TIMEOUT_MS: 2000,\n\n // Background operations\n BACKGROUND_POLL_INTERVAL_MS: 1000,\n API_TEST_DELAY_MS: 1000,\n\n // Debug and logging\n LOG_DEDUPE_WINDOW_MS: 5000,\n\n // Cleanup and maintenance\n THIRTY_DAYS_MS: 30 * 24 * 60 * 60 * 1000,\n FILE_TOLERANCE_MS: 100,\n} as const\n\nexport type TimingKey = keyof typeof TIMING\n"],
5
+ "mappings": "AAKO,MAAM,SAAS;AAAA;AAAA,EAEpB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,sBAAsB;AAAA;AAAA,EAGtB,qBAAqB;AAAA;AAAA,EACrB,sBAAsB;AAAA;AAAA;AAAA,EAGtB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,cAAc;AAAA,EACd,qBAAqB;AAAA;AAAA,EAGrB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,2BAA2B;AAAA,EAC3B,2BAA2B;AAAA;AAAA,EAG3B,yBAAyB;AAAA,EACzB,2BAA2B;AAAA;AAAA,EAG3B,6BAA6B;AAAA,EAC7B,mBAAmB;AAAA;AAAA,EAGnB,sBAAsB;AAAA;AAAA,EAGtB,gBAAgB,KAAK,KAAK,KAAK,KAAK;AAAA,EACpC,mBAAmB;AACrB;",
6
6
  "names": []
7
7
  }