Problem
Desktop layering allows server platform adapters to depend on the CLI/daemon handshake, but daemon-server-process.ts (under main/server/) imports @vibest/server/daemon directly.
This couples a mid-layer adapter to server package internals rather than a narrow desktop-owned port, bypassing the "adapter behind interface, wired at composition root" pattern in apps/desktop/AGENTS.md.
Severity
P3
Affected files
apps/desktop/src/main/server/daemon-server-process.ts
- Wired from:
apps/desktop/src/main/server/local-server-live.ts
- Composition root:
apps/desktop/src/main/desktop-runtime.ts
Suggested fix
Introduce a small desktop-owned port type for daemon attach/spawn (similar to SpawnServer), implement it at the composition root, and keep @vibest/server/daemon imports out of mid-layer consumers. Alternatively, document this as an intentional exception if the team accepts server/daemon as the shared handshake surface.
Problem
Desktop layering allows server platform adapters to depend on the CLI/daemon handshake, but
daemon-server-process.ts(undermain/server/) imports@vibest/server/daemondirectly.This couples a mid-layer adapter to server package internals rather than a narrow desktop-owned port, bypassing the "adapter behind interface, wired at composition root" pattern in
apps/desktop/AGENTS.md.Severity
P3
Affected files
apps/desktop/src/main/server/daemon-server-process.tsapps/desktop/src/main/server/local-server-live.tsapps/desktop/src/main/desktop-runtime.tsSuggested fix
Introduce a small desktop-owned port type for daemon attach/spawn (similar to
SpawnServer), implement it at the composition root, and keep@vibest/server/daemonimports out of mid-layer consumers. Alternatively, document this as an intentional exception if the team accepts server/daemon as the shared handshake surface.