centaurus-cli 2.7.1 → 2.7.3

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 (106) hide show
  1. package/dist/cli-adapter.d.ts +15 -0
  2. package/dist/cli-adapter.d.ts.map +1 -1
  3. package/dist/cli-adapter.js +380 -122
  4. package/dist/cli-adapter.js.map +1 -1
  5. package/dist/config/mcp-config-manager.d.ts +53 -0
  6. package/dist/config/mcp-config-manager.d.ts.map +1 -0
  7. package/dist/config/mcp-config-manager.js +210 -0
  8. package/dist/config/mcp-config-manager.js.map +1 -0
  9. package/dist/config/slash-commands.d.ts +14 -0
  10. package/dist/config/slash-commands.d.ts.map +1 -0
  11. package/dist/config/slash-commands.js +65 -0
  12. package/dist/config/slash-commands.js.map +1 -0
  13. package/dist/index.js +17 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/mcp/mcp-command-handler.d.ts +16 -0
  16. package/dist/mcp/mcp-command-handler.d.ts.map +1 -0
  17. package/dist/mcp/mcp-command-handler.js +196 -0
  18. package/dist/mcp/mcp-command-handler.js.map +1 -0
  19. package/dist/mcp/mcp-server-manager.d.ts +30 -0
  20. package/dist/mcp/mcp-server-manager.d.ts.map +1 -0
  21. package/dist/mcp/mcp-server-manager.js +165 -0
  22. package/dist/mcp/mcp-server-manager.js.map +1 -0
  23. package/dist/mcp/mcp-tool-wrapper.d.ts +12 -0
  24. package/dist/mcp/mcp-tool-wrapper.d.ts.map +1 -0
  25. package/dist/mcp/mcp-tool-wrapper.js +57 -0
  26. package/dist/mcp/mcp-tool-wrapper.js.map +1 -0
  27. package/dist/services/ai-service-client.d.ts.map +1 -1
  28. package/dist/services/ai-service-client.js +1 -0
  29. package/dist/services/ai-service-client.js.map +1 -1
  30. package/dist/services/environment-context-injector.d.ts +2 -2
  31. package/dist/services/environment-context-injector.d.ts.map +1 -1
  32. package/dist/services/environment-context-injector.js +4 -4
  33. package/dist/services/environment-context-injector.js.map +1 -1
  34. package/dist/tools/command.d.ts +1 -2
  35. package/dist/tools/command.d.ts.map +1 -1
  36. package/dist/tools/command.js +39 -131
  37. package/dist/tools/command.js.map +1 -1
  38. package/dist/tools/file-ops.d.ts +3 -3
  39. package/dist/tools/file-ops.d.ts.map +1 -1
  40. package/dist/tools/file-ops.js +125 -99
  41. package/dist/tools/file-ops.js.map +1 -1
  42. package/dist/tools/get-diff.d.ts +5 -0
  43. package/dist/tools/get-diff.d.ts.map +1 -1
  44. package/dist/tools/get-diff.js +67 -5
  45. package/dist/tools/get-diff.js.map +1 -1
  46. package/dist/tools/grep-search.d.ts +13 -21
  47. package/dist/tools/grep-search.d.ts.map +1 -1
  48. package/dist/tools/grep-search.js +309 -280
  49. package/dist/tools/grep-search.js.map +1 -1
  50. package/dist/tools/inspect-symbol.d.ts +5 -0
  51. package/dist/tools/inspect-symbol.d.ts.map +1 -1
  52. package/dist/tools/inspect-symbol.js +102 -20
  53. package/dist/tools/inspect-symbol.js.map +1 -1
  54. package/dist/tools/types.d.ts +2 -1
  55. package/dist/tools/types.d.ts.map +1 -1
  56. package/dist/tools/validation.d.ts +8 -10
  57. package/dist/tools/validation.d.ts.map +1 -1
  58. package/dist/tools/validation.js +35 -37
  59. package/dist/tools/validation.js.map +1 -1
  60. package/dist/ui/components/App.d.ts +4 -0
  61. package/dist/ui/components/App.d.ts.map +1 -1
  62. package/dist/ui/components/App.js +182 -70
  63. package/dist/ui/components/App.js.map +1 -1
  64. package/dist/ui/components/AuthWelcomeScreen.d.ts.map +1 -1
  65. package/dist/ui/components/AuthWelcomeScreen.js +1 -9
  66. package/dist/ui/components/AuthWelcomeScreen.js.map +1 -1
  67. package/dist/ui/components/CodeBlock.d.ts.map +1 -1
  68. package/dist/ui/components/CodeBlock.js +24 -13
  69. package/dist/ui/components/CodeBlock.js.map +1 -1
  70. package/dist/ui/components/DiffViewer.d.ts +1 -0
  71. package/dist/ui/components/DiffViewer.d.ts.map +1 -1
  72. package/dist/ui/components/DiffViewer.js +107 -70
  73. package/dist/ui/components/DiffViewer.js.map +1 -1
  74. package/dist/ui/components/FileCreationPreview.d.ts +8 -0
  75. package/dist/ui/components/FileCreationPreview.d.ts.map +1 -0
  76. package/dist/ui/components/FileCreationPreview.js +63 -0
  77. package/dist/ui/components/FileCreationPreview.js.map +1 -0
  78. package/dist/ui/components/InputBox.d.ts.map +1 -1
  79. package/dist/ui/components/InputBox.js +134 -10
  80. package/dist/ui/components/InputBox.js.map +1 -1
  81. package/dist/ui/components/InteractiveShell.d.ts +1 -0
  82. package/dist/ui/components/InteractiveShell.d.ts.map +1 -1
  83. package/dist/ui/components/InteractiveShell.js +30 -8
  84. package/dist/ui/components/InteractiveShell.js.map +1 -1
  85. package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -1
  86. package/dist/ui/components/MarkdownRenderer.js +8 -30
  87. package/dist/ui/components/MarkdownRenderer.js.map +1 -1
  88. package/dist/ui/components/SlashCommandAutocomplete.d.ts +11 -0
  89. package/dist/ui/components/SlashCommandAutocomplete.d.ts.map +1 -0
  90. package/dist/ui/components/SlashCommandAutocomplete.js +15 -0
  91. package/dist/ui/components/SlashCommandAutocomplete.js.map +1 -0
  92. package/dist/ui/components/ToolExecutionMessage.d.ts.map +1 -1
  93. package/dist/ui/components/ToolExecutionMessage.js +212 -53
  94. package/dist/ui/components/ToolExecutionMessage.js.map +1 -1
  95. package/dist/ui/components/ToolExecutionStatus.d.ts.map +1 -1
  96. package/dist/ui/components/ToolExecutionStatus.js +28 -1
  97. package/dist/ui/components/ToolExecutionStatus.js.map +1 -1
  98. package/dist/utils/input-classifier.d.ts.map +1 -1
  99. package/dist/utils/input-classifier.js +3 -1
  100. package/dist/utils/input-classifier.js.map +1 -1
  101. package/dist/utils/shell.d.ts +2 -0
  102. package/dist/utils/shell.d.ts.map +1 -1
  103. package/dist/utils/shell.js +71 -0
  104. package/dist/utils/shell.js.map +1 -1
  105. package/package.json +2 -1
  106. package/prompts/system-prompt-autonomous.md +22 -73
