@liangjie559567/ultrapower 5.0.16 → 5.0.17
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.
|
@@ -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.17",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jesse Vincent & oh-my-claudecode contributors"
|
|
7
7
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liangjie559567/ultrapower",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.17",
|
|
4
4
|
"description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"sync-metadata:verify": "tsx scripts/sync-metadata.ts --verify",
|
|
56
56
|
"sync-metadata:dry-run": "tsx scripts/sync-metadata.ts --dry-run",
|
|
57
57
|
"prepare": "npm run build",
|
|
58
|
-
"prepublishOnly": "npm run build && npm run compose-docs"
|
|
58
|
+
"prepublishOnly": "npm run build && npm run compose-docs",
|
|
59
|
+
"postinstall": "node scripts/plugin-setup.mjs"
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
62
|
"@anthropic-ai/claude-agent-sdk": "^0.1.0",
|
package/scripts/plugin-setup.mjs
CHANGED
|
@@ -54,6 +54,66 @@ function fixNestedCacheDir() {
|
|
|
54
54
|
|
|
55
55
|
fixNestedCacheDir();
|
|
56
56
|
|
|
57
|
+
// Fix: npm install strips hidden directories (starting with '.'), so .claude-plugin/plugin.json
|
|
58
|
+
// is never extracted to the plugin cache. We recreate it directly in the plugin cache.
|
|
59
|
+
// The postinstall script runs from the npm-cache node_modules dir, so we must target the
|
|
60
|
+
// plugin cache path explicitly rather than relying on __dirname.
|
|
61
|
+
function fixMissingPluginJson() {
|
|
62
|
+
try {
|
|
63
|
+
const pluginRoot = dirname(__dirname);
|
|
64
|
+
const pkgPath = join(pluginRoot, 'package.json');
|
|
65
|
+
if (!existsSync(pkgPath)) return;
|
|
66
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
67
|
+
const version = pkg.version || '0.0.0';
|
|
68
|
+
|
|
69
|
+
const pluginJson = {
|
|
70
|
+
name: 'ultrapower',
|
|
71
|
+
description: pkg.description || '',
|
|
72
|
+
version,
|
|
73
|
+
author: pkg.author ? { name: typeof pkg.author === 'string' ? pkg.author : pkg.author.name } : undefined,
|
|
74
|
+
homepage: pkg.homepage || '',
|
|
75
|
+
repository: pkg.repository?.url || pkg.repository || '',
|
|
76
|
+
license: pkg.license || 'MIT',
|
|
77
|
+
keywords: pkg.keywords || [],
|
|
78
|
+
skills: './skills/',
|
|
79
|
+
mcpServers: './.mcp.json'
|
|
80
|
+
};
|
|
81
|
+
const pluginJsonStr = JSON.stringify(pluginJson, null, 2);
|
|
82
|
+
|
|
83
|
+
// 1. Write to current install location (npm-cache node_modules dir)
|
|
84
|
+
const localPluginJsonDir = join(pluginRoot, '.claude-plugin');
|
|
85
|
+
const localPluginJsonPath = join(localPluginJsonDir, 'plugin.json');
|
|
86
|
+
if (!existsSync(localPluginJsonPath)) {
|
|
87
|
+
mkdirSync(localPluginJsonDir, { recursive: true });
|
|
88
|
+
writeFileSync(localPluginJsonPath, pluginJsonStr);
|
|
89
|
+
console.log('[OMC] Created .claude-plugin/plugin.json in install dir');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 2. Write directly to plugin cache (marketplace: ultrapower, plugin: ultrapower)
|
|
93
|
+
// Claude Code copies from npm-cache but skips hidden dirs, so we patch the cache directly.
|
|
94
|
+
const pluginCacheBase = join(CLAUDE_DIR, 'plugins/cache/ultrapower/ultrapower');
|
|
95
|
+
if (existsSync(pluginCacheBase)) {
|
|
96
|
+
const versions = readdirSync(pluginCacheBase);
|
|
97
|
+
for (const v of versions) {
|
|
98
|
+
const cacheVersionDir = join(pluginCacheBase, v);
|
|
99
|
+
const cachePluginJsonDir = join(cacheVersionDir, '.claude-plugin');
|
|
100
|
+
const cachePluginJsonPath = join(cachePluginJsonDir, 'plugin.json');
|
|
101
|
+
if (!existsSync(cachePluginJsonPath)) {
|
|
102
|
+
mkdirSync(cachePluginJsonDir, { recursive: true });
|
|
103
|
+
// Use version-specific content for each cached version
|
|
104
|
+
const versionedPkg = { ...pluginJson, version: v };
|
|
105
|
+
writeFileSync(cachePluginJsonPath, JSON.stringify(versionedPkg, null, 2));
|
|
106
|
+
console.log(`[OMC] Created .claude-plugin/plugin.json in plugin cache v${v}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
} catch (e) {
|
|
111
|
+
console.log('[OMC] Warning: Could not create .claude-plugin/plugin.json:', e.message);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
fixMissingPluginJson();
|
|
116
|
+
|
|
57
117
|
// 1. Create HUD directory
|
|
58
118
|
if (!existsSync(HUD_DIR)) {
|
|
59
119
|
mkdirSync(HUD_DIR, { recursive: true });
|
package/skills/release/SKILL.md
CHANGED
|
@@ -20,13 +20,16 @@ description: ultrapower 的自动化发布工作流
|
|
|
20
20
|
按顺序执行以下步骤:
|
|
21
21
|
|
|
22
22
|
### 1. 版本升级
|
|
23
|
-
|
|
23
|
+
在所有位置更新版本(**必须同步,缺一不可**):
|
|
24
24
|
- `package.json`
|
|
25
25
|
- `src/installer/index.ts`(VERSION 常量)
|
|
26
26
|
- `src/__tests__/installer.test.ts`(预期版本)
|
|
27
27
|
- `.claude-plugin/plugin.json`
|
|
28
|
+
- `.claude-plugin/marketplace.json`(`"version"` 和 `"source.version"` 两处)
|
|
28
29
|
- `README.md`(版本徽章和标题)
|
|
29
30
|
|
|
31
|
+
> ⚠️ `marketplace.json` 是安装器读取的入口,版本不同步会导致用户始终安装旧版本。
|
|
32
|
+
|
|
30
33
|
### 2. 运行测试
|
|
31
34
|
```bash
|
|
32
35
|
npm run test:run
|
|
@@ -46,17 +49,24 @@ git push origin main
|
|
|
46
49
|
git push origin v<version>
|
|
47
50
|
```
|
|
48
51
|
|
|
49
|
-
### 5.
|
|
52
|
+
### 5. 刷新本地 marketplace 缓存
|
|
53
|
+
```bash
|
|
54
|
+
claude plugin marketplace update ultrapower
|
|
55
|
+
```
|
|
56
|
+
> 推送到 GitHub 后必须执行此步,否则本地安装器仍读取旧版 `marketplace.json`。
|
|
57
|
+
|
|
58
|
+
### 6. 发布到 npm
|
|
50
59
|
```bash
|
|
51
60
|
npm publish --access public
|
|
52
61
|
```
|
|
62
|
+
> ⚠️ npm 不允许覆盖已发布版本,版本号必须先升级再发布。
|
|
53
63
|
|
|
54
|
-
###
|
|
64
|
+
### 7. 创建 GitHub Release
|
|
55
65
|
```bash
|
|
56
66
|
gh release create v<version> --title "v<version> - <title>" --notes "<release notes>"
|
|
57
67
|
```
|
|
58
68
|
|
|
59
|
-
###
|
|
69
|
+
### 8. 验证
|
|
60
70
|
- [ ] npm: https://www.npmjs.com/package/@liangjie559567/ultrapower
|
|
61
71
|
- [ ] GitHub: https://github.com/liangjie559567/ultrapower/releases
|
|
62
72
|
|
|
@@ -68,6 +78,7 @@ gh release create v<version> --title "v<version> - <title>" --notes "<release no
|
|
|
68
78
|
| `src/installer/index.ts` | `export const VERSION = 'X.Y.Z'` |
|
|
69
79
|
| `src/__tests__/installer.test.ts` | `expect(VERSION).toBe('X.Y.Z')` |
|
|
70
80
|
| `.claude-plugin/plugin.json` | `"version": "X.Y.Z"` |
|
|
81
|
+
| `.claude-plugin/marketplace.json` | `"version": "X.Y.Z"` 和 `"source": { "version": "X.Y.Z" }` |
|
|
71
82
|
| `README.md` | 标题 + 版本徽章 |
|
|
72
83
|
|
|
73
84
|
## 语义化版本
|
|
@@ -80,7 +91,70 @@ gh release create v<version> --title "v<version> - <title>" --notes "<release no
|
|
|
80
91
|
|
|
81
92
|
- 发布前始终运行测试
|
|
82
93
|
- 创建总结变更的发布说明
|
|
83
|
-
-
|
|
94
|
+
- 推送到 GitHub 后必须运行 `claude plugin marketplace update ultrapower` 刷新本地缓存
|
|
95
|
+
- npm 不允许覆盖已发布版本,每次发布前必须升级版本号
|
|
96
|
+
- `.npmignore` 必须排除缓存目录(`ultrapower/`、`*.tgz`、`.claude/`),防止安装时产生无限嵌套
|
|
97
|
+
|
|
98
|
+
## .npmignore 必要内容
|
|
99
|
+
|
|
100
|
+
发布前确认 `.npmignore` 包含以下排除项:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
# 防止缓存目录被打包(会导致安装时无限嵌套)
|
|
104
|
+
ultrapower/
|
|
105
|
+
.claude/
|
|
106
|
+
plugins/cache/
|
|
107
|
+
*.tgz
|
|
108
|
+
*.tar.gz
|
|
109
|
+
node_modules/
|
|
110
|
+
.git/
|
|
111
|
+
dist/
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 故障排查
|
|
115
|
+
|
|
116
|
+
### 安装后 skill 无法识别
|
|
117
|
+
|
|
118
|
+
检查插件缓存路径是否正确:
|
|
119
|
+
```bash
|
|
120
|
+
ls ~/.claude/plugins/cache/ultrapower/ultrapower/<version>/skills/
|
|
121
|
+
```
|
|
122
|
+
正确路径应直接包含 `skills/`、`dist/` 等目录。
|
|
123
|
+
|
|
124
|
+
### 缓存目录无限嵌套
|
|
125
|
+
|
|
126
|
+
症状:`cache/ultrapower/ultrapower/5.x.x/ultrapower/5.x.x/ultrapower/...`
|
|
127
|
+
|
|
128
|
+
原因:npm 包中包含了 `ultrapower/` 子目录(通常是缓存目录被打包进去)。
|
|
129
|
+
|
|
130
|
+
修复步骤:
|
|
131
|
+
```bash
|
|
132
|
+
# 1. 卸载插件
|
|
133
|
+
claude plugin uninstall ultrapower
|
|
134
|
+
|
|
135
|
+
# 2. 清除缓存
|
|
136
|
+
rm -rf ~/.claude/plugins/cache/ultrapower
|
|
137
|
+
rm -rf ~/.claude/plugins/marketplaces/ultrapower
|
|
138
|
+
|
|
139
|
+
# 3. 确认 .npmignore 已排除 ultrapower/ 目录
|
|
140
|
+
|
|
141
|
+
# 4. 重新发布(需升级版本号)
|
|
142
|
+
npm publish --access public
|
|
143
|
+
|
|
144
|
+
# 5. 重新安装
|
|
145
|
+
claude plugin install ultrapower
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 安装后仍是旧版本
|
|
149
|
+
|
|
150
|
+
原因:本地 marketplace 缓存未更新,安装器读取的是旧版 `marketplace.json`。
|
|
151
|
+
|
|
152
|
+
修复:
|
|
153
|
+
```bash
|
|
154
|
+
claude plugin marketplace update ultrapower
|
|
155
|
+
claude plugin uninstall ultrapower
|
|
156
|
+
claude plugin install ultrapower
|
|
157
|
+
```
|
|
84
158
|
|
|
85
159
|
## 路由触发
|
|
86
160
|
|