ArchiveBox/archivebox/misc
Claude 877b5f91c2
Derive CHROME_USER_DATA_DIR from ACTIVE_PERSONA in config system
- Add _derive_persona_paths() in configset.py to automatically derive
  CHROME_USER_DATA_DIR and CHROME_EXTENSIONS_DIR from ACTIVE_PERSONA
  when not explicitly set. This allows plugins to use these paths
  without knowing about the persona system.

- Update chrome_utils.js launchChromium() to accept userDataDir option
  and pass --user-data-dir to Chrome. Also cleans up SingletonLock
  before launch.

- Update killZombieChrome() to clean up SingletonLock files from all
  persona chrome_user_data directories after killing zombies.

- Update chrome_cleanup() in misc/util.py to handle persona-based
  user data directories when cleaning up stale Chrome state.

- Simplify on_Crawl__20_chrome_launch.bg.js to use CHROME_USER_DATA_DIR
  and CHROME_EXTENSIONS_DIR from env (derived by get_config()).

Config priority flow:
  ACTIVE_PERSONA=WorkAccount (set on crawl/snapshot)
  -> get_config() derives:
     CHROME_USER_DATA_DIR = PERSONAS_DIR/WorkAccount/chrome_user_data
     CHROME_EXTENSIONS_DIR = PERSONAS_DIR/WorkAccount/chrome_extensions
  -> hooks receive these as env vars without needing persona logic
2025-12-31 00:21:07 +00:00
..
__init__.py safer import handling 2024-10-08 00:51:58 -07:00
checks.py wip 2 2025-12-24 21:46:14 -08:00
db.py remove huey 2025-12-24 23:40:18 -08:00
debugging.py speed up startup time, add rich startup progressbar, split logging and checks into misc, fix search index import backend bug 2024-09-24 19:04:38 -07:00
folders.py way better plugin hooks system wip 2025-12-28 03:39:59 -08:00
hashing.py wip major changes 2025-12-24 20:10:38 -08:00
jsonl.py fix: correct CLI pipeline data flow for crawl -> snapshot -> extract 2025-12-30 19:42:41 +00:00
legacy.py fix: address PR review comments from cubic-dev-ai 2025-12-30 20:09:51 +00:00
logging_util.py wip 2025-12-28 17:51:54 -08:00
logging.py remove Seed model in favor of Crawl as template 2025-12-25 01:52:41 -08:00
monkey_patches.py remove Seed model in favor of Crawl as template 2025-12-25 01:52:41 -08:00
paginators.py comment out Crawl api methods temporarily 2024-10-14 15:41:58 -07:00
process_utils.py continue renaming extractor to plugin, add plan for hook concurrency, add chrome kill helper script 2025-12-28 05:29:24 -08:00
serve_static.py move serve_static and shell_welcome_message into misc 2024-10-14 17:35:28 -07:00
shell_welcome_message.py continue renaming extractor to plugin, add plan for hook concurrency, add chrome kill helper script 2025-12-28 05:29:24 -08:00
system.py switch .is_dir and .exists for os.access to avoid PermissionError on startup 2024-10-08 03:02:34 -07:00
toml_util.py fix LIB_DIR and TMP_DIR loading when primary option isnt available 2024-10-21 00:35:56 -07:00
util.py Derive CHROME_USER_DATA_DIR from ACTIVE_PERSONA in config system 2025-12-31 00:21:07 +00:00