feat(google-gmail): 通过构建期依赖打包接入 gog - #129
Merged
GaoWeiLiuXD merged 4 commits intoSep 21, 2026
Merged
GaoWeiLiuXD merged 4 commits into
GaoWeiLiuXD merged 4 commits into
Conversation
仅迁移 Gmail 到 schema/run/accounts 工具,保留原 OAuth 配置并支持插件内多账号昵称。声明六平台固定版本与校验值,由仓库打包器收集 gog,不向 Git 提交二进制。 Signed-off-by: liugaowei <liugaowei@xd.com>
|
Signed-off-by: liugaowei <liugaowei@xd.com>
Signed-off-by: liugaowei <liugaowei@xd.com>
Signed-off-by: liugaowei <liugaowei@xd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed / 改了什么
仅修改
google-gmail及 Gmail 专属测试,版本1.2.0 → 1.3.1,最低 Cindy0.1.82。gmail_accounts、gmail_schema、gmail_run替换旧gmail业务实现;固定上游 gog v0.39.1,不修改 gog 源码。binary-dependencies.json:构建时下载并校验六平台官方产物,再以固定 Brotli 编码收集到同一个完整.cindy包。Git 只包含源码、声明、哈希和许可证,不包含 gog 二进制。终端用户无运行时下载或工具链依赖。run请求注入所选账号的短期 access token。原network配置完全保留,包括 clientId、clientSecret、secret key、scope;不迁移或清空存量账号。Why / 为什么
复用成熟 CLI 的 Gmail 能力与参数发现,避免插件反复实现邮件和附件 API;同时实际验证已合并的声明式二进制依赖打包流程,避免向源码仓提交大二进制。
Checklist
node_modules. OAuth 应用身份声明与主线完全相同,无新增凭证值。ghost.jsondeclares only capabilities actually used (direct capability fields / autonomous network hosts / secrets / Node runtime); any new capability is justified in this PR description.ghost.json.versionabove main.0.1.82;实测包标识、校验和及验收后的文案修正范围见下文。minCindyVersion没有降低或删除;使用已包含 OAuth Node 注入和账号选择能力的0.1.82。provisioning.json与 audience 不变。src/构建产物;node/gog.cjs是手写薄适配器,不是生成的 vendor 代码。THIRD-PARTY-LICENSES.txtfor gog and Lucide icons.git commit -s).Tool declaration changes / 工具声明改动
移除旧
gmail工具及其 action 参数,不保留旧 API 适配分支。模型先调用gmail_accounts匹配邮箱/昵称,存在歧义则询问,再通过gmail_schema获取规范命令路径与参数,最后调用gmail_run。附件输出需明确本地任务目录路径;只读会话禁止落盘,且向 gog 传递--readonly。CLI 可发现的部分命令需要比既有 OAuth scope 更大的权限;本 PR 不扩大 scope,这类操作仍由 Google 拒绝,不能静默更换账号或自动扩权。
Verification / 验证
google-gmail-1.3.1-pr129-0b5c03e.cindy,61,687,751 bytes;SHA-256edd635ec328099cab57e616f1102d9843f8c7cee6df56596af45f5c83343535c。此证据对应下方的0b5c03e包,不冒充后续提交的包哈希。settings.js的连接结果未知提示与专属回归测试:异常和未知错误要求先核对账号状态,补齐四语言文案及英文回退。没有修改 gog、依赖、OAuth 配置、凭据读写、网络请求、账号选择或升级路径。新增 VM 执行测试覆盖响应丢失、HTTP 503、JSON 损坏、空响应、未知错误、正常成功及取消;没有声称这些故障在真实账号上逐项注入测试。0b5c03ef94a09940cabc46ddcb9906c7a4593374,buildCommita68f28f70cf06f0133d5a7c37831c7d33d3931ab。下载及桌面副本 SHA-256 均与 CI 校验文件一致;该 run 的测试、打包和上传步骤均已通过。94f489a59cffb6a14f7b7f117eec51620c0483f5。其余门禁和 Gmail 回归34项通过;可选真实下载用例单独显式执行。check-source-size.mjs、git diff --check通过;无 gog payload 进入 Git。CINDY_GMAIL_BINARY_SMOKE=1 node --test .tests/google-gmail-packaging.test.mjs:2/2 通过,真实下载六平台官方 archive,调用仓库统一打包器;逐个校验压缩及解压哈希,本机darwin-arm64启动随包 worker 并取得 Gmail schema(含 attachment/send)。未读取真实账号、安装插件或操作用户 Beta。070ea2b6c288994e45e77f50bc5840e1fc234a29b26cc4ec6596a73ebc6d4753。包内24个插件源码/资源文件逐字节匹配提交5ed44f038869d4647120533a5408eb375da338c7。随后仅恢复主线已有的账号查询错误分类,并补回归;最终实机验收应使用最新 head 的 CI 验证包,不使用这个首轮包。Sensitive changes / 敏感变更
需要维护者人工 review。
openclaw/gogcli v0.39.1,MIT;六平台 URL/原始 archive SHA 在依赖声明,压缩/解压 SHA 在vendor/gog/binaries.json。上游二进制不改动。Lucide 六枚 SVG 附 ISC 条款。node/gog.cjs入口和oauthSecret: gmail_account的run方法绑定。Worker 不是 OS sandbox;仅执行校验后的固定 gog 路径、使用 argv 数组而非 shell、过滤全局配置/账号/token 覆盖参数与外部 hooks/常驻命令;会话审批继续由 Cindy 负责。eval、new Function、shell exec 或可执行 base64;唯一 spawn 为固定 gog。自主网络声明与原版完全相同;Gmail 数据面使用上游 Google Gmail API,tracking/watch 等外部服务路径不开放。