@wundr.io/cli 1.0.1 → 1.0.2-dev.20260530180455.e1307186

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 (69) hide show
  1. package/bin/wundr.js +13 -5
  2. package/package.json +30 -9
  3. package/src/ai/ai-service.ts +6 -4
  4. package/src/ai/claude-client.ts +6 -2
  5. package/src/ai/conversation-manager.ts +12 -5
  6. package/src/cli.ts +42 -13
  7. package/src/commands/ai.ts +340 -64
  8. package/src/commands/alignment.ts +1212 -0
  9. package/src/commands/analyze-optimized.ts +371 -33
  10. package/src/commands/analyze.ts +8 -6
  11. package/src/commands/batch.ts +166 -26
  12. package/src/commands/chat.ts +20 -10
  13. package/src/commands/claude-init.ts +31 -27
  14. package/src/commands/claude-setup.ts +761 -81
  15. package/src/commands/computer-setup.ts +524 -12
  16. package/src/commands/create-command.ts +3 -3
  17. package/src/commands/create.ts +9 -6
  18. package/src/commands/dashboard.ts +11 -6
  19. package/src/commands/govern.ts +11 -6
  20. package/src/commands/governance.ts +1005 -0
  21. package/src/commands/guardian.ts +887 -0
  22. package/src/commands/init.ts +104 -11
  23. package/src/commands/orchestrator.ts +789 -0
  24. package/src/commands/performance-optimizer.ts +15 -10
  25. package/src/commands/plugins.ts +8 -5
  26. package/src/commands/project-update.ts +1156 -0
  27. package/src/commands/rag.ts +1011 -0
  28. package/src/commands/session.ts +631 -0
  29. package/src/commands/setup.ts +42 -344
  30. package/src/commands/test-init.ts +3 -2
  31. package/src/commands/test.ts +3 -2
  32. package/src/commands/watch.ts +21 -11
  33. package/src/commands/worktree.ts +1057 -0
  34. package/src/context/context-manager.ts +5 -2
  35. package/src/context/session-manager.ts +18 -7
  36. package/src/framework/command-interface.ts +520 -0
  37. package/src/framework/command-registry.ts +942 -0
  38. package/src/framework/completion-exporter.ts +383 -0
  39. package/src/framework/debug-logger.ts +519 -0
  40. package/src/framework/error-handler.ts +867 -0
  41. package/src/framework/help-generator.ts +540 -0
  42. package/src/framework/index.ts +169 -0
  43. package/src/framework/interactive-repl.ts +703 -0
  44. package/src/framework/output-formatter.ts +834 -0
  45. package/src/framework/progress-manager.ts +539 -0
  46. package/src/index.ts +3 -2
  47. package/src/interactive/interactive-mode.ts +14 -7
  48. package/src/lib/conflict-resolution.ts +818 -0
  49. package/src/lib/merge-strategy.ts +550 -0
  50. package/src/lib/safety-mechanisms.ts +451 -0
  51. package/src/lib/state-detection.ts +1030 -0
  52. package/src/nlp/command-mapper.ts +8 -3
  53. package/src/nlp/command-parser.ts +5 -2
  54. package/src/nlp/intent-parser.ts +23 -9
  55. package/src/plugins/plugin-manager.ts +50 -24
  56. package/src/tests/computer-setup-integration.test.ts +46 -15
  57. package/src/types/index.ts +1 -1
  58. package/src/types/modules.d.ts +425 -1
  59. package/src/utils/backup-rollback-manager.ts +19 -14
  60. package/src/utils/claude-config-installer.ts +119 -28
  61. package/src/utils/config-manager.ts +9 -6
  62. package/src/utils/error-handler.ts +3 -1
  63. package/src/utils/logger.ts +35 -12
  64. package/templates/batch/ci-cd.yaml +7 -7
  65. package/test-suites/api/health.spec.ts +20 -23
  66. package/test-suites/helpers/test-config.ts +14 -13
  67. package/test-suites/ui/accessibility.spec.ts +27 -22
  68. package/test-suites/ui/smoke.spec.ts +26 -21
  69. package/src/commands/computer-setup-commands.ts +0 -869
