feat: add assistant browser CLI with decoupled operations contract#26235
Conversation
#26193) * refactor: add browser operations contract decoupled from tool wrappers * fix: remove TOOLS.json literal from doc comment to pass static analysis guard * fix: remove bundled-skills reference from doc comment to pass static analysis guard
…mmands (#26207) * feat: add assistant browser command namespace with 17 browser subcommands * fix: address review feedback — daemon terminology, help text examples, boolean flags, write error handling 1. Replace "daemon" and "CLI IPC socket" with user-friendly terminology in all user-facing text per AGENTS.md guidelines. 2. Add optional `helpText` field to `BrowserOperationMeta` type and populate it for all 16 operations with behavioral notes and 2-3 concrete examples per CLI AGENTS.md Help Text Standards. `buildSubcommand` now calls `subcmd.addHelpText("after", ...)`. 3. Fix boolean flags to support explicit `false` values via Commander's `--no-<flag>` negation pattern. `fieldToFlag` now emits `--flag, --no-flag` for booleans, and `parseFieldValue` passes through the actual boolean value instead of always coercing to `true`. 4. Wrap `writeFileSync` for screenshot `--output` in try/catch, producing structured error output (JSON or log) instead of an unhandled stack trace on invalid path or permission errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add enum choices validation and fix boolean option negation for Commander 13 - Use Commander's Option class with .choices() when field.enum is defined, enforcing valid values at the CLI level and showing allowed choices in --help. Required enum fields also call .makeOptionMandatory(true). - Fix boolean option negation by declaring only --flag (not --flag, --no-flag). Commander 13 auto-generates --no-flag; the dual-declaration pattern caused --flag to parse as false. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| registerDefaultAction(program); | ||
| registerBackupCommand(program); | ||
| registerBashCommand(program); | ||
| registerBrowserCommand(program); |
There was a problem hiding this comment.
🚩 CLI browser command bypasses browser feature flag gate
The browser CLI command is registered unconditionally in assistant/src/cli/program.ts:68, and the IPC route at assistant/src/ipc/routes/browser.ts:71 dispatches directly through executeBrowserOperation — which calls into browser-execution.ts functions without checking the browser feature flag. In contrast, the LLM-facing path gates browser tool availability on the feature flag (as shown in browser-skill-endstate.test.ts with _setOverridesForTesting({ browser: true })). This means assistant browser navigate --url ... works even when the feature flag is disabled, while the LLM cannot invoke browser tools. This may be intentional (CLI as an independent entrypoint), but it's worth confirming the design intent since the feature flag is meant to control browser availability.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Review SummaryPulled this branch into a dedicated worktree and did a full diff review with targeted validation. Validation run
Both passed after installing package deps in the worktree. Findings1) [P2]
|
Summary
Introduces a first-class
assistant browsercommand namespace with 17 subcommands (navigate, click, type, screenshot, etc.) that are fully decoupled from the existingbrowser_*skill tools. The implementation adds a shared browser operations contract that both tool wrappers and the CLI consume, creating a clean removal path forbrowser_*tools later.Self-review result
GAPS FOUND — 5 gaps fixed across 2 fix PRs
PRs merged into feature branch
browser_executeCLI IPC route for daemon-side browser operations #26200: feat: addbrowser_executeCLI IPC route for daemon-side browser operationsassistant browsercommand namespace with 17 browser subcommands #26207: feat: addassistant browsercommand namespace with 17 browser subcommandsFix PRs
Part of plan: assistant-browser-cli-decoupling.md