中文 | English
这是给 CLIProxyAPI 使用的第三方插件商店仓库。仓库同时维护兼容老版本 CPA 的 schema v1 registry,以及推荐给新版 CPA 的 schema v2 direct-install registry,并把 registry 与 release 资产镜像到 jsDelivr CDN。
| 插件 | 说明 |
|---|---|
| developer-role-normalizer | 将不兼容上游里的 developer 消息角色转换为 system,主要面向 DeepSeek 等 OpenAI-compatible provider。 |
| cpa-manager-plus | 在 CPA 管理端提供 Manager Plus 风格的仪表盘、用量分析、请求监控、账号巡检与配置页,并反向代理到 Manager Server。 |
plugins:
enabled: true
store-sources:
- "https://cdn.jsdelivr.net/gh/xinghaix/CLIProxyAPI-Plugins-Store@cdn/registry-v2.json"这是当前主推入口:
- registry 本身走 jsDelivr CDN。
registry-v2.json使用install.type = direct。- 每个插件固定到自己的版本和平台资产 URL,不再依赖 GitHub
releases/latest。 - CDN 分支里的 v2 registry 会把插件 zip 指向 jsDelivr CDN 资产 URL。
plugins:
enabled: true
store-sources:
- "https://raw.githubusercontent.com/xinghaix/CLIProxyAPI-Plugins-Store/main/registry-v2.json"这个入口同样是 schema v2 direct install,但 artifact URL 指向 GitHub Release。适合排查 CDN 问题。
plugins:
enabled: true
store-sources:
- "https://raw.githubusercontent.com/xinghaix/CLIProxyAPI-Plugins-Store/main/registry.json"schema v1 仍然保留给老 CPA 使用。注意:v1 使用 GitHub releases/latest 模型,多个插件共用一个仓库时会受到 latest release 的限制。
| CPA 版本 | 推荐 registry | 说明 |
|---|---|---|
< v7.2.44 |
registry.json |
这些版本早于 schema v2 direct install。 |
v7.2.44 - v7.2.45 |
registry.json,或谨慎测试 registry-v2.json |
已有 direct install 初版,但缺少后续下载/auth/错误处理修复。 |
>= v7.2.46 |
registry-v2.json,优先 CDN URL |
推荐路径。包含 direct install 及后续 plugin-store 修复。 |
证据:CPA upstream commit 1f16e87 从 v7.2.44 起包含 direct install;3ea7f18、8970873、caf7052 从 v7.2.46 起包含后续 plugin-store 修复。
CPA
└─ plugin store registry
├─ registry.json schema v1,兼容老 CPA,GitHub Release latest 模型
└─ registry-v2.json schema v2,新 CPA 推荐,direct install 模型
GitHub Actions
├─ 按 tag 发现版本匹配的插件
├─ 构建 linux/darwin/windows × amd64/arm64 动态库 zip
├─ 发布 GitHub Release
├─ 刷新 main 分支 registry-v2.json(GitHub Release URL)
└─ 发布 cdn 分支
├─ registry.json
├─ registry-v2.json(jsDelivr artifact URL)
├─ latest/
└─ vX.Y.Z/
jsDelivr
└─ https://cdn.jsdelivr.net/gh/xinghaix/CLIProxyAPI-Plugins-Store@cdn/...
GitHub raw 文件 URL:
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}
可转换为 jsDelivr:
https://cdn.jsdelivr.net/gh/{owner}/{repo}@{branch}/{path}
本仓库不建议用 @main 作为主要 CDN 入口;推荐使用专门生成的 cdn 分支:
https://cdn.jsdelivr.net/gh/xinghaix/CLIProxyAPI-Plugins-Store@cdn/registry-v2.json
https://cdn.jsdelivr.net/gh/xinghaix/CLIProxyAPI-Plugins-Store@cdn/v0.3.8/cpa-manager-plus_0.3.8_linux_amd64.zip
https://cdn.jsdelivr.net/gh/xinghaix/CLIProxyAPI-Plugins-Store@cdn/latest/checksums.txt
原因:cdn 分支只放分发产物和生成后的 registry,结构稳定,适合被 jsDelivr 缓存。
- 版本路径如
@cdn/v0.3.8/...应视为不可变路径,适合生产使用。 @cdn/latest/...和@cdn/registry-v2.json是可变路径,可能存在 CDN 缓存传播延迟。- workflow 会自动 purge 这些可变路径:
registry.jsonregistry-v2.jsonlatest/checksums.txtlatest/*.zip
手动刷新示例:
https://purge.jsdelivr.net/gh/xinghaix/CLIProxyAPI-Plugins-Store@cdn/registry-v2.json
发布使用标准 semver tag,例如 v0.3.8。不要使用插件后缀 tag,例如 v0.3.8-cpa-manager-plus。
- 修改插件代码。
- 选择新版本号,例如
0.3.9。 - 同步版本号:
plugins/<plugin-id>/go/main.go→var pluginVersion = "0.3.9"registry.json→ 对应插件的"version"plugins/<plugin-id>/Makefile→VERSION := 0.3.9(如存在)
- commit 并 push 到
main。 - 创建并推送 tag:
git tag -a v0.3.9 -m "v0.3.9"
git push origin v0.3.9- GitHub Actions 自动执行:
- 只构建源码版本等于 tag 版本的插件。
- 每个插件生成 6 平台 zip。
- 发布 GitHub Release。
- 生成 main 分支
registry-v2.json。 - 发布/刷新
cdn分支。 - purge jsDelivr 可变路径。
每个发布版本必须包含 6 个平台:
linux/amd64linux/arm64darwin/amd64darwin/arm64windows/amd64windows/arm64
Release asset 名称:
{plugin-id}_{version}_{goos}_{goarch}.zip
zip 根目录必须包含动态库:
{plugin-id}-v{version}.{so|dylib|dll}
示例:
cpa-manager-plus_0.3.8_linux_amd64.zip
└── cpa-manager-plus-v0.3.8.so
python3 -m py_compile scripts/generate-registry-v2.py
scripts/generate-registry-v2.py --check
python3 - <<'PY'
import json
for f in ['registry.json', 'registry-v2.json']:
j = json.load(open(f))
print(f, j['schema_version'], len(j['plugins']))
PYMIT