@wundr.io/cli 1.0.11 → 1.0.12
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/bin/wundr.js +8 -4
- package/package.json +23 -23
- package/src/ai/ai-service.ts +16 -17
- package/src/ai/claude-client.ts +16 -16
- package/src/ai/conversation-manager.ts +29 -29
- package/src/cli.ts +4 -4
- package/src/commands/ai.ts +246 -78
- package/src/commands/alignment.ts +74 -74
- package/src/commands/analyze-optimized.ts +111 -78
- package/src/commands/analyze.ts +14 -14
- package/src/commands/batch.ts +179 -42
- package/src/commands/chat.ts +37 -30
- package/src/commands/claude-init.ts +41 -45
- package/src/commands/claude-setup.ts +204 -119
- package/src/commands/computer-setup.ts +85 -43
- package/src/commands/create-command.ts +4 -4
- package/src/commands/create.ts +27 -27
- package/src/commands/dashboard.ts +24 -24
- package/src/commands/govern.ts +25 -25
- package/src/commands/governance.ts +34 -34
- package/src/commands/guardian.ts +56 -56
- package/src/commands/init.ts +25 -22
- package/src/commands/orchestrator.ts +68 -41
- package/src/commands/performance-optimizer.ts +34 -35
- package/src/commands/plugins.ts +27 -27
- package/src/commands/project-update.ts +175 -72
- package/src/commands/rag.ts +185 -78
- package/src/commands/session.ts +35 -35
- package/src/commands/setup.ts +40 -344
- package/src/commands/test-init.ts +3 -3
- package/src/commands/test.ts +4 -4
- package/src/commands/watch.ts +28 -29
- package/src/commands/worktree.ts +49 -49
- package/src/context/context-manager.ts +10 -10
- package/src/context/session-manager.ts +41 -41
- package/src/framework/command-interface.ts +520 -0
- package/src/framework/command-registry.ts +942 -0
- package/src/framework/completion-exporter.ts +383 -0
- package/src/framework/debug-logger.ts +519 -0
- package/src/framework/error-handler.ts +867 -0
- package/src/framework/help-generator.ts +540 -0
- package/src/framework/index.ts +169 -0
- package/src/framework/interactive-repl.ts +703 -0
- package/src/framework/output-formatter.ts +834 -0
- package/src/framework/progress-manager.ts +539 -0
- package/src/index.ts +4 -4
- package/src/interactive/interactive-mode.ts +16 -16
- package/src/lib/conflict-resolution.ts +799 -9
- package/src/lib/merge-strategy.ts +529 -7
- package/src/lib/safety-mechanisms.ts +422 -18
- package/src/lib/state-detection.ts +1015 -13
- package/src/nlp/command-mapper.ts +29 -29
- package/src/nlp/command-parser.ts +17 -17
- package/src/nlp/intent-classifier.ts +7 -7
- package/src/nlp/intent-parser.ts +54 -52
- package/src/plugins/plugin-manager.ts +61 -39
- package/src/tests/computer-setup-integration.test.ts +46 -15
- package/src/types/modules.d.ts +424 -1
- package/src/utils/backup-rollback-manager.ts +11 -8
- package/src/utils/config-manager.ts +3 -3
- package/src/utils/error-handler.ts +2 -2
- package/src/utils/logger.ts +22 -22
- package/templates/batch/ci-cd.yaml +7 -7
- package/test-suites/api/health.spec.ts +20 -23
- package/test-suites/helpers/test-config.ts +14 -13
- package/test-suites/ui/accessibility.spec.ts +27 -22
- package/test-suites/ui/smoke.spec.ts +26 -21
- package/LICENSE +0 -21
- package/dist/ai/ai-service.d.ts +0 -152
- package/dist/ai/ai-service.d.ts.map +0 -1
- package/dist/ai/ai-service.js +0 -430
- package/dist/ai/ai-service.js.map +0 -1
- package/dist/ai/claude-client.d.ts +0 -130
- package/dist/ai/claude-client.d.ts.map +0 -1
- package/dist/ai/claude-client.js +0 -340
- package/dist/ai/claude-client.js.map +0 -1
- package/dist/ai/conversation-manager.d.ts +0 -164
- package/dist/ai/conversation-manager.d.ts.map +0 -1
- package/dist/ai/conversation-manager.js +0 -614
- package/dist/ai/conversation-manager.js.map +0 -1
- package/dist/ai/index.d.ts +0 -5
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/index.js +0 -8
- package/dist/ai/index.js.map +0 -1
- package/dist/cli.d.ts +0 -36
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -192
- package/dist/cli.js.map +0 -1
- package/dist/commands/ai.d.ts +0 -89
- package/dist/commands/ai.d.ts.map +0 -1
- package/dist/commands/ai.js +0 -799
- package/dist/commands/ai.js.map +0 -1
- package/dist/commands/alignment.d.ts +0 -78
- package/dist/commands/alignment.d.ts.map +0 -1
- package/dist/commands/alignment.js +0 -817
- package/dist/commands/alignment.js.map +0 -1
- package/dist/commands/analyze-optimized.d.ts +0 -14
- package/dist/commands/analyze-optimized.d.ts.map +0 -1
- package/dist/commands/analyze-optimized.js +0 -600
- package/dist/commands/analyze-optimized.js.map +0 -1
- package/dist/commands/analyze.d.ts +0 -65
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js +0 -435
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/batch.d.ts +0 -71
- package/dist/commands/batch.d.ts.map +0 -1
- package/dist/commands/batch.js +0 -738
- package/dist/commands/batch.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -71
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -674
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/claude-init.d.ts +0 -28
- package/dist/commands/claude-init.d.ts.map +0 -1
- package/dist/commands/claude-init.js +0 -591
- package/dist/commands/claude-init.js.map +0 -1
- package/dist/commands/claude-setup.d.ts +0 -119
- package/dist/commands/claude-setup.d.ts.map +0 -1
- package/dist/commands/claude-setup.js +0 -1073
- package/dist/commands/claude-setup.js.map +0 -1
- package/dist/commands/computer-setup-commands.d.ts +0 -53
- package/dist/commands/computer-setup-commands.d.ts.map +0 -1
- package/dist/commands/computer-setup-commands.js +0 -705
- package/dist/commands/computer-setup-commands.js.map +0 -1
- package/dist/commands/computer-setup.d.ts +0 -7
- package/dist/commands/computer-setup.d.ts.map +0 -1
- package/dist/commands/computer-setup.js +0 -849
- package/dist/commands/computer-setup.js.map +0 -1
- package/dist/commands/create-command.d.ts +0 -7
- package/dist/commands/create-command.d.ts.map +0 -1
- package/dist/commands/create-command.js +0 -158
- package/dist/commands/create-command.js.map +0 -1
- package/dist/commands/create.d.ts +0 -74
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -556
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -91
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -538
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/govern.d.ts +0 -70
- package/dist/commands/govern.d.ts.map +0 -1
- package/dist/commands/govern.js +0 -481
- package/dist/commands/govern.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -17
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -703
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/guardian.d.ts +0 -20
- package/dist/commands/guardian.d.ts.map +0 -1
- package/dist/commands/guardian.js +0 -597
- package/dist/commands/guardian.js.map +0 -1
- package/dist/commands/init.d.ts +0 -59
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -650
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/orchestrator.d.ts +0 -7
- package/dist/commands/orchestrator.d.ts.map +0 -1
- package/dist/commands/orchestrator.js +0 -571
- package/dist/commands/orchestrator.js.map +0 -1
- package/dist/commands/performance-optimizer.d.ts +0 -30
- package/dist/commands/performance-optimizer.d.ts.map +0 -1
- package/dist/commands/performance-optimizer.js +0 -650
- package/dist/commands/performance-optimizer.js.map +0 -1
- package/dist/commands/plugins.d.ts +0 -87
- package/dist/commands/plugins.d.ts.map +0 -1
- package/dist/commands/plugins.js +0 -685
- package/dist/commands/plugins.js.map +0 -1
- package/dist/commands/rag.d.ts +0 -7
- package/dist/commands/rag.d.ts.map +0 -1
- package/dist/commands/rag.js +0 -748
- package/dist/commands/rag.js.map +0 -1
- package/dist/commands/session.d.ts +0 -41
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js +0 -441
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -29
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -397
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/test-init.d.ts +0 -9
- package/dist/commands/test-init.d.ts.map +0 -1
- package/dist/commands/test-init.js +0 -222
- package/dist/commands/test-init.js.map +0 -1
- package/dist/commands/test.d.ts +0 -25
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -217
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/vp.d.ts +0 -7
- package/dist/commands/vp.d.ts.map +0 -1
- package/dist/commands/vp.js +0 -571
- package/dist/commands/vp.js.map +0 -1
- package/dist/commands/watch.d.ts +0 -76
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/watch.js +0 -613
- package/dist/commands/watch.js.map +0 -1
- package/dist/commands/worktree.d.ts +0 -63
- package/dist/commands/worktree.d.ts.map +0 -1
- package/dist/commands/worktree.js +0 -774
- package/dist/commands/worktree.js.map +0 -1
- package/dist/context/context-manager.d.ts +0 -155
- package/dist/context/context-manager.d.ts.map +0 -1
- package/dist/context/context-manager.js +0 -383
- package/dist/context/context-manager.js.map +0 -1
- package/dist/context/index.d.ts +0 -3
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -6
- package/dist/context/index.js.map +0 -1
- package/dist/context/session-manager.d.ts +0 -207
- package/dist/context/session-manager.d.ts.map +0 -1
- package/dist/context/session-manager.js +0 -686
- package/dist/context/session-manager.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +0 -1
- package/dist/interactive/interactive-mode.d.ts +0 -76
- package/dist/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/interactive/interactive-mode.js +0 -732
- package/dist/interactive/interactive-mode.js.map +0 -1
- package/dist/nlp/command-mapper.d.ts +0 -174
- package/dist/nlp/command-mapper.d.ts.map +0 -1
- package/dist/nlp/command-mapper.js +0 -624
- package/dist/nlp/command-mapper.js.map +0 -1
- package/dist/nlp/command-parser.d.ts +0 -106
- package/dist/nlp/command-parser.d.ts.map +0 -1
- package/dist/nlp/command-parser.js +0 -417
- package/dist/nlp/command-parser.js.map +0 -1
- package/dist/nlp/index.d.ts +0 -5
- package/dist/nlp/index.d.ts.map +0 -1
- package/dist/nlp/index.js +0 -8
- package/dist/nlp/index.js.map +0 -1
- package/dist/nlp/intent-classifier.d.ts +0 -59
- package/dist/nlp/intent-classifier.d.ts.map +0 -1
- package/dist/nlp/intent-classifier.js +0 -384
- package/dist/nlp/intent-classifier.js.map +0 -1
- package/dist/nlp/intent-parser.d.ts +0 -152
- package/dist/nlp/intent-parser.d.ts.map +0 -1
- package/dist/nlp/intent-parser.js +0 -744
- package/dist/nlp/intent-parser.js.map +0 -1
- package/dist/plugins/plugin-manager.d.ts +0 -120
- package/dist/plugins/plugin-manager.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.js +0 -595
- package/dist/plugins/plugin-manager.js.map +0 -1
- package/dist/types/index.d.ts +0 -224
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/utils/backup-rollback-manager.d.ts +0 -72
- package/dist/utils/backup-rollback-manager.d.ts.map +0 -1
- package/dist/utils/backup-rollback-manager.js +0 -289
- package/dist/utils/backup-rollback-manager.js.map +0 -1
- package/dist/utils/claude-config-installer.d.ts +0 -98
- package/dist/utils/claude-config-installer.d.ts.map +0 -1
- package/dist/utils/claude-config-installer.js +0 -678
- package/dist/utils/claude-config-installer.js.map +0 -1
- package/dist/utils/config-manager.d.ts +0 -73
- package/dist/utils/config-manager.d.ts.map +0 -1
- package/dist/utils/config-manager.js +0 -339
- package/dist/utils/config-manager.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -46
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -169
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -25
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -105
- package/dist/utils/logger.js.map +0 -1
- package/src/commands/computer-setup-commands.ts +0 -872
|
@@ -21,25 +21,45 @@ export function createComputerSetupCommand(): Command {
|
|
|
21
21
|
.alias('setup-machine')
|
|
22
22
|
.alias('provision')
|
|
23
23
|
.description(
|
|
24
|
-
'Set up a new developer machine with all required tools and configurations'
|
|
24
|
+
'Set up a new developer machine with all required tools and configurations'
|
|
25
25
|
)
|
|
26
26
|
.option(
|
|
27
27
|
'-p, --profile <profile>',
|
|
28
|
-
'Use a specific profile (frontend, backend, fullstack, devops, ml)'
|
|
28
|
+
'Use a specific profile (frontend, backend, fullstack, devops, ml)'
|
|
29
29
|
)
|
|
30
30
|
.option('-t, --team <team>', 'Apply team-specific configurations')
|
|
31
31
|
.option(
|
|
32
32
|
'-m, --mode <mode>',
|
|
33
33
|
'Setup mode (interactive, automated, minimal)',
|
|
34
|
-
'interactive'
|
|
34
|
+
'interactive'
|
|
35
35
|
)
|
|
36
36
|
.option('--dry-run', 'Show what would be installed without making changes')
|
|
37
37
|
.option('--skip-existing', 'Skip tools that are already installed')
|
|
38
38
|
.option('--parallel', 'Install tools in parallel where possible')
|
|
39
39
|
.option('--verbose', 'Show detailed output')
|
|
40
40
|
.option('--report', 'Generate a detailed setup report')
|
|
41
|
-
.
|
|
42
|
-
|
|
41
|
+
.option(
|
|
42
|
+
'-y, --yes',
|
|
43
|
+
'Skip confirmation prompts (assume yes) — implied on non-TTY/CI runs'
|
|
44
|
+
)
|
|
45
|
+
.option(
|
|
46
|
+
'--non-interactive',
|
|
47
|
+
'Run fully unattended with no prompts (for headless / MDM provisioning)'
|
|
48
|
+
)
|
|
49
|
+
.option(
|
|
50
|
+
'--no-remote-access',
|
|
51
|
+
'Skip remote-access provisioning (Tailscale, SSH, power management, desktop sharing)'
|
|
52
|
+
)
|
|
53
|
+
.action(async (options, command) => {
|
|
54
|
+
// `--dry-run`, `--verbose` and `--interactive` are declared as GLOBAL
|
|
55
|
+
// options on the root program, so they land in the parent's opts, not the
|
|
56
|
+
// sub-command's. optsWithGlobals() merges both so flags like --dry-run
|
|
57
|
+
// actually take effect here.
|
|
58
|
+
const merged =
|
|
59
|
+
typeof command?.optsWithGlobals === 'function'
|
|
60
|
+
? { ...command.optsWithGlobals(), ...options }
|
|
61
|
+
: options;
|
|
62
|
+
await runComputerSetup(merged);
|
|
43
63
|
});
|
|
44
64
|
|
|
45
65
|
// Subcommands
|
|
@@ -75,7 +95,7 @@ export function createComputerSetupCommand(): Command {
|
|
|
75
95
|
return command;
|
|
76
96
|
}
|
|
77
97
|
|
|
78
|
-
async function runComputerSetup(options: any): Promise<void> {
|
|
98
|
+
export async function runComputerSetup(options: any): Promise<void> {
|
|
79
99
|
const spinner = ora('Initializing computer setup...').start();
|
|
80
100
|
|
|
81
101
|
try {
|
|
@@ -84,6 +104,17 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
84
104
|
|
|
85
105
|
spinner.stop();
|
|
86
106
|
|
|
107
|
+
// A run is non-interactive when there is no console, in CI, or when the
|
|
108
|
+
// caller asked for it (--yes / --non-interactive / a non-interactive mode).
|
|
109
|
+
// In that case we never prompt — for a profile OR for confirmation — and
|
|
110
|
+
// fall back to the default profile.
|
|
111
|
+
const nonInteractive =
|
|
112
|
+
Boolean(options.yes) ||
|
|
113
|
+
Boolean(options.nonInteractive) ||
|
|
114
|
+
options.mode !== 'interactive' ||
|
|
115
|
+
!process.stdin.isTTY ||
|
|
116
|
+
Boolean(process.env.CI);
|
|
117
|
+
|
|
87
118
|
// Get or create profile
|
|
88
119
|
let profile;
|
|
89
120
|
if (options.profile) {
|
|
@@ -91,16 +122,24 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
91
122
|
profile = await manager.getProfile(options.profile);
|
|
92
123
|
if (!profile) {
|
|
93
124
|
console.log(
|
|
94
|
-
chalk.yellow(`Profile '${options.profile}' not found. Using default.`)
|
|
125
|
+
chalk.yellow(`Profile '${options.profile}' not found. Using default.`)
|
|
95
126
|
);
|
|
96
127
|
profile = await manager.getDefaultProfile();
|
|
97
128
|
}
|
|
98
|
-
} else if (
|
|
129
|
+
} else if (!nonInteractive) {
|
|
99
130
|
profile = await createInteractiveProfile();
|
|
100
131
|
} else {
|
|
101
132
|
profile = await manager.getDefaultProfile();
|
|
102
133
|
}
|
|
103
134
|
|
|
135
|
+
// commander sets options.remoteAccess === false for --no-remote-access.
|
|
136
|
+
if (profile && options.remoteAccess === false) {
|
|
137
|
+
profile.remoteAccess = {
|
|
138
|
+
...(profile.remoteAccess ?? {}),
|
|
139
|
+
enabled: false,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
104
143
|
// Detect platform
|
|
105
144
|
const platform = {
|
|
106
145
|
os: process.platform as 'darwin' | 'linux' | 'win32',
|
|
@@ -114,19 +153,20 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
114
153
|
console.log(chalk.white('Role:'), chalk.green(profile.role));
|
|
115
154
|
console.log(
|
|
116
155
|
chalk.white('Platform:'),
|
|
117
|
-
chalk.green(`${platform.os} ${platform.arch}`)
|
|
156
|
+
chalk.green(`${platform.os} ${platform.arch}`)
|
|
118
157
|
);
|
|
119
158
|
console.log(chalk.white('Mode:'), chalk.green(options.mode));
|
|
120
159
|
console.log(chalk.gray('━'.repeat(50)));
|
|
121
160
|
|
|
122
161
|
if (options.dryRun) {
|
|
123
162
|
console.log(
|
|
124
|
-
chalk.yellow('\n⚠️ DRY RUN MODE - No changes will be made\n')
|
|
163
|
+
chalk.yellow('\n⚠️ DRY RUN MODE - No changes will be made\n')
|
|
125
164
|
);
|
|
126
165
|
}
|
|
127
166
|
|
|
128
|
-
// Confirm before proceeding
|
|
129
|
-
|
|
167
|
+
// Confirm before proceeding (only in a real interactive session — the
|
|
168
|
+
// `nonInteractive` flag computed above already accounts for TTY/CI/--yes).
|
|
169
|
+
if (!options.dryRun && !nonInteractive) {
|
|
130
170
|
const { proceed } = await inquirer.prompt([
|
|
131
171
|
{
|
|
132
172
|
type: 'confirm',
|
|
@@ -148,7 +188,7 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
148
188
|
console.log(chalk.cyan(`\n[${bar}] ${progress.percentage}%`));
|
|
149
189
|
console.log(chalk.gray(`Current: ${progress.currentStep}`));
|
|
150
190
|
console.log(
|
|
151
|
-
chalk.gray(`Steps: ${progress.completedSteps}/${progress.totalSteps}`)
|
|
191
|
+
chalk.gray(`Steps: ${progress.completedSteps}/${progress.totalSteps}`)
|
|
152
192
|
);
|
|
153
193
|
});
|
|
154
194
|
|
|
@@ -178,11 +218,11 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
178
218
|
|
|
179
219
|
console.log(chalk.white('Summary:'));
|
|
180
220
|
console.log(
|
|
181
|
-
chalk.green(` ✓ Completed: ${result.completedSteps?.length || 0} steps`)
|
|
221
|
+
chalk.green(` ✓ Completed: ${result.completedSteps?.length || 0} steps`)
|
|
182
222
|
);
|
|
183
223
|
if (result.skippedSteps && result.skippedSteps.length > 0) {
|
|
184
224
|
console.log(
|
|
185
|
-
chalk.yellow(` ⊘ Skipped: ${result.skippedSteps.length} steps`)
|
|
225
|
+
chalk.yellow(` ⊘ Skipped: ${result.skippedSteps.length} steps`)
|
|
186
226
|
);
|
|
187
227
|
}
|
|
188
228
|
if (result.failedSteps && result.failedSteps.length > 0) {
|
|
@@ -197,7 +237,7 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
197
237
|
if (result.errors && result.errors.length > 0) {
|
|
198
238
|
console.log(chalk.red('\n❌ Errors:'));
|
|
199
239
|
result.errors.forEach(e =>
|
|
200
|
-
console.log(chalk.red(` - ${(e as any)?.message || e}`))
|
|
240
|
+
console.log(chalk.red(` - ${(e as any)?.message || e}`))
|
|
201
241
|
);
|
|
202
242
|
}
|
|
203
243
|
|
|
@@ -212,12 +252,12 @@ async function runComputerSetup(options: any): Promise<void> {
|
|
|
212
252
|
} catch (fleetError) {
|
|
213
253
|
console.error(
|
|
214
254
|
chalk.red('\n⚠️ Fleet Mode setup encountered issues:'),
|
|
215
|
-
fleetError
|
|
255
|
+
fleetError
|
|
216
256
|
);
|
|
217
257
|
console.log(
|
|
218
258
|
chalk.yellow(
|
|
219
|
-
'You can retry with: wundr computer-setup --profile <your-profile>'
|
|
220
|
-
)
|
|
259
|
+
'You can retry with: wundr computer-setup --profile <your-profile>'
|
|
260
|
+
)
|
|
221
261
|
);
|
|
222
262
|
}
|
|
223
263
|
}
|
|
@@ -328,7 +368,7 @@ async function createInteractiveProfile(): Promise<any> {
|
|
|
328
368
|
type: 'confirm',
|
|
329
369
|
name: 'aiTools',
|
|
330
370
|
message:
|
|
331
|
-
'Do you want to set up AI development tools (Claude Code,
|
|
371
|
+
'Do you want to set up AI development tools (Claude Code, Ruflo)?',
|
|
332
372
|
default: true,
|
|
333
373
|
},
|
|
334
374
|
{
|
|
@@ -365,7 +405,7 @@ async function createInteractiveProfile(): Promise<any> {
|
|
|
365
405
|
},
|
|
366
406
|
aiTools: {
|
|
367
407
|
claudeCode: answers.aiTools,
|
|
368
|
-
|
|
408
|
+
ruflo: answers.aiTools,
|
|
369
409
|
mcpTools: answers.aiTools ? ['all'] : [],
|
|
370
410
|
swarmAgents: answers.aiTools ? ['default'] : [],
|
|
371
411
|
memoryAllocation: '2GB',
|
|
@@ -474,7 +514,7 @@ interface DeveloperProfile {
|
|
|
474
514
|
};
|
|
475
515
|
aiTools: {
|
|
476
516
|
claudeCode: boolean;
|
|
477
|
-
|
|
517
|
+
ruflo: boolean;
|
|
478
518
|
mcpTools: string[];
|
|
479
519
|
swarmAgents: string[];
|
|
480
520
|
memoryAllocation: string;
|
|
@@ -495,7 +535,7 @@ async function setupFleetMode(profile: DeveloperProfile): Promise<void> {
|
|
|
495
535
|
const templatesDir = path.join(wundrDir, 'templates');
|
|
496
536
|
|
|
497
537
|
console.log(
|
|
498
|
-
chalk.cyan('\n🚀 Setting up Fleet-Scale Autonomous Engineering mode...\n')
|
|
538
|
+
chalk.cyan('\n🚀 Setting up Fleet-Scale Autonomous Engineering mode...\n')
|
|
499
539
|
);
|
|
500
540
|
|
|
501
541
|
// Create directory structure
|
|
@@ -539,7 +579,7 @@ async function setupFleetMode(profile: DeveloperProfile): Promise<void> {
|
|
|
539
579
|
await fs.writeFile(
|
|
540
580
|
path.join(orchestratorDaemonDir, 'config.yaml'),
|
|
541
581
|
generateYamlContent(orchestratorConfig),
|
|
542
|
-
'utf-8'
|
|
582
|
+
'utf-8'
|
|
543
583
|
);
|
|
544
584
|
console.log(chalk.green(' ✓ Orchestrator Daemon configuration installed'));
|
|
545
585
|
|
|
@@ -580,7 +620,7 @@ hardConstraints:
|
|
|
580
620
|
await fs.writeFile(
|
|
581
621
|
path.join(orchestratorDaemonDir, 'orchestrator-charter.md'),
|
|
582
622
|
orchestratorCharter,
|
|
583
|
-
'utf-8'
|
|
623
|
+
'utf-8'
|
|
584
624
|
);
|
|
585
625
|
console.log(chalk.green(' ✓ Orchestrator Charter template deployed'));
|
|
586
626
|
|
|
@@ -624,7 +664,7 @@ hardConstraints:
|
|
|
624
664
|
await fs.writeFile(
|
|
625
665
|
path.join(orchestratorDaemonDir, 'token-budget.yaml'),
|
|
626
666
|
generateYamlContent(tokenBudgetConfig),
|
|
627
|
-
'utf-8'
|
|
667
|
+
'utf-8'
|
|
628
668
|
);
|
|
629
669
|
console.log(chalk.green(' ✓ Token budgeting configuration set up'));
|
|
630
670
|
|
|
@@ -699,22 +739,22 @@ technical_debt: 0.15
|
|
|
699
739
|
await fs.writeFile(
|
|
700
740
|
path.join(templatesDir, 'memory-bank', 'activeContext.md'),
|
|
701
741
|
sessionTemplate,
|
|
702
|
-
'utf-8'
|
|
742
|
+
'utf-8'
|
|
703
743
|
);
|
|
704
744
|
await fs.writeFile(
|
|
705
745
|
path.join(templatesDir, 'memory-bank', 'progress.md'),
|
|
706
746
|
progressTemplate,
|
|
707
|
-
'utf-8'
|
|
747
|
+
'utf-8'
|
|
708
748
|
);
|
|
709
749
|
await fs.writeFile(
|
|
710
750
|
path.join(templatesDir, 'memory-bank', 'subAgentDelegation.md'),
|
|
711
751
|
subAgentDelegationTemplate,
|
|
712
|
-
'utf-8'
|
|
752
|
+
'utf-8'
|
|
713
753
|
);
|
|
714
754
|
await fs.writeFile(
|
|
715
755
|
path.join(templatesDir, 'memory-bank', 'ipre-alignment.md'),
|
|
716
756
|
ipreAlignmentTemplate,
|
|
717
|
-
'utf-8'
|
|
757
|
+
'utf-8'
|
|
718
758
|
);
|
|
719
759
|
console.log(chalk.green(' ✓ Memory Bank templates deployed'));
|
|
720
760
|
|
|
@@ -776,7 +816,7 @@ technical_debt: 0.15
|
|
|
776
816
|
await fs.writeFile(
|
|
777
817
|
path.join(governanceDir, 'ipre-defaults.yaml'),
|
|
778
818
|
generateYamlContent(ipreDefaults),
|
|
779
|
-
'utf-8'
|
|
819
|
+
'utf-8'
|
|
780
820
|
);
|
|
781
821
|
console.log(chalk.green(' ✓ IPRE governance defaults initialized'));
|
|
782
822
|
|
|
@@ -837,24 +877,26 @@ git worktree list
|
|
|
837
877
|
await fs.writeFile(
|
|
838
878
|
path.join(wundrDir, 'RESOURCE_LIMITS.md'),
|
|
839
879
|
resourceGuidance,
|
|
840
|
-
'utf-8'
|
|
880
|
+
'utf-8'
|
|
841
881
|
);
|
|
842
882
|
console.log(chalk.green(' ✓ System resource limits guidance configured'));
|
|
843
883
|
|
|
844
884
|
console.log(
|
|
845
|
-
chalk.cyan('\n✅ Fleet-Scale Autonomous Engineering mode setup complete!\n')
|
|
885
|
+
chalk.cyan('\n✅ Fleet-Scale Autonomous Engineering mode setup complete!\n')
|
|
846
886
|
);
|
|
847
887
|
console.log(chalk.white('Files created:'));
|
|
848
888
|
console.log(chalk.gray(' ~/.wundr/orchestrator-daemon/config.yaml'));
|
|
849
|
-
console.log(
|
|
889
|
+
console.log(
|
|
890
|
+
chalk.gray(' ~/.wundr/orchestrator-daemon/orchestrator-charter.md')
|
|
891
|
+
);
|
|
850
892
|
console.log(chalk.gray(' ~/.wundr/orchestrator-daemon/token-budget.yaml'));
|
|
851
893
|
console.log(chalk.gray(' ~/.wundr/templates/memory-bank/'));
|
|
852
894
|
console.log(chalk.gray(' ~/.wundr/governance/ipre-defaults.yaml'));
|
|
853
895
|
console.log(chalk.gray(' ~/.wundr/RESOURCE_LIMITS.md'));
|
|
854
896
|
console.log(
|
|
855
897
|
chalk.yellow(
|
|
856
|
-
'\n⚠️ Review ~/.wundr/RESOURCE_LIMITS.md for system configuration recommendations.'
|
|
857
|
-
)
|
|
898
|
+
'\n⚠️ Review ~/.wundr/RESOURCE_LIMITS.md for system configuration recommendations.'
|
|
899
|
+
)
|
|
858
900
|
);
|
|
859
901
|
}
|
|
860
902
|
|
|
@@ -878,7 +920,7 @@ function generateYamlContent(obj: Record<string, unknown>, indent = 0): string {
|
|
|
878
920
|
yaml += `${spaces} -\n`;
|
|
879
921
|
const itemYaml = generateYamlContent(
|
|
880
922
|
item as Record<string, unknown>,
|
|
881
|
-
indent + 2
|
|
923
|
+
indent + 2
|
|
882
924
|
);
|
|
883
925
|
yaml += itemYaml;
|
|
884
926
|
} else {
|
|
@@ -905,7 +947,7 @@ async function manageProfiles(): Promise<void> {
|
|
|
905
947
|
|
|
906
948
|
if (profiles.length === 0) {
|
|
907
949
|
console.log(
|
|
908
|
-
chalk.yellow('No profiles found. Create one with "wundr computer-setup"')
|
|
950
|
+
chalk.yellow('No profiles found. Create one with "wundr computer-setup"')
|
|
909
951
|
);
|
|
910
952
|
return;
|
|
911
953
|
}
|
|
@@ -932,7 +974,7 @@ async function validateSetup(): Promise<void> {
|
|
|
932
974
|
if (profiles.length === 0) {
|
|
933
975
|
spinner.stop();
|
|
934
976
|
console.log(
|
|
935
|
-
chalk.yellow('No profile found. Run "wundr computer-setup" first.')
|
|
977
|
+
chalk.yellow('No profile found. Run "wundr computer-setup" first.')
|
|
936
978
|
);
|
|
937
979
|
return;
|
|
938
980
|
}
|
|
@@ -940,7 +982,7 @@ async function validateSetup(): Promise<void> {
|
|
|
940
982
|
const profile = profiles[0]; // Use most recent
|
|
941
983
|
if (!profile) {
|
|
942
984
|
console.log(
|
|
943
|
-
chalk.yellow('No profile found. Run "wundr computer-setup" first.')
|
|
985
|
+
chalk.yellow('No profile found. Run "wundr computer-setup" first.')
|
|
944
986
|
);
|
|
945
987
|
return;
|
|
946
988
|
}
|
|
@@ -954,8 +996,8 @@ async function validateSetup(): Promise<void> {
|
|
|
954
996
|
console.log(chalk.red('❌ Machine setup has issues'));
|
|
955
997
|
console.log(
|
|
956
998
|
chalk.yellow(
|
|
957
|
-
'\nRun "wundr computer-setup doctor" to diagnose and fix issues'
|
|
958
|
-
)
|
|
999
|
+
'\nRun "wundr computer-setup doctor" to diagnose and fix issues'
|
|
1000
|
+
)
|
|
959
1001
|
);
|
|
960
1002
|
}
|
|
961
1003
|
} catch (error) {
|
|
@@ -985,7 +1027,7 @@ async function runDoctor(): Promise<void> {
|
|
|
985
1027
|
const { execa } = (await import('execa')) as any;
|
|
986
1028
|
const { stdout } = await execa(
|
|
987
1029
|
check.command.split(' ')[0],
|
|
988
|
-
check.command.split(' ').slice(1)
|
|
1030
|
+
check.command.split(' ').slice(1)
|
|
989
1031
|
);
|
|
990
1032
|
spinner.succeed(`${check.name}: ${stdout.trim()}`);
|
|
991
1033
|
} catch (error) {
|
|
@@ -14,7 +14,7 @@ export const createCommand = new Command('create')
|
|
|
14
14
|
.description('Create a new wundr-compliant project')
|
|
15
15
|
.argument(
|
|
16
16
|
'[type]',
|
|
17
|
-
'Project type (frontend|backend|fullstack|monorepo|library|cli)'
|
|
17
|
+
'Project type (frontend|backend|fullstack|monorepo|library|cli)'
|
|
18
18
|
)
|
|
19
19
|
.argument('[name]', 'Project name')
|
|
20
20
|
.option('-f, --framework <framework>', 'Framework to use')
|
|
@@ -76,8 +76,8 @@ export const createCommand = new Command('create')
|
|
|
76
76
|
logger.error('Failed to create project', error);
|
|
77
77
|
console.error(
|
|
78
78
|
chalk.red(
|
|
79
|
-
`\n❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
80
|
-
)
|
|
79
|
+
`\n❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
80
|
+
)
|
|
81
81
|
);
|
|
82
82
|
process.exit(1);
|
|
83
83
|
}
|
|
@@ -104,7 +104,7 @@ createCommand
|
|
|
104
104
|
.option(
|
|
105
105
|
'-f, --framework <framework>',
|
|
106
106
|
'Framework (fastify|express|nestjs)',
|
|
107
|
-
'fastify'
|
|
107
|
+
'fastify'
|
|
108
108
|
)
|
|
109
109
|
.action(async (name: string, options: any) => {
|
|
110
110
|
await projectTemplates.createProject({
|
package/src/commands/create.ts
CHANGED
|
@@ -31,7 +31,7 @@ export class CreateCommands {
|
|
|
31
31
|
constructor(
|
|
32
32
|
private program: Command,
|
|
33
33
|
private configManager: ConfigManager,
|
|
34
|
-
private pluginManager: PluginManager
|
|
34
|
+
private pluginManager: PluginManager
|
|
35
35
|
) {
|
|
36
36
|
this.registerCommands();
|
|
37
37
|
}
|
|
@@ -40,7 +40,7 @@ export class CreateCommands {
|
|
|
40
40
|
const createCmd = this.program
|
|
41
41
|
.command('create')
|
|
42
42
|
.description(
|
|
43
|
-
'create new wundr-compliant projects, components, services, and templates'
|
|
43
|
+
'create new wundr-compliant projects, components, services, and templates'
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
// Create new project (full wundr-compliant project)
|
|
@@ -69,7 +69,7 @@ export class CreateCommands {
|
|
|
69
69
|
.option(
|
|
70
70
|
'-f, --framework <framework>',
|
|
71
71
|
'framework (next|react|vue)',
|
|
72
|
-
'next'
|
|
72
|
+
'next'
|
|
73
73
|
)
|
|
74
74
|
.action(async (name: string, options: any) => {
|
|
75
75
|
await projectTemplates.createProject({
|
|
@@ -87,7 +87,7 @@ export class CreateCommands {
|
|
|
87
87
|
.option(
|
|
88
88
|
'-f, --framework <framework>',
|
|
89
89
|
'framework (fastify|express|nestjs)',
|
|
90
|
-
'fastify'
|
|
90
|
+
'fastify'
|
|
91
91
|
)
|
|
92
92
|
.action(async (name: string, options: any) => {
|
|
93
93
|
await projectTemplates.createProject({
|
|
@@ -145,12 +145,12 @@ export class CreateCommands {
|
|
|
145
145
|
.option(
|
|
146
146
|
'--type <type>',
|
|
147
147
|
'service type (api, worker, microservice)',
|
|
148
|
-
'api'
|
|
148
|
+
'api'
|
|
149
149
|
)
|
|
150
150
|
.option(
|
|
151
151
|
'--framework <framework>',
|
|
152
152
|
'framework (express, fastify, nest)',
|
|
153
|
-
'express'
|
|
153
|
+
'express'
|
|
154
154
|
)
|
|
155
155
|
.option('--with-tests', 'generate test files')
|
|
156
156
|
.option('--with-docs', 'generate API documentation')
|
|
@@ -187,7 +187,7 @@ export class CreateCommands {
|
|
|
187
187
|
.option(
|
|
188
188
|
'--platform <platform>',
|
|
189
189
|
'platform (github, gitlab, jenkins)',
|
|
190
|
-
'github'
|
|
190
|
+
'github'
|
|
191
191
|
)
|
|
192
192
|
.action(async (name, options) => {
|
|
193
193
|
await this.createWorkflow(name, options);
|
|
@@ -199,7 +199,7 @@ export class CreateCommands {
|
|
|
199
199
|
.description('create configuration files')
|
|
200
200
|
.option(
|
|
201
201
|
'--type <type>',
|
|
202
|
-
'config type (eslint, prettier, jest, typescript)'
|
|
202
|
+
'config type (eslint, prettier, jest, typescript)'
|
|
203
203
|
)
|
|
204
204
|
.option('--preset <preset>', 'configuration preset')
|
|
205
205
|
.action(async (name, options) => {
|
|
@@ -213,7 +213,7 @@ export class CreateCommands {
|
|
|
213
213
|
private async createProject(
|
|
214
214
|
type: string,
|
|
215
215
|
name: string | undefined,
|
|
216
|
-
options: any
|
|
216
|
+
options: any
|
|
217
217
|
): Promise<void> {
|
|
218
218
|
try {
|
|
219
219
|
// If no name provided, launch interactive mode
|
|
@@ -259,7 +259,7 @@ export class CreateCommands {
|
|
|
259
259
|
'WUNDR_CREATE_PROJECT_FAILED',
|
|
260
260
|
'Failed to create project',
|
|
261
261
|
{ type, name, options },
|
|
262
|
-
true
|
|
262
|
+
true
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
@@ -280,7 +280,7 @@ export class CreateCommands {
|
|
|
280
280
|
await this.generateFromTemplate(
|
|
281
281
|
'component-test',
|
|
282
282
|
componentData,
|
|
283
|
-
outputPath
|
|
283
|
+
outputPath
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
286
|
|
|
@@ -288,7 +288,7 @@ export class CreateCommands {
|
|
|
288
288
|
await this.generateFromTemplate(
|
|
289
289
|
'component-stories',
|
|
290
290
|
componentData,
|
|
291
|
-
outputPath
|
|
291
|
+
outputPath
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -298,7 +298,7 @@ export class CreateCommands {
|
|
|
298
298
|
'WUNDR_CREATE_COMPONENT_FAILED',
|
|
299
299
|
'Failed to create component',
|
|
300
300
|
{ name, options },
|
|
301
|
-
true
|
|
301
|
+
true
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
@@ -319,7 +319,7 @@ export class CreateCommands {
|
|
|
319
319
|
await this.generateFromTemplate(
|
|
320
320
|
'service-test',
|
|
321
321
|
serviceData,
|
|
322
|
-
outputPath
|
|
322
|
+
outputPath
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
325
|
|
|
@@ -333,7 +333,7 @@ export class CreateCommands {
|
|
|
333
333
|
'WUNDR_CREATE_SERVICE_FAILED',
|
|
334
334
|
'Failed to create service',
|
|
335
335
|
{ name, options },
|
|
336
|
-
true
|
|
336
|
+
true
|
|
337
337
|
);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
@@ -357,7 +357,7 @@ export class CreateCommands {
|
|
|
357
357
|
'WUNDR_CREATE_PACKAGE_FAILED',
|
|
358
358
|
'Failed to create package',
|
|
359
359
|
{ name, options },
|
|
360
|
-
true
|
|
360
|
+
true
|
|
361
361
|
);
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -383,7 +383,7 @@ export class CreateCommands {
|
|
|
383
383
|
'WUNDR_CREATE_TEMPLATE_FAILED',
|
|
384
384
|
'Failed to create template',
|
|
385
385
|
{ name, options },
|
|
386
|
-
true
|
|
386
|
+
true
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
@@ -406,7 +406,7 @@ export class CreateCommands {
|
|
|
406
406
|
'WUNDR_CREATE_WORKFLOW_FAILED',
|
|
407
407
|
'Failed to create workflow',
|
|
408
408
|
{ name, options },
|
|
409
|
-
true
|
|
409
|
+
true
|
|
410
410
|
);
|
|
411
411
|
}
|
|
412
412
|
}
|
|
@@ -429,7 +429,7 @@ export class CreateCommands {
|
|
|
429
429
|
'WUNDR_CREATE_CONFIG_FAILED',
|
|
430
430
|
'Failed to create configuration',
|
|
431
431
|
{ name, options },
|
|
432
|
-
true
|
|
432
|
+
true
|
|
433
433
|
);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
@@ -504,7 +504,7 @@ export class CreateCommands {
|
|
|
504
504
|
private async generateFromTemplate(
|
|
505
505
|
templateType: string,
|
|
506
506
|
data: any,
|
|
507
|
-
outputPath: string
|
|
507
|
+
outputPath: string
|
|
508
508
|
): Promise<void> {
|
|
509
509
|
const templatePath = this.getTemplatePath(templateType);
|
|
510
510
|
|
|
@@ -521,7 +521,7 @@ export class CreateCommands {
|
|
|
521
521
|
private async copyTemplateWithReplacements(
|
|
522
522
|
srcPath: string,
|
|
523
523
|
destPath: string,
|
|
524
|
-
data: any
|
|
524
|
+
data: any
|
|
525
525
|
): Promise<void> {
|
|
526
526
|
const files = await fs.readdir(srcPath);
|
|
527
527
|
|
|
@@ -529,7 +529,7 @@ export class CreateCommands {
|
|
|
529
529
|
const srcFile = path.join(srcPath, file);
|
|
530
530
|
const destFile = path.join(
|
|
531
531
|
destPath,
|
|
532
|
-
this.replacePlaceholders(file, data)
|
|
532
|
+
this.replacePlaceholders(file, data)
|
|
533
533
|
);
|
|
534
534
|
|
|
535
535
|
const stat = await fs.stat(srcFile);
|
|
@@ -561,7 +561,7 @@ export class CreateCommands {
|
|
|
561
561
|
*/
|
|
562
562
|
private async determineOutputPath(
|
|
563
563
|
category: string,
|
|
564
|
-
name: string
|
|
564
|
+
name: string
|
|
565
565
|
): Promise<string> {
|
|
566
566
|
const projectRoot = process.cwd();
|
|
567
567
|
const srcPath = path.join(projectRoot, 'src');
|
|
@@ -575,7 +575,7 @@ export class CreateCommands {
|
|
|
575
575
|
|
|
576
576
|
private async determinePackagePath(
|
|
577
577
|
name: string,
|
|
578
|
-
type: string
|
|
578
|
+
type: string
|
|
579
579
|
): Promise<string> {
|
|
580
580
|
const projectRoot = process.cwd();
|
|
581
581
|
const packagesPath = path.join(projectRoot, 'packages');
|
|
@@ -632,7 +632,7 @@ export class CreateCommands {
|
|
|
632
632
|
|
|
633
633
|
private async updateWorkspaceConfig(
|
|
634
634
|
name: string,
|
|
635
|
-
type: string
|
|
635
|
+
type: string
|
|
636
636
|
): Promise<void> {
|
|
637
637
|
const packageJsonPath = path.join(process.cwd(), 'package.json');
|
|
638
638
|
|
|
@@ -651,7 +651,7 @@ export class CreateCommands {
|
|
|
651
651
|
|
|
652
652
|
private async generateApiDocs(
|
|
653
653
|
serviceData: any,
|
|
654
|
-
outputPath: string
|
|
654
|
+
outputPath: string
|
|
655
655
|
): Promise<void> {
|
|
656
656
|
// Generate API documentation based on service type and framework
|
|
657
657
|
const docsPath = path.join(outputPath, 'docs');
|
|
@@ -717,7 +717,7 @@ Create new ${serviceData.name}
|
|
|
717
717
|
|
|
718
718
|
private async createTemplateFromSource(
|
|
719
719
|
name: string,
|
|
720
|
-
sourcePath: string
|
|
720
|
+
sourcePath: string
|
|
721
721
|
): Promise<void> {
|
|
722
722
|
logger.debug(`Creating template ${name} from source: ${sourcePath}`);
|
|
723
723
|
// Implementation for creating template from existing source
|