d3fc6f2bfada18e6ae7887b79ed1e4c650ca37e1
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
41357f3935 |
codex: the ChatGPT desktop app on Linux is found, and a switch reaches it
pota on Discord: magpie switches the ChatGPT (Codex) desktop app's account on macOS and Windows but not on Linux. OpenAI ships the app for Linux since 08-11 (preview; learn.chatgpt.com/docs/linux/linux-app): a deb, an rpm and an Arch package, which install /usr/lib/chatgpt. Its app-server is /usr/lib/chatgpt/resources/codex ... app-server, run with the user's HOME and no CODEX_HOME, so it reads ~/.codex like the CLI. isCodexAppServer took only .app/Contents/ and Windows paths, so on Linux nothing found the app: no "still signed in as" notice after a switch, no restart of its app-server, and no version on the Agents row. - provider: linuxCodexApp takes an absolute .../chatgpt/resources/codex as the app's own app-server (findCodexApp, CodexAppStale, the switch's restart all read it). - agent: restartOnLinux; codexAppOpen knows on Linux whether the app is open (any /usr/lib/chatgpt/ChatGPT process, not its codex alone or another program's ChatGPT). desktopApps["codex"].linux reads the version from resources/linux-package-metadata.json, HasApp/AppVersion see it, and codexReaders counts the bundled codex's --version as a reader of Codex's config. version() no longer stops at an empty store read before the other sources. Real run, WSL magpie-desktop (Ubuntu 24.04), OpenAI's chatgpt_amd64.deb 26.1027.30824 (bundled codex-cli 0.166.0-alpha.5.1) under Xvfb, sandbox HOME, fake unsigned JWT accounts alice/bob (no real credentials), magpie web on 127.0.0.1:3591: - POST /api/login/switch alice: 200, auth.json alice; /api/providers then says codexApp "bob@example.com" (the stale notice). - POST /api/codex/daemon/restart-app: 200 in ~3s; the old app-server ended (app log "Codex CLI process exited classifiedAsExpected=true code=0"), a new one started with the sandbox HOME, the notice cleared. - /api/agents/cli: "codex":{"app":"26.1027.30824"}. - The same run with linuxCodexApp reverted: no notice, restart-app 400, the app-server untouched (pota's case). Run at |