centaurus-cli 3.0.0 → 3.1.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 (552) hide show
  1. package/dist/ai/types.js +0 -1
  2. package/dist/ai/types.js.map +1 -1
  3. package/dist/cli-adapter.js +5047 -5037
  4. package/dist/cli-adapter.js.map +1 -1
  5. package/dist/commands/CommandParser.js +372 -315
  6. package/dist/commands/CommandParser.js.map +1 -1
  7. package/dist/config/build-config.js +11 -42
  8. package/dist/config/build-config.js.map +1 -1
  9. package/dist/config/defaultConfig.js +94 -82
  10. package/dist/config/defaultConfig.js.map +1 -1
  11. package/dist/config/manager.js +144 -160
  12. package/dist/config/manager.js.map +1 -1
  13. package/dist/config/mcp-config-manager.js +411 -364
  14. package/dist/config/mcp-config-manager.js.map +1 -1
  15. package/dist/config/models.js +118 -185
  16. package/dist/config/models.js.map +1 -1
  17. package/dist/config/slash-commands.js +186 -184
  18. package/dist/config/slash-commands.js.map +1 -1
  19. package/dist/config/types.js +33 -26
  20. package/dist/config/types.js.map +1 -1
  21. package/dist/context/command-detector.js +63 -67
  22. package/dist/context/command-detector.js.map +1 -1
  23. package/dist/context/context-manager.js +533 -518
  24. package/dist/context/context-manager.js.map +1 -1
  25. package/dist/context/handlers/docker-handler.js +518 -576
  26. package/dist/context/handlers/docker-handler.js.map +1 -1
  27. package/dist/context/handlers/ssh-handler.js +1050 -1109
  28. package/dist/context/handlers/ssh-handler.js.map +1 -1
  29. package/dist/context/handlers/wsl-handler.js +558 -630
  30. package/dist/context/handlers/wsl-handler.js.map +1 -1
  31. package/dist/context/index.js +42 -6
  32. package/dist/context/index.js.map +1 -1
  33. package/dist/context/subshell-handler.js +0 -4
  34. package/dist/context/subshell-handler.js.map +1 -1
  35. package/dist/context/types.js +20 -31
  36. package/dist/context/types.js.map +1 -1
  37. package/dist/hooks/useConnectivity.js +13 -10
  38. package/dist/hooks/useConnectivity.js.map +1 -1
  39. package/dist/hooks/useTerminalDimensions.js +67 -79
  40. package/dist/hooks/useTerminalDimensions.js.map +1 -1
  41. package/dist/index.js +228 -251
  42. package/dist/index.js.map +1 -1
  43. package/dist/mcp/mcp-command-handler.js +297 -260
  44. package/dist/mcp/mcp-command-handler.js.map +1 -1
  45. package/dist/mcp/mcp-server-manager.js +139 -155
  46. package/dist/mcp/mcp-server-manager.js.map +1 -1
  47. package/dist/mcp/mcp-tool-wrapper.js +74 -94
  48. package/dist/mcp/mcp-tool-wrapper.js.map +1 -1
  49. package/dist/services/ai-autocomplete-agent.js +169 -181
  50. package/dist/services/ai-autocomplete-agent.js.map +1 -1
  51. package/dist/services/ai-context-injector.js +180 -93
  52. package/dist/services/ai-context-injector.js.map +1 -1
  53. package/dist/services/ai-service-client.js +513 -456
  54. package/dist/services/ai-service-client.js.map +1 -1
  55. package/dist/services/api-client.js +443 -441
  56. package/dist/services/api-client.js.map +1 -1
  57. package/dist/services/auth-handler.js +162 -198
  58. package/dist/services/auth-handler.js.map +1 -1
  59. package/dist/services/background-task-manager.js +258 -282
  60. package/dist/services/background-task-manager.js.map +1 -1
  61. package/dist/services/checkpoint-manager.js +1513 -973
  62. package/dist/services/checkpoint-manager.js.map +1 -1
  63. package/dist/services/clipboard-service.js +151 -200
  64. package/dist/services/clipboard-service.js.map +1 -1
  65. package/dist/services/connectivity-manager.js +63 -65
  66. package/dist/services/connectivity-manager.js.map +1 -1
  67. package/dist/services/conversation-manager.js +118 -121
  68. package/dist/services/conversation-manager.js.map +1 -1
  69. package/dist/services/environment-context-injector.js +160 -187
  70. package/dist/services/environment-context-injector.js.map +1 -1
  71. package/dist/services/fast-context-agent.js +203 -243
  72. package/dist/services/fast-context-agent.js.map +1 -1
  73. package/dist/services/input-detection-agent.js +190 -202
  74. package/dist/services/input-detection-agent.js.map +1 -1
  75. package/dist/services/input-requirement-detector.js +155 -189
  76. package/dist/services/input-requirement-detector.js.map +1 -1
  77. package/dist/services/local-chat-storage.js +342 -365
  78. package/dist/services/local-chat-storage.js.map +1 -1
  79. package/dist/services/monitored-shell-manager.js +225 -233
  80. package/dist/services/monitored-shell-manager.js.map +1 -1
  81. package/dist/services/ollama-service.js +293 -310
  82. package/dist/services/ollama-service.js.map +1 -1
  83. package/dist/services/rules-storage.js +142 -0
  84. package/dist/services/rules-storage.js.map +1 -0
  85. package/dist/services/session-quota-manager.js +219 -235
  86. package/dist/services/session-quota-manager.js.map +1 -1
  87. package/dist/services/shell-input-agent.js +299 -334
  88. package/dist/services/shell-input-agent.js.map +1 -1
  89. package/dist/services/sub-agent-manager.js +459 -501
  90. package/dist/services/sub-agent-manager.js.map +1 -1
  91. package/dist/services/warpify-detector.js +133 -183
  92. package/dist/services/warpify-detector.js.map +1 -1
  93. package/dist/services/workflow-storage.js +202 -217
  94. package/dist/services/workflow-storage.js.map +1 -1
  95. package/dist/test-ssh-handler.js +148 -193
  96. package/dist/test-ssh-handler.js.map +1 -1
  97. package/dist/tools/add-mcp.js +161 -0
  98. package/dist/tools/add-mcp.js.map +1 -0
  99. package/dist/tools/background-command.js +240 -273
  100. package/dist/tools/background-command.js.map +1 -1
  101. package/dist/tools/command.js +447 -440
  102. package/dist/tools/command.js.map +1 -1
  103. package/dist/tools/create-image.js +172 -202
  104. package/dist/tools/create-image.js.map +1 -1
  105. package/dist/tools/enter-remote-session.js +169 -215
  106. package/dist/tools/enter-remote-session.js.map +1 -1
  107. package/dist/tools/fast-context.js +60 -67
  108. package/dist/tools/fast-context.js.map +1 -1
  109. package/dist/tools/file-ops.js +605 -537
  110. package/dist/tools/file-ops.js.map +1 -1
  111. package/dist/tools/find-files.js +262 -303
  112. package/dist/tools/find-files.js.map +1 -1
  113. package/dist/tools/get-diff.js +423 -400
  114. package/dist/tools/get-diff.js.map +1 -1
  115. package/dist/tools/grep-search.js +966 -948
  116. package/dist/tools/grep-search.js.map +1 -1
  117. package/dist/tools/inspect-symbol.js +308 -323
  118. package/dist/tools/inspect-symbol.js.map +1 -1
  119. package/dist/tools/plan-mode.js +459 -503
  120. package/dist/tools/plan-mode.js.map +1 -1
  121. package/dist/tools/read-binary-file.js +160 -190
  122. package/dist/tools/read-binary-file.js.map +1 -1
  123. package/dist/tools/registry.js +100 -84
  124. package/dist/tools/registry.js.map +1 -1
  125. package/dist/tools/reproduce_issue.js +170 -151
  126. package/dist/tools/reproduce_issue.js.map +1 -1
  127. package/dist/tools/sub-agent.js +223 -228
  128. package/dist/tools/sub-agent.js.map +1 -1
  129. package/dist/tools/task-complete.js +28 -27
  130. package/dist/tools/task-complete.js.map +1 -1
  131. package/dist/tools/types.js +0 -1
  132. package/dist/tools/types.js.map +1 -1
  133. package/dist/tools/validation.js +96 -118
  134. package/dist/tools/validation.js.map +1 -1
  135. package/dist/tools/web-search.js +194 -194
  136. package/dist/tools/web-search.js.map +1 -1
  137. package/dist/tools/workflow-tool.js +77 -82
  138. package/dist/tools/workflow-tool.js.map +1 -1
  139. package/dist/types/index.js +0 -1
  140. package/dist/types/index.js.map +1 -1
  141. package/dist/types/rule.js +1 -0
  142. package/dist/types/rule.js.map +1 -0
  143. package/dist/types/workflow.js +0 -7
  144. package/dist/types/workflow.js.map +1 -1
  145. package/dist/ui/components/AgentTimer.js +24 -25
  146. package/dist/ui/components/AgentTimer.js.map +1 -1
  147. package/dist/ui/components/App.js +3266 -3249
  148. package/dist/ui/components/App.js.map +1 -1
  149. package/dist/ui/components/AuthScreen.js +22 -34
  150. package/dist/ui/components/AuthScreen.js.map +1 -1
  151. package/dist/ui/components/AuthWelcomeScreen.js +30 -24
  152. package/dist/ui/components/AuthWelcomeScreen.js.map +1 -1
  153. package/dist/ui/components/Breadcrumbs.js +53 -82
  154. package/dist/ui/components/Breadcrumbs.js.map +1 -1
  155. package/dist/ui/components/CircularSelectInput.js +59 -67
  156. package/dist/ui/components/CircularSelectInput.js.map +1 -1
  157. package/dist/ui/components/ClipboardFileAutocomplete.js +78 -39
  158. package/dist/ui/components/ClipboardFileAutocomplete.js.map +1 -1
  159. package/dist/ui/components/CodeBlock.js +24 -42
  160. package/dist/ui/components/CodeBlock.js.map +1 -1
  161. package/dist/ui/components/ConfigViewer.js +18 -25
  162. package/dist/ui/components/ConfigViewer.js.map +1 -1
  163. package/dist/ui/components/ConfirmPrompt.js +49 -71
  164. package/dist/ui/components/ConfirmPrompt.js.map +1 -1
  165. package/dist/ui/components/ConnectionStatusMessage.js +32 -83
  166. package/dist/ui/components/ConnectionStatusMessage.js.map +1 -1
  167. package/dist/ui/components/ContextWindowIndicator.js +34 -49
  168. package/dist/ui/components/ContextWindowIndicator.js.map +1 -1
  169. package/dist/ui/components/DetailedPlanReviewScreen.js +104 -106
  170. package/dist/ui/components/DetailedPlanReviewScreen.js.map +1 -1
  171. package/dist/ui/components/DiffViewer.js +68 -121
  172. package/dist/ui/components/DiffViewer.js.map +1 -1
  173. package/dist/ui/components/ErrorBoundary.js +40 -48
  174. package/dist/ui/components/ErrorBoundary.js.map +1 -1
  175. package/dist/ui/components/FileCreationPreview.js +29 -60
  176. package/dist/ui/components/FileCreationPreview.js.map +1 -1
  177. package/dist/ui/components/FileOperation.js +34 -29
  178. package/dist/ui/components/FileOperation.js.map +1 -1
  179. package/dist/ui/components/FileTagAutocomplete.js +55 -25
  180. package/dist/ui/components/FileTagAutocomplete.js.map +1 -1
  181. package/dist/ui/components/FontRecommendation.js.map +1 -1
  182. package/dist/ui/components/GitDiffBreadcrumb.js +29 -0
  183. package/dist/ui/components/GitDiffBreadcrumb.js.map +1 -0
  184. package/dist/ui/components/InputBox.js +1620 -2150
  185. package/dist/ui/components/InputBox.js.map +1 -1
  186. package/dist/ui/components/InteractiveShell.js +234 -352
  187. package/dist/ui/components/InteractiveShell.js.map +1 -1
  188. package/dist/ui/components/KeyboardHelp.js +34 -35
  189. package/dist/ui/components/KeyboardHelp.js.map +1 -1
  190. package/dist/ui/components/LoadingIndicator.js +22 -25
  191. package/dist/ui/components/LoadingIndicator.js.map +1 -1
  192. package/dist/ui/components/MCPAddScreen.js +40 -51
  193. package/dist/ui/components/MCPAddScreen.js.map +1 -1
  194. package/dist/ui/components/MCPListScreen.js +40 -48
  195. package/dist/ui/components/MCPListScreen.js.map +1 -1
  196. package/dist/ui/components/MCPServerListScreen.js +49 -56
  197. package/dist/ui/components/MCPServerListScreen.js.map +1 -1
  198. package/dist/ui/components/MarkdownRenderer.js +69 -96
  199. package/dist/ui/components/MarkdownRenderer.js.map +1 -1
  200. package/dist/ui/components/MessageBox.js +66 -48
  201. package/dist/ui/components/MessageBox.js.map +1 -1
  202. package/dist/ui/components/MessageDisplay.js +150 -142
  203. package/dist/ui/components/MessageDisplay.js.map +1 -1
  204. package/dist/ui/components/MonitorModeAIPanel.js +46 -65
  205. package/dist/ui/components/MonitorModeAIPanel.js.map +1 -1
  206. package/dist/ui/components/MultiLineInput.js +243 -277
  207. package/dist/ui/components/MultiLineInput.js.map +1 -1
  208. package/dist/ui/components/PasswordPrompt.js +37 -18
  209. package/dist/ui/components/PasswordPrompt.js.map +1 -1
  210. package/dist/ui/components/PlanAcceptedMessage.js +27 -38
  211. package/dist/ui/components/PlanAcceptedMessage.js.map +1 -1
  212. package/dist/ui/components/PlanReviewScreen.js +46 -50
  213. package/dist/ui/components/PlanReviewScreen.js.map +1 -1
  214. package/dist/ui/components/RulesEditorScreen.js +81 -0
  215. package/dist/ui/components/RulesEditorScreen.js.map +1 -0
  216. package/dist/ui/components/SelectPrompt.js +19 -8
  217. package/dist/ui/components/SelectPrompt.js.map +1 -1
  218. package/dist/ui/components/ShimmerText.js +44 -0
  219. package/dist/ui/components/ShimmerText.js.map +1 -0
  220. package/dist/ui/components/SlashCommandAutocomplete.js +49 -22
  221. package/dist/ui/components/SlashCommandAutocomplete.js.map +1 -1
  222. package/dist/ui/components/StatusBar.js +56 -87
  223. package/dist/ui/components/StatusBar.js.map +1 -1
  224. package/dist/ui/components/StreamingMessageDisplay.js +116 -99
  225. package/dist/ui/components/StreamingMessageDisplay.js.map +1 -1
  226. package/dist/ui/components/TaskCompletedMessage.js +28 -23
  227. package/dist/ui/components/TaskCompletedMessage.js.map +1 -1
  228. package/dist/ui/components/TaskProgressIndicator.js +44 -70
  229. package/dist/ui/components/TaskProgressIndicator.js.map +1 -1
  230. package/dist/ui/components/ThinkingDisplay.js +44 -41
  231. package/dist/ui/components/ThinkingDisplay.js.map +1 -1
  232. package/dist/ui/components/ToolExecutionMessage.js +772 -1326
  233. package/dist/ui/components/ToolExecutionMessage.js.map +1 -1
  234. package/dist/ui/components/ToolExecutionStatus.js +53 -84
  235. package/dist/ui/components/ToolExecutionStatus.js.map +1 -1
  236. package/dist/ui/components/ToolResult.js +22 -15
  237. package/dist/ui/components/ToolResult.js.map +1 -1
  238. package/dist/ui/components/VersionUpdatePrompt.js +88 -120
  239. package/dist/ui/components/VersionUpdatePrompt.js.map +1 -1
  240. package/dist/ui/components/WelcomeBanner.js +176 -26
  241. package/dist/ui/components/WelcomeBanner.js.map +1 -1
  242. package/dist/ui/components/WorkflowCreatorScreen.js +94 -161
  243. package/dist/ui/components/WorkflowCreatorScreen.js.map +1 -1
  244. package/dist/utils/ansi-encoder.js +30 -61
  245. package/dist/utils/ansi-encoder.js.map +1 -1
  246. package/dist/utils/chat-formatter.js +327 -305
  247. package/dist/utils/chat-formatter.js.map +1 -1
  248. package/dist/utils/command-history.js +152 -174
  249. package/dist/utils/command-history.js.map +1 -1
  250. package/dist/utils/context-sanitizer.js +49 -112
  251. package/dist/utils/context-sanitizer.js.map +1 -1
  252. package/dist/utils/conversation-logger.js +292 -324
  253. package/dist/utils/conversation-logger.js.map +1 -1
  254. package/dist/utils/custom-commands-manager.js +126 -131
  255. package/dist/utils/custom-commands-manager.js.map +1 -1
  256. package/dist/utils/editor-utils.js +732 -837
  257. package/dist/utils/editor-utils.js.map +1 -1
  258. package/dist/utils/file.js +174 -213
  259. package/dist/utils/file.js.map +1 -1
  260. package/dist/utils/git-stats.js +169 -0
  261. package/dist/utils/git-stats.js.map +1 -0
  262. package/dist/utils/input-classifier.js +960 -482
  263. package/dist/utils/input-classifier.js.map +1 -1
  264. package/dist/utils/logger.js +48 -73
  265. package/dist/utils/logger.js.map +1 -1
  266. package/dist/utils/markdown-parser.js +277 -310
  267. package/dist/utils/markdown-parser.js.map +1 -1
  268. package/dist/utils/rule-reference-resolver.js +54 -0
  269. package/dist/utils/rule-reference-resolver.js.map +1 -0
  270. package/dist/utils/shell.js +144 -156
  271. package/dist/utils/shell.js.map +1 -1
  272. package/dist/utils/state.js +23 -22
  273. package/dist/utils/state.js.map +1 -1
  274. package/dist/utils/syntax-checker.js +279 -327
  275. package/dist/utils/syntax-checker.js.map +1 -1
  276. package/dist/utils/terminal-output.js +199 -302
  277. package/dist/utils/terminal-output.js.map +1 -1
  278. package/dist/utils/text-clipboard.js +47 -70
  279. package/dist/utils/text-clipboard.js.map +1 -1
  280. package/dist/utils/unicode-sanitizer.js +134 -197
  281. package/dist/utils/unicode-sanitizer.js.map +1 -1
  282. package/dist/utils/version-checker.js +46 -56
  283. package/dist/utils/version-checker.js.map +1 -1
  284. package/package.json +6 -4
  285. package/dist/ai/types.d.ts +0 -20
  286. package/dist/ai/types.d.ts.map +0 -1
  287. package/dist/cli-adapter.d.ts +0 -511
  288. package/dist/cli-adapter.d.ts.map +0 -1
  289. package/dist/commands/CommandParser.d.ts +0 -27
  290. package/dist/commands/CommandParser.d.ts.map +0 -1
  291. package/dist/config/build-config.d.ts +0 -42
  292. package/dist/config/build-config.d.ts.map +0 -1
  293. package/dist/config/defaultConfig.d.ts +0 -79
  294. package/dist/config/defaultConfig.d.ts.map +0 -1
  295. package/dist/config/manager.d.ts +0 -62
  296. package/dist/config/manager.d.ts.map +0 -1
  297. package/dist/config/mcp-config-manager.d.ts +0 -79
  298. package/dist/config/mcp-config-manager.d.ts.map +0 -1
  299. package/dist/config/models.d.ts +0 -83
  300. package/dist/config/models.d.ts.map +0 -1
  301. package/dist/config/slash-commands.d.ts +0 -23
  302. package/dist/config/slash-commands.d.ts.map +0 -1
  303. package/dist/config/types.d.ts +0 -35
  304. package/dist/config/types.d.ts.map +0 -1
  305. package/dist/context/command-detector.d.ts +0 -50
  306. package/dist/context/command-detector.d.ts.map +0 -1
  307. package/dist/context/context-manager.d.ts +0 -157
  308. package/dist/context/context-manager.d.ts.map +0 -1
  309. package/dist/context/handlers/docker-handler.d.ts +0 -130
  310. package/dist/context/handlers/docker-handler.d.ts.map +0 -1
  311. package/dist/context/handlers/ssh-handler.d.ts +0 -201
  312. package/dist/context/handlers/ssh-handler.d.ts.map +0 -1
  313. package/dist/context/handlers/wsl-handler.d.ts +0 -146
  314. package/dist/context/handlers/wsl-handler.d.ts.map +0 -1
  315. package/dist/context/index.d.ts +0 -8
  316. package/dist/context/index.d.ts.map +0 -1
  317. package/dist/context/subshell-handler.d.ts +0 -165
  318. package/dist/context/subshell-handler.d.ts.map +0 -1
  319. package/dist/context/types.d.ts +0 -70
  320. package/dist/context/types.d.ts.map +0 -1
  321. package/dist/hooks/useConnectivity.d.ts +0 -2
  322. package/dist/hooks/useConnectivity.d.ts.map +0 -1
  323. package/dist/hooks/useTerminalDimensions.d.ts +0 -41
  324. package/dist/hooks/useTerminalDimensions.d.ts.map +0 -1
  325. package/dist/index.d.ts +0 -9
  326. package/dist/index.d.ts.map +0 -1
  327. package/dist/mcp/mcp-command-handler.d.ts +0 -47
  328. package/dist/mcp/mcp-command-handler.d.ts.map +0 -1
  329. package/dist/mcp/mcp-server-manager.d.ts +0 -30
  330. package/dist/mcp/mcp-server-manager.d.ts.map +0 -1
  331. package/dist/mcp/mcp-tool-wrapper.d.ts +0 -12
  332. package/dist/mcp/mcp-tool-wrapper.d.ts.map +0 -1
  333. package/dist/services/ai-autocomplete-agent.d.ts +0 -39
  334. package/dist/services/ai-autocomplete-agent.d.ts.map +0 -1
  335. package/dist/services/ai-context-injector.d.ts +0 -41
  336. package/dist/services/ai-context-injector.d.ts.map +0 -1
  337. package/dist/services/ai-service-client.d.ts +0 -128
  338. package/dist/services/ai-service-client.d.ts.map +0 -1
  339. package/dist/services/api-client.d.ts +0 -353
  340. package/dist/services/api-client.d.ts.map +0 -1
  341. package/dist/services/auth-handler.d.ts +0 -30
  342. package/dist/services/auth-handler.d.ts.map +0 -1
  343. package/dist/services/background-task-manager.d.ts +0 -114
  344. package/dist/services/background-task-manager.d.ts.map +0 -1
  345. package/dist/services/checkpoint-manager.d.ts +0 -167
  346. package/dist/services/checkpoint-manager.d.ts.map +0 -1
  347. package/dist/services/clipboard-service.d.ts +0 -37
  348. package/dist/services/clipboard-service.d.ts.map +0 -1
  349. package/dist/services/connectivity-manager.d.ts +0 -18
  350. package/dist/services/connectivity-manager.d.ts.map +0 -1
  351. package/dist/services/conversation-manager.d.ts +0 -73
  352. package/dist/services/conversation-manager.d.ts.map +0 -1
  353. package/dist/services/environment-context-injector.d.ts +0 -69
  354. package/dist/services/environment-context-injector.d.ts.map +0 -1
  355. package/dist/services/fast-context-agent.d.ts +0 -12
  356. package/dist/services/fast-context-agent.d.ts.map +0 -1
  357. package/dist/services/input-detection-agent.d.ts +0 -40
  358. package/dist/services/input-detection-agent.d.ts.map +0 -1
  359. package/dist/services/input-requirement-detector.d.ts +0 -28
  360. package/dist/services/input-requirement-detector.d.ts.map +0 -1
  361. package/dist/services/local-chat-storage.d.ts +0 -182
  362. package/dist/services/local-chat-storage.d.ts.map +0 -1
  363. package/dist/services/monitored-shell-manager.d.ts +0 -120
  364. package/dist/services/monitored-shell-manager.d.ts.map +0 -1
  365. package/dist/services/ollama-service.d.ts +0 -197
  366. package/dist/services/ollama-service.d.ts.map +0 -1
  367. package/dist/services/session-quota-manager.d.ts +0 -101
  368. package/dist/services/session-quota-manager.d.ts.map +0 -1
  369. package/dist/services/shell-input-agent.d.ts +0 -89
  370. package/dist/services/shell-input-agent.d.ts.map +0 -1
  371. package/dist/services/sub-agent-manager.d.ts +0 -140
  372. package/dist/services/sub-agent-manager.d.ts.map +0 -1
  373. package/dist/services/warpify-detector.d.ts +0 -43
  374. package/dist/services/warpify-detector.d.ts.map +0 -1
  375. package/dist/services/workflow-storage.d.ts +0 -72
  376. package/dist/services/workflow-storage.d.ts.map +0 -1
  377. package/dist/test-ssh-handler.d.ts +0 -8
  378. package/dist/test-ssh-handler.d.ts.map +0 -1
  379. package/dist/tools/background-command.d.ts +0 -11
  380. package/dist/tools/background-command.d.ts.map +0 -1
  381. package/dist/tools/command.d.ts +0 -3
  382. package/dist/tools/command.d.ts.map +0 -1
  383. package/dist/tools/create-image.d.ts +0 -10
  384. package/dist/tools/create-image.d.ts.map +0 -1
  385. package/dist/tools/enter-remote-session.d.ts +0 -48
  386. package/dist/tools/enter-remote-session.d.ts.map +0 -1
  387. package/dist/tools/fast-context.d.ts +0 -3
  388. package/dist/tools/fast-context.d.ts.map +0 -1
  389. package/dist/tools/file-ops.d.ts +0 -7
  390. package/dist/tools/file-ops.d.ts.map +0 -1
  391. package/dist/tools/find-files.d.ts +0 -49
  392. package/dist/tools/find-files.d.ts.map +0 -1
  393. package/dist/tools/get-diff.d.ts +0 -14
  394. package/dist/tools/get-diff.d.ts.map +0 -1
  395. package/dist/tools/grep-search.d.ts +0 -155
  396. package/dist/tools/grep-search.d.ts.map +0 -1
  397. package/dist/tools/inspect-symbol.d.ts +0 -32
  398. package/dist/tools/inspect-symbol.d.ts.map +0 -1
  399. package/dist/tools/plan-mode.d.ts +0 -140
  400. package/dist/tools/plan-mode.d.ts.map +0 -1
  401. package/dist/tools/read-binary-file.d.ts +0 -10
  402. package/dist/tools/read-binary-file.d.ts.map +0 -1
  403. package/dist/tools/registry.d.ts +0 -31
  404. package/dist/tools/registry.d.ts.map +0 -1
  405. package/dist/tools/reproduce_issue.d.ts +0 -2
  406. package/dist/tools/reproduce_issue.d.ts.map +0 -1
  407. package/dist/tools/sub-agent.d.ts +0 -9
  408. package/dist/tools/sub-agent.d.ts.map +0 -1
  409. package/dist/tools/task-complete.d.ts +0 -3
  410. package/dist/tools/task-complete.d.ts.map +0 -1
  411. package/dist/tools/types.d.ts +0 -40
  412. package/dist/tools/types.d.ts.map +0 -1
  413. package/dist/tools/validation.d.ts +0 -47
  414. package/dist/tools/validation.d.ts.map +0 -1
  415. package/dist/tools/web-search.d.ts +0 -24
  416. package/dist/tools/web-search.d.ts.map +0 -1
  417. package/dist/tools/workflow-tool.d.ts +0 -11
  418. package/dist/tools/workflow-tool.d.ts.map +0 -1
  419. package/dist/types/index.d.ts +0 -123
  420. package/dist/types/index.d.ts.map +0 -1
  421. package/dist/types/workflow.d.ts +0 -110
  422. package/dist/types/workflow.d.ts.map +0 -1
  423. package/dist/ui/components/AgentTimer.d.ts +0 -7
  424. package/dist/ui/components/AgentTimer.d.ts.map +0 -1
  425. package/dist/ui/components/App.d.ts +0 -197
  426. package/dist/ui/components/App.d.ts.map +0 -1
  427. package/dist/ui/components/AuthScreen.d.ts +0 -8
  428. package/dist/ui/components/AuthScreen.d.ts.map +0 -1
  429. package/dist/ui/components/AuthWelcomeScreen.d.ts +0 -8
  430. package/dist/ui/components/AuthWelcomeScreen.d.ts.map +0 -1
  431. package/dist/ui/components/Breadcrumbs.d.ts +0 -13
  432. package/dist/ui/components/Breadcrumbs.d.ts.map +0 -1
  433. package/dist/ui/components/CircularSelectInput.d.ts +0 -24
  434. package/dist/ui/components/CircularSelectInput.d.ts.map +0 -1
  435. package/dist/ui/components/ClipboardFileAutocomplete.d.ts +0 -10
  436. package/dist/ui/components/ClipboardFileAutocomplete.d.ts.map +0 -1
  437. package/dist/ui/components/CodeBlock.d.ts +0 -9
  438. package/dist/ui/components/CodeBlock.d.ts.map +0 -1
  439. package/dist/ui/components/ConfigViewer.d.ts +0 -11
  440. package/dist/ui/components/ConfigViewer.d.ts.map +0 -1
  441. package/dist/ui/components/ConfirmPrompt.d.ts +0 -13
  442. package/dist/ui/components/ConfirmPrompt.d.ts.map +0 -1
  443. package/dist/ui/components/ConnectionStatusMessage.d.ts +0 -17
  444. package/dist/ui/components/ConnectionStatusMessage.d.ts.map +0 -1
  445. package/dist/ui/components/ContextWindowIndicator.d.ts +0 -8
  446. package/dist/ui/components/ContextWindowIndicator.d.ts.map +0 -1
  447. package/dist/ui/components/DetailedPlanReviewScreen.d.ts +0 -17
  448. package/dist/ui/components/DetailedPlanReviewScreen.d.ts.map +0 -1
  449. package/dist/ui/components/DiffViewer.d.ts +0 -9
  450. package/dist/ui/components/DiffViewer.d.ts.map +0 -1
  451. package/dist/ui/components/ErrorBoundary.d.ts +0 -17
  452. package/dist/ui/components/ErrorBoundary.d.ts.map +0 -1
  453. package/dist/ui/components/FileCreationPreview.d.ts +0 -8
  454. package/dist/ui/components/FileCreationPreview.d.ts.map +0 -1
  455. package/dist/ui/components/FileOperation.d.ts +0 -10
  456. package/dist/ui/components/FileOperation.d.ts.map +0 -1
  457. package/dist/ui/components/FileTagAutocomplete.d.ts +0 -11
  458. package/dist/ui/components/FileTagAutocomplete.d.ts.map +0 -1
  459. package/dist/ui/components/FontRecommendation.d.ts +0 -1
  460. package/dist/ui/components/FontRecommendation.d.ts.map +0 -1
  461. package/dist/ui/components/InputBox.d.ts +0 -42
  462. package/dist/ui/components/InputBox.d.ts.map +0 -1
  463. package/dist/ui/components/InteractiveShell.d.ts +0 -30
  464. package/dist/ui/components/InteractiveShell.d.ts.map +0 -1
  465. package/dist/ui/components/KeyboardHelp.d.ts +0 -7
  466. package/dist/ui/components/KeyboardHelp.d.ts.map +0 -1
  467. package/dist/ui/components/LoadingIndicator.d.ts +0 -3
  468. package/dist/ui/components/LoadingIndicator.d.ts.map +0 -1
  469. package/dist/ui/components/MCPAddScreen.d.ts +0 -13
  470. package/dist/ui/components/MCPAddScreen.d.ts.map +0 -1
  471. package/dist/ui/components/MCPListScreen.d.ts +0 -17
  472. package/dist/ui/components/MCPListScreen.d.ts.map +0 -1
  473. package/dist/ui/components/MCPServerListScreen.d.ts +0 -16
  474. package/dist/ui/components/MCPServerListScreen.d.ts.map +0 -1
  475. package/dist/ui/components/MarkdownRenderer.d.ts +0 -8
  476. package/dist/ui/components/MarkdownRenderer.d.ts.map +0 -1
  477. package/dist/ui/components/MessageBox.d.ts +0 -10
  478. package/dist/ui/components/MessageBox.d.ts.map +0 -1
  479. package/dist/ui/components/MessageDisplay.d.ts +0 -14
  480. package/dist/ui/components/MessageDisplay.d.ts.map +0 -1
  481. package/dist/ui/components/MonitorModeAIPanel.d.ts +0 -23
  482. package/dist/ui/components/MonitorModeAIPanel.d.ts.map +0 -1
  483. package/dist/ui/components/MultiLineInput.d.ts +0 -13
  484. package/dist/ui/components/MultiLineInput.d.ts.map +0 -1
  485. package/dist/ui/components/PasswordPrompt.d.ts +0 -9
  486. package/dist/ui/components/PasswordPrompt.d.ts.map +0 -1
  487. package/dist/ui/components/PlanAcceptedMessage.d.ts +0 -20
  488. package/dist/ui/components/PlanAcceptedMessage.d.ts.map +0 -1
  489. package/dist/ui/components/PlanReviewScreen.d.ts +0 -14
  490. package/dist/ui/components/PlanReviewScreen.d.ts.map +0 -1
  491. package/dist/ui/components/SelectPrompt.d.ts +0 -12
  492. package/dist/ui/components/SelectPrompt.d.ts.map +0 -1
  493. package/dist/ui/components/SlashCommandAutocomplete.d.ts +0 -13
  494. package/dist/ui/components/SlashCommandAutocomplete.d.ts.map +0 -1
  495. package/dist/ui/components/StatusBar.d.ts +0 -14
  496. package/dist/ui/components/StatusBar.d.ts.map +0 -1
  497. package/dist/ui/components/StreamingMessageDisplay.d.ts +0 -15
  498. package/dist/ui/components/StreamingMessageDisplay.d.ts.map +0 -1
  499. package/dist/ui/components/TaskCompletedMessage.d.ts +0 -14
  500. package/dist/ui/components/TaskCompletedMessage.d.ts.map +0 -1
  501. package/dist/ui/components/TaskProgressIndicator.d.ts +0 -18
  502. package/dist/ui/components/TaskProgressIndicator.d.ts.map +0 -1
  503. package/dist/ui/components/ThinkingDisplay.d.ts +0 -15
  504. package/dist/ui/components/ThinkingDisplay.d.ts.map +0 -1
  505. package/dist/ui/components/ToolExecutionMessage.d.ts +0 -8
  506. package/dist/ui/components/ToolExecutionMessage.d.ts.map +0 -1
  507. package/dist/ui/components/ToolExecutionStatus.d.ts +0 -10
  508. package/dist/ui/components/ToolExecutionStatus.d.ts.map +0 -1
  509. package/dist/ui/components/ToolResult.d.ts +0 -10
  510. package/dist/ui/components/ToolResult.d.ts.map +0 -1
  511. package/dist/ui/components/VersionUpdatePrompt.d.ts +0 -9
  512. package/dist/ui/components/VersionUpdatePrompt.d.ts.map +0 -1
  513. package/dist/ui/components/WelcomeBanner.d.ts +0 -3
  514. package/dist/ui/components/WelcomeBanner.d.ts.map +0 -1
  515. package/dist/ui/components/WorkflowCreatorScreen.d.ts +0 -25
  516. package/dist/ui/components/WorkflowCreatorScreen.d.ts.map +0 -1
  517. package/dist/utils/ansi-encoder.d.ts +0 -7
  518. package/dist/utils/ansi-encoder.d.ts.map +0 -1
  519. package/dist/utils/chat-formatter.d.ts +0 -12
  520. package/dist/utils/chat-formatter.d.ts.map +0 -1
  521. package/dist/utils/command-history.d.ts +0 -24
  522. package/dist/utils/command-history.d.ts.map +0 -1
  523. package/dist/utils/context-sanitizer.d.ts +0 -50
  524. package/dist/utils/context-sanitizer.d.ts.map +0 -1
  525. package/dist/utils/conversation-logger.d.ts +0 -142
  526. package/dist/utils/conversation-logger.d.ts.map +0 -1
  527. package/dist/utils/custom-commands-manager.d.ts +0 -59
  528. package/dist/utils/custom-commands-manager.d.ts.map +0 -1
  529. package/dist/utils/editor-utils.d.ts +0 -101
  530. package/dist/utils/editor-utils.d.ts.map +0 -1
  531. package/dist/utils/file.d.ts +0 -61
  532. package/dist/utils/file.d.ts.map +0 -1
  533. package/dist/utils/input-classifier.d.ts +0 -25
  534. package/dist/utils/input-classifier.d.ts.map +0 -1
  535. package/dist/utils/logger.d.ts +0 -17
  536. package/dist/utils/logger.d.ts.map +0 -1
  537. package/dist/utils/markdown-parser.d.ts +0 -60
  538. package/dist/utils/markdown-parser.d.ts.map +0 -1
  539. package/dist/utils/shell.d.ts +0 -47
  540. package/dist/utils/shell.d.ts.map +0 -1
  541. package/dist/utils/state.d.ts +0 -13
  542. package/dist/utils/state.d.ts.map +0 -1
  543. package/dist/utils/syntax-checker.d.ts +0 -24
  544. package/dist/utils/syntax-checker.d.ts.map +0 -1
  545. package/dist/utils/terminal-output.d.ts +0 -25
  546. package/dist/utils/terminal-output.d.ts.map +0 -1
  547. package/dist/utils/text-clipboard.d.ts +0 -12
  548. package/dist/utils/text-clipboard.d.ts.map +0 -1
  549. package/dist/utils/unicode-sanitizer.d.ts +0 -44
  550. package/dist/utils/unicode-sanitizer.d.ts.map +0 -1
  551. package/dist/utils/version-checker.d.ts +0 -14
  552. package/dist/utils/version-checker.d.ts.map +0 -1
