🎭 feat(agents): playwright-chatgpt agent (browser-driven ChatGPT via ACP bridge)#62
Open
chaizhenhua wants to merge 19 commits into
Open
🎭 feat(agents): playwright-chatgpt agent (browser-driven ChatGPT via ACP bridge)#62chaizhenhua wants to merge 19 commits into
chaizhenhua wants to merge 19 commits into
Conversation
51f5729 to
efa0145
Compare
f011572 to
988dc9a
Compare
5 tasks
988dc9a to
b9737ce
Compare
5 tasks
4a00905 to
96d70ab
Compare
… emit relative paths
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.
Summary
Adds a fifth agent type,
playwright-chatgpt, that drives a real Chromium session againstchatgpt.comvia a new Node.js ACP bridge. Slots into the existingGenericCliAdapterpath with zero Rust adapter changes outside this PR's own provisioning hardening — registration is a single seed manifest entry.crates/oversight-agents/manifests/playwright-chatgpt.toml— adapter manifest (idplaywright-chatgpt, detect viafile_existson built CLI,pnpm_workspaceinstall strategy)bridges/playwright-chatgpt/— TypeScript Node bridge (~1.6k lines): ACP JSON-RPC server over stdio, persistent-context Chromium launcher with bootstrap guard, layered stream-complete detector (SSE[DONE]/ DOM stop-button / idle / hard-timeout), versionedselectorRegistry, session resume viachatgpt://conversation/<uuid>, honest text-only capabilities, hard-timeout surfaced as error,SessionNewParams.cwdhonoured for artifact paths, cancel signal propagates asstopReason: "cancelled".crates/oversight-worker/— provisioning + discovery hardening for in-repo builtins: default allowlist gainspnpm/node/hermes;pnpm_workspaceinstall strategy now requiresOVERSIGHT_WORKER_REPO_ROOTand refuses fast otherwise;file_existsdetect and runtime spawn args resolve the same env so detect / install / runtime never disagree on where to look.Stack
masterReview range
12 commits, all playwright-chatgpt scope:
📐 docs(superpowers)× 2 — design spec + implementation plan🎭 feat(agents)× 2 — playwright-chatgpt adapter manifest + server-side seed🎭 feat(bridges)× 4 — TS bridge layers (types/codec/sessions; ACP server; browser/CLI/bootstrap/fixture; scaffolding)🧪 test(worker)× 2 — manifest round-trips + cross-language smoke against fake-chatgpt fixture🛠️ chore(make)× 1 —bridges-*targets;make setupinstalls the bridge✨ feat(worker)× 1 — embed playwright-chatgpt inembedded_builtin_manifests()fallback (also absorbs the four follow-on provisioning fixes: pnpm/node allowlist, pnpm_workspace cwd, repo-relative path resolution, hermes allowlist + test coverage)The previous 25-commit stack squashed the bridge review-fix commits into
feat(bridges): browser layer + CLI + bootstrapand the worker review-fix commits intofeat(worker): mirror playwright-chatgpt in embedded_builtin_manifests fallback; six unrelated commits were extracted to #64. Net effect: same diff, half the SHAs.Builtin auto-provision requirements
playwright-chatgpt's install steps live inside this repo (pnpm --dir bridges/playwright-chatgpt …). The worker provisioner used to default to a per-install tempdir as cwd, which silently broke the in-repo paths. Two operator-visible knobs make this explicit:OVERSIGHT_WORKER_REPO_ROOTpnpm_workspaceinstalls fail with a clear error;file_existsdetect and runtime spawn fall back to process cwdWORKER_PROVISION_ALLOWLISTpnpm/node/hermesso the builtin is accepted out of the boxmake bridges-installon the worker host and skip autoinstall entirely.Test plan
Covered by CI
cargo test -p oversight-worker --test playwright_chatgpt_manifest— manifest round-trips throughGenericCliConfig::validate()cargo test -p oversight-worker provisioning::tests::default_allowlist_accepts_every_builtin_manifests_install— walks claude/codex/hermes/playwright-chatgpt against the default allowlistcargo test -p oversight-worker discovery::tests::detect_file_exists_resolves_relative_path_against_repo_root_envcargo test -p oversight-worker adapters::generic::tests::resolve_runtime_arg_*pnpm --dir bridges/playwright-chatgpt test:unit— codec / sessions / selectors / server (includes the test that pins the honest prompt capabilities + cwd-forwarding test)pnpm --dir bridges/playwright-chatgpt test:integration— Playwright test over local fake-chatgpt fixturecargo test -p oversight-worker --test playwright_chatgpt_smoke— real Node bridge spawned over stdio against the fake fixture, Rust asserts ACP framesmake bridges-install/bridges-build/bridges-test/bridges-test-integrationtargets;make setupnow installs the bridgeNot covered by CI (manual until follow-up e2e runner lands)
chatgpt.comsmoke: reviewer runsnode bridges/playwright-chatgpt/dist/bootstrap.js --profile-dir /tmp/oversight-test-profile, logs in, then exercises the live site via a workerRisks / limitations
chatgpt.compath. All automated coverage runs against the local fake-chatgpt fixture; live-site behaviour is verified only by manual smoke until atests/e2e/runner lands.selectorRegistryis versioned so patches ship without recompiling.Deferred / follow-ups
chatgpt.come2e runner undertests/e2e/(lifts the "not covered by CI" caveat)?model=<id>via URL)attach.ts)