@liangjie559567/ultrapower 5.2.1 → 5.2.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +49 -1
- package/dist/__tests__/plugin-registry.test.d.ts +2 -0
- package/dist/__tests__/plugin-registry.test.d.ts.map +1 -0
- package/dist/__tests__/plugin-registry.test.js +233 -0
- package/dist/__tests__/plugin-registry.test.js.map +1 -0
- package/dist/agents/definitions.d.ts +1 -1
- package/dist/agents/definitions.js +1 -1
- package/dist/agents/index.d.ts +0 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +0 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/analytics/metrics-collector.d.ts +1 -0
- package/dist/analytics/metrics-collector.d.ts.map +1 -1
- package/dist/analytics/metrics-collector.js +33 -0
- package/dist/analytics/metrics-collector.js.map +1 -1
- package/dist/analytics/query-engine.d.ts.map +1 -1
- package/dist/analytics/query-engine.js +3 -2
- package/dist/analytics/query-engine.js.map +1 -1
- package/dist/cli/index.js +24 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +2 -3
- package/dist/cli/launch.js.map +1 -1
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +70 -6
- package/dist/features/auto-update.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/plugin-registry.d.ts +42 -0
- package/dist/lib/plugin-registry.d.ts.map +1 -0
- package/dist/lib/plugin-registry.js +169 -0
- package/dist/lib/plugin-registry.js.map +1 -0
- package/docs/CLAUDE.md +1 -1
- package/docs/EVOLUTION.md +605 -0
- package/docs/INSTALL.md +542 -0
- package/docs/NEXUS.md +562 -0
- package/docs/REFERENCE.md +32 -1
- package/package.json +1 -1
- package/scripts/plugin-setup.mjs +18 -10
- package/skills/omc-setup/SKILL.md +68 -0
- package/skills/release/SKILL.md +2 -0
|
@@ -382,6 +382,40 @@ claude plugin install ultrapower
|
|
|
382
382
|
|
|
383
383
|
> ⚠️ 仅清除插件缓存不够,必须同时清除 `npm-cache`。
|
|
384
384
|
|
|
385
|
+
## 步骤 3.55:同步 installed_plugins.json 注册表
|
|
386
|
+
|
|
387
|
+
检测并修复 `installed_plugins.json` 中的版本漂移问题(k-046)。
|
|
388
|
+
|
|
389
|
+
**背景**:本地开发安装后,`~/.claude/plugins/installed_plugins.json` 中的 `installPath` 可能仍指向旧 npm 缓存路径,导致 hook 文件 `MODULE_NOT_FOUND`。
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
node -e "
|
|
393
|
+
const p=require('path'),f=require('fs'),h=require('os').homedir();
|
|
394
|
+
const d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');
|
|
395
|
+
const pluginsJson=p.join(d,'plugins','installed_plugins.json');
|
|
396
|
+
if(f.existsSync(pluginsJson)===false){console.log('installed_plugins.json not found');process.exit(0);}
|
|
397
|
+
let data;
|
|
398
|
+
try{data=JSON.parse(f.readFileSync(pluginsJson,'utf-8'));}catch(e){console.log('Parse error:',e.message);process.exit(0);}
|
|
399
|
+
const key=data.ultrapower?'ultrapower':'@liangjie559567/ultrapower';
|
|
400
|
+
const entry=data[key];
|
|
401
|
+
if(entry==null){console.log('ultrapower not in installed_plugins.json');process.exit(0);}
|
|
402
|
+
const installPath=entry.installPath||'';
|
|
403
|
+
const isNpmCache=installPath.includes('npm-cache')||installPath.includes('plugins/cache');
|
|
404
|
+
if(isNpmCache===false){console.log('installPath OK (local dev):',installPath);process.exit(0);}
|
|
405
|
+
const cacheBase=p.join(d,'plugins','cache','omc','ultrapower');
|
|
406
|
+
let bestPath='';
|
|
407
|
+
try{const vs=f.readdirSync(cacheBase).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));if(vs.length)bestPath=p.join(cacheBase,vs[vs.length-1]);}catch{}
|
|
408
|
+
if(bestPath===''){console.log('No local cache path found, skipping');process.exit(0);}
|
|
409
|
+
let newVersion=entry.version||'';
|
|
410
|
+
try{newVersion=JSON.parse(f.readFileSync(p.join(bestPath,'package.json'),'utf-8')).version||newVersion;}catch{}
|
|
411
|
+
data[key].installPath=bestPath;data[key].version=newVersion;
|
|
412
|
+
f.writeFileSync(pluginsJson,JSON.stringify(data,null,2));
|
|
413
|
+
console.log('✅ installed_plugins.json synced — installPath:',bestPath,'version:',newVersion);
|
|
414
|
+
"
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
> ⚠️ 此步骤仅在 `installPath` 指向 npm 缓存路径时才修改注册表。
|
|
418
|
+
|
|
385
419
|
## 步骤 3.6:检查更新
|
|
386
420
|
|
|
387
421
|
如果有新版本可用,通知用户:
|
|
@@ -746,6 +780,40 @@ claude plugin install ultrapower
|
|
|
746
780
|
|
|
747
781
|
> ⚠️ 仅清除插件缓存不够,必须同时清除 `npm-cache`。
|
|
748
782
|
|
|
783
|
+
## 步骤 3.55:同步 installed_plugins.json 注册表
|
|
784
|
+
|
|
785
|
+
检测并修复 `installed_plugins.json` 中的版本漂移问题(k-046)。
|
|
786
|
+
|
|
787
|
+
**背景**:本地开发安装后,`~/.claude/plugins/installed_plugins.json` 中的 `installPath` 可能仍指向旧 npm 缓存路径,导致 hook 文件 `MODULE_NOT_FOUND`。
|
|
788
|
+
|
|
789
|
+
```bash
|
|
790
|
+
node -e "
|
|
791
|
+
const p=require('path'),f=require('fs'),h=require('os').homedir();
|
|
792
|
+
const d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');
|
|
793
|
+
const pluginsJson=p.join(d,'plugins','installed_plugins.json');
|
|
794
|
+
if(f.existsSync(pluginsJson)===false){console.log('installed_plugins.json not found');process.exit(0);}
|
|
795
|
+
let data;
|
|
796
|
+
try{data=JSON.parse(f.readFileSync(pluginsJson,'utf-8'));}catch(e){console.log('Parse error:',e.message);process.exit(0);}
|
|
797
|
+
const key=data.ultrapower?'ultrapower':'@liangjie559567/ultrapower';
|
|
798
|
+
const entry=data[key];
|
|
799
|
+
if(entry==null){console.log('ultrapower not in installed_plugins.json');process.exit(0);}
|
|
800
|
+
const installPath=entry.installPath||'';
|
|
801
|
+
const isNpmCache=installPath.includes('npm-cache')||installPath.includes('plugins/cache');
|
|
802
|
+
if(isNpmCache===false){console.log('installPath OK (local dev):',installPath);process.exit(0);}
|
|
803
|
+
const cacheBase=p.join(d,'plugins','cache','omc','ultrapower');
|
|
804
|
+
let bestPath='';
|
|
805
|
+
try{const vs=f.readdirSync(cacheBase).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));if(vs.length)bestPath=p.join(cacheBase,vs[vs.length-1]);}catch{}
|
|
806
|
+
if(bestPath===''){console.log('No local cache path found, skipping');process.exit(0);}
|
|
807
|
+
let newVersion=entry.version||'';
|
|
808
|
+
try{newVersion=JSON.parse(f.readFileSync(p.join(bestPath,'package.json'),'utf-8')).version||newVersion;}catch{}
|
|
809
|
+
data[key].installPath=bestPath;data[key].version=newVersion;
|
|
810
|
+
f.writeFileSync(pluginsJson,JSON.stringify(data,null,2));
|
|
811
|
+
console.log('✅ installed_plugins.json synced — installPath:',bestPath,'version:',newVersion);
|
|
812
|
+
"
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
> ⚠️ 此步骤仅在 `installPath` 指向 npm 缓存路径时才修改注册表。
|
|
816
|
+
|
|
749
817
|
## 步骤 3.6:检查更新
|
|
750
818
|
|
|
751
819
|
如果有新版本可用,通知用户:
|
package/skills/release/SKILL.md
CHANGED
|
@@ -33,6 +33,7 @@ description: ultrapower 的自动化发布工作流
|
|
|
33
33
|
> ⚠️ `marketplace.json` 是安装器读取的入口,版本不同步会导致用户始终安装旧版本。
|
|
34
34
|
> ⚠️ `docs/CLAUDE.md` 是 `/ultrapower:omc-setup` 下载的模板,版本不同步会导致用户安装后显示旧版本号。
|
|
35
35
|
> ⚠️ `CLAUDE.md` 是开发规范文档,版本引用不同步会导致开发者参考错误的规范版本。
|
|
36
|
+
> ⚠️ `docs/REFERENCE.md` 存在两处数量声明(TOC 第 12 行 + 正文第 280 行),新增 skill/agent/hook 时必须同步更新两处,否则会出现文档内部不一致(k-047)。
|
|
36
37
|
|
|
37
38
|
### 2. 运行测试
|
|
38
39
|
```bash
|
|
@@ -86,6 +87,7 @@ gh release create v<version> --title "v<version> - <title>" --notes "<release no
|
|
|
86
87
|
| `docs/CLAUDE.md` | `<!-- OMC:VERSION:X.Y.Z -->` |
|
|
87
88
|
| `CLAUDE.md` | `ultrapower vX.Y.Z 规范体系位于 \`docs/standards/\`` |
|
|
88
89
|
| `README.md` | 标题 + 版本徽章 |
|
|
90
|
+
| `docs/REFERENCE.md` | TOC 第 12 行 `[Skills (N Total)]` + 正文 `## Skills(共 N 个)` 两处数量必须一致 |
|
|
89
91
|
|
|
90
92
|
## 语义化版本
|
|
91
93
|
|