Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): clear untrusted approval quarantine on bundled no-op; filter target deferred by pendingIds
Yuewei-LLa2f9091767cf
diff --git a/apps/desktop/src/main/cindy-brain/GhostManager.ts b/apps/desktop/src/main/cindy-brain/GhostManager.tsindex b978e38ffc..5b26550bf5 100644--- a/apps/desktop/src/main/cindy-brain/GhostManager.ts+++ b/apps/desktop/src/main/cindy-brain/GhostManager.ts@@ -3457,6 +3457,13 @@ export class GhostManager {return true;}await this.finishTrustedBundledPublish(manifest.id, pendingPublish);+ // Receipt already matches the immutable seed — no write needed,+ // but the process-internal untrusted approval quarantine from+ // publishTrustedBundledSeed must still be cleared. The other+ // two branches (full write and enabled toggle) both clear it;+ // without it here, the no-op path leaves the plugin quarantined+ // until the next restart (P1, PRRT_kwDOTgdRUs6YcxiH).+ this.untrustedApprovals.delete(this.isolationKey(manifest.id));return false;}await this.receiptStore.write(diff --git a/apps/desktop/src/main/ownerNamespaceMigration.ts b/apps/desktop/src/main/ownerNamespaceMigration.tsindex d3f10232ff..f3ee581cf7 100644--- a/apps/desktop/src/main/ownerNamespaceMigration.ts+++ b/apps/desktop/src/main/ownerNamespaceMigration.ts@@ -1241,12 +1241,17 @@ export function getLegacyGhostRecoveryStatus(? [...sharedDiscovery.deferredIds, ...scopedDiscovery.deferredIds].filter((id) => !isOfficialGhostId(id)): [...sharedDiscovery.deferredIds, ...scopedDiscovery.deferredIds];+ // Filter target deferred IDs by pendingIds so an unrelated installed+ // plugin's transient read error doesn't make the status report deferred+ // (P2, PRRT_kwDOTgdRUs6YcxiJ). Already done in recoverLegacyGhostPlugins.const discoveryDeferred =sharedDiscovery.deferredRoots.length > 0 ||scopedDiscovery.deferredRoots.length > 0 ||targetDiscovery.deferredRoots.length > 0 ||sourceDeferredIds.length > 0 ||- targetDiscovery.deferredIds.length > 0;+ targetDiscovery.deferredIds.some((id) =>+ recoveryMarker?.pendingIds?.includes(id),+ );// 一个与待恢复 id 无关的 target 目录损坏(比如安装了别的插件但 ghost.json// 偶然坏了)不应永久卡死本 owner 的整批 legacy 恢复。用已按 pendingIds// 过滤的 targetInvalidIds 判定,而不是原始的 targetDiscovery.invalidIds。