cookie-bridge
Estate-local browser cookie/session bridge. Injects the owner's OWN web sessions (ChatGPT, Databricks) from a phone CDP extract into the owner's MAIN Chrome/Edge/Comet profiles WITHOUT the profile corruption that an earlier force-kill approach caused. Use for putting a logged-in web session onto a main browser profile safely, or for extracting/refreshing a session from a phone over ADB+CDP. NOT for third-party accounts, NOT for reading or exfiltrating cookie values, NOT for bypassing another site's auth.
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- cookie-bridge
- metadata
- { "risk": "high", "type": "reference", "estate_local": true }
- description
- Estate-local browser cookie/session bridge. Injects the owner's OWN web sessions (ChatGPT, Databricks) from a phone CDP extract into the owner's MAIN Chrome/Edge/Comet profiles WITHOUT the profile corruption that an earlier force-kill approach caused. Use for putting a logged-in web session onto a main browser profile safely, or for extracting/refreshing a session from a phone over ADB+CDP. NOT for third-party accounts, NOT for reading or exfiltrating cookie values, NOT for bypassing another site's auth.
02 资源文件 18
- 其他.gitignore399 B
- 脚本apply_durable.py16.1 KB
- 脚本aws_cookie_bridge.py27.1 KB
- 脚本cookie_bridge.py16.4 KB
- 脚本databricks_cookie_bridge.py33.9 KB
- 脚本inject_all_main_profiles.py22.8 KB
- 脚本inject_edge.py3.7 KB
- 脚本inject_now.py5.6 KB
- 脚本inject_selenium.py5.3 KB
- 脚本list_session_options.py11.5 KB
- 脚本print_session_summary.py2.6 KB
- 脚本reapply.ps1810 B
- 参考文档references/RUNBOOK-cookie-bridge-databricks-2026-07-24-ADDENDUM.md6.2 KB
- 参考文档references/RUNBOOK-cookie-bridge-databricks-2026-07-24.md12.8 KB
- 脚本restore_browser_sessions.py10.0 KB
- 脚本restore_by_ids.py5.7 KB
- 脚本safe_main_cookie_inject.py27.4 KB
- 脚本safe_restore_prefs_accounts.py9.8 KB
03 SKILL.md 正文
cookie-bridge
Estate-local tooling to move the owner's own authenticated web sessions onto the owner's own main browser profiles, safely. Every script operates on this machine's local browser profiles; none reads or transmits a cookie value off-box.
Why this exists (the corruption it prevents)
On 2026-07-20 an un-gated inject_all_main_profiles.py force-killed live browsers and
rebound the real User Data via CDP with no pre-snapshot and no integrity check. It cost
Chrome its multi-account list. The corruption vector was force-kill + main-profile rebind
without backup/verify, not cookie injection itself. This skill is the safe replacement.
Hard rules (non-negotiable)
- Prefer
safe_main_cookie_inject.pyover any kill-all inject. It snapshots Preferences/Cookies/Login Data first, refuses if the browser is still running, usesNetwork.setCookieONLY (never a delete API), verifies integrity, and rolls back on failure. - Never
Network.deleteCookies/ wipe a cookie jar on a main profile. - Never rewrite
Preferencesas part of a cookie inject. Account merge is a SEPARATE step. (Bundling a Preferences patch into an inject is what pruned Chrome's account_info to 0 on 2026-07-23.) - Snapshot
SessionsBEFORE closing a browser if windows must be preserved. - After a CDP inject (
about:blank), restoreSessionsfrom the pre-close backup before a normal launch. - Do not touch
.sso-mirror-backup-2026070*(a separate, older concern). - Never print cookie values, PATs, or secret-vault plaintext.
Gated / dangerous scripts
Two scripts force-kill browsers and are gated behind I_ACCEPT_PROFILE_RISK=1; they refuse
to run without it and --help never kills:
inject_all_main_profiles.py— the legacy kill-all inject. DEPRECATED; prefer the safe tool.restore_browser_sessions.py— kill → promote largest Session/Tabs → relaunch with--restore-last-session. Kills ALL browsers, including one you may want left alone.
Known limitation — account restore is NOT a file operation
Restoring account_info into Preferences is cosmetic: Chrome validates those entries
against OAuth refresh tokens it no longer holds and prunes them on startup. No file-level
restore reconstitutes a signed-in Google account — that requires manual sign-in. Do not
represent an on-disk account-list restore as a recovered login.
Safe commands
# status only
python safe_main_cookie_inject.py --dry-run --browser chrome,edge --payload databricks
# re-extract from phone (tabs open + USB debug)
adb forward tcp:9223 localabstract:chrome_devtools_remote
python databricks_cookie_bridge.py extract
# main inject, one browser at a time, quit that browser first
python safe_main_cookie_inject.py --browser chrome --payload databricks
Script inventory
| script | role |
|---|---|
safe_main_cookie_inject.py |
preferred main inject: snapshot + integrity + graceful close |
safe_restore_prefs_accounts.py |
merge Chrome account_info from a backup (browsers must be quit) |
databricks_cookie_bridge.py |
extract/inject Databricks; default = durable isolated profile |
cookie_bridge.py |
phone extract/inject for ChatGPT (ADB → CDP) |
apply_durable.py |
apply cookies to an ISOLATED durable profile (safe, never main) |
restore_browser_sessions.py |
gated kill→restore-sessions→relaunch |
inject_all_main_profiles.py |
gated, DEPRECATED legacy kill-all inject |
inject_edge.py / inject_now.py / inject_selenium.py |
narrower inject variants |
list_session_options.py / print_session_summary.py / restore_by_ids.py |
session inspection/restore helpers |
Runtime artifacts (cookie JSON, reports, snapshots, profiles) are .gitignored and never
versioned — this skill is tooling only.
04 同仓库更多 Skills
clarify-requirements
Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.
openmm-md
Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein / protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.
visual-review
Take screenshots of web pages and UI using Playwright for visual review and iteration
status
Diagnostic status report — shows metaswarm installation state, project setup, and potential issues
start
Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work
setup
Interactive project setup — detects your project, configures metaswarm, writes project-local files