@@ -1,336 +1,393 @@
1
- /**
2
- * Command Parser
3
- * Handles parsing and routing of slash commands
4
- */
5
- export class CommandParser {
6
- commands = new Map();
7
- constructor() {
8
- this.registerDefaultCommands();
9
- }
10
- registerDefaultCommands() {
11
- // Register built-in commands
12
- this.register({
13
- name: 'help',
14
- description: 'Show available commands',
15
- aliases: ['h', '?'],
16
- execute: async () => ({
17
- success: true,
18
- action: 'show-help',
19
- data: this.getHelp()
20
- })
21
- });
22
- this.register({
23
- name: 'model',
24
- description: 'Select AI model',
25
- aliases: ['m'],
26
- execute: async (args) => {
27
- if (args.length > 0) {
28
- // Direct model selection
29
- return {
30
- success: true,
31
- data: { model: args.join(' ') }
32
- };
33
- }
34
- // Show model picker
35
- return {
36
- success: true,
37
- action: 'show-model-picker'
38
- };
39
- }
40
- });
41
- this.register({
42
- name: 'config',
43
- description: 'View or edit configuration',
44
- aliases: ['c', 'settings'],
45
- execute: async (args) => {
46
- if (args.length === 0) {
47
- return {
48
- success: true,
49
- action: 'show-config'
50
- };
51
- }
52
- // Handle config set command
53
- if (args[0] === 'set' && args.length >= 3) {
54
- const key = args[1];
55
- const value = args.slice(2).join(' ');
56
- return {
57
- success: true,
58
- data: { action: 'set', key, value }
59
- };
60
- }
61
- // Handle config reset
62
- if (args[0] === 'reset') {
63
- return {
64
- success: true,
65
- data: { action: 'reset' }
66
- };
67
- }
68
- return {
69
- success: false,
70
- message: 'Usage: /config [set <key> <value> | reset]'
71
- };
1
+ class CommandParser {
2
+ commands = /* @__PURE__ */ new Map();
3
+ constructor() {
4
+ this.registerDefaultCommands();
5
+ }
6
+ registerDefaultCommands() {
7
+ this.register({
8
+ name: "help",
9
+ description: "Show available commands",
10
+ aliases: ["h", "?"],
11
+ execute: async () => ({
12
+ success: true,
13
+ action: "show-help",
14
+ data: this.getHelp()
15
+ })
16
+ });
17
+ this.register({
18
+ name: "model",
19
+ description: "Select AI model",
20
+ aliases: ["m"],
21
+ execute: async (args) => {
22
+ if (args.length > 0) {
23
+ return {
24
+ success: true,
25
+ data: { model: args.join(" ") }
26
+ };
27
+ }
28
+ return {
29
+ success: true,
30
+ action: "show-model-picker"
31
+ };
32
+ }
33
+ });
34
+ this.register({
35
+ name: "config",
36
+ description: "View or edit configuration",
37
+ aliases: ["c", "settings"],
38
+ execute: async (args) => {
39
+ if (args.length === 0) {
40
+ return {
41
+ success: true,
42
+ action: "show-config"
43
+ };
44
+ }
45
+ if (args[0] === "set" && args.length >= 3) {
46
+ const key = args[1];
47
+ const value = args.slice(2).join(" ");
48
+ return {
49
+ success: true,
50
+ data: { action: "set", key, value }
51
+ };
52
+ }
53
+ if (args[0] === "reset") {
54
+ return {
55
+ success: true,
56
+ data: { action: "reset" }
57
+ };
58
+ }
59
+ return {
60
+ success: false,
61
+ message: "Usage: /config [set <key> <value> | reset]"
62
+ };
63
+ }
64
+ });
65
+ this.register({
66
+ name: "clear",
67
+ description: "Clear conversation history",
68
+ aliases: ["cls", "reset"],
69
+ execute: async () => ({
70
+ success: true,
71
+ action: "clear"
72
+ })
73
+ });
74
+ this.register({
75
+ name: "exit",
76
+ description: "Exit Centaurus CLI",
77
+ aliases: ["quit", "q"],
78
+ execute: async () => ({
79
+ success: true,
80
+ action: "exit"
81
+ })
82
+ });
83
+ this.register({
84
+ name: "session",
85
+ description: "Manage sessions",
86
+ aliases: ["s"],
87
+ execute: async (args) => {
88
+ if (args.length === 0) {
89
+ return {
90
+ success: true,
91
+ message: "Usage: /session [save|load|list|export]"
92
+ };
93
+ }
94
+ const subcommand = args[0];
95
+ switch (subcommand) {
96
+ case "save":
97
+ return {
98
+ success: true,
99
+ data: { action: "save", name: args[1] || `session-${Date.now()}` }
100
+ };
101
+ case "load":
102
+ if (args.length < 2) {
103
+ return {
104
+ success: false,
105
+ message: "Please specify session name to load"
106
+ };
72
107
  }
73
- });
74
- this.register({
75
- name: 'clear',
76
- description: 'Clear conversation history',
77
- aliases: ['cls', 'reset'],
78
- execute: async () => ({
108
+ return {
109
+ success: true,
110
+ data: { action: "load", name: args[1] }
111
+ };
112
+ case "list":
113
+ return {
114
+ success: true,
115
+ data: { action: "list" }
116
+ };
117
+ case "export":
118
+ return {
119
+ success: true,
120
+ data: { action: "export", format: args[1] || "markdown" }
121
+ };
122
+ default:
123
+ return {
124
+ success: false,
125
+ message: `Unknown session command: ${subcommand}`
126
+ };
127
+ }
128
+ }
129
+ });
130
+ this.register({
131
+ name: "tools",
132
+ description: "List available tools",
133
+ aliases: ["t"],
134
+ execute: async () => ({
135
+ success: true,
136
+ data: { action: "list-tools" }
137
+ })
138
+ });
139
+ this.register({
140
+ name: "plan",
141
+ description: "Toggle plan mode for complex implementations",
142
+ execute: async () => ({
143
+ success: true,
144
+ action: "toggle-plan-mode"
145
+ })
146
+ });
147
+ this.register({
148
+ name: "workflow",
149
+ description: "Manage workflows (new, list, run, delete, view)",
150
+ aliases: ["wf"],
151
+ execute: async (args) => {
152
+ if (args.length === 0) {
153
+ return {
154
+ success: true,
155
+ message: `\u{1F4CB} **Workflow Commands:**
156
+
157
+ **/workflow new** - Create a new workflow
158
+ **/workflow list** - List saved workflows
159
+ **/workflow run <name>** - Run a workflow
160
+ **/workflow view <name>** - View workflow steps
161
+ **/workflow delete <name>** - Delete a workflow
162
+
163
+ **What are workflows?**
164
+ Workflows let you save and replay sequences of commands and instructions.
165
+ Create once, run many times across different machines.`
166
+ };
167
+ }
168
+ const subcommand = args[0].toLowerCase();
169
+ const workflowName = args.slice(1).join(" ");
170
+ switch (subcommand) {
171
+ case "new":
172
+ case "create":
173
+ const newSubcommand = args[1]?.toLowerCase();
174
+ if (newSubcommand === "manual") {
175
+ return {
79
176
  success: true,
80
- action: 'clear'
81
- })
82
- });
83
- this.register({
84
- name: 'exit',
85
- description: 'Exit Centaurus CLI',
86
- aliases: ['quit', 'q'],
87
- execute: async () => ({
177
+ action: "show-workflow-creator"
178
+ };
179
+ } else if (newSubcommand === "learn-workflow") {
180
+ return {
88
181
  success: true,
89
- action: 'exit'
90
- })
91
- });
92
- this.register({
93
- name: 'session',
94
- description: 'Manage sessions',
95
- aliases: ['s'],
96
- execute: async (args) => {
97
- if (args.length === 0) {
98
- return {
99
- success: true,
100
- message: 'Usage: /session [save|load|list|export]'
101
- };
102
- }
103
- const subcommand = args[0];
104
- switch (subcommand) {
105
- case 'save':
106
- return {
107
- success: true,
108
- data: { action: 'save', name: args[1] || `session-${Date.now()}` }
109
- };
110
- case 'load':
111
- if (args.length < 2) {
112
- return {
113
- success: false,
114
- message: 'Please specify session name to load'
115
- };
116
- }
117
- return {
118
- success: true,
119
- data: { action: 'load', name: args[1] }
120
- };
121
- case 'list':
122
- return {
123
- success: true,
124
- data: { action: 'list' }
125
- };
126
- case 'export':
127
- return {
128
- success: true,
129
- data: { action: 'export', format: args[1] || 'markdown' }
130
- };
131
- default:
132
- return {
133
- success: false,
134
- message: `Unknown session command: ${subcommand}`
135
- };
136
- }
182
+ action: "toggle-workflow-learning"
183
+ };
184
+ } else if (newSubcommand) {
185
+ return {
186
+ success: false,
187
+ message: `Unknown workflow new subcommand: ${newSubcommand}. Use 'manual' or 'learn-workflow'.`
188
+ };
137
189
  }
138
- });
139
- this.register({
140
- name: 'tools',
141
- description: 'List available tools',
142
- aliases: ['t'],
143
- execute: async () => ({
144
- success: true,
145
- data: { action: 'list-tools' }
146
- })
147
- });
148
- this.register({
149
- name: 'plan',
150
- description: 'Toggle plan mode for complex implementations',
151
- execute: async () => ({
152
- success: true,
153
- action: 'toggle-plan-mode'
154
- })
155
- });
156
- this.register({
157
- name: 'workflow',
158
- description: 'Manage workflows (new, list, run, delete, view)',
159
- aliases: ['wf'],
160
- execute: async (args) => {
161
- if (args.length === 0) {
162
- return {
163
- success: true,
164
- message: `šŸ“‹ **Workflow Commands:**
165
-
166
- **/workflow new** - Create a new workflow
167
- **/workflow list** - List saved workflows
168
- **/workflow run <name>** - Run a workflow
169
- **/workflow view <name>** - View workflow steps
170
- **/workflow delete <name>** - Delete a workflow
171
-
172
- **What are workflows?**
173
- Workflows let you save and replay sequences of commands and instructions.
174
- Create once, run many times across different machines.`
175
- };
176
- }
177
- const subcommand = args[0].toLowerCase();
178
- const workflowName = args.slice(1).join(' ');
179
- switch (subcommand) {
180
- case 'new':
181
- case 'create':
182
- // Check for nested subcommand (manual or learn-workflow)
183
- const newSubcommand = args[1]?.toLowerCase();
184
- if (newSubcommand === 'manual') {
185
- return {
186
- success: true,
187
- action: 'show-workflow-creator'
188
- };
189
- }
190
- else if (newSubcommand === 'learn-workflow') {
191
- return {
192
- success: true,
193
- action: 'toggle-workflow-learning'
194
- };
195
- }
196
- else if (newSubcommand) {
197
- // Unknown subcommand
198
- return {
199
- success: false,
200
- message: `Unknown workflow new subcommand: ${newSubcommand}. Use 'manual' or 'learn-workflow'.`
201
- };
202
- }
203
- // No subcommand - show help for new options
204
- return {
205
- success: true,
206
- message: `šŸ“‹ **Create a New Workflow:**
207
-
208
- **/workflow new manual** - Manually create by typing steps
209
- **/workflow new learn-workflow** - Learn from your commands and prompts
210
-
211
- **Manual Mode:** Type each step one at a time, toggle between command/instruction mode.
212
-
190
+ return {
191
+ success: true,
192
+ message: `\u{1F4CB} **Create a New Workflow:**
193
+
194
+ **/workflow new manual** - Manually create by typing steps
195
+ **/workflow new learn-workflow** - Learn from your commands and prompts
196
+
197
+ **Manual Mode:** Type each step one at a time, toggle between command/instruction mode.
198
+
213
199
  **Learn Mode:** Start learning, then run commands and prompts naturally. Run the command again to save.`
214
- };
215
- case 'list':
216
- case 'ls':
217
- return {
218
- success: true,
219
- action: 'show-workflow-list'
220
- };
221
- case 'run':
222
- case 'execute':
223
- if (!workflowName) {
224
- return {
225
- success: false,
226
- message: 'Usage: /workflow run <name>'
227
- };
228
- }
229
- return {
230
- success: true,
231
- action: 'run-workflow',
232
- data: { name: workflowName }
233
- };
234
- case 'view':
235
- case 'show':
236
- if (!workflowName) {
237
- return {
238
- success: false,
239
- message: 'Usage: /workflow view <name>'
240
- };
241
- }
242
- return {
243
- success: true,
244
- action: 'view-workflow',
245
- data: { name: workflowName }
246
- };
247
- case 'delete':
248
- case 'rm':
249
- case 'remove':
250
- if (!workflowName) {
251
- return {
252
- success: false,
253
- message: 'Usage: /workflow delete <name>'
254
- };
255
- }
256
- return {
257
- success: true,
258
- action: 'delete-workflow',
259
- data: { name: workflowName }
260
- };
261
- default:
262
- return {
263
- success: false,
264
- message: `Unknown workflow command: ${subcommand}. Use /workflow for help.`
265
- };
266
- }
200
+ };
201
+ case "list":
202
+ case "ls":
203
+ return {
204
+ success: true,
205
+ action: "show-workflow-list"
206
+ };
207
+ case "run":
208
+ case "execute":
209
+ if (!workflowName) {
210
+ return {
211
+ success: false,
212
+ message: "Usage: /workflow run <name>"
213
+ };
267
214
  }
268
- });
269
- }
270
- register(command) {
271
- this.commands.set(command.name, command);
272
- // Also register aliases
273
- if (command.aliases) {
274
- for (const alias of command.aliases) {
275
- this.commands.set(alias, command);
215
+ return {
216
+ success: true,
217
+ action: "run-workflow",
218
+ data: { name: workflowName }
219
+ };
220
+ case "view":
221
+ case "show":
222
+ if (!workflowName) {
223
+ return {
224
+ success: false,
225
+ message: "Usage: /workflow view <name>"
226
+ };
276
227
  }
277
- }
278
- }
279
- async parse(input) {
280
- if (!input.startsWith('/')) {
281
- return null;
282
- }
283
- const parts = input.slice(1).trim().split(/\s+/);
284
- if (parts.length === 0 || parts[0] === '') {
285
- return null;
286
- }
287
- const commandName = parts[0].toLowerCase();
288
- const args = parts.slice(1);
289
- const command = this.commands.get(commandName);
290
- if (!command) {
291
228
  return {
229
+ success: true,
230
+ action: "view-workflow",
231
+ data: { name: workflowName }
232
+ };
233
+ case "delete":
234
+ case "rm":
235
+ case "remove":
236
+ if (!workflowName) {
237
+ return {
292
238
  success: false,
293
- message: `Unknown command: ${commandName}. Type /help for available commands.`
239
+ message: "Usage: /workflow delete <name>"
240
+ };
241
+ }
242
+ return {
243
+ success: true,
244
+ action: "delete-workflow",
245
+ data: { name: workflowName }
246
+ };
247
+ default:
248
+ return {
249
+ success: false,
250
+ message: `Unknown workflow command: ${subcommand}. Use /workflow for help.`
294
251
  };
295
252
  }
296
- try {
297
- return await command.execute(args);
253
+ }
254
+ });
255
+ this.register({
256
+ name: "rules",
257
+ description: "Manage reusable prompt rules (list, add, edit, delete)",
258
+ execute: async (args) => {
259
+ if (args.length === 0) {
260
+ return {
261
+ success: true,
262
+ message: `\u{1F4DC} **Rule Commands:**
263
+
264
+ **/rules list** - List saved rules
265
+ **/rules add** - Create a new reusable rule
266
+ **/rules edit <name>** - Edit an existing rule
267
+ **/rules delete <name>** - Delete a saved rule
268
+
269
+ **How to use rules**
270
+ Reference a saved rule inside any prompt with \`@rules:<name>\`.`
271
+ };
298
272
  }
299
- catch (error) {
273
+ const subcommand = args[0].toLowerCase();
274
+ const ruleName = args.slice(1).join(" ");
275
+ switch (subcommand) {
276
+ case "list":
277
+ case "ls":
278
+ return {
279
+ success: true,
280
+ action: "list-rules"
281
+ };
282
+ case "add":
283
+ case "new":
284
+ case "create":
300
285
  return {
286
+ success: true,
287
+ action: "show-rules-editor",
288
+ data: { mode: "add" }
289
+ };
290
+ case "edit":
291
+ if (!ruleName) {
292
+ return {
301
293
  success: false,
302
- message: `Error executing command: ${error.message}`
294
+ message: "Usage: /rules edit <name>"
295
+ };
296
+ }
297
+ return {
298
+ success: true,
299
+ action: "show-rules-editor",
300
+ data: { mode: "edit", name: ruleName }
303
301
  };
304
- }
305
- }
306
- getHelp() {
307
- const uniqueCommands = new Map();
308
- // Get unique commands (skip aliases)
309
- for (const [name, command] of this.commands) {
310
- if (name === command.name) {
311
- uniqueCommands.set(name, command);
302
+ case "delete":
303
+ case "rm":
304
+ case "remove":
305
+ if (!ruleName) {
306
+ return {
307
+ success: false,
308
+ message: "Usage: /rules delete <name>"
309
+ };
312
310
  }
311
+ return {
312
+ success: true,
313
+ action: "delete-rule",
314
+ data: { name: ruleName }
315
+ };
316
+ default:
317
+ return {
318
+ success: false,
319
+ message: `Unknown rules command: ${subcommand}. Use /rules for help.`
320
+ };
313
321
  }
314
- let help = 'šŸ“š **Available Commands:**\n\n';
315
- for (const command of uniqueCommands.values()) {
316
- const aliases = command.aliases ? ` (${command.aliases.join(', ')})` : '';
317
- help += ` **/${command.name}${aliases}** - ${command.description}\n`;
318
- }
319
- help += '\nāŒØļø **Keyboard Shortcuts:**\n';
320
- help += ' **Ctrl+T** - Toggle auto-accept mode\n';
321
- help += ' **Ctrl+C** - Exit application\n';
322
- help += ' **?** - Show this help\n';
323
- help += '\nšŸ’” **Examples:**\n';
324
- help += ' `/model gemini-2.5-flash` - Switch to a specific model\n';
325
- help += ' `/config set model gemini-2.5-pro` - Set preferred model\n';
326
- help += ' `/session save my-work` - Save current session\n';
327
- help += '\nšŸ“ **Note:**\n';
328
- help += ' All AI requests are handled through the backend using Google Gemini models.\n';
329
- return help;
322
+ }
323
+ });
324
+ }
325
+ register(command) {
326
+ this.commands.set(command.name, command);
327
+ if (command.aliases) {
328
+ for (const alias of command.aliases) {
329
+ this.commands.set(alias, command);
330
+ }
331
+ }
332
+ }
333
+ async parse(input) {
334
+ if (!input.startsWith("/")) {
335
+ return null;
336
+ }
337
+ const parts = input.slice(1).trim().split(/\s+/);
338
+ if (parts.length === 0 || parts[0] === "") {
339
+ return null;
340
+ }
341
+ const commandName = parts[0].toLowerCase();
342
+ const args = parts.slice(1);
343
+ const command = this.commands.get(commandName);
344
+ if (!command) {
345
+ return {
346
+ success: false,
347
+ message: `Unknown command: ${commandName}. Type /help for available commands.`
348
+ };
349
+ }
350
+ try {
351
+ return await command.execute(args);
352
+ } catch (error) {
353
+ return {
354
+ success: false,
355
+ message: `Error executing command: ${error.message}`
356
+ };
357
+ }
358
+ }
359
+ getHelp() {
360
+ const uniqueCommands = /* @__PURE__ */ new Map();
361
+ for (const [name, command] of this.commands) {
362
+ if (name === command.name) {
363
+ uniqueCommands.set(name, command);
364
+ }
330
365
  }
331
- isCommand(input) {
332
- return input.startsWith('/');
366
+ let help = "\u{1F4DA} **Available Commands:**\n\n";
367
+ for (const command of uniqueCommands.values()) {
368
+ const aliases = command.aliases ? ` (${command.aliases.join(", ")})` : "";
369
+ help += ` **/${command.name}${aliases}** - ${command.description}
370
+ `;
333
371
  }
372
+ help += "\n\u2328\uFE0F **Keyboard Shortcuts:**\n";
373
+ help += " **Ctrl+T** - Toggle auto-accept mode\n";
374
+ help += " **Ctrl+C** - Exit application\n";
375
+ help += " **?** - Show this help\n";
376
+ help += "\n\u{1F4A1} **Examples:**\n";
377
+ help += " `/model gemini-2.5-flash` - Switch to a specific model\n";
378
+ help += " `/config set model gemini-2.5-pro` - Set preferred model\n";
379
+ help += " `/session save my-work` - Save current session\n";
380
+ help += "\n\u{1F4DD} **Note:**\n";
381
+ help += " All AI requests are handled through the backend using Google Gemini models.\n";
382
+ return help;
383
+ }
384
+ isCommand(input) {
385
+ return input.startsWith("/");
386
+ }
334
387
  }
335
- export default CommandParser;
388
+ var CommandParser_default = CommandParser;
389
+ export {
390
+ CommandParser,
391
+ CommandParser_default as default
392
+ };
336
393
  //# sourceMappingURL=CommandParser.js.map