sync-cliproxy-core

Solid

Synchronize or audit ccLoad's in-tree CLIProxyAPI/cliproxy protocol conversion snapshot from an immutable upstream commit. Invoking without a target automatically resolves and synchronizes the latest stable upstream version. Use when asked to 同步、更新或升级 CLIProxyAPI、cliproxy、translator core、internal/protocol/cliproxy,刷新上游 commit,或审查一次协议核心同步。

AI & Automation 370 stars 64 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
86
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 同步 CLIProxy 转换核心 只同步 CLIProxyAPI 的纯协议转换代码和对应测试。保持 ccLoad Registry 线协议契约,不引入上游运行时系统。 默认调用 `$sync-cliproxy-core` 时,自动同步上游最新稳定版本并完成验证,不等待目标确认。用户明确指定 commit/tag 时使用指定目标;用户明确要求仅审计时保持只读。 ## 权威边界 1. 先读仓库根目录 `CLAUDE.md` 和 `internal/protocol/cliproxy/UPSTREAM.md`。后者是来源、固定提交、排除范围和本地契约的唯一事实源。 2. `internal/protocol/registry.go` 定义 ccLoad 契约;`internal/protocol/builtin/cliproxy_adapter.go` 处理 ccLoad 输入验证、JSON/SSE 规范化和流帧封装;`internal/protocol/cliproxy/` 保存同步的纯转换核心。 3. 不引入 CLIProxyAPI 的认证、配置、路由、缓存、插件、动态 Registry、网络刷新、Antigravity 或 Interactions 代码。 4. 不添加 CLIProxyAPI 运行时 Go module 依赖或 `replace`。源码继续使用 `ccLoad/internal/protocol/cliproxy/...` 导入路径。 5. Registry 边界测试是 ccLoad 兼容性权威。上游行为与本地线协议冲突时,修正根因并保留本地契约,不盲目覆盖。 ## 同步流程 ### 1. 预检 - 确认当前目录属于 ccLoad,并检查 `git status --short`。 - 保护已有修改。若工作区改动覆盖协议目录、适配器、Registry、`go.mod`、`go.sum` 或 `UPSTREAM.md`,先区分用户修改与本次同步;无法安全隔离时停止并说明冲突。 - 记录当前同步 commit 和目标 commit。 ### 2. 固定目标 - 用户指定 commit/tag 时,解析成完整不可变 commit SHA。 - 用户未指定目标或只说“同步最新”时,自动查询 `UPSTREAM.md` 记录仓库的远端 tags。以当前记录 tag 的非版本前缀和 `vMAJOR.MINOR.PATCH` 形状确定稳定 tag 系列,按语义版本选择最高版本;忽略预发布 tag,禁止按字典序或提交时间猜版本。 - 将选中的 tag 解引用为完整 commit SHA(等价于 `<tag>^{commit}`)。记录并同步该 commit,而不是 annotated tag object;报告目标和变化范围后直接继续,不等待确认。 - 若无法从当前记录确定 tag 系列、找不到稳定 tag,或 tag 无法解析为 commit,停止并说明原因。禁止退回到浮动分支 HEAD。 - 若目标 SHA 与当前同步 SHA 相同,不改写 `UPSTREAM.md` 的同步日期;运行确定性审计和验证后报告已是最新版本。 - 使用现有上游 checkout,或在临时目录克隆 `UPSTREAM.md` 记录的仓库。所有生产源码与测试必须来自同一个 checkout 和同一个 commit。 ### 3. 比较范围 - 同时比较纯转换生产源码和对应 `_test.go`,不要只看生产文件。 - 先生成目标 commi...

Details

Author
caidaoli
Repository
caidaoli/ccLoad
Created
10 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category