@zeyue0329/xiaoma-cli 1.0.37 → 1.0.38
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/.idea/workspace.xml +27 -26
- package/JAVA-BACKEND-COMMANDS-REFERENCE.md +62 -52
- package/JAVA-BACKEND-ITERATION-GUIDE.md +125 -18
- package/README.md +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +35 -5
- package/dist/agents/architect.txt +217 -31
- package/dist/agents/automation-orchestrator.txt +4 -4
- package/dist/agents/dev.txt +3 -3
- package/dist/agents/full-requirement-orchestrator.txt +11 -11
- package/dist/agents/qa.txt +102 -102
- package/dist/agents/sm.txt +6 -6
- package/dist/agents/ux-expert.txt +6 -1
- package/dist/agents/workflow-executor.txt +879 -0
- package/dist/agents/xiaoma-master.txt +258 -37
- package/dist/teams/team-all.txt +1223 -445
- package/dist/teams/team-fullstack-with-database.txt +384 -446
- package/dist/teams/team-fullstack.txt +258 -37
- package/dist/teams/team-ide-minimal.txt +111 -111
- package/dist/teams/team-no-ui.txt +252 -36
- package/docs/architecture-sharding-modification.md +623 -0
- package/docs/automated-requirements-analysis-outputs.md +896 -0
- package/package.json +1 -1
- package/tools/builders/web-builder.js +292 -142
- package/tools/bump-all-versions.js +50 -32
- package/tools/cli.js +52 -47
- package/tools/flattener/aggregate.js +30 -12
- package/tools/flattener/binary.js +46 -43
- package/tools/flattener/discovery.js +23 -15
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +122 -121
- package/tools/flattener/main.js +249 -144
- package/tools/flattener/projectRoot.js +74 -69
- package/tools/flattener/prompts.js +12 -10
- package/tools/flattener/stats.helpers.js +90 -61
- package/tools/flattener/stats.js +1 -1
- package/tools/flattener/test-matrix.js +225 -170
- package/tools/flattener/xml.js +31 -23
- package/tools/installer/bin/xiaoma.js +199 -153
- package/tools/installer/lib/config-loader.js +76 -47
- package/tools/installer/lib/file-manager.js +101 -44
- package/tools/installer/lib/ide-base-setup.js +49 -39
- package/tools/installer/lib/ide-setup.js +694 -380
- package/tools/installer/lib/installer.js +802 -469
- package/tools/installer/lib/memory-profiler.js +22 -12
- package/tools/installer/lib/module-manager.js +16 -14
- package/tools/installer/lib/resource-locator.js +61 -35
- package/tools/lib/dependency-resolver.js +34 -23
- package/tools/lib/yaml-utils.js +7 -2
- package/tools/preview-release-notes.js +33 -25
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +16 -7
- package/tools/upgraders/v3-to-v4-upgrader.js +244 -163
- package/tools/version-bump.js +24 -18
- package/tools/xiaoma-npx-wrapper.js +15 -10
- package/tools/yaml-format.js +60 -36
- package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -1
- package/xiaoma-core/agents/automated-fix-validator.yaml +2 -1
- package/xiaoma-core/agents/automated-quality-validator.yaml +10 -5
- package/xiaoma-core/agents/automation-orchestrator.md +4 -4
- package/xiaoma-core/agents/dev.md +4 -4
- package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +2 -1
- package/xiaoma-core/agents/full-requirement-orchestrator.md +11 -11
- package/xiaoma-core/agents/global-requirements-auditor.yaml +11 -3
- package/xiaoma-core/agents/intelligent-template-adapter.yaml +19 -5
- package/xiaoma-core/agents/master-execution-engine.yaml +19 -5
- package/xiaoma-core/agents/workflow-executor.md +8 -4
- package/xiaoma-core/agents/xiaoma-master.md +1 -1
- package/xiaoma-core/data/test-levels-framework.md +12 -12
- package/xiaoma-core/tasks/analyze-existing-database.md +1 -1
- package/xiaoma-core/tasks/apply-qa-fixes.md +3 -3
- package/xiaoma-core/tasks/batch-story-generation.md +22 -22
- package/xiaoma-core/tasks/create-enhanced-story-with-database.md +6 -6
- package/xiaoma-core/tasks/nfr-assess.md +6 -6
- package/xiaoma-core/tasks/project-integration-testing.md +42 -42
- package/xiaoma-core/tasks/qa-gate.md +23 -23
- package/xiaoma-core/tasks/review-story.md +18 -18
- package/xiaoma-core/tasks/risk-profile.md +25 -25
- package/xiaoma-core/tasks/serial-development-orchestration.md +51 -51
- package/xiaoma-core/tasks/test-design.md +9 -9
- package/xiaoma-core/tasks/trace-requirements.md +21 -21
- package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +35 -5
- package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +77 -11
- package/xiaoma-core/templates/front-end-spec-tmpl.yaml +6 -1
- package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +140 -20
- package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +2 -1
- package/xiaoma-core/templates/requirements-coverage-audit.yaml +2 -1
- package/xiaoma-core/workflows/automated-requirements-analysis.yaml +4 -4
- package/dist/agents/database-architect.txt +0 -322
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const { program } = require(
|
|
2
|
-
const path = require(
|
|
3
|
-
const fs = require(
|
|
4
|
-
const yaml = require(
|
|
5
|
-
const chalk = require(
|
|
6
|
-
const inquirer = require(
|
|
7
|
-
const semver = require(
|
|
8
|
-
const https = require(
|
|
1
|
+
const { program } = require("commander");
|
|
2
|
+
const path = require("node:path");
|
|
3
|
+
const fs = require("node:fs").promises;
|
|
4
|
+
const yaml = require("js-yaml");
|
|
5
|
+
const chalk = require("chalk").default || require("chalk");
|
|
6
|
+
const inquirer = require("inquirer").default || require("inquirer");
|
|
7
|
+
const semver = require("semver");
|
|
8
|
+
const https = require("node:https");
|
|
9
9
|
|
|
10
10
|
// Handle both execution contexts (from root via npx or from installer directory)
|
|
11
11
|
let version;
|
|
@@ -13,20 +13,22 @@ let installer;
|
|
|
13
13
|
let packageName;
|
|
14
14
|
try {
|
|
15
15
|
// Try installer context first (when run from tools/installer/)
|
|
16
|
-
version = require(
|
|
17
|
-
packageName = require(
|
|
18
|
-
installer = require(
|
|
16
|
+
version = require("../package.json").version;
|
|
17
|
+
packageName = require("../package.json").name;
|
|
18
|
+
installer = require("../lib/installer");
|
|
19
19
|
} catch (error) {
|
|
20
20
|
// Fall back to root context (when run via npx from GitHub)
|
|
21
|
-
console.log(
|
|
21
|
+
console.log(
|
|
22
|
+
`Installer context not found (${error.message}), trying root context...`,
|
|
23
|
+
);
|
|
22
24
|
try {
|
|
23
|
-
version = require(
|
|
24
|
-
installer = require(
|
|
25
|
+
version = require("../../../package.json").version;
|
|
26
|
+
installer = require("../../../tools/installer/lib/installer");
|
|
25
27
|
} catch (error) {
|
|
26
28
|
console.error(
|
|
27
|
-
|
|
29
|
+
"Error: Could not load required modules. Please ensure you are running from the correct directory.",
|
|
28
30
|
);
|
|
29
|
-
console.error(
|
|
31
|
+
console.error("Debug info:", {
|
|
30
32
|
__dirname,
|
|
31
33
|
cwd: process.cwd(),
|
|
32
34
|
error: error.message,
|
|
@@ -37,21 +39,26 @@ try {
|
|
|
37
39
|
|
|
38
40
|
program
|
|
39
41
|
.version(version)
|
|
40
|
-
.description(
|
|
42
|
+
.description(
|
|
43
|
+
"XiaoMa CLI installer - Universal AI agent framework for any domain",
|
|
44
|
+
);
|
|
41
45
|
|
|
42
46
|
program
|
|
43
|
-
.command(
|
|
44
|
-
.description(
|
|
45
|
-
.option(
|
|
46
|
-
.option('-x, --expansion-only', 'Install only expansion packs (no xiaoma-core)')
|
|
47
|
-
.option('-d, --directory <path>', 'Installation directory')
|
|
47
|
+
.command("install")
|
|
48
|
+
.description("Install XiaoMa CLI agents and tools")
|
|
49
|
+
.option("-f, --full", "Install complete XiaoMa CLI")
|
|
48
50
|
.option(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
"-x, --expansion-only",
|
|
52
|
+
"Install only expansion packs (no xiaoma-core)",
|
|
51
53
|
)
|
|
54
|
+
.option("-d, --directory <path>", "Installation directory")
|
|
52
55
|
.option(
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
"-i, --ide <ide...>",
|
|
57
|
+
"Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, trae, roo, kilo, cline, gemini, qwen-code, github-copilot, codex, codex-web, auggie-cli, other)",
|
|
58
|
+
)
|
|
59
|
+
.option(
|
|
60
|
+
"-e, --expansion-packs <packs...>",
|
|
61
|
+
"Install specific expansion packs (can specify multiple)",
|
|
55
62
|
)
|
|
56
63
|
.action(async (options) => {
|
|
57
64
|
try {
|
|
@@ -64,128 +71,142 @@ program
|
|
|
64
71
|
}
|
|
65
72
|
} else {
|
|
66
73
|
// Direct mode
|
|
67
|
-
let installType =
|
|
68
|
-
if (options.expansionOnly) installType =
|
|
74
|
+
let installType = "full";
|
|
75
|
+
if (options.expansionOnly) installType = "expansion-only";
|
|
69
76
|
|
|
70
77
|
const config = {
|
|
71
78
|
installType,
|
|
72
|
-
directory: options.directory ||
|
|
73
|
-
ides: (options.ide || []).filter((ide) => ide !==
|
|
79
|
+
directory: options.directory || ".",
|
|
80
|
+
ides: (options.ide || []).filter((ide) => ide !== "other"),
|
|
74
81
|
expansionPacks: options.expansionPacks || [],
|
|
75
82
|
};
|
|
76
83
|
await installer.install(config);
|
|
77
84
|
process.exit(0);
|
|
78
85
|
}
|
|
79
86
|
} catch (error) {
|
|
80
|
-
console.error(chalk.red(
|
|
87
|
+
console.error(chalk.red("Installation failed:"), error.message);
|
|
81
88
|
process.exit(1);
|
|
82
89
|
}
|
|
83
90
|
});
|
|
84
91
|
|
|
85
92
|
program
|
|
86
|
-
.command(
|
|
87
|
-
.description(
|
|
88
|
-
.option(
|
|
89
|
-
.option(
|
|
93
|
+
.command("update")
|
|
94
|
+
.description("Update existing XiaoMa installation")
|
|
95
|
+
.option("--force", "Force update, overwriting modified files")
|
|
96
|
+
.option("--dry-run", "Show what would be updated without making changes")
|
|
90
97
|
.action(async () => {
|
|
91
98
|
try {
|
|
92
99
|
await installer.update();
|
|
93
100
|
} catch (error) {
|
|
94
|
-
console.error(chalk.red(
|
|
101
|
+
console.error(chalk.red("Update failed:"), error.message);
|
|
95
102
|
process.exit(1);
|
|
96
103
|
}
|
|
97
104
|
});
|
|
98
105
|
|
|
99
106
|
// Command to check if updates are available
|
|
100
107
|
program
|
|
101
|
-
.command(
|
|
102
|
-
.description(
|
|
108
|
+
.command("update-check")
|
|
109
|
+
.description("Check for XiaoMa Update")
|
|
103
110
|
.action(async () => {
|
|
104
|
-
console.log(
|
|
111
|
+
console.log("Checking for updates...");
|
|
105
112
|
|
|
106
113
|
// Make HTTP request to npm registry for latest version info
|
|
107
|
-
const req = https.get(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
res.on('end', () => {
|
|
120
|
-
try {
|
|
121
|
-
// Parse npm registry response and extract version
|
|
122
|
-
const latest = JSON.parse(data).version;
|
|
114
|
+
const req = https.get(
|
|
115
|
+
`https://registry.npmjs.org/${packageName}/latest`,
|
|
116
|
+
(res) => {
|
|
117
|
+
// Check for HTTP errors (non-200 status codes)
|
|
118
|
+
if (res.statusCode !== 200) {
|
|
119
|
+
console.error(
|
|
120
|
+
chalk.red(
|
|
121
|
+
`Update check failed: Received status code ${res.statusCode}`,
|
|
122
|
+
),
|
|
123
|
+
);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
// Accumulate response data chunks
|
|
128
|
+
let data = "";
|
|
129
|
+
res.on("data", (chunk) => (data += chunk));
|
|
130
|
+
|
|
131
|
+
// Process complete response
|
|
132
|
+
res.on("end", () => {
|
|
133
|
+
try {
|
|
134
|
+
// Parse npm registry response and extract version
|
|
135
|
+
const latest = JSON.parse(data).version;
|
|
136
|
+
|
|
137
|
+
// Compare versions using semver
|
|
138
|
+
if (semver.gt(latest, version)) {
|
|
139
|
+
console.log(
|
|
140
|
+
chalk.bold.blue(
|
|
141
|
+
`⚠️ ${packageName} update available: ${version} → ${latest}`,
|
|
142
|
+
),
|
|
143
|
+
);
|
|
144
|
+
console.log(chalk.bold.blue("\nInstall latest by running:"));
|
|
145
|
+
console.log(
|
|
146
|
+
chalk.bold.magenta(` npm install ${packageName}@latest`),
|
|
147
|
+
);
|
|
148
|
+
console.log(chalk.dim(" or"));
|
|
149
|
+
console.log(chalk.bold.magenta(` npx ${packageName}@latest`));
|
|
150
|
+
} else {
|
|
151
|
+
console.log(chalk.bold.blue(`✨ ${packageName} is up to date`));
|
|
152
|
+
}
|
|
153
|
+
} catch (error) {
|
|
154
|
+
// Handle JSON parsing errors
|
|
155
|
+
console.error(
|
|
156
|
+
chalk.red("Failed to parse npm registry data:"),
|
|
157
|
+
error.message,
|
|
128
158
|
);
|
|
129
|
-
console.log(chalk.bold.blue('\nInstall latest by running:'));
|
|
130
|
-
console.log(chalk.bold.magenta(` npm install ${packageName}@latest`));
|
|
131
|
-
console.log(chalk.dim(' or'));
|
|
132
|
-
console.log(chalk.bold.magenta(` npx ${packageName}@latest`));
|
|
133
|
-
} else {
|
|
134
|
-
console.log(chalk.bold.blue(`✨ ${packageName} is up to date`));
|
|
135
159
|
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
});
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
);
|
|
142
163
|
|
|
143
164
|
// Handle network/connection errors
|
|
144
|
-
req.on(
|
|
145
|
-
console.error(chalk.red(
|
|
165
|
+
req.on("error", (error) => {
|
|
166
|
+
console.error(chalk.red("Update check failed:"), error.message);
|
|
146
167
|
});
|
|
147
168
|
|
|
148
169
|
// Set 30 second timeout to prevent hanging
|
|
149
170
|
req.setTimeout(30_000, () => {
|
|
150
171
|
req.destroy();
|
|
151
|
-
console.error(chalk.red(
|
|
172
|
+
console.error(chalk.red("Update check timed out"));
|
|
152
173
|
});
|
|
153
174
|
});
|
|
154
175
|
|
|
155
176
|
program
|
|
156
|
-
.command(
|
|
157
|
-
.description(
|
|
177
|
+
.command("list:expansions")
|
|
178
|
+
.description("List available expansion packs")
|
|
158
179
|
.action(async () => {
|
|
159
180
|
try {
|
|
160
181
|
await installer.listExpansionPacks();
|
|
161
182
|
} catch (error) {
|
|
162
|
-
console.error(chalk.red(
|
|
183
|
+
console.error(chalk.red("Error:"), error.message);
|
|
163
184
|
process.exit(1);
|
|
164
185
|
}
|
|
165
186
|
});
|
|
166
187
|
|
|
167
188
|
program
|
|
168
|
-
.command(
|
|
169
|
-
.description(
|
|
189
|
+
.command("status")
|
|
190
|
+
.description("Show installation status")
|
|
170
191
|
.action(async () => {
|
|
171
192
|
try {
|
|
172
193
|
await installer.showStatus();
|
|
173
194
|
} catch (error) {
|
|
174
|
-
console.error(chalk.red(
|
|
195
|
+
console.error(chalk.red("Error:"), error.message);
|
|
175
196
|
process.exit(1);
|
|
176
197
|
}
|
|
177
198
|
});
|
|
178
199
|
|
|
179
200
|
program
|
|
180
|
-
.command(
|
|
181
|
-
.description(
|
|
182
|
-
.option(
|
|
183
|
-
.option(
|
|
201
|
+
.command("flatten")
|
|
202
|
+
.description("Flatten codebase to XML format")
|
|
203
|
+
.option("-i, --input <path>", "Input directory to flatten", process.cwd())
|
|
204
|
+
.option("-o, --output <path>", "Output file path", "flattened-codebase.xml")
|
|
184
205
|
.action(async (options) => {
|
|
185
206
|
try {
|
|
186
207
|
await installer.flatten(options);
|
|
187
208
|
} catch (error) {
|
|
188
|
-
console.error(chalk.red(
|
|
209
|
+
console.error(chalk.red("Flatten failed:"), error.message);
|
|
189
210
|
process.exit(1);
|
|
190
211
|
}
|
|
191
212
|
});
|
|
@@ -203,7 +224,9 @@ async function promptInstallation() {
|
|
|
203
224
|
`),
|
|
204
225
|
);
|
|
205
226
|
|
|
206
|
-
console.log(
|
|
227
|
+
console.log(
|
|
228
|
+
chalk.bold.magenta("🚀 Universal AI Agent Framework for Any Domain"),
|
|
229
|
+
);
|
|
207
230
|
console.log(chalk.bold.blue(`✨ Installer v${version}\n`));
|
|
208
231
|
|
|
209
232
|
const answers = {};
|
|
@@ -211,13 +234,14 @@ async function promptInstallation() {
|
|
|
211
234
|
// Ask for installation directory first
|
|
212
235
|
const { directory } = await inquirer.prompt([
|
|
213
236
|
{
|
|
214
|
-
type:
|
|
215
|
-
name:
|
|
216
|
-
message:
|
|
217
|
-
|
|
237
|
+
type: "input",
|
|
238
|
+
name: "directory",
|
|
239
|
+
message:
|
|
240
|
+
"Enter the full path to your project directory where XiaoMa should be installed:",
|
|
241
|
+
default: path.resolve("."),
|
|
218
242
|
validate: (input) => {
|
|
219
243
|
if (!input.trim()) {
|
|
220
|
-
return
|
|
244
|
+
return "Please enter a valid project path";
|
|
221
245
|
}
|
|
222
246
|
return true;
|
|
223
247
|
},
|
|
@@ -236,14 +260,22 @@ async function promptInstallation() {
|
|
|
236
260
|
const availableExpansionPacks = await installer.getAvailableExpansionPacks();
|
|
237
261
|
|
|
238
262
|
// Load core config to get short-title
|
|
239
|
-
const coreConfigPath = path.join(
|
|
240
|
-
|
|
241
|
-
|
|
263
|
+
const coreConfigPath = path.join(
|
|
264
|
+
__dirname,
|
|
265
|
+
"..",
|
|
266
|
+
"..",
|
|
267
|
+
"..",
|
|
268
|
+
"xiaoma-core",
|
|
269
|
+
"core-config.yaml",
|
|
270
|
+
);
|
|
271
|
+
const coreConfig = yaml.load(await fs.readFile(coreConfigPath, "utf8"));
|
|
272
|
+
const coreShortTitle =
|
|
273
|
+
coreConfig["short-title"] || "XiaoMa Agile Core System";
|
|
242
274
|
|
|
243
275
|
// Display what will be installed
|
|
244
276
|
let bmadOptionText;
|
|
245
|
-
if (state.type ===
|
|
246
|
-
const currentVersion = state.manifest?.version ||
|
|
277
|
+
if (state.type === "v4_existing") {
|
|
278
|
+
const currentVersion = state.manifest?.version || "unknown";
|
|
247
279
|
const newVersion = version; // Always use package.json version
|
|
248
280
|
const versionInfo =
|
|
249
281
|
currentVersion === newVersion
|
|
@@ -257,16 +289,20 @@ async function promptInstallation() {
|
|
|
257
289
|
console.log(chalk.cyan(`\n📦 Installing: ${bmadOptionText} → .xiaoma-core`));
|
|
258
290
|
|
|
259
291
|
// Automatically select xiaoma-core (no user prompt)
|
|
260
|
-
const selectedItems = [
|
|
292
|
+
const selectedItems = ["xiaoma-core"];
|
|
261
293
|
|
|
262
294
|
// Process selections
|
|
263
|
-
answers.installType =
|
|
295
|
+
answers.installType = "full";
|
|
264
296
|
answers.expansionPacks = [];
|
|
265
297
|
|
|
266
298
|
// Configure sharding settings if installing XiaoMa core
|
|
267
|
-
if (selectedItems.includes(
|
|
268
|
-
console.log(chalk.cyan(
|
|
269
|
-
console.log(
|
|
299
|
+
if (selectedItems.includes("xiaoma-core")) {
|
|
300
|
+
console.log(chalk.cyan("\n📋 Document Organization Settings"));
|
|
301
|
+
console.log(
|
|
302
|
+
chalk.dim(
|
|
303
|
+
"PRD and Architecture documents will be sharded into multiple files.\n",
|
|
304
|
+
),
|
|
305
|
+
);
|
|
270
306
|
|
|
271
307
|
// Automatically enable both PRD and architecture sharding
|
|
272
308
|
answers.prdSharded = true;
|
|
@@ -278,37 +314,37 @@ async function promptInstallation() {
|
|
|
278
314
|
let ideSelectionComplete = false;
|
|
279
315
|
|
|
280
316
|
while (!ideSelectionComplete) {
|
|
281
|
-
console.log(chalk.cyan(
|
|
317
|
+
console.log(chalk.cyan("\n🛠️ IDE Configuration"));
|
|
282
318
|
console.log(
|
|
283
319
|
chalk.bold.yellow.bgRed(
|
|
284
|
-
|
|
320
|
+
" ⚠️ IMPORTANT: This is a MULTISELECT! Use SPACEBAR to toggle each IDE! ",
|
|
285
321
|
),
|
|
286
322
|
);
|
|
287
|
-
console.log(chalk.bold.magenta(
|
|
288
|
-
console.log(chalk.bold.magenta(
|
|
289
|
-
console.log(chalk.bold.magenta(
|
|
323
|
+
console.log(chalk.bold.magenta("🔸 Use arrow keys to navigate"));
|
|
324
|
+
console.log(chalk.bold.magenta("🔸 Use SPACEBAR to select/deselect IDEs"));
|
|
325
|
+
console.log(chalk.bold.magenta("🔸 Press ENTER when finished selecting\n"));
|
|
290
326
|
|
|
291
327
|
const ideResponse = await inquirer.prompt([
|
|
292
328
|
{
|
|
293
|
-
type:
|
|
294
|
-
name:
|
|
329
|
+
type: "checkbox",
|
|
330
|
+
name: "ides",
|
|
295
331
|
message:
|
|
296
|
-
|
|
332
|
+
"Which IDE(s) do you want to configure? (Select with SPACEBAR, confirm with ENTER):",
|
|
297
333
|
choices: [
|
|
298
|
-
{ name:
|
|
299
|
-
{ name:
|
|
300
|
-
{ name:
|
|
301
|
-
{ name:
|
|
302
|
-
{ name:
|
|
303
|
-
{ name:
|
|
304
|
-
{ name:
|
|
305
|
-
{ name:
|
|
306
|
-
{ name:
|
|
307
|
-
{ name:
|
|
308
|
-
{ name:
|
|
309
|
-
{ name:
|
|
310
|
-
{ name:
|
|
311
|
-
{ name:
|
|
334
|
+
{ name: "Cursor", value: "cursor" },
|
|
335
|
+
{ name: "Claude Code", value: "claude-code" },
|
|
336
|
+
{ name: "Windsurf", value: "windsurf" },
|
|
337
|
+
{ name: "Trae", value: "trae" }, // { name: 'Trae', value: 'trae'}
|
|
338
|
+
{ name: "Roo Code", value: "roo" },
|
|
339
|
+
{ name: "Kilo Code", value: "kilo" },
|
|
340
|
+
{ name: "Cline", value: "cline" },
|
|
341
|
+
{ name: "Gemini CLI", value: "gemini" },
|
|
342
|
+
{ name: "Qwen Code", value: "qwen-code" },
|
|
343
|
+
{ name: "Crush", value: "crush" },
|
|
344
|
+
{ name: "Github Copilot", value: "github-copilot" },
|
|
345
|
+
{ name: "Auggie CLI (Augment Code)", value: "auggie-cli" },
|
|
346
|
+
{ name: "Codex CLI", value: "codex" },
|
|
347
|
+
{ name: "Codex Web", value: "codex-web" },
|
|
312
348
|
],
|
|
313
349
|
},
|
|
314
350
|
]);
|
|
@@ -319,10 +355,10 @@ async function promptInstallation() {
|
|
|
319
355
|
if (ides.length === 0) {
|
|
320
356
|
const { confirmNoIde } = await inquirer.prompt([
|
|
321
357
|
{
|
|
322
|
-
type:
|
|
323
|
-
name:
|
|
358
|
+
type: "confirm",
|
|
359
|
+
name: "confirmNoIde",
|
|
324
360
|
message: chalk.red(
|
|
325
|
-
|
|
361
|
+
"⚠️ You have NOT selected any IDEs. This means NO IDE integration will be set up. Is this correct?",
|
|
326
362
|
),
|
|
327
363
|
default: false,
|
|
328
364
|
},
|
|
@@ -331,7 +367,7 @@ async function promptInstallation() {
|
|
|
331
367
|
if (!confirmNoIde) {
|
|
332
368
|
console.log(
|
|
333
369
|
chalk.bold.red(
|
|
334
|
-
|
|
370
|
+
"\n🔄 Returning to IDE selection. Remember to use SPACEBAR to select IDEs!\n",
|
|
335
371
|
),
|
|
336
372
|
);
|
|
337
373
|
continue; // Go back to IDE selection only
|
|
@@ -345,32 +381,36 @@ async function promptInstallation() {
|
|
|
345
381
|
answers.ides = ides;
|
|
346
382
|
|
|
347
383
|
// Configure GitHub Copilot immediately if selected
|
|
348
|
-
if (ides.includes(
|
|
349
|
-
console.log(chalk.cyan(
|
|
384
|
+
if (ides.includes("github-copilot")) {
|
|
385
|
+
console.log(chalk.cyan("\n🔧 GitHub Copilot Configuration"));
|
|
350
386
|
console.log(
|
|
351
|
-
chalk.dim(
|
|
387
|
+
chalk.dim(
|
|
388
|
+
"XiaoMa works best with specific VS Code settings for optimal agent experience.\n",
|
|
389
|
+
),
|
|
352
390
|
);
|
|
353
391
|
|
|
354
392
|
const { configChoice } = await inquirer.prompt([
|
|
355
393
|
{
|
|
356
|
-
type:
|
|
357
|
-
name:
|
|
358
|
-
message: chalk.yellow(
|
|
394
|
+
type: "list",
|
|
395
|
+
name: "configChoice",
|
|
396
|
+
message: chalk.yellow(
|
|
397
|
+
"How would you like to configure GitHub Copilot settings?",
|
|
398
|
+
),
|
|
359
399
|
choices: [
|
|
360
400
|
{
|
|
361
|
-
name:
|
|
362
|
-
value:
|
|
401
|
+
name: "Use recommended defaults (fastest setup)",
|
|
402
|
+
value: "defaults",
|
|
363
403
|
},
|
|
364
404
|
{
|
|
365
|
-
name:
|
|
366
|
-
value:
|
|
405
|
+
name: "Configure each setting manually (customize to your preferences)",
|
|
406
|
+
value: "manual",
|
|
367
407
|
},
|
|
368
408
|
{
|
|
369
409
|
name: "Skip settings configuration (I'll configure manually later)",
|
|
370
|
-
value:
|
|
410
|
+
value: "skip",
|
|
371
411
|
},
|
|
372
412
|
],
|
|
373
|
-
default:
|
|
413
|
+
default: "defaults",
|
|
374
414
|
},
|
|
375
415
|
]);
|
|
376
416
|
|
|
@@ -378,28 +418,32 @@ async function promptInstallation() {
|
|
|
378
418
|
}
|
|
379
419
|
|
|
380
420
|
// Configure Auggie CLI (Augment Code) immediately if selected
|
|
381
|
-
if (ides.includes(
|
|
382
|
-
console.log(chalk.cyan(
|
|
383
|
-
console.log(
|
|
421
|
+
if (ides.includes("auggie-cli")) {
|
|
422
|
+
console.log(chalk.cyan("\n📍 Auggie CLI Location Configuration"));
|
|
423
|
+
console.log(
|
|
424
|
+
chalk.dim(
|
|
425
|
+
"Choose where to install XiaoMa agents for Auggie CLI access.\n",
|
|
426
|
+
),
|
|
427
|
+
);
|
|
384
428
|
|
|
385
429
|
const { selectedLocations } = await inquirer.prompt([
|
|
386
430
|
{
|
|
387
|
-
type:
|
|
388
|
-
name:
|
|
389
|
-
message:
|
|
431
|
+
type: "checkbox",
|
|
432
|
+
name: "selectedLocations",
|
|
433
|
+
message: "Select Auggie CLI command locations:",
|
|
390
434
|
choices: [
|
|
391
435
|
{
|
|
392
|
-
name:
|
|
393
|
-
value:
|
|
436
|
+
name: "User Commands (Global): Available across all your projects (user-wide)",
|
|
437
|
+
value: "user",
|
|
394
438
|
},
|
|
395
439
|
{
|
|
396
|
-
name:
|
|
397
|
-
value:
|
|
440
|
+
name: "Workspace Commands (Project): Stored in repository, shared with team",
|
|
441
|
+
value: "workspace",
|
|
398
442
|
},
|
|
399
443
|
],
|
|
400
444
|
validate: (selected) => {
|
|
401
445
|
if (selected.length === 0) {
|
|
402
|
-
return
|
|
446
|
+
return "Please select at least one location";
|
|
403
447
|
}
|
|
404
448
|
return true;
|
|
405
449
|
},
|
|
@@ -410,14 +454,16 @@ async function promptInstallation() {
|
|
|
410
454
|
}
|
|
411
455
|
|
|
412
456
|
// Automatically include pre-built web bundles
|
|
413
|
-
console.log(chalk.cyan(
|
|
457
|
+
console.log(chalk.cyan("\n📦 Web Bundles Configuration"));
|
|
414
458
|
console.log(
|
|
415
|
-
chalk.dim(
|
|
459
|
+
chalk.dim(
|
|
460
|
+
"Pre-built web bundles for ChatGPT, Claude, and Gemini will be included.\n",
|
|
461
|
+
),
|
|
416
462
|
);
|
|
417
463
|
|
|
418
464
|
// Set default configuration for web bundles
|
|
419
465
|
answers.includeWebBundles = true;
|
|
420
|
-
answers.webBundleType =
|
|
466
|
+
answers.webBundleType = "all"; // Include all available bundles
|
|
421
467
|
answers.webBundlesDirectory = `${answers.directory}/web-bundles`;
|
|
422
468
|
|
|
423
469
|
return answers;
|