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。

test(plugins): wire sync mutation fixtures and break type cycle

zqchris954f13e20949
diff --git a/apps/desktop/src/main/cindy-brain/__tests__/deviceSyncSlot.test.ts b/apps/desktop/src/main/cindy-brain/__tests__/deviceSyncSlot.test.ts
index ec61cfe15f..19135e793a 100644
--- a/apps/desktop/src/main/cindy-brain/__tests__/deviceSyncSlot.test.ts
+++ b/apps/desktop/src/main/cindy-brain/__tests__/deviceSyncSlot.test.ts
@@ -69,7 +69,7 @@ function pair() {
deliver,
});
const remoteBlocked = new Set<string>();
- const access = new PluginSyncAccess({
+ const access: PluginSyncAccess = new PluginSyncAccess({
eligible: peer => sides.has(peer) && peer !== id && !blocked.has(peer),
revokedByRemote: peer => remoteBlocked.has(peer),
invalidate: peer => svc.invalidatePeer(peer),
diff --git a/apps/desktop/src/main/cindy-brain/__tests__/ghostInstanceBoundaries.test.ts b/apps/desktop/src/main/cindy-brain/__tests__/ghostInstanceBoundaries.test.ts
index 0ca73cfdd0..0138301ec8 100644
--- a/apps/desktop/src/main/cindy-brain/__tests__/ghostInstanceBoundaries.test.ts
+++ b/apps/desktop/src/main/cindy-brain/__tests__/ghostInstanceBoundaries.test.ts
@@ -42,6 +42,7 @@ function harness() {
requireGhostAvailableForActiveSession: vi.fn(), getGhostManager: () => ({ setEnabled,
findInstalledInstance: (key: string) => ghosts.find((ghost) => installedGhostStoragePart(ghost) === key) }),
beginGhostMutation: () => vi.fn(), captureGhostMutationOwner: vi.fn(),
+ pluginDeviceSync: { beginMutation: vi.fn(() => vi.fn()) },
getGhostNodeRuntimeBroker: () => ({ stop }), getGhostSubscriptionGateway: () => ({ dropGhost: vi.fn() }),
getGhostErrandSlot: () => ({ clearGhost: vi.fn() }),
getGhostLibrarySlot: () => ({ disposeGhost: vi.fn() }),
diff --git a/apps/desktop/src/main/cindy-brain/__tests__/ghostLocalFileIpc.test.ts b/apps/desktop/src/main/cindy-brain/__tests__/ghostLocalFileIpc.test.ts
index 501f430ad0..2b3a847f1a 100644
--- a/apps/desktop/src/main/cindy-brain/__tests__/ghostLocalFileIpc.test.ts
+++ b/apps/desktop/src/main/cindy-brain/__tests__/ghostLocalFileIpc.test.ts
@@ -217,6 +217,7 @@ function harness(
assertTrustedAppRendererEvent: vi.fn(),
captureGhostMutationOwner: () => ({ ...session }),
beginGhostMutation: () => release,
+ pluginDeviceSync: { beginMutation: vi.fn(() => vi.fn()) },
getActiveAppSession: () => session,
isAppSessionBoundaryPending: () => false,
isSameAppSession: (left: typeof session, right: typeof session) =>