feat(extension): prepare Chrome Web Store beta - #32
Merged
Conversation
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
Prepare Browser Control's thin MV3 extension for an unlisted Chrome Web Store beta while keeping the local relay as the Playwright/session driver.
statusanddoctorBefore / After
Before
chrome.debuggerattachment.session resetandsession deleterejected forever with "target has not re-announced yet".sessions.json.After
hello, re-announces its complete attached-tab inventory, reconciles groups, then sends socket-scopedready.How
extension/src/background.tsimplements the protocol-1 handshake, socket-scoped inventory and responses, bounded reconnect behavior, and runtime manifest version reporting.src/extension-rpc.ts,src/protocol.ts, andsrc/relay.tsgate authoritative events on handshake compatibility/readiness and serialize target reconciliation by extension generation.src/relay.tsadds bounded dead-target release and preserves durable ownership while detaching stale live CDP generations.src/http-api.ts,src/relay-schema.ts,src/doctor.ts, andsrc/cli.tsexpose version-independent protocol diagnostics.scripts/package-extension.tsvalidates the manifest/resources and emits a deterministic, allowlisted Store ZIP.docs/CHROME_WEB_STORE.mdanddocs/PRIVACY.mdcontain submission copy, permission justifications, reviewer steps, disclosure, local-storage categories, and Limited Use language.src/execute.tskeepssnapshot()callbacks self-contained under source-mode esbuild/tsx transforms;src/cli.tspreserves nestedsecrets run -- <command>operands across the current Effect CLI parser.Scope
chrome-extension://origins remain a development-only submission blocker.@opencode-ai/browser-controlrelay; this PR does not move Playwright, session state, capture, or artifacts into the extension.0.3.0forx-live-chat; final cold-start verification of this exact commit is deferred until that relay can be deliberately upgraded without interrupting the stream workflow.Testing
pnpm run ci0.0.22connected successfully to the existing protocol-compatible npm0.3.0relay without taking ownership away fromx-live-chatartifacts/browser-control-extension-0.0.22.zipbbcf6c18b7ad65cf2cac6dc0ab8b5094d0c33d528d68e20185038f85f59a2d6aFlow
sequenceDiagram participant Extension participant Relay participant Registry as Target Registry participant Session as Durable Session participant Client as Playwright/CDP Client Extension->>Relay: hello(version, protocol=1) Relay->>Client: detach old live target generations Relay->>Registry: clear live state Note over Session: preserve target identity during reconciliation loop attached tabs Extension->>Relay: debugger.attached(tabId) Relay->>Registry: reconcile exact target generation end Extension->>Relay: ready alt all announced targets reconciled Relay->>Relay: mark extension ready else reconciliation failed Relay-->>Extension: close and reconnect end alt reset/delete target is live Relay->>Extension: close exact tabId else complete inventory omits relay target Relay->>Session: forget dead target identity end