Skip to main content

Module browser_profiles_store

Module browser_profiles_store 

Source
Expand description

Named browser profiles: the list of them, in shared_dir (~/.agentmux/shared/browser-profiles.json), like the bookmarks (docs/specs/SPEC_BROWSER_PANE_PROFILES_MENU_2026_10_09.md §3, §6). A profile’s cookie jar is a disk-backed CEF profile the host keeps at <cef-cache>/profile-<id>; this file only names and colours them. “Personal” (the shared jar every tab had before profiles) isn’t listed: it always exists and can’t be deleted.

Structs§

BrowserProfile

Constants§

MAX_NAME_CHARS
MAX_PROFILES
PALETTE
Colours a new profile is given in turn, unless one is chosen.
PROFILES_FILE_NAME 🔒

Functions§

add
A new profile added to profiles: a fresh id, a checked name, and the given colour or the next one from the palette.
check_color 🔒
check_name 🔒
is_profile_id
Is id a well-formed profile id?
profiles_file_path
read_profiles
The list. A missing or empty file is “no profiles yet”; a present but unparseable one is an error, not an empty list that would look like the profiles vanished.
remove
Remove profile id. Its tabs and its jar are the caller’s to close.
update
Rename or recolour profile id.
write_profiles
Replace the list, through a temp file and a rename, so a crash never leaves a half-written file.