experiments in a post-browser web

fix(desktop): keep peek MCP connected - match-any drift check + presence-based enabled master

Two bugs shipped together in the 2026-07-08 build broke peek MCP across projects: 1. The mcp-server config-drift detector exited on the first message whenever the spawn env did not byte-match the FIRST on-disk peek entry found by CWD-walk. It cannot know which registration actually spawned it, so a read-only user-scope entry and a scoped project .mcp.json - both legitimate - could never both satisfy it. The nearest-resolved file was often not the one that spawned us, so a healthy server quit on connect and clients reported cannot-connect. Now it collects ALL candidate entries and exits only when NONE matches the spawn env, so coexisting registrations are fine. Renamed resolveOnDiskPeekEntry to collectOnDiskPeekEntries. 2. getMcpStatus gated enabled on a byte-exact snippet match against what the current build generates, so a reinstall that changed the command path or env shape flipped a present, working config to Not-configured - the blank Settings the user saw - which lured a re-enable with defaults that silently dropped the scope tag. enabled is now presence-based. Staleness is surfaced via a new stale flag plus a Settings hint to re-save. Adds a regression test: a mismatching entry resolved first plus a matching entry elsewhere must not exit. All 4 drift tests pass. Desktop tsc clean.


Author burrito.space Date Commit abbcbe24 Parent acfefe22 Change ID pzwstzpy
+104 -25
4 changed files