feat(browser): --auditable session + inspect command (CDP bridge)#1
Open
dgouvea wants to merge 1 commit into
Open
feat(browser): --auditable session + inspect command (CDP bridge)#1dgouvea wants to merge 1 commit into
dgouvea wants to merge 1 commit into
Conversation
Opening a session with --auditable true launches it as a persistent
context exposing a Chrome remote-debugging port. The new 'inspect'
command prints a {url,port} handshake so an external CDP tool (e.g.
aux4 lighthouse --fromBrowser) can attach to the authenticated session
and inherit its cookies and localStorage. Normal isolated sessions are
unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a CDP bridge so an external tool can audit an authenticated browser session.
aux4 browser open --auditable true— launches the session as a Playwright persistent context exposing a Chrome remote-debugging port (instead of the normal isolated context). Normal sessions are unchanged.aux4 browser inspect --session <id>— prints a one-line handshake{"url":"...","port":<n>}to stdout.Why
Normal sessions run in an isolated context, so an external Chrome tool (e.g. Lighthouse) attaching via CDP would land in the default context and only ever see a logged-out page. A persistent context shares one profile, so an attaching tool inherits the session's cookies and localStorage.
Pairs with (no dependency)
aux4/lighthousegains--fromBrowser, which consumes this handshake:The two packages share no
.aux4dependency — they only meet at the shell pipe.Verification
aux4 lint runpasses (one pre-existingplaybook:actionswarning, unrelated).inspect3/3 andopen3/3.test.mdpass.authCookie=PRESENT, no/loginbounce), confirming auth carries through the bridge.🤖 Generated with Claude Code