makecindy / makecindy/cindy

Cindy 重启后批量清空已安装 Ghost 插件,并写入 defaultInstallOptOuts

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

Description

**提交人**: jermy
**客户端版本**: 0.1.38

---

## 现象

Cindy 桌面端重启后,此前已安装并正常使用的所有 Ghost 插件从插件列表和 Agent 工具清单中消失。插件源码目录和 safe-storage 中的加密授权仍然存在,但插件市场账本将所有插件统一标记为未安装。

受影响插件:
- x-manager 1.0.13
- cindy-web-search 1.2.2
- google-gmail 1.1.1
- icloud-mail 0.1.4
- qq-mail 0.2.3
- 163-mail 0.1.5

## 已确认的本地证据

1. 重启前日志明确记录上述插件成功安装,例如:
- `ghost installed { id: 'google-gmail', version: '1.1.1' }`
- `ghost installed { id: 'x-manager', version: '1.0.13' }`
2. Cindy 于 2026-08-09 14:21 正常退出并重启。
3. 重启后,owner namespace 下 `plugin-market/ledger.v1.json` 中上述 6 个插件的 `installed` 同时变成 `false`。
4. 同一时间,这 6 个插件的 pluginId 被全部写入该账号的 `defaultInstallOptOuts`。
5. `ghost_list` 返回空列表。
6. 插件本体仍保留在 owner namespace 的 `cindy-brain//`,相关加密授权仍保留在 `safe-storage`,说明不是用户主动卸载或文件被删除。

## 可复现步骤

1. 在 Cindy 插件市场安装并启用多个 Ghost 插件。
2. 确认插件可以正常运行,且 `ghost_list` 能返回已启用插件。
3. 完全退出 Cindy 桌面端。
4. 重新启动 Cindy。
5. 查看插件页或调用 `ghost_list`。

## 实际行为

已安装插件全部消失;本地 ledger 被启动流程批量改写为 `installed: false`,并将插件加入 `defaultInstallOptOuts`。

即使在退出后手动把 ledger 修正为 `installed: true`、移除对应 opt-outs,再重新启动 Cindy,启动同步仍会再次覆盖回 `false`,因此不是一次性的 JSON 损坏。

## 期望行为

- Cindy 重启后应保留用户已安装/启用的插件状态。
- `defaultInstallOptOuts` 不应在没有用户主动卸载或拒绝默认安装的情况下被批量写入。
- 当插件本体和授权数据仍存在、账本与磁盘状态冲突时,应提供自动恢复或至少阻止破坏性覆盖。
- 插件状态恢复不应要求用户逐个重新安装;现有授权不应丢失。

## 补充

这是稳定可复现的启动阶段状态恢复问题,与 Claude Code 的 Nowledge Mem marketplace 更新无关;插件在该操作之前的一次 Cindy 重启中就已被清空。
---
**OS**: darwin arm64 (25.5.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start by tracing the startup synchronization that rewrites owner-namespace plugin-market/ledger.v1.json and defaultInstallOptOuts. Compare that flow with the preserved cindy-brain// files and safe-storage authorization, and use ghost_list during reproduction. Done means restart no longer marks existing plugins uninstalled or adds opt-outs without user action, with the reported multi-plugin scenario covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.