prizmkit 1.1.197 → 1.1.198
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/create-prizmkit.js +1 -5
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/claude/settings-adapter.js +3 -8
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
- package/src/config.js +16 -33
- package/src/index.js +1 -4
- package/src/manifest.js +2 -3
- package/src/prompts.js +0 -13
- package/src/scaffold.js +8 -15
- package/src/upgrade.js +6 -11
package/bin/create-prizmkit.js
CHANGED
|
@@ -51,8 +51,6 @@ program
|
|
|
51
51
|
.option('--platform <platform>', 'Target platform: codebuddy, claude, codex, pi, cursor, antigravity, comma-separated list, or all')
|
|
52
52
|
.option('--runtime <runtime>', 'Runtime assets: python or auto; unix/windows are accepted as legacy aliases for python')
|
|
53
53
|
.option('--skills <suite>', '[deprecated] Ignored; PrizmKit now always installs the full core skill suite')
|
|
54
|
-
.option('--pipeline', 'Install dev-pipeline (default: true)')
|
|
55
|
-
.option('--no-pipeline', 'Disable dev-pipeline')
|
|
56
54
|
.option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude, codex, pi, agent, agy)')
|
|
57
55
|
.option('--headless-prompt-arg <arg>', 'Prompt injection argv token for a custom AI CLI (e.g. -p or -i)')
|
|
58
56
|
.option('--headless-extra-args <args>', 'Additional headless argv tokens for a custom AI CLI')
|
|
@@ -101,15 +99,13 @@ program
|
|
|
101
99
|
|
|
102
100
|
program
|
|
103
101
|
.command('config [directory]')
|
|
104
|
-
.description('Reconfigure existing PrizmKit installation (change platform, AI CLI
|
|
102
|
+
.description('Reconfigure existing PrizmKit installation (change platform, AI CLI)')
|
|
105
103
|
.option('--platform <platform>', 'Target platform: codebuddy, claude, codex, pi, cursor, antigravity, comma-separated list, or all')
|
|
106
104
|
.option('--runtime <runtime>', 'Runtime assets: python or auto; unix/windows are accepted as legacy aliases for python')
|
|
107
105
|
.option('--skills <suite>', '[deprecated] Ignored; PrizmKit now always installs the full core skill suite')
|
|
108
106
|
.option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude, codex, pi, agent, agy)')
|
|
109
107
|
.option('--headless-prompt-arg <arg>', 'Prompt injection argv token for a custom AI CLI (e.g. -p or -i)')
|
|
110
108
|
.option('--headless-extra-args <args>', 'Additional headless argv tokens for a custom AI CLI')
|
|
111
|
-
.option('--pipeline', 'Enable dev-pipeline')
|
|
112
|
-
.option('--no-pipeline', 'Disable dev-pipeline')
|
|
113
109
|
.option('--non-interactive', 'Skip interactive prompts')
|
|
114
110
|
.option('--dry-run', 'Show what would change without applying')
|
|
115
111
|
.action(async (directory = '.', options) => {
|
package/bundled/VERSION.json
CHANGED
|
@@ -10,7 +10,7 @@ import path from 'path';
|
|
|
10
10
|
/**
|
|
11
11
|
* Generate Claude Code settings.json for a PrizmKit-enabled project.
|
|
12
12
|
* @param {string} targetRoot - Target project root
|
|
13
|
-
* @param {Object} options - { hooks: boolean
|
|
13
|
+
* @param {Object} options - { hooks: boolean }
|
|
14
14
|
*/
|
|
15
15
|
export async function generateSettings(targetRoot, options = {}) {
|
|
16
16
|
const settingsPath = path.join(targetRoot, '.claude', 'settings.json');
|
|
@@ -62,15 +62,10 @@ export async function generateSettings(targetRoot, options = {}) {
|
|
|
62
62
|
'Bash(./*)',
|
|
63
63
|
'Bash(bash *)',
|
|
64
64
|
'Bash(sh *)',
|
|
65
|
+
'Bash(./.prizmkit/dev-pipeline/*)',
|
|
66
|
+
'Bash(python3 .prizmkit/dev-pipeline/*)',
|
|
65
67
|
];
|
|
66
68
|
|
|
67
|
-
if (options.pipeline) {
|
|
68
|
-
prizmkitPermissions.push(
|
|
69
|
-
'Bash(./.prizmkit/dev-pipeline/*)',
|
|
70
|
-
'Bash(python3 .prizmkit/dev-pipeline/*)',
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
69
|
// Merge without duplicates
|
|
75
70
|
for (const perm of prizmkitPermissions) {
|
|
76
71
|
if (!existing.permissions.allow.includes(perm)) {
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* PrizmKit Config Command
|
|
3
3
|
*
|
|
4
4
|
* Reconfigure an existing PrizmKit installation without a full reinstall.
|
|
5
|
-
* Supports changing platform
|
|
5
|
+
* Supports changing platform and AI CLI.
|
|
6
6
|
*
|
|
7
7
|
* Flow: READ manifest → PROMPT user → COMPUTE DIFF → DISPLAY SUMMARY → EXECUTE
|
|
8
8
|
*
|
|
@@ -43,13 +43,11 @@ import {
|
|
|
43
43
|
removeSkillFiles,
|
|
44
44
|
removeAgentFiles,
|
|
45
45
|
removeRuleFiles,
|
|
46
|
-
removePipelineFiles,
|
|
47
46
|
} from './upgrade.js';
|
|
48
47
|
import { detectPlatform } from './detect-platform.js';
|
|
49
48
|
import {
|
|
50
49
|
selectPlatform,
|
|
51
50
|
selectAiCliLaunch,
|
|
52
|
-
confirmPipeline,
|
|
53
51
|
confirmAction,
|
|
54
52
|
} from './prompts.js';
|
|
55
53
|
import { canonicalizePlatformSelection, isKnownPlatform, platformLabel, privateProjectMemoryFile, projectMemoryFile, resolvePayloadPlatforms, uniquePlatforms, unknownPlatformMessage } from './platforms.js';
|
|
@@ -536,7 +534,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
536
534
|
runtime: normalizedManifestRuntime,
|
|
537
535
|
suite: rawManifestSuite,
|
|
538
536
|
rules: rawManifestRules,
|
|
539
|
-
pipeline: oldManifest.options?.pipeline ?? true,
|
|
540
537
|
aiCli: userConfig.ai_cli || oldManifest.options?.aiCli || '',
|
|
541
538
|
aiCliLaunch: storedAiCliLaunch(userConfig),
|
|
542
539
|
};
|
|
@@ -554,7 +551,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
554
551
|
console.log(` 平台: ${chalk.cyan(platformLabel(currentConfig.platform))}`);
|
|
555
552
|
console.log(` 运行时: ${chalk.cyan(runtimeLabel(currentConfig.runtime))}`);
|
|
556
553
|
console.log(` AI CLI: ${currentConfig.aiCli ? chalk.cyan(currentConfig.aiCli) : chalk.gray('(未设置)')}`);
|
|
557
|
-
console.log(` 流水线: ${currentConfig.pipeline ? chalk.green('启用') : chalk.gray('禁用')}`);
|
|
558
554
|
console.log('');
|
|
559
555
|
|
|
560
556
|
// ── Phase 2: PROMPT for new config ───────────────────────────────────────
|
|
@@ -575,10 +571,9 @@ export async function runConfig(directory, options = {}) {
|
|
|
575
571
|
&& options.runtime === undefined
|
|
576
572
|
&& options.aiCli === undefined
|
|
577
573
|
&& options.headlessPromptArg === undefined
|
|
578
|
-
&& options.headlessExtraArgs === undefined
|
|
579
|
-
&& options.pipeline === undefined) {
|
|
574
|
+
&& options.headlessExtraArgs === undefined) {
|
|
580
575
|
console.log(chalk.yellow(' ⚠ 非交互式模式下未指定任何变更。'));
|
|
581
|
-
console.log(chalk.gray(' 使用 --platform, --runtime, --ai-cli, --headless-prompt-arg, --headless-extra-args
|
|
576
|
+
console.log(chalk.gray(' 使用 --platform, --runtime, --ai-cli, --headless-prompt-arg, --headless-extra-args'));
|
|
582
577
|
return;
|
|
583
578
|
}
|
|
584
579
|
|
|
@@ -593,12 +588,11 @@ export async function runConfig(directory, options = {}) {
|
|
|
593
588
|
runtime: optionRuntime || currentConfig.runtime,
|
|
594
589
|
suite: targetSuite,
|
|
595
590
|
rules: targetRules,
|
|
596
|
-
pipeline: options.pipeline !== undefined ? options.pipeline : currentConfig.pipeline,
|
|
597
591
|
aiCli: aiCliLaunchValue.aiCli,
|
|
598
592
|
aiCliLaunch: aiCliLaunchValue.aiCliLaunch,
|
|
599
593
|
};
|
|
600
594
|
} else {
|
|
601
|
-
// Interactive: platform
|
|
595
|
+
// Interactive: platform and AI CLI only
|
|
602
596
|
const detected = detectPlatform();
|
|
603
597
|
|
|
604
598
|
try {
|
|
@@ -607,14 +601,12 @@ export async function runConfig(directory, options = {}) {
|
|
|
607
601
|
const newRuntime = optionRuntime || currentConfig.runtime;
|
|
608
602
|
const newPlatform = await selectPlatform(currentConfig.platform, detected);
|
|
609
603
|
const aiCliSelection = await selectAiCliLaunch(currentConfig.aiCli, detected, currentConfig.aiCliLaunch);
|
|
610
|
-
const newPipeline = await confirmPipeline(currentConfig.pipeline);
|
|
611
604
|
|
|
612
605
|
newConfig = {
|
|
613
606
|
platform: newPlatform,
|
|
614
607
|
runtime: newRuntime,
|
|
615
608
|
suite: targetSuite,
|
|
616
609
|
rules: targetRules,
|
|
617
|
-
pipeline: newPipeline,
|
|
618
610
|
aiCli: aiCliSelection.aiCli,
|
|
619
611
|
aiCliLaunch: aiCliSelection.aiCliLaunch,
|
|
620
612
|
};
|
|
@@ -657,9 +649,6 @@ export async function runConfig(directory, options = {}) {
|
|
|
657
649
|
if (rulesManifestNeedsNormalization) {
|
|
658
650
|
changes.push(`规则: ${currentConfig.rules} → 全部内置规则`);
|
|
659
651
|
}
|
|
660
|
-
if (newConfig.pipeline !== currentConfig.pipeline) {
|
|
661
|
-
changes.push(`流水线: ${currentConfig.pipeline ? '启用' : '禁用'} → ${newConfig.pipeline ? '启用' : '禁用'}`);
|
|
662
|
-
}
|
|
663
652
|
|
|
664
653
|
// ── Phase 4: DISPLAY SUMMARY + CONFIRM ───────────────────────────────────
|
|
665
654
|
|
|
@@ -713,7 +702,7 @@ export async function runConfig(directory, options = {}) {
|
|
|
713
702
|
const newSkillList = await resolveSkillList();
|
|
714
703
|
const rulesMeta = await loadRulesMetadata();
|
|
715
704
|
const newRuleFiles = resolveRuleNamesForRuntime(rulesMeta, newConfig.runtime).map(name => `${name}.md`);
|
|
716
|
-
const newPipelineFiles =
|
|
705
|
+
const newPipelineFiles = resolvePipelineFileList(newConfig.runtime);
|
|
717
706
|
|
|
718
707
|
// 5a. Migrate project memory before removing dropped platforms
|
|
719
708
|
for (const p of platformsToRemove) {
|
|
@@ -785,22 +774,17 @@ export async function runConfig(directory, options = {}) {
|
|
|
785
774
|
await installBuiltinRules(projectRoot, false, newConfig.runtime);
|
|
786
775
|
}
|
|
787
776
|
|
|
788
|
-
// 5e. Pipeline
|
|
789
|
-
if (newConfig.
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
await
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
if (oldPipelineFiles.length) {
|
|
800
|
-
await removePipelineFiles(projectRoot, oldPipelineFiles, false);
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
} else if (newConfig.pipeline) {
|
|
777
|
+
// 5e. Pipeline
|
|
778
|
+
if (newConfig.runtime !== currentConfig.runtime
|
|
779
|
+
|| runtimeManifestNeedsNormalization
|
|
780
|
+
|| runtimeOptionNeedsNormalization
|
|
781
|
+
|| !await fs.pathExists(path.join(projectRoot, '.prizmkit', 'dev-pipeline', 'cli.py'))) {
|
|
782
|
+
console.log(chalk.blue('\n 安装 Pipeline:'));
|
|
783
|
+
await installPipeline(projectRoot, false, {
|
|
784
|
+
runtime: newConfig.runtime,
|
|
785
|
+
previousRuntime: currentConfig.runtime,
|
|
786
|
+
});
|
|
787
|
+
} else {
|
|
804
788
|
const staleManagedPipelineFiles = await findStaleManagedPipelineFiles(projectRoot, newConfig.runtime);
|
|
805
789
|
if (staleManagedPipelineFiles.length) {
|
|
806
790
|
console.log(chalk.blue('\n 移除过期 Pipeline 框架文件:'));
|
|
@@ -867,6 +851,5 @@ export async function runConfig(directory, options = {}) {
|
|
|
867
851
|
console.log(chalk.gray(` 平台: ${platformLabel(newConfig.platform)}`));
|
|
868
852
|
console.log(chalk.gray(` 运行时: ${runtimeLabel(newConfig.runtime)}`));
|
|
869
853
|
console.log(chalk.gray(` AI CLI: ${newConfig.aiCli || '(未设置)'}`));
|
|
870
|
-
console.log(chalk.gray(` 流水线: ${newConfig.pipeline ? '启用' : '禁用'}`));
|
|
871
854
|
console.log('');
|
|
872
855
|
}
|
package/src/index.js
CHANGED
|
@@ -68,7 +68,6 @@ export async function runScaffold(directory, options = {}) {
|
|
|
68
68
|
|
|
69
69
|
// 兼容旧 --skills 参数:输出弃用警告并始终归一为 core
|
|
70
70
|
const skillSuite = normalizeSkillSuite(options.skills, { warn: true, warnOnCore: true });
|
|
71
|
-
const pipeline = options.pipeline !== false;
|
|
72
71
|
|
|
73
72
|
// === 非交互式模式 ===
|
|
74
73
|
if (options.nonInteractive) {
|
|
@@ -80,7 +79,6 @@ export async function runScaffold(directory, options = {}) {
|
|
|
80
79
|
platform: options.platform,
|
|
81
80
|
runtime: normalizeRuntime(options.runtime),
|
|
82
81
|
skills: skillSuite,
|
|
83
|
-
pipeline,
|
|
84
82
|
aiCli: options.aiCli || '',
|
|
85
83
|
aiCliLaunch: resolveAiCliLaunchSelection(options.aiCli || '', {
|
|
86
84
|
headlessPromptArg: options.headlessPromptArg,
|
|
@@ -114,7 +112,7 @@ export async function runScaffold(directory, options = {}) {
|
|
|
114
112
|
console.log(` 运行时: ${chalk.cyan(runtimeLabel(runtime))}`);
|
|
115
113
|
console.log(` 平台: ${chalk.cyan(selectedPlatformLabel)}`);
|
|
116
114
|
console.log(` 技能: ${chalk.cyan(`Core (${coreSkillCount} 个)`)}`);
|
|
117
|
-
console.log(` 流水线: ${
|
|
115
|
+
console.log(` 流水线: ${chalk.cyan('dev-pipeline')}`);
|
|
118
116
|
console.log(` 规则: ${chalk.cyan(`全部内置规则 (${ruleCount} 条)`)}`);
|
|
119
117
|
if (aiCli) console.log(` AI CLI: ${chalk.cyan(aiCli)}`);
|
|
120
118
|
console.log(` 目标目录: ${projectRoot}`);
|
|
@@ -131,7 +129,6 @@ export async function runScaffold(directory, options = {}) {
|
|
|
131
129
|
platform,
|
|
132
130
|
runtime,
|
|
133
131
|
skills: skillSuite,
|
|
134
|
-
pipeline,
|
|
135
132
|
aiCli: aiCli || '',
|
|
136
133
|
aiCliLaunch,
|
|
137
134
|
projectRoot,
|
package/src/manifest.js
CHANGED
|
@@ -18,7 +18,7 @@ const MANIFEST_FIELDS = new Set([
|
|
|
18
18
|
'version', 'installedAt', 'updatedAt', 'platform', 'runtime', 'suite',
|
|
19
19
|
'options', 'files',
|
|
20
20
|
]);
|
|
21
|
-
const MANIFEST_OPTION_FIELDS = new Set(['
|
|
21
|
+
const MANIFEST_OPTION_FIELDS = new Set(['rules', 'aiCli']);
|
|
22
22
|
const MANIFEST_FILE_FIELDS = new Set([
|
|
23
23
|
'skills', 'rules', 'pipeline', 'payloadPlatforms', 'memory',
|
|
24
24
|
]);
|
|
@@ -138,7 +138,7 @@ export async function writeManifest(projectRoot, data) {
|
|
|
138
138
|
* @param {string} params.suite - skill suite name
|
|
139
139
|
* @param {string[]} params.skills - resolved skill name list
|
|
140
140
|
* @param {string[]} params.rules - rule file names (e.g. ['prizm-documentation.md'])
|
|
141
|
-
* @param {string[]} params.pipeline - pipeline file relative paths
|
|
141
|
+
* @param {string[]} params.pipeline - pipeline file relative paths
|
|
142
142
|
* @param {string} [params.aiCli] - AI CLI command
|
|
143
143
|
* @param {string} [params.rulesPreset] - rules preset name
|
|
144
144
|
* @param {string[]} [params.payloadPlatforms] - concrete platform payloads installed for platform + aiCli
|
|
@@ -168,7 +168,6 @@ export function buildManifest({
|
|
|
168
168
|
runtime: normalizeRuntime(runtime),
|
|
169
169
|
suite,
|
|
170
170
|
options: {
|
|
171
|
-
pipeline: Array.isArray(pipeline) ? pipeline.length > 0 : Boolean(pipeline),
|
|
172
171
|
rules: rulesPreset || 'recommended',
|
|
173
172
|
aiCli: aiCli || '',
|
|
174
173
|
},
|
package/src/prompts.js
CHANGED
|
@@ -205,19 +205,6 @@ export async function selectAiCliLaunch(currentCommand, detected = {}, currentLa
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
/**
|
|
209
|
-
* Confirm pipeline setting.
|
|
210
|
-
* @param {boolean} currentValue - current pipeline value
|
|
211
|
-
* @returns {Promise<boolean>}
|
|
212
|
-
*/
|
|
213
|
-
export async function confirmPipeline(currentValue = true) {
|
|
214
|
-
const pipeline = await confirmPrompt({
|
|
215
|
-
message: '安装自动化流水线 (dev-pipeline)?',
|
|
216
|
-
default: currentValue,
|
|
217
|
-
});
|
|
218
|
-
return pipeline;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
208
|
/**
|
|
222
209
|
* Confirm an interactive install or config action.
|
|
223
210
|
* @param {string} message - prompt message
|
package/src/scaffold.js
CHANGED
|
@@ -1519,7 +1519,7 @@ export async function installGitignore(projectRoot, options = {}, dryRun) {
|
|
|
1519
1519
|
// ============================================================
|
|
1520
1520
|
|
|
1521
1521
|
const SCAFFOLD_CONFIG_FIELDS = new Set([
|
|
1522
|
-
'platform', 'runtime', 'skills', '
|
|
1522
|
+
'platform', 'runtime', 'skills', 'aiCli', 'aiCliLaunch',
|
|
1523
1523
|
'projectRoot', 'dryRun',
|
|
1524
1524
|
]);
|
|
1525
1525
|
|
|
@@ -1529,7 +1529,6 @@ const SCAFFOLD_CONFIG_FIELDS = new Set([
|
|
|
1529
1529
|
* @param {string} config.platform - 'codebuddy' | 'claude' | 'codex' | 'pi' | 'cursor' | 'antigravity' | 'all' | comma-separated subset
|
|
1530
1530
|
* @param {string} [config.runtime] - 'python' (legacy aliases accepted: 'unix' | 'windows')
|
|
1531
1531
|
* @param {string} [config.skills] - sole supported suite is 'core' (legacy values warn and normalize to 'core')
|
|
1532
|
-
* @param {boolean} config.pipeline - 是否安装 dev-pipeline
|
|
1533
1532
|
* @param {string} [config.aiCli] - AI CLI 可执行命令(写入 .prizmkit/config.json)
|
|
1534
1533
|
* @param {string} config.projectRoot - 目标项目根目录
|
|
1535
1534
|
* @param {boolean} config.dryRun - 是否为预览模式
|
|
@@ -1544,7 +1543,7 @@ export async function scaffold(config) {
|
|
|
1544
1543
|
if (unknownFields.length) {
|
|
1545
1544
|
throw new TypeError(`scaffold config has unknown fields: ${unknownFields.join(', ')}`);
|
|
1546
1545
|
}
|
|
1547
|
-
const { platform, skills,
|
|
1546
|
+
const { platform, skills, aiCli, aiCliLaunch, projectRoot, dryRun } = config;
|
|
1548
1547
|
const normalizedSuite = normalizeSkillSuite(skills, { warn: true, warnOnCore: false });
|
|
1549
1548
|
const runtime = normalizeRuntime(config.runtime);
|
|
1550
1549
|
const launchSelection = resolveAiCliLaunchSelection(aiCli || '', {
|
|
@@ -1608,12 +1607,9 @@ export async function scaffold(config) {
|
|
|
1608
1607
|
});
|
|
1609
1608
|
|
|
1610
1609
|
// 6. Pipeline
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
installedPipelineFiles = await installPipeline(projectRoot, dryRun, { runtime }) || [];
|
|
1615
|
-
console.log('');
|
|
1616
|
-
}
|
|
1610
|
+
console.log(chalk.blue(' 自动化流水线:'));
|
|
1611
|
+
const installedPipelineFiles = await installPipeline(projectRoot, dryRun, { runtime }) || [];
|
|
1612
|
+
console.log('');
|
|
1617
1613
|
|
|
1618
1614
|
// 7. .gitignore
|
|
1619
1615
|
console.log(chalk.blue(' 项目配置:'));
|
|
@@ -1717,11 +1713,8 @@ export async function scaffold(config) {
|
|
|
1717
1713
|
? '输入 "/prizmkit-init"'
|
|
1718
1714
|
: '说 "/prizmkit-init"';
|
|
1719
1715
|
console.log(` 3. ${chalk.cyan(initInstruction)} ${chalk.gray('# 初始化项目上下文')}`);
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
console.log(` 4. ${chalk.cyan('说 "规划一个应用"')} ${chalk.gray('# 生成 feature-list.json')}`);
|
|
1723
|
-
console.log(` 5. ${chalk.cyan('说 "启动流水线"')} ${chalk.gray('# 开始自动开发')}`);
|
|
1724
|
-
}
|
|
1716
|
+
console.log(` 4. ${chalk.cyan('说 "规划一个应用"')} ${chalk.gray('# 生成 feature-list.json')}`);
|
|
1717
|
+
console.log(` 5. ${chalk.cyan('说 "启动流水线"')} ${chalk.gray('# 开始自动开发')}`);
|
|
1725
1718
|
|
|
1726
1719
|
console.log('');
|
|
1727
1720
|
|
|
@@ -1733,7 +1726,7 @@ export async function scaffold(config) {
|
|
|
1733
1726
|
console.log(chalk.gray(` AI CLI 载荷平台: ${payloadPlatforms.map(platformLabel).join(' + ')}`));
|
|
1734
1727
|
}
|
|
1735
1728
|
console.log(chalk.gray(` 运行时: ${runtimeLabel(runtime)}`));
|
|
1736
|
-
console.log(chalk.gray(` 流水线:
|
|
1729
|
+
console.log(chalk.gray(` 流水线: 已安装`));
|
|
1737
1730
|
console.log(chalk.gray(` 规则: 全部内置规则`));
|
|
1738
1731
|
if (resolvedAiCli) console.log(chalk.gray(` AI CLI: ${resolvedAiCli}`));
|
|
1739
1732
|
console.log('');
|
package/src/upgrade.js
CHANGED
|
@@ -339,7 +339,6 @@ export async function runUpgrade(directory, options = {}) {
|
|
|
339
339
|
// 3. Resolve new skill list and built-in rules (migrating legacy minimal suites/presets)
|
|
340
340
|
const suite = 'core';
|
|
341
341
|
const runtime = normalizeRuntime(oldManifest?.runtime);
|
|
342
|
-
const pipeline = oldManifest?.options?.pipeline ?? true;
|
|
343
342
|
const rulesPreset = 'recommended';
|
|
344
343
|
const aiCli = userConfig.ai_cli || oldManifest?.options?.aiCli || '';
|
|
345
344
|
|
|
@@ -389,7 +388,7 @@ export async function runUpgrade(directory, options = {}) {
|
|
|
389
388
|
const newRuleFiles = resolveRuleNamesForRuntime(rulesMeta, runtime).map(name => `${name}.md`);
|
|
390
389
|
|
|
391
390
|
// Resolve pipeline file list from source (for manifest diff)
|
|
392
|
-
const newPipelineFiles =
|
|
391
|
+
const newPipelineFiles = resolvePipelineFileList(runtime);
|
|
393
392
|
|
|
394
393
|
const payloadPlatforms = resolvePayloadPlatforms(platform, aiCli);
|
|
395
394
|
|
|
@@ -414,10 +413,8 @@ export async function runUpgrade(directory, options = {}) {
|
|
|
414
413
|
|
|
415
414
|
const diff = oldManifest ? diffManifest(oldManifest, newManifest) : { skills: { added: [], removed: [] }, rules: { added: [], removed: [] }, pipeline: { added: [], removed: [] } };
|
|
416
415
|
const removedPipelineSet = new Set(diff.pipeline.removed);
|
|
417
|
-
const staleManagedPipelineFiles =
|
|
418
|
-
|
|
419
|
-
.filter(file => !removedPipelineSet.has(file))
|
|
420
|
-
: [];
|
|
416
|
+
const staleManagedPipelineFiles = (await findStaleManagedPipelineFiles(projectRoot, runtime))
|
|
417
|
+
.filter(file => !removedPipelineSet.has(file));
|
|
421
418
|
|
|
422
419
|
// 5. Display upgrade summary
|
|
423
420
|
const oldVersion = oldManifest?.version || 'unknown';
|
|
@@ -511,11 +508,9 @@ export async function runUpgrade(directory, options = {}) {
|
|
|
511
508
|
console.log('');
|
|
512
509
|
|
|
513
510
|
// Pipeline (with forceOverwrite)
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
console.log('');
|
|
518
|
-
}
|
|
511
|
+
console.log(chalk.blue(' Pipeline:'));
|
|
512
|
+
await installPipeline(projectRoot, dryRun, { forceOverwrite: true, runtime });
|
|
513
|
+
console.log('');
|
|
519
514
|
|
|
520
515
|
// Git hook
|
|
521
516
|
console.log(chalk.blue(' Git Hook:'));
|