@wundr.io/cli 1.0.12 → 1.0.13

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 (234) hide show
  1. package/LICENSE +21 -0
  2. package/dist/ai/ai-service.d.ts +152 -0
  3. package/dist/ai/ai-service.d.ts.map +1 -0
  4. package/dist/ai/ai-service.js +430 -0
  5. package/dist/ai/ai-service.js.map +1 -0
  6. package/dist/ai/claude-client.d.ts +130 -0
  7. package/dist/ai/claude-client.d.ts.map +1 -0
  8. package/dist/ai/claude-client.js +340 -0
  9. package/dist/ai/claude-client.js.map +1 -0
  10. package/dist/ai/conversation-manager.d.ts +164 -0
  11. package/dist/ai/conversation-manager.d.ts.map +1 -0
  12. package/dist/ai/conversation-manager.js +614 -0
  13. package/dist/ai/conversation-manager.js.map +1 -0
  14. package/dist/ai/index.d.ts +5 -0
  15. package/dist/ai/index.d.ts.map +1 -0
  16. package/dist/ai/index.js +8 -0
  17. package/dist/ai/index.js.map +1 -0
  18. package/dist/cli.d.ts +36 -0
  19. package/dist/cli.d.ts.map +1 -0
  20. package/dist/cli.js +192 -0
  21. package/dist/cli.js.map +1 -0
  22. package/dist/commands/ai.d.ts +89 -0
  23. package/dist/commands/ai.d.ts.map +1 -0
  24. package/dist/commands/ai.js +954 -0
  25. package/dist/commands/ai.js.map +1 -0
  26. package/dist/commands/alignment.d.ts +78 -0
  27. package/dist/commands/alignment.d.ts.map +1 -0
  28. package/dist/commands/alignment.js +817 -0
  29. package/dist/commands/alignment.js.map +1 -0
  30. package/dist/commands/analyze-optimized.d.ts +14 -0
  31. package/dist/commands/analyze-optimized.d.ts.map +1 -0
  32. package/dist/commands/analyze-optimized.js +609 -0
  33. package/dist/commands/analyze-optimized.js.map +1 -0
  34. package/dist/commands/analyze.d.ts +65 -0
  35. package/dist/commands/analyze.d.ts.map +1 -0
  36. package/dist/commands/analyze.js +435 -0
  37. package/dist/commands/analyze.js.map +1 -0
  38. package/dist/commands/batch.d.ts +93 -0
  39. package/dist/commands/batch.d.ts.map +1 -0
  40. package/dist/commands/batch.js +854 -0
  41. package/dist/commands/batch.js.map +1 -0
  42. package/dist/commands/chat.d.ts +72 -0
  43. package/dist/commands/chat.d.ts.map +1 -0
  44. package/dist/commands/chat.js +678 -0
  45. package/dist/commands/chat.js.map +1 -0
  46. package/dist/commands/claude-init.d.ts +28 -0
  47. package/dist/commands/claude-init.d.ts.map +1 -0
  48. package/dist/commands/claude-init.js +591 -0
  49. package/dist/commands/claude-init.js.map +1 -0
  50. package/dist/commands/claude-setup.d.ts +119 -0
  51. package/dist/commands/claude-setup.d.ts.map +1 -0
  52. package/dist/commands/claude-setup.js +1079 -0
  53. package/dist/commands/claude-setup.js.map +1 -0
  54. package/dist/commands/computer-setup.d.ts +8 -0
  55. package/dist/commands/computer-setup.d.ts.map +1 -0
  56. package/dist/commands/computer-setup.js +877 -0
  57. package/dist/commands/computer-setup.js.map +1 -0
  58. package/dist/commands/create-command.d.ts +7 -0
  59. package/dist/commands/create-command.d.ts.map +1 -0
  60. package/dist/commands/create-command.js +158 -0
  61. package/dist/commands/create-command.js.map +1 -0
  62. package/dist/commands/create.d.ts +74 -0
  63. package/dist/commands/create.d.ts.map +1 -0
  64. package/dist/commands/create.js +556 -0
  65. package/dist/commands/create.js.map +1 -0
  66. package/dist/commands/dashboard.d.ts +91 -0
  67. package/dist/commands/dashboard.d.ts.map +1 -0
  68. package/dist/commands/dashboard.js +538 -0
  69. package/dist/commands/dashboard.js.map +1 -0
  70. package/dist/commands/govern.d.ts +70 -0
  71. package/dist/commands/govern.d.ts.map +1 -0
  72. package/dist/commands/govern.js +481 -0
  73. package/dist/commands/govern.js.map +1 -0
  74. package/dist/commands/governance.d.ts +17 -0
  75. package/dist/commands/governance.d.ts.map +1 -0
  76. package/dist/commands/governance.js +703 -0
  77. package/dist/commands/governance.js.map +1 -0
  78. package/dist/commands/guardian.d.ts +20 -0
  79. package/dist/commands/guardian.d.ts.map +1 -0
  80. package/dist/commands/guardian.js +597 -0
  81. package/dist/commands/guardian.js.map +1 -0
  82. package/dist/commands/init.d.ts +59 -0
  83. package/dist/commands/init.d.ts.map +1 -0
  84. package/dist/commands/init.js +650 -0
  85. package/dist/commands/init.js.map +1 -0
  86. package/dist/commands/orchestrator.d.ts +7 -0
  87. package/dist/commands/orchestrator.d.ts.map +1 -0
  88. package/dist/commands/orchestrator.js +578 -0
  89. package/dist/commands/orchestrator.js.map +1 -0
  90. package/dist/commands/performance-optimizer.d.ts +30 -0
  91. package/dist/commands/performance-optimizer.d.ts.map +1 -0
  92. package/dist/commands/performance-optimizer.js +650 -0
  93. package/dist/commands/performance-optimizer.js.map +1 -0
  94. package/dist/commands/plugins.d.ts +87 -0
  95. package/dist/commands/plugins.d.ts.map +1 -0
  96. package/dist/commands/plugins.js +685 -0
  97. package/dist/commands/plugins.js.map +1 -0
  98. package/dist/commands/rag.d.ts +7 -0
  99. package/dist/commands/rag.d.ts.map +1 -0
  100. package/dist/commands/rag.js +751 -0
  101. package/dist/commands/rag.js.map +1 -0
  102. package/dist/commands/session.d.ts +41 -0
  103. package/dist/commands/session.d.ts.map +1 -0
  104. package/dist/commands/session.js +441 -0
  105. package/dist/commands/session.js.map +1 -0
  106. package/dist/commands/setup.d.ts +24 -0
  107. package/dist/commands/setup.d.ts.map +1 -0
  108. package/dist/commands/setup.js +172 -0
  109. package/dist/commands/setup.js.map +1 -0
  110. package/dist/commands/test-init.d.ts +9 -0
  111. package/dist/commands/test-init.d.ts.map +1 -0
  112. package/dist/commands/test-init.js +222 -0
  113. package/dist/commands/test-init.js.map +1 -0
  114. package/dist/commands/test.d.ts +25 -0
  115. package/dist/commands/test.d.ts.map +1 -0
  116. package/dist/commands/test.js +217 -0
  117. package/dist/commands/test.js.map +1 -0
  118. package/dist/commands/watch.d.ts +76 -0
  119. package/dist/commands/watch.d.ts.map +1 -0
  120. package/dist/commands/watch.js +613 -0
  121. package/dist/commands/watch.js.map +1 -0
  122. package/dist/commands/worktree.d.ts +63 -0
  123. package/dist/commands/worktree.d.ts.map +1 -0
  124. package/dist/commands/worktree.js +774 -0
  125. package/dist/commands/worktree.js.map +1 -0
  126. package/dist/context/context-manager.d.ts +155 -0
  127. package/dist/context/context-manager.d.ts.map +1 -0
  128. package/dist/context/context-manager.js +383 -0
  129. package/dist/context/context-manager.js.map +1 -0
  130. package/dist/context/index.d.ts +3 -0
  131. package/dist/context/index.d.ts.map +1 -0
  132. package/dist/context/index.js +6 -0
  133. package/dist/context/index.js.map +1 -0
  134. package/dist/context/session-manager.d.ts +207 -0
  135. package/dist/context/session-manager.d.ts.map +1 -0
  136. package/dist/context/session-manager.js +686 -0
  137. package/dist/context/session-manager.js.map +1 -0
  138. package/dist/framework/command-interface.d.ts +349 -0
  139. package/dist/framework/command-interface.d.ts.map +1 -0
  140. package/dist/framework/command-interface.js +101 -0
  141. package/dist/framework/command-interface.js.map +1 -0
  142. package/dist/framework/command-registry.d.ts +173 -0
  143. package/dist/framework/command-registry.d.ts.map +1 -0
  144. package/dist/framework/command-registry.js +734 -0
  145. package/dist/framework/command-registry.js.map +1 -0
  146. package/dist/framework/completion-exporter.d.ts +79 -0
  147. package/dist/framework/completion-exporter.d.ts.map +1 -0
  148. package/dist/framework/completion-exporter.js +259 -0
  149. package/dist/framework/completion-exporter.js.map +1 -0
  150. package/dist/framework/debug-logger.d.ts +163 -0
  151. package/dist/framework/debug-logger.d.ts.map +1 -0
  152. package/dist/framework/debug-logger.js +373 -0
  153. package/dist/framework/debug-logger.js.map +1 -0
  154. package/dist/framework/error-handler.d.ts +196 -0
  155. package/dist/framework/error-handler.d.ts.map +1 -0
  156. package/dist/framework/error-handler.js +613 -0
  157. package/dist/framework/error-handler.js.map +1 -0
  158. package/dist/framework/help-generator.d.ts +78 -0
  159. package/dist/framework/help-generator.d.ts.map +1 -0
  160. package/dist/framework/help-generator.js +414 -0
  161. package/dist/framework/help-generator.js.map +1 -0
  162. package/dist/framework/index.d.ts +62 -0
  163. package/dist/framework/index.d.ts.map +1 -0
  164. package/dist/framework/index.js +95 -0
  165. package/dist/framework/index.js.map +1 -0
  166. package/dist/framework/interactive-repl.d.ts +138 -0
  167. package/dist/framework/interactive-repl.d.ts.map +1 -0
  168. package/dist/framework/interactive-repl.js +567 -0
  169. package/dist/framework/interactive-repl.js.map +1 -0
  170. package/dist/framework/output-formatter.d.ts +274 -0
  171. package/dist/framework/output-formatter.d.ts.map +1 -0
  172. package/dist/framework/output-formatter.js +545 -0
  173. package/dist/framework/output-formatter.js.map +1 -0
  174. package/dist/framework/progress-manager.d.ts +192 -0
  175. package/dist/framework/progress-manager.d.ts.map +1 -0
  176. package/dist/framework/progress-manager.js +408 -0
  177. package/dist/framework/progress-manager.js.map +1 -0
  178. package/dist/index.d.ts +8 -0
  179. package/dist/index.d.ts.map +1 -0
  180. package/dist/index.js +51 -0
  181. package/dist/index.js.map +1 -0
  182. package/dist/interactive/interactive-mode.d.ts +76 -0
  183. package/dist/interactive/interactive-mode.d.ts.map +1 -0
  184. package/dist/interactive/interactive-mode.js +732 -0
  185. package/dist/interactive/interactive-mode.js.map +1 -0
  186. package/dist/nlp/command-mapper.d.ts +174 -0
  187. package/dist/nlp/command-mapper.d.ts.map +1 -0
  188. package/dist/nlp/command-mapper.js +624 -0
  189. package/dist/nlp/command-mapper.js.map +1 -0
  190. package/dist/nlp/command-parser.d.ts +106 -0
  191. package/dist/nlp/command-parser.d.ts.map +1 -0
  192. package/dist/nlp/command-parser.js +417 -0
  193. package/dist/nlp/command-parser.js.map +1 -0
  194. package/dist/nlp/index.d.ts +5 -0
  195. package/dist/nlp/index.d.ts.map +1 -0
  196. package/dist/nlp/index.js +8 -0
  197. package/dist/nlp/index.js.map +1 -0
  198. package/dist/nlp/intent-classifier.d.ts +59 -0
  199. package/dist/nlp/intent-classifier.d.ts.map +1 -0
  200. package/dist/nlp/intent-classifier.js +384 -0
  201. package/dist/nlp/intent-classifier.js.map +1 -0
  202. package/dist/nlp/intent-parser.d.ts +152 -0
  203. package/dist/nlp/intent-parser.d.ts.map +1 -0
  204. package/dist/nlp/intent-parser.js +746 -0
  205. package/dist/nlp/intent-parser.js.map +1 -0
  206. package/dist/plugins/plugin-manager.d.ts +121 -0
  207. package/dist/plugins/plugin-manager.d.ts.map +1 -0
  208. package/dist/plugins/plugin-manager.js +606 -0
  209. package/dist/plugins/plugin-manager.js.map +1 -0
  210. package/dist/types/index.d.ts +224 -0
  211. package/dist/types/index.d.ts.map +1 -0
  212. package/dist/types/index.js +3 -0
  213. package/dist/types/index.js.map +1 -0
  214. package/dist/utils/backup-rollback-manager.d.ts +72 -0
  215. package/dist/utils/backup-rollback-manager.d.ts.map +1 -0
  216. package/dist/utils/backup-rollback-manager.js +288 -0
  217. package/dist/utils/backup-rollback-manager.js.map +1 -0
  218. package/dist/utils/claude-config-installer.d.ts +98 -0
  219. package/dist/utils/claude-config-installer.d.ts.map +1 -0
  220. package/dist/utils/claude-config-installer.js +678 -0
  221. package/dist/utils/claude-config-installer.js.map +1 -0
  222. package/dist/utils/config-manager.d.ts +73 -0
  223. package/dist/utils/config-manager.d.ts.map +1 -0
  224. package/dist/utils/config-manager.js +339 -0
  225. package/dist/utils/config-manager.js.map +1 -0
  226. package/dist/utils/error-handler.d.ts +46 -0
  227. package/dist/utils/error-handler.d.ts.map +1 -0
  228. package/dist/utils/error-handler.js +169 -0
  229. package/dist/utils/error-handler.js.map +1 -0
  230. package/dist/utils/logger.d.ts +25 -0
  231. package/dist/utils/logger.d.ts.map +1 -0
  232. package/dist/utils/logger.js +105 -0
  233. package/dist/utils/logger.js.map +1 -0
  234. package/package.json +23 -23