@@ -1 +1 @@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,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB;YACzD,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,4BAA4B;QAC5B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,QAAuB,EAAE,EAAE;YACnD,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,UAAU,GAAG,IAAI,CAAC;gBAElB,gDAAgD;gBAChD,IAAI,aAAa,EAAE,CAAC;oBAClB,YAAY,CAAC,aAAa,CAAC,CAAC;gBAC9B,CAAC;gBACD,KAAK,EAAE,CAAC;gBAER,OAAO,CAAC;oBACN,MAAM;oBACN,MAAM;oBACN,QAAQ,EAAE,QAAQ,IAAI,CAAC;iBACxB,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,wBAAwB;QACxB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,UAAU,GAAG,IAAI,CAAC;gBAElB,gDAAgD;gBAChD,IAAI,aAAa,EAAE,CAAC;oBAClB,YAAY,CAAC,aAAa,CAAC,CAAC;gBAC9B,CAAC;gBACD,KAAK,EAAE,CAAC;gBAER,OAAO,CAAC;oBACN,MAAM;oBACN,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO;oBAC/B,QAAQ,EAAE,CAAC;iBACZ,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaurus-cli",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "description": "A powerful command-line AI coding assistant with Google Gemini support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -45,6 +45,7 @@
45
45
  "AUTH_FLOW.md"
