Closed
Conversation
Codex and Claude onboarding now separate CLI installation from authentication, so missing CLIs show install actions instead of sign-in prompts. CLI launches use one high-level router that enriches GUI PATHs on macOS/Linux/Windows and resolves Windows npm shims before spawning. Constraint: Electron GUI launches can miss user shell PATH entries, and Windows npm-installed CLIs often resolve to .cmd or .ps1 shims. Rejected: Keep per-call Windows launch fixes | leaves Codex PTY login and future CLI calls easy to miss. Confidence: high Scope-risk: moderate Tested: npm run test Tested: task typecheck Tested: npm run lint -- --quiet Tested: git diff --check Not-tested: Manual Windows/Linux Electron installer flow on physical machines
Agents need a local CDP runtime that does not depend on legacy helper tools or global skill installation. This vendors the upstream browser-harness-js runtime and interaction recipes, while excluding the bundled SDK from app TypeScript and ESLint passes because it is a runtime asset rather than app source. Constraint: App-spawned agents run from userData/harness and need the CLI available relative to that harness. Rejected: Install the upstream skill globally at task time | mutates the user's toolchain and makes launches depend on external setup. Confidence: high Scope-risk: moderate Directive: Treat browser-harness-js/sdk as vendored runtime; update from upstream intentionally, not via incidental formatting or lint fixes. Tested: cd app && npm run typecheck; targeted Vitest harness and adapter tests. Not-tested: Fresh packaged production app launch.
The desktop app now gives agents a vendored browser-harness-js CLI, an assigned-target connection helper, and reference folders for browser mechanics and domain playbooks. This replaces the old helpers.js/TOOLS.json tool-extension path while preserving a narrow manual-edit escape hatch for real runtime blockers. Constraint: Agents must drive only the BrowserPool-assigned CDP target identified by BU_TARGET_ID and BU_CDP_PORT. Rejected: Keep regular helper APIs as the primary surface | it keeps encouraging agents to patch tools that the upstream CDP runtime already covers. Confidence: high Scope-risk: moderate Directive: Do not reintroduce TOOLS.json as an agent-facing browser control surface; add browser mechanics as upstream browser-harness-js recipes or tightly scoped app runtime fixes. Tested: cd app && npm run typecheck; cd app && npm run test -- --run tests/unit/hl/stock-helpers.test.ts tests/unit/hl/harnessBootstrap.test.ts tests/unit/hl/codexAdapter.test.ts tests/unit/hl/browsercodeAdapter.test.ts; task agent:run smoke opened example.com and returned Example Domain. Not-tested: Fresh packaged production app launch.
Collaborator
Author
|
Closing duplicate. The intended stacked PR is #417, based on fix/onboarding-cli-launch-router. |
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 by cubic
Switch desktop agents to the bundled
browser-harness-jsCDP runtime and retireTOOLS.json. Agents now drive the assigned browser via the vendored CLI, with better PATH/CLI resolution and clearer onboarding for engine installs.New Features
browser-harness-jsruntime under the harness; added to PATH viaapplyBrowserHarnessEnvwith per-sessionCDP_REPL_PORTand log.browsercode,claude-code,codex) to inject the new env and guide agents to the CLI.AGENTS.mdcontent and added interaction skill guides (screenshots, iframes, tabs, uploads, etc.);helpers.jsis now a thin bridge to the CLI.TOOLS.jsonand related watchers; UI logs now referenceAGENTS.md.resolveCliLaunch: enrich GUI PATHs and resolve Windows npm shims; used by spawns and Codex login. Added safer Windows installer spawn spec.installEngineonboarding action and split CLI installation from authentication.Migration
browser-harness-js 'await connectToAssignedTarget()'and call CDP domains (e.g.,session.Page.navigate) instead of legacy tool APIs.TOOLS.json; referenceAGENTS.mdand the new interaction skill docs for patterns.Written for commit a5c568f. Summary will update on new commits.