prizmkit 1.1.26 → 1.1.27
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/bundled/VERSION.json +3 -3
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
- package/src/upgrade.js +18 -11
package/bundled/VERSION.json
CHANGED
package/package.json
CHANGED
package/src/upgrade.js
CHANGED
|
@@ -198,17 +198,24 @@ export async function runUpgrade(directory, options = {}) {
|
|
|
198
198
|
const rulesPreset = oldManifest?.options?.rules || 'recommended';
|
|
199
199
|
const aiCli = userConfig.ai_cli || oldManifest?.options?.aiCli || '';
|
|
200
200
|
|
|
201
|
-
//
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
const hasCodeBuddy = await fs.pathExists(path.join(projectRoot, '.codebuddy', 'skills'))
|
|
205
|
-
|| await fs.pathExists(path.join(projectRoot, '.codebuddy', 'agents'));
|
|
206
|
-
|
|
201
|
+
// Platform detection: manifest is the source of truth (set by install/config).
|
|
202
|
+
// Filesystem detection is only used as fallback when manifest has no platform field
|
|
203
|
+
// (e.g. legacy installs before manifest tracked platform).
|
|
207
204
|
let platform;
|
|
208
|
-
if (
|
|
209
|
-
|
|
210
|
-
else
|
|
211
|
-
|
|
205
|
+
if (oldManifest?.platform) {
|
|
206
|
+
platform = oldManifest.platform;
|
|
207
|
+
} else {
|
|
208
|
+
// Fallback: detect from filesystem for legacy manifests without platform field
|
|
209
|
+
const hasClaude = await fs.pathExists(path.join(projectRoot, '.claude', 'commands'))
|
|
210
|
+
|| await fs.pathExists(path.join(projectRoot, '.claude', 'agents'));
|
|
211
|
+
const hasCodeBuddy = await fs.pathExists(path.join(projectRoot, '.codebuddy', 'skills'))
|
|
212
|
+
|| await fs.pathExists(path.join(projectRoot, '.codebuddy', 'agents'));
|
|
213
|
+
|
|
214
|
+
if (hasClaude && hasCodeBuddy) platform = 'both';
|
|
215
|
+
else if (hasCodeBuddy) platform = 'codebuddy';
|
|
216
|
+
else if (hasClaude) platform = 'claude';
|
|
217
|
+
else platform = 'claude'; // ultimate fallback
|
|
218
|
+
}
|
|
212
219
|
|
|
213
220
|
const newSkillList = await resolveSkillList(suite);
|
|
214
221
|
const agentsDir = getAgentsDir();
|
|
@@ -253,7 +260,7 @@ export async function runUpgrade(directory, options = {}) {
|
|
|
253
260
|
const oldVersion = oldManifest?.version || 'unknown';
|
|
254
261
|
console.log(chalk.bold(' Upgrade Summary:'));
|
|
255
262
|
console.log(` Version: ${chalk.gray(oldVersion)} → ${chalk.cyan(pkg.version)}`);
|
|
256
|
-
console.log(` Platform: ${platform}${platform
|
|
263
|
+
console.log(` Platform: ${platform}${!oldManifest?.platform ? chalk.yellow(' (detected from filesystem — no platform in manifest)') : ''}`);
|
|
257
264
|
console.log(` Suite: ${suite}`);
|
|
258
265
|
console.log('');
|
|
259
266
|
|