@liangjie559567/ultrapower 5.4.3 → 5.4.5
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.5",
|
|
12
12
|
"source": {
|
|
13
13
|
"source": "npm",
|
|
14
14
|
"package": "@liangjie559567/ultrapower",
|
|
15
|
-
"version": "5.4.
|
|
15
|
+
"version": "5.4.5"
|
|
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.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "liangjie559567"
|
|
7
7
|
},
|
package/package.json
CHANGED
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -235,8 +235,13 @@ function fixMissingPluginJson() {
|
|
|
235
235
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
236
236
|
const version = pkg.version || '0.0.0';
|
|
237
237
|
|
|
238
|
-
//
|
|
239
|
-
//
|
|
238
|
+
// Metadata-only plugin manifest. Per the Claude Code plugin schema:
|
|
239
|
+
// - hooks/hooks.json is auto-discovered from the hooks/ directory
|
|
240
|
+
// - agents/ directory is auto-discovered automatically
|
|
241
|
+
// - The 'hooks' field is only for ADDITIONAL hooks files (must end with .json)
|
|
242
|
+
// - The 'agents' field is only for ADDITIONAL individual agent .md files (must end with .md)
|
|
243
|
+
// Declaring hooks/agents directory paths here causes Zod validation failures because
|
|
244
|
+
// the schema expects .md files for agents and .json files for hooks, NOT directory paths.
|
|
240
245
|
const pluginJson = {
|
|
241
246
|
name: 'ultrapower',
|
|
242
247
|
description: pkg.description || '',
|
|
@@ -249,29 +254,34 @@ function fixMissingPluginJson() {
|
|
|
249
254
|
};
|
|
250
255
|
const pluginJsonStr = JSON.stringify(pluginJson, null, 2);
|
|
251
256
|
|
|
252
|
-
//
|
|
253
|
-
|
|
254
|
-
|
|
257
|
+
// Detect cache entries that need repair:
|
|
258
|
+
// - Old invalid inline object/array formats from v5.3.x (hooks as object, agents as array)
|
|
259
|
+
// - Old invalid path formats from v5.4.1-v5.4.4 (agents as directory path like './agents/')
|
|
260
|
+
// NOTE: Missing hooks/agents fields is NOT a problem — auto-discovery handles them.
|
|
261
|
+
function needsRepair(jsonPath) {
|
|
255
262
|
try {
|
|
256
263
|
const content = JSON.parse(readFileSync(jsonPath, 'utf-8'));
|
|
257
|
-
|
|
264
|
+
// agents must NOT be a directory path (./agents/ fails r48() which requires .md files)
|
|
265
|
+
if (content.agents && (typeof content.agents !== 'string' || !content.agents.endsWith('.md'))) return true;
|
|
266
|
+
// hooks must NOT be an object/array (inline format is invalid; string path or absent is OK)
|
|
267
|
+
if (content.hooks && typeof content.hooks === 'object') return true;
|
|
268
|
+
return false;
|
|
258
269
|
} catch { return false; }
|
|
259
270
|
}
|
|
260
271
|
|
|
261
272
|
// 1. Write to current install location (npm-cache node_modules dir)
|
|
262
|
-
// Also overwrite if existing file
|
|
273
|
+
// Also overwrite if existing file has missing or incorrectly formatted component paths.
|
|
263
274
|
const localPluginJsonDir = join(pluginRoot, '.claude-plugin');
|
|
264
275
|
const localPluginJsonPath = join(localPluginJsonDir, 'plugin.json');
|
|
265
|
-
if (!existsSync(localPluginJsonPath) ||
|
|
276
|
+
if (!existsSync(localPluginJsonPath) || needsRepair(localPluginJsonPath)) {
|
|
266
277
|
mkdirSync(localPluginJsonDir, { recursive: true });
|
|
267
278
|
writeFileSync(localPluginJsonPath, pluginJsonStr);
|
|
268
|
-
console.log('[OMC] Wrote
|
|
279
|
+
console.log('[OMC] Wrote .claude-plugin/plugin.json with correct component paths in install dir');
|
|
269
280
|
}
|
|
270
281
|
|
|
271
282
|
// 2. Write directly to plugin cache (marketplace: omc, plugin: ultrapower)
|
|
272
283
|
// Claude Code copies from npm-cache but skips hidden dirs, so we patch the cache directly.
|
|
273
|
-
// Also
|
|
274
|
-
// left over from older versions of this script.
|
|
284
|
+
// Also repair any existing cache entries with missing or invalid component path formats.
|
|
275
285
|
const pluginCacheBase = join(CLAUDE_DIR, 'plugins/cache/omc/ultrapower');
|
|
276
286
|
if (existsSync(pluginCacheBase)) {
|
|
277
287
|
const versions = readdirSync(pluginCacheBase);
|
|
@@ -279,12 +289,12 @@ function fixMissingPluginJson() {
|
|
|
279
289
|
const cacheVersionDir = join(pluginCacheBase, v);
|
|
280
290
|
const cachePluginJsonDir = join(cacheVersionDir, '.claude-plugin');
|
|
281
291
|
const cachePluginJsonPath = join(cachePluginJsonDir, 'plugin.json');
|
|
282
|
-
if (!existsSync(cachePluginJsonPath) ||
|
|
292
|
+
if (!existsSync(cachePluginJsonPath) || needsRepair(cachePluginJsonPath)) {
|
|
283
293
|
mkdirSync(cachePluginJsonDir, { recursive: true });
|
|
284
294
|
// Use version-specific content for each cached version
|
|
285
295
|
const versionedPkg = { ...pluginJson, version: v };
|
|
286
296
|
writeFileSync(cachePluginJsonPath, JSON.stringify(versionedPkg, null, 2));
|
|
287
|
-
console.log(`[OMC] Wrote
|
|
297
|
+
console.log(`[OMC] Wrote .claude-plugin/plugin.json with correct component paths in plugin cache v${v}`);
|
|
288
298
|
}
|
|
289
299
|
}
|
|
290
300
|
}
|