@liangjie559567/ultrapower 5.0.18 → 5.0.20
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/.claude-plugin/plugin.json +1 -1
- package/docs/CLAUDE.md +1 -1
- package/package.json +1 -1
- package/scripts/plugin-setup.mjs +46 -11
|
@@ -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.0.
|
|
4
|
+
"version": "5.0.20",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jesse Vincent & oh-my-claudecode contributors"
|
|
7
7
|
},
|
package/docs/CLAUDE.md
CHANGED
package/package.json
CHANGED
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -19,9 +19,12 @@ const SETTINGS_FILE = join(CLAUDE_DIR, 'settings.json');
|
|
|
19
19
|
|
|
20
20
|
console.log('[OMC] Running post-install setup...');
|
|
21
21
|
|
|
22
|
-
// Fix: flatten nested cache directories caused by
|
|
23
|
-
//
|
|
24
|
-
//
|
|
22
|
+
// Fix: flatten nested cache directories caused by Claude Code installer bug.
|
|
23
|
+
// Root cause: xF6(src, dest) copies src contents to dest, but dest is a subdirectory of src.
|
|
24
|
+
// After mkdir -p dest, readdir(src) includes the newly created dest subdir, causing recursive copy.
|
|
25
|
+
// Result: cache/.../VERSION/ultrapower/VERSION/ultrapower/VERSION/... infinite nesting.
|
|
26
|
+
// This function detects and fixes arbitrary-depth nesting by finding the real plugin content
|
|
27
|
+
// and moving it up to the version directory, then removing all nested dirs.
|
|
25
28
|
function fixNestedCacheDir() {
|
|
26
29
|
try {
|
|
27
30
|
const pluginCacheBase = join(CLAUDE_DIR, 'plugins/cache/ultrapower/ultrapower');
|
|
@@ -31,19 +34,51 @@ function fixNestedCacheDir() {
|
|
|
31
34
|
const versionDir = join(pluginCacheBase, version);
|
|
32
35
|
const nestedDir = join(versionDir, 'ultrapower');
|
|
33
36
|
if (!existsSync(nestedDir)) continue;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
|
|
38
|
+
// Walk down the nesting to find the real plugin content (arbitrary depth)
|
|
39
|
+
// Real content has skills/, dist/, agents/, or hooks/ directly inside
|
|
40
|
+
const PLUGIN_MARKERS = ['skills', 'dist', 'agents', 'hooks'];
|
|
41
|
+
let realContentDir = null;
|
|
42
|
+
let searchDir = nestedDir;
|
|
43
|
+
let depth = 0;
|
|
44
|
+
while (depth < 20) {
|
|
45
|
+
const contents = readdirSync(searchDir);
|
|
46
|
+
if (contents.length === 0) {
|
|
47
|
+
// Empty dir - just remove it
|
|
48
|
+
rmSync(nestedDir, { recursive: true, force: true });
|
|
49
|
+
console.log(`[OMC] Removed empty nested dir for version ${version}`);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
if (contents.some(f => PLUGIN_MARKERS.includes(f))) {
|
|
53
|
+
realContentDir = searchDir;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
// Go deeper: look for ultrapower/ or version/ subdir
|
|
57
|
+
const nextDir = join(searchDir, 'ultrapower');
|
|
58
|
+
const nextVerDir = join(searchDir, version);
|
|
59
|
+
if (existsSync(nextDir)) {
|
|
60
|
+
searchDir = nextDir;
|
|
61
|
+
} else if (existsSync(nextVerDir)) {
|
|
62
|
+
searchDir = nextVerDir;
|
|
63
|
+
} else {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
depth++;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!realContentDir) continue;
|
|
70
|
+
|
|
71
|
+
console.log(`[OMC] Fixing nested cache dir for version ${version} (depth ${depth})...`);
|
|
72
|
+
// Move contents of realContentDir up to versionDir
|
|
73
|
+
const realContents = readdirSync(realContentDir);
|
|
74
|
+
for (const item of realContents) {
|
|
75
|
+
const src = join(realContentDir, item);
|
|
42
76
|
const dest = join(versionDir, item);
|
|
43
77
|
if (!existsSync(dest)) {
|
|
44
78
|
renameSync(src, dest);
|
|
45
79
|
}
|
|
46
80
|
}
|
|
81
|
+
// Remove the entire nested ultrapower/ subtree
|
|
47
82
|
rmSync(nestedDir, { recursive: true, force: true });
|
|
48
83
|
console.log(`[OMC] Fixed nested cache dir for version ${version}`);
|
|
49
84
|
}
|