feat(bird): read X cookies from Brave only

Bird 0.8.0 asks Keychain for Chrome Safe Storage, but Brave stores its key
under Brave Safe Storage, so the reader fails before it can use Brave.

Manage the Bird config in Nix and add a wrapper at ~/.pi/agent/bin/bird.
The wrapper decrypts auth_token and ct0 from Brave cookie database with the
Brave Safe Storage key and passes them to bird as env vars. It has no
browser fallback, writes no Keychain item, and never opens the credentials
file.

Add an end-to-end shell check with a fake Brave cookie source and keychain.
The check fails before the wrapper exists and passes after implementation.
This commit is contained in:
Lap Tran committed 2026-11-28 15:46:40 -05:00
1 parent fd96dc6dc0
commit aae4dfd6d0
8 files changed
+413 -9

No files matched your search

+2 -1
View File
@@ -4,7 +4,7 @@
# The launcher check builds the zshrc from the home-manager configuration and
# runs `fm`, `fm-oc2`, and `fm-pi` with spies. The dispatch check reads the crew
# dispatch config through firstmate's bootstrap validator. Neither starts a real
# agent session.
# agent session. The bird check runs the Brave-only wrapper in a throwaway HOME.
set -euo pipefail
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
@@ -13,5 +13,6 @@ status=0
"$ROOT/tests/fm-launcher.sh" || status=1
"$ROOT/tests/crew-dispatch.sh" || status=1
"$ROOT/tests/rebuild-update-steps.sh" || status=1
"$ROOT/tests/bird-brave-e2e.sh" || status=1
exit "$status"