code-as-plan 2.0.0 → 2.0.3
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/install.js +58 -126
- package/cap/bin/lib/cap-migrate.cjs +513 -0
- package/cap/bin/lib/cap-tag-scanner.cjs +72 -0
- package/cap/workflows/update.md +24 -24
- package/commands/cap/migrate.md +177 -0
- package/commands/cap/update.md +48 -0
- package/hooks/dist/gsd-check-update.js +6 -6
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -61,7 +61,7 @@ const hasCopilot = args.includes('--copilot');
|
|
|
61
61
|
const hasAntigravity = args.includes('--antigravity');
|
|
62
62
|
const hasCursor = args.includes('--cursor');
|
|
63
63
|
const hasWindsurf = args.includes('--windsurf');
|
|
64
|
-
|
|
64
|
+
// SDK install removed in CAP v2.0 — not needed
|
|
65
65
|
const hasBoth = args.includes('--both'); // Legacy flag, keeps working
|
|
66
66
|
const hasAll = args.includes('--all');
|
|
67
67
|
const hasUninstall = args.includes('--uninstall') || args.includes('-u');
|
|
@@ -322,7 +322,7 @@ if (hasUninstall) {
|
|
|
322
322
|
|
|
323
323
|
// Show help if requested
|
|
324
324
|
if (hasHelp) {
|
|
325
|
-
console.log(` ${yellow}Usage:${reset} npx code-as-plan [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--copilot${reset} Install for Copilot only\n ${cyan}--antigravity${reset} Install for Antigravity only\n ${cyan}--cursor${reset} Install for Cursor only\n ${cyan}--windsurf${reset} Install for Windsurf only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}
|
|
325
|
+
console.log(` ${yellow}Usage:${reset} npx code-as-plan [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--copilot${reset} Install for Copilot only\n ${cyan}--antigravity${reset} Install for Antigravity only\n ${cyan}--cursor${reset} Install for Cursor only\n ${cyan}--windsurf${reset} Install for Windsurf only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}-u, --uninstall${reset} Uninstall CAP (remove all CAP files)\n ${cyan}-c, --config-dir <path>${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx code-as-plan\n\n ${dim}# Install for Claude Code globally${reset}\n npx code-as-plan --claude --global\n\n ${dim}# Install for Gemini globally${reset}\n npx code-as-plan --gemini --global\n\n ${dim}# Install for Codex globally${reset}\n npx code-as-plan --codex --global\n\n ${dim}# Install for Copilot globally${reset}\n npx code-as-plan --copilot --global\n\n ${dim}# Install for Copilot locally${reset}\n npx code-as-plan --copilot --local\n\n ${dim}# Install for Antigravity globally${reset}\n npx code-as-plan --antigravity --global\n\n ${dim}# Install for Antigravity locally${reset}\n npx code-as-plan --antigravity --local\n\n ${dim}# Install for Cursor globally${reset}\n npx code-as-plan --cursor --global\n\n ${dim}# Install for Cursor locally${reset}\n npx code-as-plan --cursor --local\n\n ${dim}# Install for Windsurf globally${reset}\n npx code-as-plan --windsurf --global\n\n ${dim}# Install for Windsurf locally${reset}\n npx code-as-plan --windsurf --local\n\n ${dim}# Install for all runtimes globally${reset}\n npx code-as-plan --all --global\n\n ${dim}# Install to custom config directory${reset}\n npx code-as-plan --codex --global --config-dir ~/.codex-work\n\n ${dim}# Install to current project only${reset}\n npx code-as-plan --claude --local\n\n ${dim}# Uninstall CAP from Cursor globally${reset}\n npx code-as-plan --cursor --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR / CODEX_HOME / COPILOT_CONFIG_DIR / ANTIGRAVITY_CONFIG_DIR / CURSOR_CONFIG_DIR / WINDSURF_CONFIG_DIR environment variables.\n`);
|
|
326
326
|
process.exit(0);
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -2686,10 +2686,10 @@ function convertClaudeToGeminiToml(content) {
|
|
|
2686
2686
|
|
|
2687
2687
|
/**
|
|
2688
2688
|
* Copy commands to a flat structure for OpenCode
|
|
2689
|
-
* OpenCode expects: command/
|
|
2690
|
-
* Source structure: commands/
|
|
2691
|
-
*
|
|
2692
|
-
* @param {string} srcDir - Source directory (e.g., commands/
|
|
2689
|
+
* OpenCode expects: command/cap-help.md (invoked as /cap-help)
|
|
2690
|
+
* Source structure: commands/cap/help.md
|
|
2691
|
+
*
|
|
2692
|
+
* @param {string} srcDir - Source directory (e.g., commands/cap/)
|
|
2693
2693
|
* @param {string} destDir - Destination directory (e.g., command/)
|
|
2694
2694
|
* @param {string} prefix - Prefix for filenames (e.g., 'gsd')
|
|
2695
2695
|
* @param {string} pathPrefix - Path prefix for file references
|
|
@@ -2718,7 +2718,7 @@ function copyFlattenedCommands(srcDir, destDir, prefix, pathPrefix, runtime) {
|
|
|
2718
2718
|
|
|
2719
2719
|
if (entry.isDirectory()) {
|
|
2720
2720
|
// Recurse into subdirectories, adding to prefix
|
|
2721
|
-
// e.g., commands/
|
|
2721
|
+
// e.g., commands/cap/debug/start.md -> command/cap-debug-start.md
|
|
2722
2722
|
copyFlattenedCommands(srcPath, destDir, `${prefix}-${entry.name}`, pathPrefix, runtime);
|
|
2723
2723
|
} else if (entry.name.endsWith('.md')) {
|
|
2724
2724
|
// Flatten: help.md -> gsd-help.md
|
|
@@ -3336,7 +3336,7 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
3336
3336
|
if (fs.existsSync(commandDir)) {
|
|
3337
3337
|
const files = fs.readdirSync(commandDir);
|
|
3338
3338
|
for (const file of files) {
|
|
3339
|
-
if (file.startsWith('
|
|
3339
|
+
if (file.startsWith('cap-') && file.endsWith('.md')) {
|
|
3340
3340
|
fs.unlinkSync(path.join(commandDir, file));
|
|
3341
3341
|
removedCount++;
|
|
3342
3342
|
}
|
|
@@ -3481,11 +3481,18 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
3481
3481
|
}
|
|
3482
3482
|
}
|
|
3483
3483
|
} else {
|
|
3484
|
-
const capCommandsDir = path.join(targetDir, 'commands', '
|
|
3484
|
+
const capCommandsDir = path.join(targetDir, 'commands', 'cap');
|
|
3485
3485
|
if (fs.existsSync(capCommandsDir)) {
|
|
3486
3486
|
fs.rmSync(capCommandsDir, { recursive: true });
|
|
3487
3487
|
removedCount++;
|
|
3488
|
-
console.log(` ${green}✓${reset} Removed commands/
|
|
3488
|
+
console.log(` ${green}✓${reset} Removed commands/cap/`);
|
|
3489
|
+
}
|
|
3490
|
+
// Also remove legacy commands/gsd/ if it exists from previous installs
|
|
3491
|
+
const legacyCommandsDir = path.join(targetDir, 'commands', 'gsd');
|
|
3492
|
+
if (fs.existsSync(legacyCommandsDir)) {
|
|
3493
|
+
fs.rmSync(legacyCommandsDir, { recursive: true });
|
|
3494
|
+
removedCount++;
|
|
3495
|
+
console.log(` ${green}✓${reset} Removed legacy commands/gsd/`);
|
|
3489
3496
|
}
|
|
3490
3497
|
}
|
|
3491
3498
|
|
|
@@ -3503,7 +3510,7 @@ function uninstall(isGlobal, runtime = 'claude') {
|
|
|
3503
3510
|
const files = fs.readdirSync(agentsDir);
|
|
3504
3511
|
let agentCount = 0;
|
|
3505
3512
|
for (const file of files) {
|
|
3506
|
-
if (file.startsWith('
|
|
3513
|
+
if (file.startsWith('cap-') && file.endsWith('.md')) {
|
|
3507
3514
|
fs.unlinkSync(path.join(agentsDir, file));
|
|
3508
3515
|
agentCount++;
|
|
3509
3516
|
}
|
|
@@ -3914,7 +3921,7 @@ function writeManifest(configDir, runtime = 'claude') {
|
|
|
3914
3921
|
const isCursor = runtime === 'cursor';
|
|
3915
3922
|
const isWindsurf = runtime === 'windsurf';
|
|
3916
3923
|
const capDir = path.join(configDir, 'cap');
|
|
3917
|
-
const commandsDir = path.join(configDir, 'commands', '
|
|
3924
|
+
const commandsDir = path.join(configDir, 'commands', 'cap');
|
|
3918
3925
|
const opencodeCommandDir = path.join(configDir, 'command');
|
|
3919
3926
|
const codexSkillsDir = path.join(configDir, 'skills');
|
|
3920
3927
|
const agentsDir = path.join(configDir, 'agents');
|
|
@@ -3927,12 +3934,12 @@ function writeManifest(configDir, runtime = 'claude') {
|
|
|
3927
3934
|
if (!isOpencode && !isCodex && !isCopilot && !isAntigravity && !isCursor && !isWindsurf && fs.existsSync(commandsDir)) {
|
|
3928
3935
|
const cmdHashes = generateManifest(commandsDir);
|
|
3929
3936
|
for (const [rel, hash] of Object.entries(cmdHashes)) {
|
|
3930
|
-
manifest.files['commands/
|
|
3937
|
+
manifest.files['commands/cap/' + rel] = hash;
|
|
3931
3938
|
}
|
|
3932
3939
|
}
|
|
3933
3940
|
if (isOpencode && fs.existsSync(opencodeCommandDir)) {
|
|
3934
3941
|
for (const file of fs.readdirSync(opencodeCommandDir)) {
|
|
3935
|
-
if (file.startsWith('
|
|
3942
|
+
if (file.startsWith('cap-') && file.endsWith('.md')) {
|
|
3936
3943
|
manifest.files['command/' + file] = fileHash(path.join(opencodeCommandDir, file));
|
|
3937
3944
|
}
|
|
3938
3945
|
}
|
|
@@ -3948,7 +3955,7 @@ function writeManifest(configDir, runtime = 'claude') {
|
|
|
3948
3955
|
}
|
|
3949
3956
|
if (fs.existsSync(agentsDir)) {
|
|
3950
3957
|
for (const file of fs.readdirSync(agentsDir)) {
|
|
3951
|
-
if (file.startsWith('
|
|
3958
|
+
if (file.startsWith('cap-') && file.endsWith('.md')) {
|
|
3952
3959
|
manifest.files['agents/' + file] = fileHash(path.join(agentsDir, file));
|
|
3953
3960
|
}
|
|
3954
3961
|
}
|
|
@@ -4095,93 +4102,93 @@ function install(isGlobal, runtime = 'claude') {
|
|
|
4095
4102
|
// Clean up orphaned files from previous versions
|
|
4096
4103
|
cleanupOrphanedFiles(targetDir);
|
|
4097
4104
|
|
|
4098
|
-
// OpenCode uses command/ (flat), Codex uses skills/, Claude/Gemini use commands/
|
|
4105
|
+
// OpenCode uses command/ (flat), Codex uses skills/, Claude/Gemini use commands/cap/
|
|
4099
4106
|
if (isOpencode) {
|
|
4100
4107
|
// OpenCode: flat structure in command/ directory
|
|
4101
4108
|
const commandDir = path.join(targetDir, 'command');
|
|
4102
4109
|
fs.mkdirSync(commandDir, { recursive: true });
|
|
4103
|
-
|
|
4104
|
-
// Copy commands/
|
|
4105
|
-
const capSrc = path.join(src, 'commands', '
|
|
4106
|
-
copyFlattenedCommands(capSrc, commandDir, '
|
|
4107
|
-
if (verifyInstalled(commandDir, 'command/
|
|
4108
|
-
const count = fs.readdirSync(commandDir).filter(f => f.startsWith('
|
|
4110
|
+
|
|
4111
|
+
// Copy commands/cap/*.md as command/cap-*.md (flatten structure)
|
|
4112
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4113
|
+
copyFlattenedCommands(capSrc, commandDir, 'cap', pathPrefix, runtime);
|
|
4114
|
+
if (verifyInstalled(commandDir, 'command/cap-*')) {
|
|
4115
|
+
const count = fs.readdirSync(commandDir).filter(f => f.startsWith('cap-')).length;
|
|
4109
4116
|
console.log(` ${green}✓${reset} Installed ${count} commands to command/`);
|
|
4110
4117
|
} else {
|
|
4111
|
-
failures.push('command/
|
|
4118
|
+
failures.push('command/cap-*');
|
|
4112
4119
|
}
|
|
4113
4120
|
} else if (isCodex) {
|
|
4114
4121
|
const skillsDir = path.join(targetDir, 'skills');
|
|
4115
|
-
const capSrc = path.join(src, 'commands', '
|
|
4116
|
-
copyCommandsAsCodexSkills(capSrc, skillsDir, '
|
|
4122
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4123
|
+
copyCommandsAsCodexSkills(capSrc, skillsDir, 'cap', pathPrefix, runtime);
|
|
4117
4124
|
const installedSkillNames = listCodexSkillNames(skillsDir);
|
|
4118
4125
|
if (installedSkillNames.length > 0) {
|
|
4119
4126
|
console.log(` ${green}✓${reset} Installed ${installedSkillNames.length} skills to skills/`);
|
|
4120
4127
|
} else {
|
|
4121
|
-
failures.push('skills/
|
|
4128
|
+
failures.push('skills/cap-*');
|
|
4122
4129
|
}
|
|
4123
4130
|
} else if (isCopilot) {
|
|
4124
4131
|
const skillsDir = path.join(targetDir, 'skills');
|
|
4125
|
-
const capSrc = path.join(src, 'commands', '
|
|
4126
|
-
copyCommandsAsCopilotSkills(capSrc, skillsDir, '
|
|
4132
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4133
|
+
copyCommandsAsCopilotSkills(capSrc, skillsDir, 'cap', isGlobal);
|
|
4127
4134
|
if (fs.existsSync(skillsDir)) {
|
|
4128
4135
|
const count = fs.readdirSync(skillsDir, { withFileTypes: true })
|
|
4129
|
-
.filter(e => e.isDirectory() && e.name.startsWith('
|
|
4136
|
+
.filter(e => e.isDirectory() && e.name.startsWith('cap-')).length;
|
|
4130
4137
|
if (count > 0) {
|
|
4131
4138
|
console.log(` ${green}✓${reset} Installed ${count} skills to skills/`);
|
|
4132
4139
|
} else {
|
|
4133
|
-
failures.push('skills/
|
|
4140
|
+
failures.push('skills/cap-*');
|
|
4134
4141
|
}
|
|
4135
4142
|
} else {
|
|
4136
|
-
failures.push('skills/
|
|
4143
|
+
failures.push('skills/cap-*');
|
|
4137
4144
|
}
|
|
4138
4145
|
} else if (isAntigravity) {
|
|
4139
4146
|
const skillsDir = path.join(targetDir, 'skills');
|
|
4140
|
-
const capSrc = path.join(src, 'commands', '
|
|
4141
|
-
copyCommandsAsAntigravitySkills(capSrc, skillsDir, '
|
|
4147
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4148
|
+
copyCommandsAsAntigravitySkills(capSrc, skillsDir, 'cap', isGlobal);
|
|
4142
4149
|
if (fs.existsSync(skillsDir)) {
|
|
4143
4150
|
const count = fs.readdirSync(skillsDir, { withFileTypes: true })
|
|
4144
|
-
.filter(e => e.isDirectory() && e.name.startsWith('
|
|
4151
|
+
.filter(e => e.isDirectory() && e.name.startsWith('cap-')).length;
|
|
4145
4152
|
if (count > 0) {
|
|
4146
4153
|
console.log(` ${green}✓${reset} Installed ${count} skills to skills/`);
|
|
4147
4154
|
} else {
|
|
4148
|
-
failures.push('skills/
|
|
4155
|
+
failures.push('skills/cap-*');
|
|
4149
4156
|
}
|
|
4150
4157
|
} else {
|
|
4151
|
-
failures.push('skills/
|
|
4158
|
+
failures.push('skills/cap-*');
|
|
4152
4159
|
}
|
|
4153
4160
|
} else if (isCursor) {
|
|
4154
4161
|
const skillsDir = path.join(targetDir, 'skills');
|
|
4155
|
-
const capSrc = path.join(src, 'commands', '
|
|
4156
|
-
copyCommandsAsCursorSkills(capSrc, skillsDir, '
|
|
4162
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4163
|
+
copyCommandsAsCursorSkills(capSrc, skillsDir, 'cap', pathPrefix, runtime);
|
|
4157
4164
|
const installedSkillNames = listCodexSkillNames(skillsDir); // reuse — same dir structure
|
|
4158
4165
|
if (installedSkillNames.length > 0) {
|
|
4159
4166
|
console.log(` ${green}✓${reset} Installed ${installedSkillNames.length} skills to skills/`);
|
|
4160
4167
|
} else {
|
|
4161
|
-
failures.push('skills/
|
|
4168
|
+
failures.push('skills/cap-*');
|
|
4162
4169
|
}
|
|
4163
4170
|
} else if (isWindsurf) {
|
|
4164
4171
|
const skillsDir = path.join(targetDir, 'skills');
|
|
4165
|
-
const capSrc = path.join(src, 'commands', '
|
|
4166
|
-
copyCommandsAsWindsurfSkills(capSrc, skillsDir, '
|
|
4172
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4173
|
+
copyCommandsAsWindsurfSkills(capSrc, skillsDir, 'cap', pathPrefix, runtime);
|
|
4167
4174
|
const installedSkillNames = listCodexSkillNames(skillsDir); // reuse — same dir structure
|
|
4168
4175
|
if (installedSkillNames.length > 0) {
|
|
4169
4176
|
console.log(` ${green}✓${reset} Installed ${installedSkillNames.length} skills to skills/`);
|
|
4170
4177
|
} else {
|
|
4171
|
-
failures.push('skills/
|
|
4178
|
+
failures.push('skills/cap-*');
|
|
4172
4179
|
}
|
|
4173
4180
|
} else {
|
|
4174
4181
|
// Claude Code & Gemini: nested structure in commands/ directory
|
|
4175
4182
|
const commandsDir = path.join(targetDir, 'commands');
|
|
4176
4183
|
fs.mkdirSync(commandsDir, { recursive: true });
|
|
4177
|
-
|
|
4178
|
-
const capSrc = path.join(src, 'commands', '
|
|
4179
|
-
const capDest = path.join(commandsDir, '
|
|
4184
|
+
|
|
4185
|
+
const capSrc = path.join(src, 'commands', 'cap');
|
|
4186
|
+
const capDest = path.join(commandsDir, 'cap');
|
|
4180
4187
|
copyWithPathReplacement(capSrc, capDest, pathPrefix, runtime, true, isGlobal);
|
|
4181
|
-
if (verifyInstalled(capDest, 'commands/
|
|
4182
|
-
console.log(` ${green}✓${reset} Installed commands/
|
|
4188
|
+
if (verifyInstalled(capDest, 'commands/cap')) {
|
|
4189
|
+
console.log(` ${green}✓${reset} Installed commands/cap`);
|
|
4183
4190
|
} else {
|
|
4184
|
-
failures.push('commands/
|
|
4191
|
+
failures.push('commands/cap');
|
|
4185
4192
|
}
|
|
4186
4193
|
}
|
|
4187
4194
|
|
|
@@ -4204,7 +4211,7 @@ function install(isGlobal, runtime = 'claude') {
|
|
|
4204
4211
|
// Remove old CAP agents (gsd-*.md) before copying new ones
|
|
4205
4212
|
if (fs.existsSync(agentsDest)) {
|
|
4206
4213
|
for (const file of fs.readdirSync(agentsDest)) {
|
|
4207
|
-
if (file.startsWith('
|
|
4214
|
+
if (file.startsWith('cap-') && file.endsWith('.md')) {
|
|
4208
4215
|
fs.unlinkSync(path.join(agentsDest, file));
|
|
4209
4216
|
}
|
|
4210
4217
|
}
|
|
@@ -4684,70 +4691,6 @@ function handleStatusline(settings, isInteractive, callback) {
|
|
|
4684
4691
|
});
|
|
4685
4692
|
}
|
|
4686
4693
|
|
|
4687
|
-
/**
|
|
4688
|
-
* Install the CAP SDK globally via npm.
|
|
4689
|
-
* @returns {boolean} true if install succeeded
|
|
4690
|
-
*/
|
|
4691
|
-
function installSdk() {
|
|
4692
|
-
const sdkPkg = `@gsd-build/sdk@latest`;
|
|
4693
|
-
console.log(`\n ${cyan}Installing CAP SDK...${reset}`);
|
|
4694
|
-
console.log(` ${dim}npm install -g ${sdkPkg}${reset}\n`);
|
|
4695
|
-
try {
|
|
4696
|
-
require('child_process').execSync(`npm install -g ${sdkPkg}`, { stdio: 'inherit' });
|
|
4697
|
-
console.log(`\n ${green}✓${reset} CAP SDK installed (${cyan}cap-sdk${reset} command available)`);
|
|
4698
|
-
return true;
|
|
4699
|
-
} catch (e) {
|
|
4700
|
-
console.log(`\n ${yellow}⚠${reset} SDK install failed: ${e.message}`);
|
|
4701
|
-
console.log(` ${dim}You can install it manually: npm install -g ${sdkPkg}${reset}`);
|
|
4702
|
-
return false;
|
|
4703
|
-
}
|
|
4704
|
-
}
|
|
4705
|
-
|
|
4706
|
-
/**
|
|
4707
|
-
* Prompt the user to optionally install the CAP SDK.
|
|
4708
|
-
* Called after runtime installation completes.
|
|
4709
|
-
* @param {Function} callback - called with true/false
|
|
4710
|
-
*/
|
|
4711
|
-
function promptSdk(callback) {
|
|
4712
|
-
if (!process.stdin.isTTY) {
|
|
4713
|
-
callback(false);
|
|
4714
|
-
return;
|
|
4715
|
-
}
|
|
4716
|
-
|
|
4717
|
-
const rl = readline.createInterface({
|
|
4718
|
-
input: process.stdin,
|
|
4719
|
-
output: process.stdout
|
|
4720
|
-
});
|
|
4721
|
-
|
|
4722
|
-
let answered = false;
|
|
4723
|
-
|
|
4724
|
-
rl.on('close', () => {
|
|
4725
|
-
if (!answered) {
|
|
4726
|
-
answered = true;
|
|
4727
|
-
callback(false);
|
|
4728
|
-
}
|
|
4729
|
-
});
|
|
4730
|
-
|
|
4731
|
-
console.log(`
|
|
4732
|
-
${yellow}Also install the CAP SDK?${reset}
|
|
4733
|
-
|
|
4734
|
-
The SDK provides a standalone CLI for autonomous execution:
|
|
4735
|
-
${dim}cap-sdk init @prd.md${reset} Bootstrap a project from a PRD
|
|
4736
|
-
${dim}cap-sdk auto${reset} Run full autonomous lifecycle
|
|
4737
|
-
${dim}cap-sdk run "prompt"${reset} Execute a milestone from text
|
|
4738
|
-
|
|
4739
|
-
${cyan}1${reset}) No
|
|
4740
|
-
${cyan}2${reset}) Yes ${dim}(runs: npm install -g @gsd-build/sdk)${reset}
|
|
4741
|
-
`);
|
|
4742
|
-
|
|
4743
|
-
rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
|
|
4744
|
-
answered = true;
|
|
4745
|
-
rl.close();
|
|
4746
|
-
const choice = answer.trim() || '1';
|
|
4747
|
-
callback(choice === '2');
|
|
4748
|
-
});
|
|
4749
|
-
}
|
|
4750
|
-
|
|
4751
4694
|
/**
|
|
4752
4695
|
* Prompt for runtime selection
|
|
4753
4696
|
*/
|
|
@@ -4877,7 +4820,7 @@ function installAllRuntimes(runtimes, isGlobal, isInteractive) {
|
|
|
4877
4820
|
const primaryStatuslineResult = results.find(r => statuslineRuntimes.includes(r.runtime));
|
|
4878
4821
|
|
|
4879
4822
|
const finalize = (shouldInstallStatusline) => {
|
|
4880
|
-
//
|
|
4823
|
+
// Print final summaries
|
|
4881
4824
|
const printSummaries = () => {
|
|
4882
4825
|
for (const result of results) {
|
|
4883
4826
|
const useStatusline = statuslineRuntimes.includes(result.runtime) && shouldInstallStatusline;
|
|
@@ -4892,18 +4835,7 @@ function installAllRuntimes(runtimes, isGlobal, isInteractive) {
|
|
|
4892
4835
|
}
|
|
4893
4836
|
};
|
|
4894
4837
|
|
|
4895
|
-
|
|
4896
|
-
// --sdk flag: install without prompting
|
|
4897
|
-
installSdk();
|
|
4898
|
-
printSummaries();
|
|
4899
|
-
} else if (isInteractive) {
|
|
4900
|
-
promptSdk((wantsSdk) => {
|
|
4901
|
-
if (wantsSdk) installSdk();
|
|
4902
|
-
printSummaries();
|
|
4903
|
-
});
|
|
4904
|
-
} else {
|
|
4905
|
-
printSummaries();
|
|
4906
|
-
}
|
|
4838
|
+
printSummaries();
|
|
4907
4839
|
};
|
|
4908
4840
|
|
|
4909
4841
|
if (primaryStatuslineResult) {
|