Skip to content

Import installed-browser cookies across all languages - #73

Merged
konard merged 21 commits into
mainfrom
issue-69-d8df3ab30de1
Aug 2, 2026
Merged

Import installed-browser cookies across all languages#73
konard merged 21 commits into
mainfrom
issue-69-d8df3ab30de1

Conversation

@konard

@konard konard commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

  • add first-class installed-browser profile discovery and cookie import APIs to JavaScript, Python, and Rust
  • support Chrome, Edge, Brave, Chromium, and Firefox profiles on macOS, Linux, and Windows
  • decrypt Chromium cookies through macOS Keychain, Linux libsecret/KWallet (plus Chromium's fallback), and Windows DPAPI/AES-GCM, including database-v24 host-hash validation
  • return the exact Playwright/Puppeteer cookie fields and support profile selection, domain filtering, strict/partial decryption, TTL, and forced refresh
  • cache results and derived credentials with owner-only permissions and a cross-process lock/shared schema, so all three implementations touch the OS credential store at most once per TTL window
  • document the local-only privacy model and the explicit boundary for Windows Chromium app-bound v20 cookies, which ordinary external processes cannot decrypt

Reproduction and verification

Before this change, importing readBrowserCookies/listBrowserProfiles (or their Python/Rust equivalents) failed because no installed-browser cookie API existed, leaving consumers to discover SQLite profiles and implement platform decryption themselves.

The regression suites build minimal Chromium and Firefox databases and verify discovery, all supported encryption formats, timestamps, cookie shape, filtering, version-24 host hashes, strict/partial behavior, TTL/refresh behavior, owner-only cache files, and separate-process prompt coordination:

  • JavaScript: 515 unit tests; lint, Prettier, duplication, JSDoc, changeset, and package dry-run checks
  • JavaScript CI install mode: all 515 tests on Node 24 after npm ci --ignore-scripts
  • Python: 280 tests; Ruff, formatting, mypy, file-size, build, and Twine checks
  • Rust: 166 unit tests plus integration/doc tests; rustfmt, Clippy, file-size, release build, and package-list checks
  • cross-language: node experiments/cookie-cache-parity.mjs verifies JavaScript/Python credential-cache interoperability

This is non-UI functionality, so screenshots are not applicable.

Fixes #69

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #69
@konard konard self-assigned this Aug 2, 2026
konard added 19 commits August 2, 2026 05:55
# Conflicts:
#	js/README.md
#	js/src/exports.js
#	python/src/browser_commander/__init__.py
#	python/src/browser_commander/browser/__init__.py
#	python/src/browser_commander/exports.py
#	rust/README.md
#	rust/src/lib.rs
# Conflicts:
#	docs/feature-parity.md
#	python/README.md
@konard konard changed the title [WIP] Import cookies/session from any installed browser (Chrome/Edge/Brave/Firefox) into an automation session Import installed-browser cookies across all languages Aug 2, 2026
@konard
konard marked this pull request as ready for review August 2, 2026 07:51
@konard

konard commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Completed and marked ready for review: PR #73 — Import installed-browser cookies across all languages.

  • Added Chrome, Edge, Brave, Chromium, and Firefox cookie import for JavaScript, Python, and Rust.
  • Implemented macOS Keychain, Linux libsecret/KWallet, Windows DPAPI, profile discovery, decryption, filtering, and exact automation cookie shape.
  • Added owner-only TTL caches, cross-process locking, refresh behavior, and Windows-native DACL protection. This follows Windows’ platform-specific permission model and icacls inheritance controls. Microsoft documentation
  • Documented the Windows app-bound v20 limitation and privacy considerations.
  • Final SHA: abb6505f59ef766eae29a881a22bbf669b8e1879
  • All final-SHA JavaScript, Python, Rust, documentation, packaging, lint, and Ubuntu/macOS/Windows checks pass.
  • Branch is current with main, PR is mergeable, and the working tree is clean.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $66.190426

📊 Context and tokens usage:

  • 1.2M / 200K (601%) input tokens, 191.2K / 128K (149%) output tokens

Total: (1.2M + 45.6M cached) input tokens, 191.2K output tokens, $66.190426 cost


This summary was automatically extracted from the AI working session output.

@konard

konard commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $66.190426

📊 Context and tokens usage:

  • 1.2M / 200K (601%) input tokens, 191.2K / 128K (149%) output tokens

Total: (1.2M + 45.6M cached) input tokens, 191.2K output tokens, $66.190426 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: xhigh (~31999 tokens)
  • Model: GPT 5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (13782KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit 4d100a1 into main Aug 2, 2026
29 checks passed
@konard

konard commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import cookies/session from any installed browser (Chrome/Edge/Brave/Firefox) into an automation session

1 participant