@@ -3,17 +3,20 @@
3
3
  * Implements intelligent optimization strategies for Wundr platform performance
4
4
  */
5
5
 
6
- import { Command } from 'commander';
7
- import fs from 'fs-extra';
8
- import path from 'path';
9
- import chalk from 'chalk';
10
- import { ConfigManager } from '../utils/config-manager';
11
- import { logger } from '../utils/logger';
12
- import { errorHandler } from '../utils/error-handler';
13
6
  import { spawn } from 'child_process';
7
+ import path from 'path';
14
8
  import { performance } from 'perf_hooks';
15
9
  import { memoryUsage, cpuUsage } from 'process';
16
10
 
11
+ import chalk from 'chalk';
12
+ import fs from 'fs-extra';
13
+
14
+ import { errorHandler } from '../utils/error-handler';
15
+ import { logger } from '../utils/logger';
16
+
17
+ import type { ConfigManager } from '../utils/config-manager';
18
+ import type { Command } from 'commander';
19
+
17
20
  interface OptimizationResult {
18
21
  category: 'memory' | 'concurrency' | 'cpu' | 'io' | 'network';
19
22
  description: string;
@@ -593,7 +596,9 @@ export class PerformanceOptimizerCommands {
593
596
  const grouped = allOptimizations.reduce(
594
597
  (acc, opt) => {
595
598
  if (opt && opt.category) {
596
- if (!acc[opt.category]) acc[opt.category] = [];
599
+ if (!acc[opt.category]) {
600
+ acc[opt.category] = [];
601
+ }
597
602
  acc[opt.category]!.push(opt);
598
603
  }
599
604
  return acc;
@@ -601,7 +606,7 @@ export class PerformanceOptimizerCommands {
601
606
  {} as Record<string, OptimizationResult[]>
602
607
  );
603
608
 
604
- logger.info(`\nšŸ“Š Optimization Summary:`);
609
+ logger.info('\nšŸ“Š Optimization Summary:');
605
610
  Object.entries(grouped).forEach(([category, opts]) => {
606
611
  console.log(
607
612
  ` ${chalk.bold(category.toUpperCase())}: ${opts.length} opportunities`
@@ -716,7 +721,7 @@ export class PerformanceOptimizerCommands {
716
721
  const peakHeap = Math.max(...metrics.map(m => m.memory.heapUsed));
717
722
  const peakRSS = Math.max(...metrics.map(m => m.memory.rss));
718
723
 
719
- console.log(`\nMemory Statistics:`);
724
+ console.log('\nMemory Statistics:');
720
725
  console.log(` Average Heap: ${(avgHeap / 1024 / 1024).toFixed(2)} MB`);
721
726
  console.log(` Average RSS: ${(avgRSS / 1024 / 1024).toFixed(2)} MB`);
722
727
  console.log(` Peak Heap: ${(peakHeap / 1024 / 1024).toFixed(2)} MB`);
@@ -1,11 +1,14 @@
1
- import { Command } from 'commander';
2
- import fs from 'fs-extra';
3
1
  import path from 'path';
2
+
4
3
  import chalk from 'chalk';
5
- import { ConfigManager } from '../utils/config-manager';
6
- import { PluginManager } from '../plugins/plugin-manager';
7
- import { logger } from '../utils/logger';
4
+ import fs from 'fs-extra';
5
+
8
6
  import { errorHandler } from '../utils/error-handler';
7
+ import { logger } from '../utils/logger';
8
+
9
+ import type { PluginManager } from '../plugins/plugin-manager';
10
+ import type { ConfigManager } from '../utils/config-manager';
11
+ import type { Command } from 'commander';
9
12
 
10
13
  /**
11
14
  * Plugin commands for managing CLI extensions