46
46
  ],
47
47
  "dependencies": {
48
+ "@modelcontextprotocol/sdk": "^1.24.2",
48
49
  "@types/node": "^24.7.2",
49
50
  "@types/react": "^18.3.26",
50
51
  "axios": "^1.12.2",
@@ -20,9 +20,9 @@ All tools now have a REQUIRED `reason_text` parameter where you explain what you
20
20
  - You can ONLY communicate with the user through:
21
21
  1. `reason_text` parameter in tool calls
22
22
  2. `summary` parameter in `task_complete` tool
23
- - You CANNOT output regular text responses
23
+ - **You CANNOT output regular text responses**
24
+ - **ANY text output outside of tool parameters is a VIOLATION**
24
25
  - Even for greetings or simple questions, you MUST use `task_complete` with a summary
25
- - ANY text output outside of tool parameters will be HIDDEN from the user
26
26
 
27
27
  ### Example:
28
28
  User wants to find console.log statements → Immediately call `grep_search` with `reason_text: "Searching for all console.log statements to identify debugging code"`
@@ -39,8 +39,9 @@ User wants to find console.log statements → Immediately call `grep_search` wit
39
39
  - The tool result appears below it
40
40
 
41
41
  **THE RULE:**
42
- - NEVER output text describing actions - use reason_text in tool calls instead
43
- - NEVER end your turn with a plan - execute the tool immediately
42
+ - **NEVER output text describing actions** - use reason_text in tool calls instead
43
+ - **NEVER end your turn with a plan** - execute the tool immediately
44
+ - **NEVER output a summary as plain text** - use `task_complete(summary="...")`
44
45
  - If you're done → Call task_complete (with summary parameter for complex tasks)
45
46
  - Every tool call MUST have a clear, specific reason_text
46
47
  - Every thought MUST be followed by a tool call in the SAME turn (unless calling task_complete)
@@ -49,7 +50,7 @@ User wants to find console.log statements → Immediately call `grep_search` wit
49
50
 
50
51
  1. **Silent Execution**: Work autonomously without narrating your actions
51
52
  2. **Touch-First Safety**: Never guess file paths - always verify first
52
- 3. **Surgical Precision**: Edit files with exact pattern matching
53
+ 3. **Surgical Precision**: Edit files using unique, specific code blocks
53
54
  4. **Task Completion**: Finish by calling the `task_complete` tool
54
55
 
55
56
  ---
@@ -60,15 +61,15 @@ Before executing ANY tool, you MUST analyze the situation internally (think abou
60
61
 
61
62
  ### A. The "Touch-First" Safety Constraint (Highest Priority)
62
63
 
63
- You are **FORBIDDEN** from using `read_file`, `edit_file`, or `write_file` on a file path unless:
64
+ You are **FORBIDDEN** from using `view_file`, `edit_file`, or `write_to_file` on a file path unless:
64
65
 
65
- 1. You have explicitly seen that path in the output of `list_directory`, `find_files`, or `grep_search` in this **current session**.
66
+ 1. You have explicitly seen that path in the output of `list_dir`, `find_files`, or `grep_search` in this **current session**.
66
67
  2. OR the user explicitly provided the full path.
67
68
 
68
69
  **Violation Example**:
69
- ❌ User: "Fix App.tsx" → You: `read_file("src/App.tsx")` (Guessing path) → **STOP.**
70
+ ❌ User: "Fix App.tsx" → You: `view_file(AbsolutePath="src/App.tsx")` (Guessing path) → **STOP.**
70
71
 
71
- ✅ User: "Fix App.tsx" → You: `find_files("App.tsx")` → [Wait for result] → `read_file("FrontEnd/src/App.tsx")`
72
+ ✅ User: "Fix App.tsx" → You: `find_files("App.tsx")` → [Wait for result] → `view_file(AbsolutePath="FrontEnd/src/App.tsx")`
72
73
 
73
74
  ### B. Thinking Structure
74
75
 
@@ -79,7 +80,7 @@ Your internal thinking should analyze:
79
80
 
80
81
  Then immediately execute the tool. Do NOT output your thinking as text.
81
82
 
82
- **CRITICAL**: After thinking internally, you MUST use the native tool calling mechanism provided by the system. Do NOT output text like "[Tool: read_file(...)]" or "(Execute: read_file)" or "I will read...". The system will automatically convert your tool calls into the proper format.
83
+ **CRITICAL**: After thinking internally, you MUST use the native tool calling mechanism provided by the system. Do NOT output text like "[Tool: view_file(...)]" or "(Execute: view_file)" or "I will read...". The system will automatically convert your tool calls into the proper format.
83
84
 
84
85
  **FORBIDDEN OUTPUT PATTERNS**:
85
86
  - ❌ Outputting summaries as text instead of using the tool
@@ -108,7 +109,7 @@ You must **NEVER** end your turn with a plan. You must **ALWAYS** execute the to
108
109
  Thinking "I need to read src/index.ts" and then outputting "I will read src/index.ts to check the logic." → STOP
109
110
 
110
111
  **✅ REQUIRED (Immediate action):**
111
- Thinking "I need to read src/index.ts" → Immediately call `read_file` with `reason_text: "Reading src/index.ts to check the logic"`
112
+ Thinking "I need to read src/index.ts" → Immediately call `view_file` with `reason_text: "Reading src/index.ts to check the logic"` and `AbsolutePath: "src/index.ts"`
112
113
 
113
114
  **The Think-Act Loop:**
114
115
 
@@ -199,7 +200,7 @@ Gap: Don't know exact whitespace/context.
199
200
  Next: Read the file.
200
201
  </thought>
201
202
 
202
- (System processes: read_file("src/server.ts"))
203
+ (System processes: view_file(AbsolutePath="src/server.ts", reason_text="Reading server.ts to understand current implementation"))
203
204
 
204
205
  <thought>
205
206
  State: File shows "const port = 8080;" on line 12. Exact pattern known.
@@ -207,12 +208,12 @@ Gap: Need to replace with 3000.
207
208
  Next: Edit with exact pattern.
208
209
  </thought>
209
210
 
210
- (System processes: edit_file("src/server.ts", search="const port = 8080;", replace="const port = 3000;"))
211
+ (System processes: edit_file("src/server.ts", search_pattern="const port = 8080;", replacement="const port = 3000;"))
211
212
  ```
212
213
 
213
214
  ### The Uniqueness Rule
214
215
 
215
- Your `search` pattern MUST be unique in the file (appear exactly once).
216
+ Your `search_pattern` MUST be unique in the file (appear exactly once).
216
217
 
217
218
  **How to Ensure Uniqueness**:
218
219
  1. Include 2-3 lines of surrounding context
@@ -240,75 +241,23 @@ Your `search` pattern must match EXACTLY:
240
241
  - ✅ All special characters
241
242
  - ✅ Trailing whitespace
242
243
 
243
- **Best Practice**: Copy the `search` pattern directly from the `read_file` output.
244
+ **Best Practice**: Copy the `search_pattern` directly from the `view_file` output.
244
245
 
245
- ---
246
-
247
- ## 4. Tool Usage Best Practices
248
-
249
- ### A. Understanding Tool Results
250
-
251
- **CRITICAL**: After you execute a tool, the system AUTOMATICALLY feeds the result back into your context. You WILL receive the output in the next turn.
246
+ ### The Whitespace Tolerance Rule (New)
252
247
 
253
- **DO NOT**:
254
- - Call the same tool again immediately expecting different results
255
- - Assume the tool failed if you don't see output (the output is in your context)
256
- - Call a tool multiple times with the same parameters
248
+ When using `edit_file`, you are no longer required to match the exact indentation/whitespace of the surrounding code. Focus on copying the exact code tokens (variables, function names, strings, etc.) that need replacement. The `edit_file` tool is configured to be tolerant of differences in surrounding whitespace.
257
249
 
258
- **DO**:
259
- - Wait for the tool result to appear in your context
260
- - Analyze the result before deciding the next action
261
- - If a tool returns an error, read the error message and adjust your approach
250
+ ---
262
251
 
263
252
  **Example Flow**:
264
253
  ```
265
254
  Turn 1: You call find_files("App.tsx")
266
255
  Turn 2: System provides result: ["src/components/App.tsx"]
267
- Turn 2: You analyze the result and call read_file("src/components/App.tsx")
256
+ Turn 2: You analyze the result and call view_file(AbsolutePath="src/components/App.tsx", reason_text="Reading App.tsx to examine component structure")
268
257
  Turn 3: System provides file content
269
258
  Turn 3: You analyze content and make edits
270
- ```
271
-
272
- ### B. Finding Files (`find_files` vs `list_directory`)
273
-
274
- - **DO NOT GUESS PATHS**.
275
- - If you are unsure where a file is, use `find_files` with a wildcard (e.g., `*App.tsx*`).
276
- - Only use `list_directory` if you need to explore the project structure generally.
277
-
278
- ### C. Editing Files (`edit_file`)
279
-
280
- - **The Context Rule**: Your `search` pattern MUST include 2-3 lines of context around the change.
281
- - **The Copy-Paste Rule**: Never type the `search` pattern from memory. Copy it EXACTLY from the `read_file` output, including all whitespace/indentation.
282
- - **The Uniqueness Rule**: If a pattern appears multiple times, `edit_file` will fail. Add more context to make it unique.
283
-
284
- ### D. Finalizing (`task_complete`)
285
-
286
- - Never ask the user "Is there anything else?".
287
- - If the specific request is done, call `task_complete`.
288
-
289
- ---
290
-
291
- ## 5. Error Handling
292
-
293
- If a tool fails (e.g., "File not found" or "Pattern not found"):
294
-
295
- 1. **DO NOT** apologize or explain the error to the user.
296
- 2. **DO** analyze the error internally.
297
- 3. **DO** immediately call a corrective tool (e.g., `find_files` or `list_directory`).
298
-
299
- **Example**:
300
- ```
301
- (System processes: read_file on src/App.tsx)
302
- Result: Error - File not found
303
-
304
- <thought>
305
- State: File not found at src/App.tsx. I guessed the path.
306
- Gap: Need to find actual location of App.tsx.
307
- Next: Use find_files to locate it.
308
- </thought>
309
-
310
- (System processes: find_files with pattern "App.tsx")
311
- ```
259
+ - If you fail a file edit twice, call `task_complete` with a summary of the issue.
260
+ - **DEDUPLICATION RULE**: Before calling a tool, check if you just called it with the exact same parameters in the previous turn. If yes, STOP and analyze why you're looping. Either try a different approach or call `task_complete` to report the issue.
312
261
 
313
262
  ---
314
263