Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 撤销陈旧随包批准时一并清理 errand slot

Yuewei-LL751ae3623f68
diff --git a/apps/desktop/src/main/cindy-brain/index.ts b/apps/desktop/src/main/cindy-brain/index.ts
index f99a4afc9c..c837dece27 100644
--- a/apps/desktop/src/main/cindy-brain/index.ts
+++ b/apps/desktop/src/main/cindy-brain/index.ts
@@ -805,11 +805,14 @@ async function reconcileBuiltinGhostsLocked(
// 自愈,不需要用户介入。
await manager.removeInstallApproval(manifest.id);
// 撤销只让后续的 Host 能力调用与技能落链失效,不会自己结束已经跑起来的沙箱
- // 进程 —— 登录触发对账时插件可能正在运行。与 beforeRemove 同款三连熄灯,
- // 让"撤销后不再被授权运行"这句话对运行中的实例也成立。
+ // 进程 —— 登录触发对账时插件可能正在运行。与 beforeRemove 同款四连熄灯
+ // (含 errand slot:漏掉它会让节流状态与在途任务记录留到同会话的自愈之后,
+ // 变成不必要的 rate-limit/"已有在途任务"阻塞),让"撤销后不再被授权运行"
+ // 这句话对运行中的实例也成立。
getGhostRuntime().stop(manifest.id);
getGhostNodeRuntimeBroker().stop(manifest.id);
getGhostAgentSlot().clearGhost(manifest.id);
+ getGhostErrandSlot().clearGhost(manifest.id);
approvalChanged = true;
log.warn('builtin ghost approval receipt failed; approval revoked', {
id: manifest.id,