Give every AO worker a live, session-owned browser - #3066
Conversation
# Conflicts: # backend/internal/daemon/daemon.go # backend/internal/httpd/api.go # backend/internal/httpd/apispec/openapi.yaml # backend/internal/httpd/lan_listener.go # backend/internal/httpd/lan_listener_test.go # backend/internal/skillassets/using-ao/SKILL.md # frontend/src/api/schema.ts # frontend/src/main.ts
…0/agent-orchestrator into feat/agent-browser-runtime
illegalcall
left a comment
There was a problem hiding this comment.
Please address the inline comments.
|
Implemented all 12 review items and merged the latest
Validation
|
Pre-landing reviewReviewed on a fresh worktree (branch at Verification run locally: This is genuinely good work. The isolation model is thought through (per-worker ephemeral partition, HMAC capability tokens, target-bound debugger instead of a global CDP port), the docs are unusually complete, and the test coverage is real rather than decorative. Findings below, most-severe first. 1. LAN listener blocks
|
Adversarial review (cross-model)Two independent passes: one fresh with an attacker/chaos framing, one from Codex CLI ( Both models found it independently (treat as confirmed)A1. A worker writes A2. Preview children orphan permanently on daemon SIGKILL. A3. A4. Browser targets leak for sessions the UI never showed. Related: A5. No read deadline on the bridge handshake. A6. Port TOCTOU, plus the probe cannot tell whose server it found. Found by Codex, verified against the codeB1. No permission handlers on the per-worker partitions. B2. B3. A failed B4. A cancelled B5. No tab cap. Only a floor. B6. No backpressure, no result size cap. B7. B8. Windows pipe has no explicit security descriptor. Found only in the Claude passC1. Silent UTF-8 corruption at C2. No untrusted-content boundary on page output. The finding most worth addressing, and neither pass's tooling raises it automatically. Concrete: "figure out why staging is broken" → staging renders user-generated content → an attacker's comment body reads C3. C4. C5. C6. C7. C8. The renderer-origin guard is inert in dev. Summary8 findings from the structured review + 21 here, 6 of them cross-model confirmed. None are caught by the existing suite, which is the point of running this pass. All local gates are green: Suggested fix order:
Should-fix before merge: B2, B3, B5, B6, A5, C3, C4, C6. Design calls: A6, B7, B8, C5, C7. Not blocking: A3, A4, C8, plus the smaller items in the structured review. The architecture is sound and the craft is high, so none of this is a rewrite. But "session-owned browser with worker isolation" is the headline claim, and B1, B8, and C2 each poke a hole in it from a different direction. Two caveats: the app was not run (no Electron session available), so every runtime claim except C1 is read-from-source. And C8's severity depends on how dev builds are packaged. 🤖 Review assisted by Claude Code + Codex CLI |
|
Thanks for contributing to Agent Orchestrator. This PR is being picked up by the current external contributor on-call pair: If someone is already working on this, please continue as usual. For faster context or live questions, you can also join the AO Discord. Join the session here: Come by if you want to see what is being built, ask questions, or just hang around with the community. |
|
@illegalcall Preview-server security and lifecycle
Browser bridge and session isolation
Browser automation correctness and safety
Contracts and documentation
Validation
|
What
This PR turns AO’s passive Preview panel into a browser that agents can inspect, control, and verify—while the developer watches or takes over the same live page.
Browser automation
ao browsercommand surface.Session ownership and isolation
WebContentsViewfor both the agent and developer.Tabs and popups
Deterministic previews
.ao/launch.jsonconfigurations, selects a port, waits for readiness, and cleans up the process tree with the session.Optional network diagnostics
Developer-facing polish
Why
Previously, an agent could build an application while AO displayed an unrelated or stale page, and meaningful verification often required the developer to manually open URLs and test the result.
This enables a smoother development loop:
Developers can now ask an agent to build, debug, and verify a frontend without repeatedly copying URLs, describing visible failures, or switching to a separate automation browser.
How
AO_SESSION_IDand validates session ownership at the daemon boundary.Reviewer focus:
Testing
Passed locally:
go build ./...go vet ./...golangci-lint— zero findingsnpm run typechecknpm run typecheck:e2eChecklist
main/ continuing the existing feature branchAGENTS.mdconventions and architecture boundaries