ensureExtensionDepsResolvable called symlinkSync without a type argument
and without path normalization. On Windows without Developer Mode or
admin rights, plain symlinkSync throws EPERM; the failure was silently
swallowed, leaving extension-owned packages unresolvable from shared
dist/ chunks and breaking gateway startup.
Extract the link logic into electron/gateway/fs-link.ts:
- linkDirSafe prefers junction on Windows (works without elevation),
falls back to a plain dir symlink only if junction creation fails
(e.g. cross-volume).
- normalizeFsPath centralizes the \\?\ extended-length + UNC prefixing
that was previously an inline helper in config-sync.ts.
Also drop the now-redundant inline fsPath helper in config-sync.ts and
replace the two bare symlinkSync calls with linkDirSafe.
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>