aodw-skill 0.7.10 → 0.7.11
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/aodw.js +23 -23
- package/package.json +1 -1
package/bin/aodw.js
CHANGED
|
@@ -80,7 +80,7 @@ const SOURCE_TEMPLATE = path.join(SOURCE_CORE, 'templates/aodw-kernel-loader-tem
|
|
|
80
80
|
|
|
81
81
|
program
|
|
82
82
|
.version(packageJson.version)
|
|
83
|
-
.description('Initialize AODW in your project');
|
|
83
|
+
.description('Initialize AODW-Next in your project');
|
|
84
84
|
|
|
85
85
|
// Helper: Install file with processor
|
|
86
86
|
async function installFile(source, target, processorClass = BaseProcessor) {
|
|
@@ -92,7 +92,7 @@ async function installFile(source, target, processorClass = BaseProcessor) {
|
|
|
92
92
|
async function copyRecursive(sourceDir, targetDir, processorClass, renameFn = null) {
|
|
93
93
|
// Files to exclude from distribution (maintainer-only tools)
|
|
94
94
|
const excludeFiles = [
|
|
95
|
-
'aodw-governance.md', // AODW 治理检查(仅维护者)
|
|
95
|
+
'aodw-governance.md', // AODW-Next 治理检查(仅维护者)
|
|
96
96
|
'aodw-init.md' // 初始化(CLI 已处理)
|
|
97
97
|
];
|
|
98
98
|
|
|
@@ -145,7 +145,7 @@ async function isTemplateFile(filePath) {
|
|
|
145
145
|
// Template has empty tech stack sections like "- 前端:\n- 后端:"
|
|
146
146
|
const hasEmptyTechStack = /- 前端:\s*\n\s*- 后端:/.test(content);
|
|
147
147
|
// Template has placeholder text
|
|
148
|
-
const hasPlaceholder = /(由 AI 或人工在首次接入 AODW 时填写/.test(content);
|
|
148
|
+
const hasPlaceholder = /(由 AI 或人工在首次接入 AODW-Next 时填写/.test(content);
|
|
149
149
|
return hasEmptyTechStack || hasPlaceholder;
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -242,13 +242,13 @@ async function checkServerHealth(url) {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
async function runInit() {
|
|
245
|
-
console.log(chalk.blue('🚀 正在初始化 AODW...'));
|
|
245
|
+
console.log(chalk.blue('🚀 正在初始化 AODW-Next...'));
|
|
246
246
|
|
|
247
|
-
// --- Safeguard: Prevent running in AODW Source Repo ---
|
|
247
|
+
// --- Safeguard: Prevent running in AODW-Next Source Repo ---
|
|
248
248
|
if (fs.existsSync(path.join(process.cwd(), 'cli/bin/aodw.js')) &&
|
|
249
249
|
(fs.existsSync(path.join(process.cwd(), 'templates/.aodw')) ||
|
|
250
250
|
fs.existsSync(path.join(process.cwd(), 'templates/.aodw-next')))) {
|
|
251
|
-
console.log(chalk.red('\n🛑 严重错误: 您正在 AODW 源码仓库中运行 "aodw init"!'));
|
|
251
|
+
console.log(chalk.red('\n🛑 严重错误: 您正在 AODW-Next 源码仓库中运行 "aodw-skill init"!'));
|
|
252
252
|
console.log(chalk.yellow(' 这将导致开发模板覆盖源文件。'));
|
|
253
253
|
console.log(chalk.yellow(' 如需更新模板,请使用: cd cli && ./build-local.sh'));
|
|
254
254
|
return;
|
|
@@ -458,7 +458,7 @@ async function runInit() {
|
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
-
console.log(chalk.green('\n✅ AODW
|
|
461
|
+
console.log(chalk.green('\n✅ AODW-Next 初始化成功!'));
|
|
462
462
|
console.log(chalk.white(`项目: ${projectName}`));
|
|
463
463
|
|
|
464
464
|
const updatedConfig = getUserConfig();
|
|
@@ -470,7 +470,7 @@ async function runInit() {
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
async function runUpdate() {
|
|
473
|
-
console.log(chalk.blue('🔄 正在更新 AODW...'));
|
|
473
|
+
console.log(chalk.blue('🔄 正在更新 AODW-Next...'));
|
|
474
474
|
await runInit();
|
|
475
475
|
}
|
|
476
476
|
|
|
@@ -479,7 +479,7 @@ async function runUninstall() {
|
|
|
479
479
|
{
|
|
480
480
|
type: 'confirm',
|
|
481
481
|
name: 'confirm',
|
|
482
|
-
message: `确定要卸载 AODW
|
|
482
|
+
message: `确定要卸载 AODW-Next 吗? 这将删除 ${CORE_DIRNAME} 目录(包含 ui-kit)。`,
|
|
483
483
|
default: false
|
|
484
484
|
}
|
|
485
485
|
]);
|
|
@@ -513,7 +513,7 @@ async function runUninstall() {
|
|
|
513
513
|
await removeIfExists(path.join(cwd, CORE_DIRNAME, 'AGENTS.md'));
|
|
514
514
|
await removeIfExists(path.join(cwd, '.github', 'copilot-instructions.md'));
|
|
515
515
|
|
|
516
|
-
console.log(chalk.green('✅ AODW 已卸载。'));
|
|
516
|
+
console.log(chalk.green('✅ AODW-Next 已卸载。'));
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -521,7 +521,7 @@ async function showHelp() {
|
|
|
521
521
|
const deployDocPath = path.join(__dirname, '../DEPLOY.md');
|
|
522
522
|
if (fs.existsSync(deployDocPath)) {
|
|
523
523
|
const content = fs.readFileSync(deployDocPath, 'utf8');
|
|
524
|
-
console.log(chalk.cyan('\n=== AODW 部署指南 ===\n'));
|
|
524
|
+
console.log(chalk.cyan('\n=== AODW-Next 部署指南 ===\n'));
|
|
525
525
|
console.log(content);
|
|
526
526
|
} else {
|
|
527
527
|
console.log(chalk.red('未找到帮助文件。'));
|
|
@@ -538,7 +538,7 @@ async function generateOverviewPrompt() {
|
|
|
538
538
|
const hasOverview = fs.existsSync(overviewFile);
|
|
539
539
|
const hasModulesIndex = fs.existsSync(modulesIndexFile);
|
|
540
540
|
|
|
541
|
-
let overviewPrompt = `请帮我${hasOverview || hasModulesIndex ? '更新' : '初始化'}项目的 AODW 项目概览文档。
|
|
541
|
+
let overviewPrompt = `请帮我${hasOverview || hasModulesIndex ? '更新' : '初始化'}项目的 AODW-Next 项目概览文档。
|
|
542
542
|
|
|
543
543
|
**任务说明**:
|
|
544
544
|
根据当前项目的代码结构、技术栈和架构,生成或完善以下文档:
|
|
@@ -562,7 +562,7 @@ async function generateOverviewPrompt() {
|
|
|
562
562
|
4. 生成或更新 \`ai-overview.md\` 和 \`modules-index.yaml\`
|
|
563
563
|
|
|
564
564
|
**重要提示**:
|
|
565
|
-
- ✅ **这些文件在更新 AODW 时会被保护,不会被覆盖**
|
|
565
|
+
- ✅ **这些文件在更新 AODW-Next 时会被保护,不会被覆盖**
|
|
566
566
|
- ${hasOverview ? '如果项目已经有部分概览文档,请基于现有内容进行完善' : '如果项目已经有部分概览文档,请基于现有内容进行完善'}
|
|
567
567
|
- 确保技术栈信息准确
|
|
568
568
|
- 确保模块索引完整
|
|
@@ -629,8 +629,8 @@ async function generateToolsPrompt() {
|
|
|
629
629
|
`;
|
|
630
630
|
}
|
|
631
631
|
|
|
632
|
-
toolsPrompt += `- ✅ **工具状态文件在更新 AODW 时会被保护,不会被覆盖**
|
|
633
|
-
- ✅ **工具配置文件在项目根目录,不会被 AODW 更新影响**
|
|
632
|
+
toolsPrompt += `- ✅ **工具状态文件在更新 AODW-Next 时会被保护,不会被覆盖**
|
|
633
|
+
- ✅ **工具配置文件在项目根目录,不会被 AODW-Next 更新影响**
|
|
634
634
|
- 确保生成的配置文件符合项目规范
|
|
635
635
|
- 如果工具已存在,请检查配置是否需要更新
|
|
636
636
|
- **此命令可以重复执行**,每次执行会检查并更新工具配置
|
|
@@ -669,7 +669,7 @@ async function configureMode(pause = true, forceConnect = false) {
|
|
|
669
669
|
const answers = await inquirer.prompt([{
|
|
670
670
|
type: 'input',
|
|
671
671
|
name: 'serverUrl',
|
|
672
|
-
message: '请输入 AODW ID 服务器地址:',
|
|
672
|
+
message: '请输入 AODW-Next ID 服务器地址:',
|
|
673
673
|
default: 'http://114.67.218.31:2005',
|
|
674
674
|
validate: (input) => {
|
|
675
675
|
if (!input || input.trim() === '') {
|
|
@@ -717,7 +717,7 @@ async function configureMode(pause = true, forceConnect = false) {
|
|
|
717
717
|
async function showMainMenu() {
|
|
718
718
|
while (true) {
|
|
719
719
|
console.clear();
|
|
720
|
-
console.log(chalk.bold.blue('=== AODW CLI 管理器 ==='));
|
|
720
|
+
console.log(chalk.bold.blue('=== AODW-Next CLI 管理器 ==='));
|
|
721
721
|
console.log(chalk.gray('版本: ' + packageJson.version));
|
|
722
722
|
|
|
723
723
|
// Show current config summary
|
|
@@ -733,7 +733,7 @@ async function showMainMenu() {
|
|
|
733
733
|
pageSize: 10,
|
|
734
734
|
choices: [
|
|
735
735
|
new inquirer.Separator('--- 核心功能 ---'),
|
|
736
|
-
{ name: '1. 初始化 / 更新 AODW (在本项目)', value: 'init' },
|
|
736
|
+
{ name: '1. 初始化 / 更新 AODW-Next (在本项目)', value: 'init' },
|
|
737
737
|
{ name: '2. 配置全局开发模式 (单机/联网)', value: 'config' },
|
|
738
738
|
|
|
739
739
|
new inquirer.Separator('--- 工具箱 ---'),
|
|
@@ -742,7 +742,7 @@ async function showMainMenu() {
|
|
|
742
742
|
|
|
743
743
|
new inquirer.Separator('--- 帮助与维护 ---'),
|
|
744
744
|
{ name: '5. 查看帮助 & 部署指南', value: 'help' },
|
|
745
|
-
{ name: '6. 卸载 AODW', value: 'uninstall' },
|
|
745
|
+
{ name: '6. 卸载 AODW-Next', value: 'uninstall' },
|
|
746
746
|
new inquirer.Separator(),
|
|
747
747
|
{ name: '0. 退出 (Exit)', value: 'exit' }
|
|
748
748
|
]
|
|
@@ -791,22 +791,22 @@ async function showMainMenu() {
|
|
|
791
791
|
|
|
792
792
|
program
|
|
793
793
|
.command('init')
|
|
794
|
-
.description('Initialize AODW')
|
|
794
|
+
.description('Initialize AODW-Next')
|
|
795
795
|
.action(runInit);
|
|
796
796
|
|
|
797
797
|
program
|
|
798
798
|
.command('update')
|
|
799
|
-
.description('Update AODW')
|
|
799
|
+
.description('Update AODW-Next')
|
|
800
800
|
.action(runUpdate);
|
|
801
801
|
|
|
802
802
|
program
|
|
803
803
|
.command('uninstall')
|
|
804
|
-
.description('Uninstall AODW')
|
|
804
|
+
.description('Uninstall AODW-Next')
|
|
805
805
|
.action(runUninstall);
|
|
806
806
|
|
|
807
807
|
program
|
|
808
808
|
.command('serve')
|
|
809
|
-
.description('Start the AODW ID Server')
|
|
809
|
+
.description('Start the AODW-Next ID Server')
|
|
810
810
|
.option('-p, --port <number>', 'Port to listen on', 2005)
|
|
811
811
|
.action(serve);
|
|
812
812
|
|