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:
1 parent
fd96dc6dc0
commit
aae4dfd6d0
8 files changed
+413
-9
No files matched your search
@@ -293,6 +293,20 @@ in
|
||||
force = true;
|
||||
};
|
||||
|
||||
# Brave-only bird reader. The config points bird's Chromium source at Brave;
|
||||
# the wrapper decrypts Brave cookies with the Brave Safe Storage key and
|
||||
# hands them to bird as env vars. PATH puts ~/.pi/agent/bin before Homebrew,
|
||||
# so `bird` resolves to this wrapper. force = true on the config is needed
|
||||
# once: a pre-existing unmanaged ~/.config/bird/config.json5 would otherwise
|
||||
# make home-manager refuse the switch. The wrapper path is new, so no force.
|
||||
home.file.".config/bird/config.json5" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/bird/config.json5";
|
||||
force = true;
|
||||
};
|
||||
home.file.".pi/agent/bin/bird" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.pi/agent/bin/bird";
|
||||
};
|
||||
|
||||
# firstmate is a mutable agent distro (self-update, state/, projects/). Clone once;
|
||||
# never put it in the Nix store. Seed OpenCode+herdr defaults only when absent.
|
||||
# Do NOT npm install -g here: activation PATH often resolves Nix's npm, which
|
||||
|
||||
Reference in new issue
Block a user