Skip to content

fix(codex): safely repair plugin marketplace registration - #61

Open
zhushihao wants to merge 1 commit into
BigStrongSun:mainfrom
zhushihao:codex/upstream-51-plugin-registration
Open

fix(codex): safely repair plugin marketplace registration#61
zhushihao wants to merge 1 commit into
BigStrongSun:mainfrom
zhushihao:codex/upstream-51-plugin-registration

Conversation

@zhushihao

Copy link
Copy Markdown
Contributor

Closes #51

变更摘要

本 PR 为 Codex 插件登记增加独立、可解释且需要用户确认的检测与修复流程。CCSwitchMulti 只处理个人 marketplace 登记,不修改 Codex 的插件启用状态。

关键改动

  • 从 Codex config.toml 读取已启用插件,兼容 name@personal 和旧的裸名称键。
  • 在允许的 .codex/plugins/cache 内校验 manifest、版本和 canonical 路径,拒绝路径穿越。
  • 兼容根级和嵌套 marketplace 结构,修复时保留已有/未知登记并按名称与来源去重。
  • 使用原子写入,检测保持只读,启动时只提示,前端提供明确的“修复登记”按钮。
  • 修复命令幂等,重复点击不会追加重复条目。

验证结果

  • cargo test --lib codex_plugin_registry::tests:4 passed / 0 failed
  • pnpm exec tsc --noEmit:通过
  • git diff --check:通过

风险与回滚

只写入用户个人 marketplace 的登记数组;原有其他条目和 Codex [plugins] 启用状态不变。回滚本提交即可。

关联 Issue

Detect enabled cached plugins missing from the personal marketplace, validate manifest paths inside the Codex cache, preserve existing marketplace entries, and expose an explicit repair action.\n\nCloses BigStrongSun#51
@zhushihao zhushihao closed this Aug 24, 2026
@zhushihao
zhushihao deleted the codex/upstream-51-plugin-registration branch August 24, 2026 13:22
@zhushihao
zhushihao restored the codex/upstream-51-plugin-registration branch August 24, 2026 13:29
@zhushihao zhushihao reopened this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex 插件登记需要基于 cache、config 和 marketplace 做安全一致性检查

1 participant