winter-super-cli 2026.5.18 → 2026.5.19

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "winter-super-cli",
3
- "version": "2026.5.18",
3
+ "version": "2026.5.19",
4
4
  "description": "❄️ AI-Powered Development CLI with Interactive REPL",
5
5
  "type": "module",
6
6
  "main": "bin/winter.js",
package/src/cli/repl.js CHANGED
@@ -2147,7 +2147,9 @@ ${colors.reset}
2147
2147
 
2148
2148
  ## Tools Available
2149
2149
  - Read, Write, Edit - File operations
2150
- - Bash - Execute shell commands
2150
+ - Write - Create/overwrite files directly. Use this instead of Bash echo/cat/heredoc for writing code.
2151
+ - Edit - Replace exact text in existing files.
2152
+ - Bash - Execute shell commands. Current OS is ${process.platform === 'win32' ? 'Windows; Bash runs through PowerShell, not Linux bash. Use PowerShell-compatible commands.' : process.platform}.
2151
2153
  - Glob - Find files
2152
2154
  - Grep - Search content
2153
2155
  - TaskCreate, TaskUpdate, TaskList - Task management
@@ -2156,6 +2158,9 @@ ${colors.reset}
2156
2158
 
2157
2159
  ## Guidelines
2158
2160
  - Call tools when they help - be proactive
2161
+ - You DO have file write tools. Never say "there is no write tool"; use Write or Edit.
2162
+ - If a tool name fails, call the canonical tool name next: Write, Edit, Read, Bash, Glob, or Grep.
2163
+ - Do not use Linux-only heredoc/echo chains to write files on Windows. Prefer Write with full content.
2159
2164
  - After using tools, always provide a direct final answer to the user.
2160
2165
  - Answer normal questions directly without unnecessary legal or policy disclaimers.
2161
2166
  - If a request is illegal, unsafe, or harmful, refuse briefly and offer a safe alternative.
@@ -2235,9 +2240,16 @@ Nếu người dùng yêu cầu sửa file/chạy lệnh/đọc dự án thì n
2235
2240
  2. [DESIGN EXCELLENCE]: Use rich aesthetics. Default to modern UI frameworks if applicable. Never output plain, ugly HTML/CSS. Ensure responsive, premium feel with micro-animations.
2236
2241
  3. [CODE QUALITY]: Write clean, modular, SOLID code. Check for syntax errors carefully. Do not generate incomplete code blocks.
2237
2242
  4. [NO HALLUCINATION]: If you don't know, use tools (Grep/Read/Web) to find out. Do not guess file paths or APIs.
2243
+ 5. [TOOL EXECUTION FIRST]: You DO have file tools. Use Write to create/overwrite files and Edit to patch files. Never say there is no write tool.
2238
2244
 
2239
2245
  ${rolePrompt}
2240
2246
 
2247
+ ## Tool Rules
2248
+ - Canonical tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList, BrowserDebug, WebFetch, WebSearch.
2249
+ - Current OS is ${process.platform === 'win32' ? 'Windows; Bash runs through PowerShell, not Linux bash. Use PowerShell-compatible commands.' : process.platform}.
2250
+ - Prefer Write/Edit for writing files. Do not use Linux-only heredoc or long echo chains for code files.
2251
+ - If a tool call fails because of an unknown alias, call the canonical tool name next.
2252
+
2241
2253
  ## Project
2242
2254
  Working directory: ${this.projectPath}
2243
2255
  Current session: ${this.session.getSessionId().substring(0, 8)}
@@ -37,7 +37,7 @@ export class ToolExecutor {
37
37
  {
38
38
  type: 'function',
39
39
  name: 'Write',
40
- description: 'Create or overwrite file with content.',
40
+ description: 'Create or overwrite a file with content. Prefer this for file creation instead of Bash echo/cat/heredoc. Also handles model aliases like write_to_file.',
41
41
  parameters: {
42
42
  type: 'object',
43
43
  properties: {
@@ -50,7 +50,7 @@ export class ToolExecutor {
50
50
  {
51
51
  type: 'function',
52
52
  name: 'Edit',
53
- description: 'Make surgical changes. Replace exact old_string with new_string.',
53
+ description: 'Make surgical changes. Replace exact old_string with new_string. Also handles model aliases like replace_in_file and str_replace_editor.',
54
54
  parameters: {
55
55
  type: 'object',
56
56
  properties: {
@@ -64,7 +64,7 @@ export class ToolExecutor {
64
64
  {
65
65
  type: 'function',
66
66
  name: 'Bash',
67
- description: 'Execute shell command. Returns stdout/stderr.',
67
+ description: 'Execute a shell command. On Windows this runs in PowerShell, not Linux bash. Prefer Write/Edit for file writes.',
68
68
  parameters: {
69
69
  type: 'object',
70
70
  properties: {
@@ -236,7 +236,12 @@ export class ToolExecutor {
236
236
  case 'WebSearch':
237
237
  return await this.webSearch(input.query ?? input.q);
238
238
  default:
239
- return { success: false, error: `Unknown tool: ${toolName}` };
239
+ return {
240
+ success: false,
241
+ error: `Unknown tool: ${toolName}`,
242
+ availableTools: ['Read', 'Write', 'Edit', 'Bash', 'Glob', 'Grep', 'TaskCreate', 'TaskUpdate', 'TaskList', 'BrowserDebug', 'WebFetch', 'WebSearch'],
243
+ recovery: 'Call one of the available tools. For file writes use Write with { "file_path": "...", "content": "..." }. For shell commands use Bash with { "command": "..." }.',
244
+ };
240
245
  }
241
246
  }
242
247
 
@@ -14,6 +14,16 @@ test('Bash validates missing command instead of throwing', async () => {
14
14
  assert.equal(result.error, 'command is required');
15
15
  });
16
16
 
17
+ test('unknown tools return recovery guidance instead of a bare failure', async () => {
18
+ const tools = new ToolExecutor({ projectPath: process.cwd() });
19
+ const result = await tools.execute('bad_tool_name', {});
20
+
21
+ assert.equal(result.success, false);
22
+ assert.equal(result.error, 'Unknown tool: bad_tool_name');
23
+ assert(result.availableTools.includes('Write'));
24
+ assert.match(result.recovery, /Write/);
25
+ });
26
+
17
27
  test('tool names accept common model aliases', () => {
18
28
  const tools = new ToolExecutor({ projectPath: process.cwd() });
19
29