Adds per-profile cookie import, with Helium on macOS as the first source. Cookies carry the logged-in sessions, which is what makes an imported profile useful; saved passwords are out of scope because Electron exposes no password store to put them in. The key is read through the in-process Keychain API rather than by shelling out to `/usr/bin/security`, because macOS attributes both the consent prompt and the resulting ACL grant to the binary that asks. Via the CLI the prompt said "security" and "Always Allow" granted trust to a tool every process on the machine can invoke; in-process it names this app and the grant belongs to it. There is deliberately no fallback when consent is denied — the techniques that work around it exist to defeat exactly this. The read is untimed: macOS answers it with a modal, and a timeout racing the user means the prompt can be approved after nothing is left listening, which reads as "approving did nothing". Sources pin their own coordinates rather than deriving them, because Chromium forks disagree: Helium uses the keychain service "Helium Storage Key" / account "Helium" where Chrome and its closer relatives use "<Name> Safe Storage" / "<Name>". `expires_utc` counts microseconds since 1601 and exceeds JavaScript's safe integer range, which `node:sqlite` refuses to narrow, so the division happens in SQL and only seconds cross the boundary. The cookie database is snapshotted before reading, since Chromium keeps it open with WAL. Unavailable sources are reported with a reason rather than as one generic failure — a missing keychain item is not something approving a prompt can fix. `unsupportedPlatform` is the one that is not a permission at all: it covers cases like Chrome on Windows, whose App-Bound Encryption is designed to stop this and which we will not work around. The platform binary is staged beside the loader during packaging, mirroring the Clerk passkey handling: pnpm nests the arch package, electron-builder only retains top-level dependencies, and the generated loader checks for a sibling `.node` first. Verified end to end against a real Helium profile: 5,002 cookies imported. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Julius Marminge committed on 9/4/2026, 6:20:37 AMparente01c153
14 files changedLine totals unavailable