@@ -0,0 +1,877 @@
1
+ "use strict";
2
+ /**
3
+ * Computer setup command for provisioning new developer machines
4
+ * Integrates new-starter functionality into the unified wundr CLI
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createComputerSetupCommand = createComputerSetupCommand;
8
+ exports.runComputerSetup = runComputerSetup;
9
+ const tslib_1 = require("tslib");
10
+ const computer_setup_1 = require("@wundr.io/computer-setup");
11
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
12
+ const commander_1 = require("commander");
13
+ const fs = tslib_1.__importStar(require("fs/promises"));
14
+ const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
15
+ const os = tslib_1.__importStar(require("os"));
16
+ const ora_1 = tslib_1.__importDefault(require("ora"));
17
+ const path = tslib_1.__importStar(require("path"));
18
+ // import { getLogger } from '@wundr/core';
19
+ const logger = { info: console.log, error: console.error, warn: console.warn };
20
+ // const logger = getLogger('cli:computer-setup');
21
+ function createComputerSetupCommand() {
22
+ const command = new commander_1.Command('computer-setup')
23
+ .alias('setup-machine')
24
+ .alias('provision')
25
+ .description('Set up a new developer machine with all required tools and configurations')
26
+ .option('-p, --profile <profile>', 'Use a specific profile (frontend, backend, fullstack, devops, ml)')
27
+ .option('-t, --team <team>', 'Apply team-specific configurations')
28
+ .option('-m, --mode <mode>', 'Setup mode (interactive, automated, minimal)', 'interactive')
29
+ .option('--dry-run', 'Show what would be installed without making changes')
30
+ .option('--skip-existing', 'Skip tools that are already installed')
31
+ .option('--parallel', 'Install tools in parallel where possible')
32
+ .option('--verbose', 'Show detailed output')
33
+ .option('--report', 'Generate a detailed setup report')
34
+ .option('-y, --yes', 'Skip confirmation prompts (assume yes) — implied on non-TTY/CI runs')
35
+ .option('--non-interactive', 'Run fully unattended with no prompts (for headless / MDM provisioning)')
36
+ .option('--no-remote-access', 'Skip remote-access provisioning (Tailscale, SSH, power management, desktop sharing)')
37
+ .action(async (options, command) => {
38
+ // `--dry-run`, `--verbose` and `--interactive` are declared as GLOBAL
39
+ // options on the root program, so they land in the parent's opts, not the
40
+ // sub-command's. optsWithGlobals() merges both so flags like --dry-run
41
+ // actually take effect here.
42
+ const merged = typeof command?.optsWithGlobals === 'function'
43
+ ? { ...command.optsWithGlobals(), ...options }
44
+ : options;
45
+ await runComputerSetup(merged);
46
+ });
47
+ // Subcommands
48
+ command
49
+ .command('profile')
50
+ .description('Manage developer profiles')
51
+ .action(async () => {
52
+ await manageProfiles();
53
+ });
54
+ command
55
+ .command('validate')
56
+ .description('Validate current machine setup')
57
+ .action(async () => {
58
+ await validateSetup();
59
+ });
60
+ command
61
+ .command('doctor')
62
+ .description('Diagnose and fix common setup issues')
63
+ .action(async () => {
64
+ await runDoctor();
65
+ });
66
+ command
67
+ .command('team-config')
68
+ .description('Download and apply team configuration')
69
+ .argument('<team>', 'Team identifier')
70
+ .action(async (team) => {
71
+ await applyTeamConfig(team);
72
+ });
73
+ return command;
74
+ }
75
+ async function runComputerSetup(options) {
76
+ const spinner = (0, ora_1.default)('Initializing computer setup...').start();
77
+ try {
78
+ const manager = new computer_setup_1.ComputerSetupManager();
79
+ await manager.initialize();
80
+ spinner.stop();
81
+ // A run is non-interactive when there is no console, in CI, or when the
82
+ // caller asked for it (--yes / --non-interactive / a non-interactive mode).
83
+ // In that case we never prompt — for a profile OR for confirmation — and
84
+ // fall back to the default profile.
85
+ const nonInteractive = Boolean(options.yes) ||
86
+ Boolean(options.nonInteractive) ||
87
+ options.mode !== 'interactive' ||
88
+ !process.stdin.isTTY ||
89
+ Boolean(process.env.CI);
90
+ // Get or create profile
91
+ let profile;
92
+ if (options.profile) {
93
+ // Get profile by name - ProfileManager will handle normalization
94
+ profile = await manager.getProfile(options.profile);
95
+ if (!profile) {
96
+ console.log(chalk_1.default.yellow(`Profile '${options.profile}' not found. Using default.`));
97
+ profile = await manager.getDefaultProfile();
98
+ }
99
+ }
100
+ else if (!nonInteractive) {
101
+ profile = await createInteractiveProfile();
102
+ }
103
+ else {
104
+ profile = await manager.getDefaultProfile();
105
+ }
106
+ // commander sets options.remoteAccess === false for --no-remote-access.
107
+ if (profile && options.remoteAccess === false) {
108
+ profile.remoteAccess = {
109
+ ...(profile.remoteAccess ?? {}),
110
+ enabled: false,
111
+ };
112
+ }
113
+ // Detect platform
114
+ const platform = {
115
+ os: process.platform,
116
+ arch: process.arch,
117
+ version: process.version,
118
+ };
119
+ console.log(chalk_1.default.cyan('\n🖥️ Computer Setup for Engineering Teams\n'));
120
+ console.log(chalk_1.default.gray('━'.repeat(50)));
121
+ console.log(chalk_1.default.white('Profile:'), chalk_1.default.green(profile.name));
122
+ console.log(chalk_1.default.white('Role:'), chalk_1.default.green(profile.role));
123
+ console.log(chalk_1.default.white('Platform:'), chalk_1.default.green(`${platform.os} ${platform.arch}`));
124
+ console.log(chalk_1.default.white('Mode:'), chalk_1.default.green(options.mode));
125
+ console.log(chalk_1.default.gray('━'.repeat(50)));
126
+ if (options.dryRun) {
127
+ console.log(chalk_1.default.yellow('\n⚠️ DRY RUN MODE - No changes will be made\n'));
128
+ }
129
+ // Confirm before proceeding (only in a real interactive session — the
130
+ // `nonInteractive` flag computed above already accounts for TTY/CI/--yes).
131
+ if (!options.dryRun && !nonInteractive) {
132
+ const { proceed } = await inquirer_1.default.prompt([
133
+ {
134
+ type: 'confirm',
135
+ name: 'proceed',
136
+ message: 'Ready to set up your machine?',
137
+ default: true,
138
+ },
139
+ ]);
140
+ if (!proceed) {
141
+ console.log(chalk_1.default.yellow('Setup cancelled'));
142
+ return;
143
+ }
144
+ }
145
+ // Set up progress monitoring
146
+ manager.on('progress', progress => {
147
+ const bar = generateProgressBar(progress.percentage);
148
+ console.log(chalk_1.default.cyan(`\n[${bar}] ${progress.percentage}%`));
149
+ console.log(chalk_1.default.gray(`Current: ${progress.currentStep}`));
150
+ console.log(chalk_1.default.gray(`Steps: ${progress.completedSteps}/${progress.totalSteps}`));
151
+ });
152
+ // Run setup
153
+ spinner.text = 'Setting up your machine...';
154
+ spinner.start();
155
+ const result = await manager.setup({
156
+ profile,
157
+ platform,
158
+ mode: options.mode,
159
+ skipExisting: options.skipExisting || false,
160
+ dryRun: options.dryRun || false,
161
+ verbose: options.verbose || false,
162
+ parallel: options.parallel || false,
163
+ generateReport: options.report || false,
164
+ });
165
+ spinner.stop();
166
+ // Display results
167
+ if (result.success) {
168
+ console.log(chalk_1.default.green('\n✅ Computer setup completed successfully!\n'));
169
+ }
170
+ else {
171
+ console.log(chalk_1.default.red('\n❌ Computer setup completed with errors\n'));
172
+ }
173
+ console.log(chalk_1.default.white('Summary:'));
174
+ console.log(chalk_1.default.green(` ✓ Completed: ${result.completedSteps?.length || 0} steps`));
175
+ if (result.skippedSteps && result.skippedSteps.length > 0) {
176
+ console.log(chalk_1.default.yellow(` ⊘ Skipped: ${result.skippedSteps.length} steps`));
177
+ }
178
+ if (result.failedSteps && result.failedSteps.length > 0) {
179
+ console.log(chalk_1.default.red(` ✗ Failed: ${result.failedSteps.length} steps`));
180
+ }
181
+ if (result.warnings && result.warnings.length > 0) {
182
+ console.log(chalk_1.default.yellow('\n⚠️ Warnings:'));
183
+ result.warnings.forEach(w => console.log(chalk_1.default.yellow(` - ${w}`)));
184
+ }
185
+ if (result.errors && result.errors.length > 0) {
186
+ console.log(chalk_1.default.red('\n❌ Errors:'));
187
+ result.errors.forEach(e => console.log(chalk_1.default.red(` - ${e?.message || e}`)));
188
+ }
189
+ if (result.report) {
190
+ console.log(chalk_1.default.cyan('\n📄 Setup report generated successfully'));
191
+ }
192
+ // Set up Fleet Mode if enabled
193
+ if (profile.preferences?.aiTools?.fleetMode) {
194
+ try {
195
+ await setupFleetMode(profile);
196
+ }
197
+ catch (fleetError) {
198
+ console.error(chalk_1.default.red('\n⚠️ Fleet Mode setup encountered issues:'), fleetError);
199
+ console.log(chalk_1.default.yellow('You can retry with: wundr computer-setup --profile <your-profile>'));
200
+ }
201
+ }
202
+ // Display next steps
203
+ console.log(chalk_1.default.cyan('\n📝 Next Steps:'));
204
+ const nextSteps = [
205
+ 'Restart your terminal to apply configurations',
206
+ 'Run "wundr computer-setup validate" to verify',
207
+ 'Sign in to your team communication tools',
208
+ 'Clone your team repositories',
209
+ 'Review team onboarding documentation',
210
+ ];
211
+ nextSteps.forEach((step, i) => {
212
+ console.log(chalk_1.default.white(` ${i + 1}. ${step}`));
213
+ });
214
+ console.log(chalk_1.default.gray('\n━'.repeat(50)));
215
+ console.log(chalk_1.default.cyan('Welcome to the team! 🎉'));
216
+ console.log(chalk_1.default.gray('━'.repeat(50)));
217
+ }
218
+ catch (error) {
219
+ spinner.stop();
220
+ logger.error('Computer setup failed', error);
221
+ console.error(chalk_1.default.red('Setup failed:'), error);
222
+ process.exit(1);
223
+ }
224
+ }
225
+ async function createInteractiveProfile() {
226
+ console.log(chalk_1.default.cyan("\n👤 Let's create your developer profile\n"));
227
+ const answers = await inquirer_1.default.prompt([
228
+ {
229
+ type: 'input',
230
+ name: 'name',
231
+ message: 'What is your name?',
232
+ validate: input => input.length > 0,
233
+ },
234
+ {
235
+ type: 'input',
236
+ name: 'email',
237
+ message: 'What is your email?',
238
+ validate: input => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(input),
239
+ },
240
+ {
241
+ type: 'list',
242
+ name: 'role',
243
+ message: 'What is your role?',
244
+ choices: [
245
+ { name: 'Frontend Developer', value: 'frontend' },
246
+ { name: 'Backend Developer', value: 'backend' },
247
+ { name: 'Full Stack Developer', value: 'fullstack' },
248
+ { name: 'DevOps Engineer', value: 'devops' },
249
+ { name: 'Machine Learning Engineer', value: 'ml' },
250
+ { name: 'Mobile Developer', value: 'mobile' },
251
+ ],
252
+ },
253
+ {
254
+ type: 'input',
255
+ name: 'team',
256
+ message: 'What team are you joining? (optional)',
257
+ default: '',
258
+ },
259
+ {
260
+ type: 'list',
261
+ name: 'shell',
262
+ message: 'Which shell do you prefer?',
263
+ choices: ['zsh', 'bash', 'fish'],
264
+ },
265
+ {
266
+ type: 'list',
267
+ name: 'editor',
268
+ message: 'Which editor do you use?',
269
+ choices: [
270
+ { name: 'Visual Studio Code', value: 'vscode' },
271
+ { name: 'Vim', value: 'vim' },
272
+ { name: 'Neovim', value: 'neovim' },
273
+ { name: 'Sublime Text', value: 'sublime' },
274
+ { name: 'IntelliJ IDEA', value: 'intellij' },
275
+ ],
276
+ },
277
+ {
278
+ type: 'checkbox',
279
+ name: 'languages',
280
+ message: 'Which programming languages do you need?',
281
+ choices: [
282
+ { name: 'Node.js', value: 'node', checked: true },
283
+ { name: 'Python', value: 'python' },
284
+ { name: 'Go', value: 'go' },
285
+ { name: 'Rust', value: 'rust' },
286
+ { name: 'Java', value: 'java' },
287
+ ],
288
+ },
289
+ {
290
+ type: 'checkbox',
291
+ name: 'tools',
292
+ message: 'Which tools do you need?',
293
+ choices: [
294
+ { name: 'Docker', value: 'docker', checked: true },
295
+ { name: 'Kubernetes', value: 'kubernetes' },
296
+ { name: 'AWS CLI', value: 'aws' },
297
+ { name: 'Google Cloud SDK', value: 'gcloud' },
298
+ { name: 'PostgreSQL', value: 'postgresql' },
299
+ { name: 'Redis', value: 'redis' },
300
+ ],
301
+ },
302
+ {
303
+ type: 'confirm',
304
+ name: 'aiTools',
305
+ message: 'Do you want to set up AI development tools (Claude Code, Ruflo)?',
306
+ default: true,
307
+ },
308
+ {
309
+ type: 'confirm',
310
+ name: 'fleetMode',
311
+ message: 'Enable Fleet-Scale Autonomous Engineering mode?',
312
+ default: false,
313
+ when: (answers) => answers.aiTools,
314
+ },
315
+ {
316
+ type: 'confirm',
317
+ name: 'slack',
318
+ message: 'Do you need Slack configuration?',
319
+ default: true,
320
+ },
321
+ ]);
322
+ // Build profile from answers
323
+ return {
324
+ name: answers.name,
325
+ email: answers.email,
326
+ role: answers.role,
327
+ team: answers.team,
328
+ preferences: {
329
+ shell: answers.shell,
330
+ editor: answers.editor,
331
+ theme: 'auto',
332
+ gitConfig: {
333
+ userName: answers.name,
334
+ userEmail: answers.email,
335
+ signCommits: true,
336
+ defaultBranch: 'main',
337
+ aliases: {},
338
+ },
339
+ aiTools: {
340
+ claudeCode: answers.aiTools,
341
+ ruflo: answers.aiTools,
342
+ mcpTools: answers.aiTools ? ['all'] : [],
343
+ swarmAgents: answers.aiTools ? ['default'] : [],
344
+ memoryAllocation: '2GB',
345
+ fleetMode: answers.fleetMode || false,
346
+ },
347
+ },
348
+ tools: {
349
+ languages: buildLanguageConfig(answers.languages),
350
+ packageManagers: {
351
+ npm: true,
352
+ pnpm: true,
353
+ yarn: false,
354
+ brew: process.platform === 'darwin',
355
+ },
356
+ containers: {
357
+ docker: answers.tools.includes('docker'),
358
+ dockerCompose: answers.tools.includes('docker'),
359
+ kubernetes: answers.tools.includes('kubernetes'),
360
+ },
361
+ cloudCLIs: {
362
+ aws: answers.tools.includes('aws'),
363
+ gcloud: answers.tools.includes('gcloud'),
364
+ },
365
+ databases: {
366
+ postgresql: answers.tools.includes('postgresql'),
367
+ redis: answers.tools.includes('redis'),
368
+ },
369
+ monitoring: {},
370
+ communication: {
371
+ slack: answers.slack
372
+ ? {
373
+ workspaces: [],
374
+ profile: {
375
+ displayName: answers.name,
376
+ statusText: 'New team member',
377
+ statusEmoji: ':wave:',
378
+ },
379
+ }
380
+ : undefined,
381
+ },
382
+ },
383
+ };
384
+ }
385
+ function buildLanguageConfig(languages) {
386
+ const config = {};
387
+ if (languages.includes('node')) {
388
+ config.node = {
389
+ versions: ['20', '18'],
390
+ defaultVersion: '20',
391
+ globalPackages: ['pnpm', 'typescript', 'tsx'],
392
+ };
393
+ }
394
+ if (languages.includes('python')) {
395
+ config.python = {
396
+ versions: ['3.11', '3.10'],
397
+ defaultVersion: '3.11',
398
+ virtualEnv: 'venv',
399
+ };
400
+ }
401
+ if (languages.includes('go')) {
402
+ config.go = {
403
+ version: 'latest',
404
+ goPath: '$HOME/go',
405
+ };
406
+ }
407
+ if (languages.includes('rust')) {
408
+ config.rust = {
409
+ version: 'stable',
410
+ components: ['rustfmt', 'clippy'],
411
+ };
412
+ }
413
+ if (languages.includes('java')) {
414
+ config.java = {
415
+ version: '17',
416
+ jdk: 'adoptium',
417
+ };
418
+ }
419
+ return config;
420
+ }
421
+ /**
422
+ * Sets up Fleet-Scale Autonomous Engineering mode
423
+ * Installs Orchestrator Daemon scripts, Memory Bank templates, and IPRE governance defaults
424
+ */
425
+ async function setupFleetMode(profile) {
426
+ const wundrDir = path.join(os.homedir(), '.wundr');
427
+ const orchestratorDaemonDir = path.join(wundrDir, 'orchestrator-daemon');
428
+ const governanceDir = path.join(wundrDir, 'governance');
429
+ const templatesDir = path.join(wundrDir, 'templates');
430
+ console.log(chalk_1.default.cyan('\n🚀 Setting up Fleet-Scale Autonomous Engineering mode...\n'));
431
+ // Create directory structure
432
+ await fs.mkdir(orchestratorDaemonDir, { recursive: true });
433
+ await fs.mkdir(governanceDir, { recursive: true });
434
+ await fs.mkdir(path.join(templatesDir, 'memory-bank'), { recursive: true });
435
+ await fs.mkdir(path.join(templatesDir, 'sub-agents'), { recursive: true });
436
+ // 1. Install Orchestrator Daemon configuration
437
+ const orchestratorConfig = {
438
+ version: '1.0.0',
439
+ identity: {
440
+ name: profile.name,
441
+ email: profile.email,
442
+ role: 'Orchestrator-Supervisor',
443
+ },
444
+ resourceLimits: {
445
+ maxSessions: 10,
446
+ tokenBudget: {
447
+ subscription: 0.8, // 80% for Orchestrator & Session Managers
448
+ api: 0.2, // 20% for sub-agent swarms
449
+ },
450
+ },
451
+ systemLimits: {
452
+ fileDescriptors: 65000,
453
+ diskSpaceBufferGB: 10,
454
+ maxWorktreesPerMachine: 200,
455
+ },
456
+ measurableObjectives: {
457
+ responseTime: '<30s to Slack mentions',
458
+ rateLimit: "Zero 'Rate Limit Exceeded' per week",
459
+ routingAccuracy: '100% correct task routing',
460
+ },
461
+ hardConstraints: [
462
+ 'Never exhaust API quota',
463
+ 'Always maintain audit trail',
464
+ 'Escalate blocked requests within 5 minutes',
465
+ ],
466
+ };
467
+ await fs.writeFile(path.join(orchestratorDaemonDir, 'config.yaml'), generateYamlContent(orchestratorConfig), 'utf-8');
468
+ console.log(chalk_1.default.green(' ✓ Orchestrator Daemon configuration installed'));
469
+ // 2. Copy Orchestrator Charter template
470
+ const orchestratorCharter = `---
471
+ name: orchestrator-supervisor
472
+ role: Tier1-Orchestrator
473
+ identity:
474
+ name: '${profile.name}'
475
+ email: '${profile.email}'
476
+ slackHandle: '@orchestrator-supervisor'
477
+
478
+ responsibilities:
479
+ - triage_requests
480
+ - manage_session_lifecycle
481
+ - allocate_token_budget
482
+ - human_communication
483
+ - fleet_status_reporting
484
+
485
+ resourceLimits:
486
+ maxSessions: 10
487
+ tokenBudget:
488
+ subscription: 80%
489
+ api: 20%
490
+
491
+ measurableObjectives:
492
+ responseTime: '<30s to Slack mentions'
493
+ rateLimit: "Zero 'Rate Limit Exceeded' per week"
494
+ routingAccuracy: '100% correct task routing'
495
+
496
+ hardConstraints:
497
+ - 'Never exhaust API quota'
498
+ - 'Always maintain audit trail'
499
+ - 'Escalate blocked requests within 5 minutes'
500
+ ---
501
+ `;
502
+ await fs.writeFile(path.join(orchestratorDaemonDir, 'orchestrator-charter.md'), orchestratorCharter, 'utf-8');
503
+ console.log(chalk_1.default.green(' ✓ Orchestrator Charter template deployed'));
504
+ // 3. Set up token budgeting configuration
505
+ const tokenBudgetConfig = {
506
+ version: '1.0.0',
507
+ subscription: {
508
+ type: 'claude-code-max-20x',
509
+ promptsPerFiveHours: 800,
510
+ warningThreshold: 0.8,
511
+ criticalThreshold: 0.95,
512
+ },
513
+ api: {
514
+ monthlyBudget: 500,
515
+ haikuRatePerMillion: 0.25,
516
+ sonnetRatePerMillion: 3.0,
517
+ },
518
+ modelAllocation: {
519
+ tier1: {
520
+ model: 'claude-3-5-sonnet',
521
+ source: 'subscription',
522
+ priority: 'critical',
523
+ },
524
+ tier2: {
525
+ model: 'claude-3-5-sonnet',
526
+ source: 'subscription',
527
+ priority: 'high',
528
+ },
529
+ tier3: {
530
+ model: 'claude-3-5-haiku',
531
+ source: 'api',
532
+ priority: 'normal',
533
+ },
534
+ },
535
+ throttlingPolicy: {
536
+ onWarning: ['pause_non_critical_sessions', 'queue_new_requests'],
537
+ onCritical: ['pause_all_except_critical', 'notify_orchestrator_human'],
538
+ },
539
+ };
540
+ await fs.writeFile(path.join(orchestratorDaemonDir, 'token-budget.yaml'), generateYamlContent(tokenBudgetConfig), 'utf-8');
541
+ console.log(chalk_1.default.green(' ✓ Token budgeting configuration set up'));
542
+ // 4. Deploy Memory Bank templates
543
+ const sessionTemplate = `# Active Context - Session {{SESSION_ID}}
544
+
545
+ ## Current Focus
546
+ <!-- Updated by session manager -->
547
+
548
+ ## Working Memory
549
+ - Last action:
550
+ - Next planned step:
551
+ - Blockers:
552
+
553
+ ## Context Window State
554
+ - Tokens used: X / 200,000
555
+ - Compression needed: Yes/No
556
+
557
+ ## Handoff Notes
558
+ <!-- For session resumption -->
559
+ `;
560
+ const progressTemplate = `# Progress Tracker - Session {{SESSION_ID}}
561
+
562
+ ## Milestones
563
+ | Status | Milestone | Target Date | Notes |
564
+ |--------|-----------|-------------|-------|
565
+
566
+ ## Completed Tasks
567
+ <!-- Archive of completed work -->
568
+
569
+ ## Blockers
570
+ <!-- Current impediments -->
571
+ `;
572
+ const subAgentDelegationTemplate = `# Sub-Agent Delegation Tracker
573
+
574
+ ## Active Sub-Agents
575
+ | ID | Type | Task | Status | Worktree | Started |
576
+ |----|------|------|--------|----------|---------|
577
+
578
+ ## Completed Tasks
579
+ <!-- Archive of completed sub-agent work -->
580
+
581
+ ## Resource Usage
582
+ - Active worktrees: X / 20
583
+ - API calls (session): X
584
+ `;
585
+ const ipreAlignmentTemplate = `# IPRE Alignment State
586
+
587
+ ## Active Policies
588
+ <!-- Hard constraints for this session -->
589
+
590
+ ## Reward Weights
591
+ \`\`\`yaml
592
+ customer_value: 0.35
593
+ code_quality: 0.30
594
+ timeline: 0.20
595
+ technical_debt: 0.15
596
+ \`\`\`
597
+
598
+ ## Alignment Score
599
+ - Current: 85/100
600
+ - Last evaluation: {{TIMESTAMP}}
601
+ - Trend: Improving
602
+
603
+ ## Escalation History
604
+ <!-- Guardian review log -->
605
+ `;
606
+ await fs.writeFile(path.join(templatesDir, 'memory-bank', 'activeContext.md'), sessionTemplate, 'utf-8');
607
+ await fs.writeFile(path.join(templatesDir, 'memory-bank', 'progress.md'), progressTemplate, 'utf-8');
608
+ await fs.writeFile(path.join(templatesDir, 'memory-bank', 'subAgentDelegation.md'), subAgentDelegationTemplate, 'utf-8');
609
+ await fs.writeFile(path.join(templatesDir, 'memory-bank', 'ipre-alignment.md'), ipreAlignmentTemplate, 'utf-8');
610
+ console.log(chalk_1.default.green(' ✓ Memory Bank templates deployed'));
611
+ // 5. Initialize IPRE governance defaults
612
+ const ipreDefaults = {
613
+ version: '1.0.0',
614
+ intent: {
615
+ mission: 'Deliver high-quality software that solves customer problems',
616
+ values: [
617
+ 'customer_first',
618
+ 'technical_excellence',
619
+ 'sustainable_velocity',
620
+ ],
621
+ },
622
+ policies: {
623
+ security: [
624
+ 'No secrets in code',
625
+ 'No SQL injection vulnerabilities',
626
+ 'No XSS attack vectors',
627
+ ],
628
+ compliance: [
629
+ 'All changes require PR review',
630
+ 'No force pushes to main/master',
631
+ 'Test coverage minimum 80%',
632
+ ],
633
+ operational: [
634
+ 'No deployments on Fridays after 2pm',
635
+ 'Rollback plan required for production changes',
636
+ ],
637
+ },
638
+ rewards: {
639
+ customer_value: 0.35,
640
+ code_quality: 0.25,
641
+ delivery_speed: 0.2,
642
+ technical_debt_reduction: 0.15,
643
+ documentation: 0.05,
644
+ },
645
+ evaluators: [
646
+ {
647
+ type: 'policy_compliance',
648
+ frequency: 'per_commit',
649
+ action: 'block_on_violation',
650
+ },
651
+ {
652
+ type: 'reward_alignment',
653
+ frequency: 'hourly',
654
+ threshold: 0.7,
655
+ action: 'escalate_to_guardian',
656
+ },
657
+ {
658
+ type: 'drift_detection',
659
+ frequency: 'daily',
660
+ patterns: ['reward_hacking', 'escalation_suppression'],
661
+ action: 'alert_architect',
662
+ },
663
+ ],
664
+ };
665
+ await fs.writeFile(path.join(governanceDir, 'ipre-defaults.yaml'), generateYamlContent(ipreDefaults), 'utf-8');
666
+ console.log(chalk_1.default.green(' ✓ IPRE governance defaults initialized'));
667
+ // 6. Configure system resource limits guidance
668
+ const resourceGuidance = `# System Resource Configuration for Fleet Mode
669
+
670
+ ## File Descriptor Limits
671
+ For optimal fleet operation with up to 200 worktrees, configure:
672
+
673
+ ### macOS / Linux
674
+ \`\`\`bash
675
+ # Add to ~/.zshrc or ~/.bashrc
676
+ ulimit -n 65000
677
+ \`\`\`
678
+
679
+ ### Persistent Configuration (macOS)
680
+ \`\`\`bash
681
+ # Create /Library/LaunchDaemons/limit.maxfiles.plist with:
682
+ # soft limit: 65000
683
+ # hard limit: 200000
684
+ \`\`\`
685
+
686
+ ### Persistent Configuration (Linux)
687
+ \`\`\`bash
688
+ # Add to /etc/security/limits.conf
689
+ * soft nofile 65000
690
+ * hard nofile 200000
691
+ \`\`\`
692
+
693
+ ## Disk Space Requirements
694
+ - Minimum: 500GB SSD
695
+ - Recommended: 4TB+ SSD (for 200 worktrees at ~2GB each)
696
+ - Buffer: Keep 10GB free at all times
697
+
698
+ ## Git Worktree Best Practices
699
+ - Session Managers sync with remote (fetch/pull)
700
+ - Sub-Agents rarely git fetch (reduces index lock contention)
701
+ - Use fractional worktree pattern:
702
+ - Read-only agents: Share Session Manager's worktree
703
+ - Write-access agents: Get dedicated worktrees
704
+
705
+ ## Monitoring Commands
706
+ \`\`\`bash
707
+ # Check current file descriptor limit
708
+ ulimit -n
709
+
710
+ # Check open files
711
+ lsof | wc -l
712
+
713
+ # Check disk space
714
+ df -h
715
+
716
+ # List active worktrees
717
+ git worktree list
718
+ \`\`\`
719
+ `;
720
+ await fs.writeFile(path.join(wundrDir, 'RESOURCE_LIMITS.md'), resourceGuidance, 'utf-8');
721
+ console.log(chalk_1.default.green(' ✓ System resource limits guidance configured'));
722
+ console.log(chalk_1.default.cyan('\n✅ Fleet-Scale Autonomous Engineering mode setup complete!\n'));
723
+ console.log(chalk_1.default.white('Files created:'));
724
+ console.log(chalk_1.default.gray(' ~/.wundr/orchestrator-daemon/config.yaml'));
725
+ console.log(chalk_1.default.gray(' ~/.wundr/orchestrator-daemon/orchestrator-charter.md'));
726
+ console.log(chalk_1.default.gray(' ~/.wundr/orchestrator-daemon/token-budget.yaml'));
727
+ console.log(chalk_1.default.gray(' ~/.wundr/templates/memory-bank/'));
728
+ console.log(chalk_1.default.gray(' ~/.wundr/governance/ipre-defaults.yaml'));
729
+ console.log(chalk_1.default.gray(' ~/.wundr/RESOURCE_LIMITS.md'));
730
+ console.log(chalk_1.default.yellow('\n⚠️ Review ~/.wundr/RESOURCE_LIMITS.md for system configuration recommendations.'));
731
+ }
732
+ /**
733
+ * Simple YAML generator for configuration objects
734
+ */
735
+ function generateYamlContent(obj, indent = 0) {
736
+ let yaml = '';
737
+ const spaces = ' '.repeat(indent);
738
+ for (const [key, value] of Object.entries(obj)) {
739
+ if (value === null || value === undefined) {
740
+ yaml += `${spaces}${key}: null\n`;
741
+ }
742
+ else if (typeof value === 'object' && !Array.isArray(value)) {
743
+ yaml += `${spaces}${key}:\n`;
744
+ yaml += generateYamlContent(value, indent + 1);
745
+ }
746
+ else if (Array.isArray(value)) {
747
+ yaml += `${spaces}${key}:\n`;
748
+ for (const item of value) {
749
+ if (typeof item === 'object') {
750
+ yaml += `${spaces} -\n`;
751
+ const itemYaml = generateYamlContent(item, indent + 2);
752
+ yaml += itemYaml;
753
+ }
754
+ else {
755
+ yaml += `${spaces} - '${item}'\n`;
756
+ }
757
+ }
758
+ }
759
+ else if (typeof value === 'string') {
760
+ yaml += `${spaces}${key}: '${value}'\n`;
761
+ }
762
+ else {
763
+ yaml += `${spaces}${key}: ${value}\n`;
764
+ }
765
+ }
766
+ return yaml;
767
+ }
768
+ async function manageProfiles() {
769
+ const manager = new computer_setup_1.ComputerSetupManager();
770
+ await manager.initialize();
771
+ const profiles = await manager.getAvailableProfiles();
772
+ console.log(chalk_1.default.cyan('\n📋 Developer Profiles\n'));
773
+ if (profiles.length === 0) {
774
+ console.log(chalk_1.default.yellow('No profiles found. Create one with "wundr computer-setup"'));
775
+ return;
776
+ }
777
+ profiles.forEach((profile, i) => {
778
+ console.log(chalk_1.default.white(`${i + 1}. ${profile.name}`));
779
+ console.log(chalk_1.default.gray(` Role: ${profile.role}`));
780
+ console.log(chalk_1.default.gray(` Email: ${profile.email}`));
781
+ if (profile.team) {
782
+ console.log(chalk_1.default.gray(` Team: ${profile.team}`));
783
+ }
784
+ });
785
+ }
786
+ async function validateSetup() {
787
+ const spinner = (0, ora_1.default)('Validating machine setup...').start();
788
+ try {
789
+ const manager = new computer_setup_1.ComputerSetupManager();
790
+ await manager.initialize();
791
+ // Get current profile
792
+ const profiles = await manager.getAvailableProfiles();
793
+ if (profiles.length === 0) {
794
+ spinner.stop();
795
+ console.log(chalk_1.default.yellow('No profile found. Run "wundr computer-setup" first.'));
796
+ return;
797
+ }
798
+ const profile = profiles[0]; // Use most recent
799
+ if (!profile) {
800
+ console.log(chalk_1.default.yellow('No profile found. Run "wundr computer-setup" first.'));
801
+ return;
802
+ }
803
+ const isValid = await manager.validateSetup(profile);
804
+ spinner.stop();
805
+ if (isValid) {
806
+ console.log(chalk_1.default.green('✅ Machine setup is valid!'));
807
+ }
808
+ else {
809
+ console.log(chalk_1.default.red('❌ Machine setup has issues'));
810
+ console.log(chalk_1.default.yellow('\nRun "wundr computer-setup doctor" to diagnose and fix issues'));
811
+ }
812
+ }
813
+ catch (error) {
814
+ spinner.stop();
815
+ console.error(chalk_1.default.red('Validation failed:'), error);
816
+ }
817
+ }
818
+ async function runDoctor() {
819
+ console.log(chalk_1.default.cyan('\n🏥 Computer Setup Doctor\n'));
820
+ console.log(chalk_1.default.gray('Diagnosing your machine setup...\n'));
821
+ const checks = [
822
+ { name: 'Node.js', command: 'node --version', required: true },
823
+ { name: 'npm', command: 'npm --version', required: true },
824
+ { name: 'pnpm', command: 'pnpm --version', required: false },
825
+ { name: 'Git', command: 'git --version', required: true },
826
+ { name: 'Docker', command: 'docker --version', required: false },
827
+ { name: 'Claude Code', command: 'claude --version', required: false },
828
+ { name: 'GitHub CLI', command: 'gh --version', required: false },
829
+ ];
830
+ for (const check of checks) {
831
+ const spinner = (0, ora_1.default)(`Checking ${check.name}...`).start();
832
+ try {
833
+ const { execa } = (await Promise.resolve().then(() => tslib_1.__importStar(require('execa'))));
834
+ const { stdout } = await execa(check.command.split(' ')[0], check.command.split(' ').slice(1));
835
+ spinner.succeed(`${check.name}: ${stdout.trim()}`);
836
+ }
837
+ catch (error) {
838
+ if (check.required) {
839
+ spinner.fail(`${check.name}: Not found (REQUIRED)`);
840
+ }
841
+ else {
842
+ spinner.warn(`${check.name}: Not found (optional)`);
843
+ }
844
+ }
845
+ }
846
+ console.log(chalk_1.default.cyan('\n💊 Recommendations:\n'));
847
+ console.log('1. Install missing required tools');
848
+ console.log('2. Run "wundr computer-setup" to complete setup');
849
+ console.log('3. Check PATH environment variable');
850
+ }
851
+ async function applyTeamConfig(team) {
852
+ console.log(chalk_1.default.cyan(`\n👥 Applying team configuration: ${team}\n`));
853
+ const spinner = (0, ora_1.default)('Downloading team configuration...').start();
854
+ try {
855
+ // This would fetch team config from a central repository
856
+ // For now, we'll simulate it
857
+ await new Promise(resolve => setTimeout(resolve, 2000));
858
+ spinner.succeed('Team configuration downloaded');
859
+ console.log(chalk_1.default.green('✅ Team configuration applied successfully!'));
860
+ console.log(chalk_1.default.cyan('\nTeam tools installed:'));
861
+ console.log(' - Internal CLI tools');
862
+ console.log(' - Team-specific VS Code extensions');
863
+ console.log(' - Pre-commit hooks');
864
+ console.log(' - Team aliases and scripts');
865
+ }
866
+ catch (error) {
867
+ spinner.fail('Failed to apply team configuration');
868
+ console.error(chalk_1.default.red('Error:'), error);
869
+ }
870
+ }
871
+ function generateProgressBar(percentage) {
872
+ const width = 30;
873
+ const filled = Math.round((width * percentage) / 100);
874
+ const empty = width - filled;
875
+ return '█'.repeat(filled) + '░'.repeat(empty);
876
+ }
877
+ //# sourceMappingURL=computer-setup.js.map