winter-super-cli 2026.5.28 → 2026.5.29

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.
@@ -470,26 +470,26 @@ export class ToolExecutor {
470
470
  }
471
471
 
472
472
  async executeInternal(toolName, input, context = {}) {
473
- input = input && typeof input === 'object' ? input : {};
474
473
  toolName = this.normalizeToolName(toolName);
474
+ input = this.normalizeToolInput(toolName, input);
475
475
  const cwd = context.cwd || this.projectPath;
476
476
  const resolvedPath = (p) => this.resolveInputPath(p, cwd);
477
477
 
478
478
  switch (toolName) {
479
479
  case 'Read':
480
- return await this.readFile(this.resolveInputPath(input.file_path ?? input.path ?? input.file, cwd));
480
+ return await this.readFile(this.resolveInputPath(input.file_path ?? input.filePath ?? input.filepath ?? input.path ?? input.file ?? input.filename ?? input.target_file ?? input.targetFile, cwd));
481
481
  case 'Write':
482
- return await this.writeFile(this.resolveInputPath(input.file_path ?? input.path ?? input.file, cwd), input.content);
482
+ return await this.writeFile(this.resolveInputPath(input.file_path ?? input.filePath ?? input.filepath ?? input.path ?? input.file ?? input.filename ?? input.target_file ?? input.targetFile, cwd), input.content ?? input.text ?? input.data ?? input.value ?? input.body);
483
483
  case 'Edit':
484
484
  return await this.executeEdit(input, cwd);
485
485
  case 'Bash':
486
- return await this.bash(input.command ?? input.cmd, input.cwd || cwd, input.timeout, input.shell);
486
+ return await this.bash(input.command ?? input.cmd ?? input.script ?? input.code ?? input.input, input.cwd || input.path || cwd, input.timeout, input.shell);
487
487
  case 'Glob':
488
488
  return await this.glob(input.pattern ?? input.glob ?? '**/*', input.cwd || input.path || cwd);
489
489
  case 'Grep':
490
490
  return await this.grep(
491
491
  input.pattern ?? input.query ?? input.q,
492
- input.path || cwd,
492
+ input.path || input.cwd || cwd,
493
493
  input.glob,
494
494
  input.output_mode,
495
495
  {
@@ -519,9 +519,9 @@ export class ToolExecutor {
519
519
  case 'BrowserDebug':
520
520
  return await this.browserDebug(input.url ?? input.uri, input.action);
521
521
  case 'WebFetch':
522
- return await this.webFetch(input.url ?? input.uri, input.prompt);
522
+ return await this.webFetch(input.url ?? input.uri ?? input.href, input.prompt ?? input.query ?? input.extract);
523
523
  case 'WebSearch':
524
- return await this.webSearch(input.query ?? input.q);
524
+ return await this.webSearch(input.query ?? input.q ?? input.search ?? input.search_query ?? input.searchQuery);
525
525
  case 'NotebookRead':
526
526
  return await this.notebookTool.read(this.resolveInputPath(input.notebook_path ?? input.path ?? input.file, cwd));
527
527
  case 'NotebookEdit':
@@ -651,41 +651,67 @@ export class ToolExecutor {
651
651
  }
652
652
 
653
653
  normalizeToolName(toolName) {
654
- const normalized = String(toolName || '').replace(/[-_\s]/g, '').toLowerCase();
654
+ const raw = String(toolName || '').trim();
655
+ const normalized = raw
656
+ .replace(/^functions[._-]/i, '')
657
+ .replace(/^tools?[._-]/i, '')
658
+ .replace(/^winter[._-]/i, '')
659
+ .replace(/^[\w-]+[.:/](?=[A-Za-z])/i, '')
660
+ .replace(/[-_\s]/g, '')
661
+ .toLowerCase();
655
662
  const aliases = {
656
663
  read: 'Read',
657
664
  readfile: 'Read',
665
+ fileread: 'Read',
658
666
  openfile: 'Read',
659
667
  viewfile: 'Read',
668
+ view: 'Read',
660
669
  cat: 'Read',
670
+ getfile: 'Read',
671
+ readfilecontent: 'Read',
661
672
  write: 'Write',
662
673
  writefile: 'Write',
674
+ filewrite: 'Write',
663
675
  writetofile: 'Write',
664
676
  createfile: 'Write',
665
677
  savefile: 'Write',
678
+ create: 'Write',
679
+ overwritefile: 'Write',
666
680
  edit: 'Edit',
667
681
  editfile: 'Edit',
682
+ fileedit: 'Edit',
668
683
  replaceinfile: 'Edit',
669
684
  strreplace: 'Edit',
670
685
  strreplaceeditor: 'Edit',
686
+ strreplaceedit: 'Edit',
671
687
  applydiff: 'Edit',
688
+ applypatch: 'Edit',
672
689
  patch: 'Edit',
673
690
  bash: 'Bash',
674
691
  shell: 'Bash',
675
692
  command: 'Bash',
676
693
  commandexecutor: 'Bash',
677
694
  executecommand: 'Bash',
695
+ runterminalcmd: 'Bash',
696
+ runterminalcommand: 'Bash',
678
697
  runcommand: 'Bash',
698
+ runcmd: 'Bash',
699
+ exec: 'Bash',
679
700
  terminal: 'Bash',
680
701
  powershell: 'Bash',
702
+ cmd: 'Bash',
681
703
  glob: 'Glob',
682
704
  listfiles: 'Glob',
705
+ list: 'Glob',
683
706
  ls: 'Glob',
684
707
  findfiles: 'Glob',
708
+ find: 'Glob',
685
709
  grep: 'Grep',
686
710
  search: 'Grep',
687
711
  searchfiles: 'Grep',
712
+ grepsearch: 'Grep',
688
713
  searchtext: 'Grep',
714
+ searchcode: 'Grep',
689
715
  rg: 'Grep',
690
716
  rgfull: 'Grep',
691
717
  searchadvanced: 'Grep',
@@ -707,12 +733,17 @@ export class ToolExecutor {
707
733
  webfetch: 'WebFetch',
708
734
  fetch: 'WebFetch',
709
735
  fetchurl: 'WebFetch',
736
+ geturl: 'WebFetch',
710
737
  websearch: 'WebSearch',
711
738
  searchweb: 'WebSearch',
739
+ internetsearch: 'WebSearch',
740
+ googlesearch: 'WebSearch',
712
741
  browserdebug: 'BrowserDebug',
713
742
  browser: 'BrowserDebug',
743
+ browserinspect: 'BrowserDebug',
714
744
  parallel: 'Parallel',
715
745
  parallelexecute: 'Parallel',
746
+ paralleltools: 'Parallel',
716
747
  batch: 'Parallel',
717
748
  // New tools
718
749
  webarchive: 'WebArchive',
@@ -746,7 +777,45 @@ export class ToolExecutor {
746
777
  subagent: 'Agent',
747
778
  agentrun: 'Agent',
748
779
  };
749
- return aliases[normalized] || toolName;
780
+ return aliases[normalized] || raw;
781
+ }
782
+
783
+ normalizeToolInput(toolName, input) {
784
+ if (input && typeof input === 'object' && !Array.isArray(input)) {
785
+ return this.unwrapToolInput(input);
786
+ }
787
+
788
+ if (typeof input !== 'string') return {};
789
+ const value = input.trim();
790
+ if (!value) return {};
791
+
792
+ switch (toolName) {
793
+ case 'Read':
794
+ case 'NotebookRead':
795
+ return { file_path: value };
796
+ case 'Write':
797
+ return { content: value };
798
+ case 'Bash':
799
+ return { command: value };
800
+ case 'Glob':
801
+ return { pattern: value };
802
+ case 'Grep':
803
+ case 'WebSearch':
804
+ return { query: value };
805
+ case 'WebFetch':
806
+ case 'WebArchive':
807
+ case 'BrowserDebug':
808
+ return { url: value };
809
+ case 'TaskCreate':
810
+ case 'TodoWrite':
811
+ return { title: value };
812
+ case 'ScheduleWakeup':
813
+ return { prompt: value };
814
+ case 'Agent':
815
+ return { task: value };
816
+ default:
817
+ return { input: value };
818
+ }
750
819
  }
751
820
 
752
821
  resolveInputPath(filePath, cwd) {