mirror of
https://github.com/different-ai/openwork
synced 2026-05-15 03:26:24 +02:00
The server compares session.directory with strict equality, but call sites could silently pick the wrong path formatter (normalizeDirectoryQueryPath vs toSessionTransportDirectory) — producing forward-slash paths on Windows where the server stores native backslashes. Changes: - Add TransportDirectory branded type so the compiler rejects raw strings where a transport-formatted directory is expected. - Fix connections/store.ts: switch path discovery from normalizeDirectoryQueryPath to toSessionTransportDirectory — this value feeds mcp.status/disconnect calls that use the same exact-match semantics (latent Windows bug). - Fix workspace.ts: remote directory discovery now goes through toSessionTransportDirectory (caught by the branded type at compile time). - Mark normalizeDirectoryQueryPath with JSDoc deprecation for server-query use. - Add round-trip invariant and idempotency tests that assert create-path equals list-path for both Unix and Windows directory formats.