makecindy / makecindy/cindy

fix(codex): support isolated-only remote plugin marketplaces in capability routing

Open
#1,659 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

## 现象

Codex 的 capability routing overlay 目前只从用户级 plugin cache 枚举 marketplace。若某个受管 remote plugin 只存在于 Cindy 隔离的 `CODEX_HOME/plugins/cache`,而用户级 cache 没有对应源目录,routing 会把它判为无法受控;只要该 plugin 命中有效 route,Codex 会话启动就会 fail closed。

这个缺口由 PR #1650 的 review 顺带暴露,但它属于 PR #1215 已有的 Codex plugin bridge / inventory 边界,不属于 Skill 来源优先级本身。

## 当前实现

相关位置:

- `apps/desktop/src/main/maker-host/codex-global-plugins.ts`
- `inspectPluginInventories()` / `prepareSourceMarketplaces()`
- `collectCapabilityRoutingFailures()`

当前 source inventory 只枚举用户级 `plugins/cache`,overlay 也要求从该 source marketplace 复制或链接。隔离 home 中由 Codex remote plugin 机制直接 materialize 的 marketplace 没有可用 source 时,现有逻辑无法生成受管 overlay。

## 期望方案

- 从 Codex 的已安装 plugin inventory / manifest 获取稳定 provenance,覆盖 isolated-only remote marketplace;
- 或为隔离 home 中已验证 provenance 的受管 plugin 生成不会修改原始用户 cache 的安全 overlay;
- 若暂时无法 overlay,不应因为与当前 route 无关的 remote plugin 阻断所有 Codex 会话;
- 仍需保持 #1215 的边界:命中受保护 route 且 provenance/约束无法验证时 fail closed,用户/项目 Skill 与无冲突 plugin 不受影响。

## 验收标准

- [ ] isolated `CODEX_HOME` 里存在 enabled remote marketplace、用户级 cache 无对应目录时,inventory 可正确识别来源;
- [ ] 命中 capability route 的 plugin 能被安全约束,或给出精确到该 plugin 的失败;
- [ ] 未命中 route 的 isolated-only remote plugin 不阻断 Codex 会话;
- [ ] 原始 plugin cache 不被修改;
- [ ] 覆盖 isolated-only、disabled plugin、manifest/provenance 不可读和 overlay 自愈测试。

## 关联

- PR #1215:Codex capability routing / plugin overlay 基座
- PR #1650:review 中发现,但不在 Skill 来源优先级 PR 内扩项

Contributor guide

Open the contributing guide

Research direction

Start in apps/desktop/src/main/maker-host/codex-global-plugins.ts, tracing inspectPluginInventories(), prepareSourceMarketplaces(), and collectCapabilityRoutingFailures(). Review the existing Codex plugin overlay and inventory tests before covering isolated-only remote marketplaces, disabled or unreadable provenance, and overlay recovery. Done means routed plugins are safely constrained, unrelated plugins do not block sessions, and the original cache remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop, security, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.