@liangjie559567/ultrapower 5.4.2 → 5.4.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.
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "ultrapower",
|
|
10
10
|
"description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution",
|
|
11
|
-
"version": "5.4.
|
|
11
|
+
"version": "5.4.3",
|
|
12
12
|
"source": {
|
|
13
13
|
"source": "npm",
|
|
14
14
|
"package": "@liangjie559567/ultrapower",
|
|
15
|
-
"version": "5.4.
|
|
15
|
+
"version": "5.4.3"
|
|
16
16
|
},
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "liangjie559567"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultrapower",
|
|
3
3
|
"description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution. Combines superpowers' TDD/debugging discipline with OMC's multi-agent execution capabilities.",
|
|
4
|
-
"version": "5.4.
|
|
4
|
+
"version": "5.4.3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "liangjie559567"
|
|
7
7
|
},
|
package/package.json
CHANGED
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -235,6 +235,8 @@ function fixMissingPluginJson() {
|
|
|
235
235
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
236
236
|
const version = pkg.version || '0.0.0';
|
|
237
237
|
|
|
238
|
+
// Only include metadata fields — no component paths (hooks, agents, skills, commands, mcpServers)
|
|
239
|
+
// which cause Zod validation errors in Claude Code's plugin manifest validator.
|
|
238
240
|
const pluginJson = {
|
|
239
241
|
name: 'ultrapower',
|
|
240
242
|
description: pkg.description || '',
|
|
@@ -244,22 +246,32 @@ function fixMissingPluginJson() {
|
|
|
244
246
|
repository: pkg.repository?.url || pkg.repository || '',
|
|
245
247
|
license: pkg.license || 'MIT',
|
|
246
248
|
keywords: pkg.keywords || [],
|
|
247
|
-
skills: './skills/',
|
|
248
|
-
mcpServers: './.mcp.json'
|
|
249
249
|
};
|
|
250
250
|
const pluginJsonStr = JSON.stringify(pluginJson, null, 2);
|
|
251
251
|
|
|
252
|
+
// Fields that cause validation errors if present — used to detect and repair bad cache entries
|
|
253
|
+
const INVALID_FIELDS = ['hooks', 'agents', 'skills', 'commands', 'mcpServers'];
|
|
254
|
+
function hasInvalidFields(jsonPath) {
|
|
255
|
+
try {
|
|
256
|
+
const content = JSON.parse(readFileSync(jsonPath, 'utf-8'));
|
|
257
|
+
return INVALID_FIELDS.some(f => f in content);
|
|
258
|
+
} catch { return false; }
|
|
259
|
+
}
|
|
260
|
+
|
|
252
261
|
// 1. Write to current install location (npm-cache node_modules dir)
|
|
262
|
+
// Also overwrite if existing file contains invalid component path fields.
|
|
253
263
|
const localPluginJsonDir = join(pluginRoot, '.claude-plugin');
|
|
254
264
|
const localPluginJsonPath = join(localPluginJsonDir, 'plugin.json');
|
|
255
|
-
if (!existsSync(localPluginJsonPath)) {
|
|
265
|
+
if (!existsSync(localPluginJsonPath) || hasInvalidFields(localPluginJsonPath)) {
|
|
256
266
|
mkdirSync(localPluginJsonDir, { recursive: true });
|
|
257
267
|
writeFileSync(localPluginJsonPath, pluginJsonStr);
|
|
258
|
-
console.log('[OMC]
|
|
268
|
+
console.log('[OMC] Wrote clean .claude-plugin/plugin.json in install dir');
|
|
259
269
|
}
|
|
260
270
|
|
|
261
|
-
// 2. Write directly to plugin cache (marketplace:
|
|
271
|
+
// 2. Write directly to plugin cache (marketplace: omc, plugin: ultrapower)
|
|
262
272
|
// Claude Code copies from npm-cache but skips hidden dirs, so we patch the cache directly.
|
|
273
|
+
// Also overwrite any existing cache entries that contain invalid component path fields
|
|
274
|
+
// left over from older versions of this script.
|
|
263
275
|
const pluginCacheBase = join(CLAUDE_DIR, 'plugins/cache/omc/ultrapower');
|
|
264
276
|
if (existsSync(pluginCacheBase)) {
|
|
265
277
|
const versions = readdirSync(pluginCacheBase);
|
|
@@ -267,12 +279,12 @@ function fixMissingPluginJson() {
|
|
|
267
279
|
const cacheVersionDir = join(pluginCacheBase, v);
|
|
268
280
|
const cachePluginJsonDir = join(cacheVersionDir, '.claude-plugin');
|
|
269
281
|
const cachePluginJsonPath = join(cachePluginJsonDir, 'plugin.json');
|
|
270
|
-
if (!existsSync(cachePluginJsonPath)) {
|
|
282
|
+
if (!existsSync(cachePluginJsonPath) || hasInvalidFields(cachePluginJsonPath)) {
|
|
271
283
|
mkdirSync(cachePluginJsonDir, { recursive: true });
|
|
272
284
|
// Use version-specific content for each cached version
|
|
273
285
|
const versionedPkg = { ...pluginJson, version: v };
|
|
274
286
|
writeFileSync(cachePluginJsonPath, JSON.stringify(versionedPkg, null, 2));
|
|
275
|
-
console.log(`[OMC]
|
|
287
|
+
console.log(`[OMC] Wrote clean .claude-plugin/plugin.json in plugin cache v${v}`);
|
|
276
288
|
}
|
|
277
289
|
}
|
|
278
290
|
}
|