feat(cli): manage browser pane extensions with superset browser extensions
Merged
KI
6d ago+598+598+012345678901234567890123456789-22-22-01234567890123456789
Follow-up to #9221 (Chrome extensions in the browser pane). Adds superset browser extensions so users and agents can manage the extensions in the user's own browser panes from the CLI.
superset browser extensions list
superset browser extensions install <web-store-id>
superset browser extensions remove <id>
superset browser extensions pin <id>
superset browser extensions unpin <id>
Safety
- Install and remove always ask the user. They show the same in-app confirm as the Web Store and the puzzle menu. Install lists the warnings of the CRX that was downloaded and signature-checked, not the store page's claims. A "no" returns 403, so an agent can't add or remove an extension on its own.
- No way into an extension. There is no command to open, click or read an extension: that would put an agent inside a password manager.
/extensions/activatereturns 404. - Only the user's extensions. List, pin and remove only see extensions installed from the Web Store into the user's folder. The app's bundled extension is hidden.
- IDs are validated (32 chars, a–p), so a path like
../../etcis refused with 400. - Pin and unpin are reversible and need no confirm.
Changes
- Desktop bridge:
/extensions/{list,install,remove,pin}routes inbrowser-bridge.ts, backed byextension-host/cli-extensions.ts. - host-service: tRPC procedures and bridge types that forward to the desktop.
- CLI:
browser extensionscommand group andparseExtensionId.
Testing
browser-bridge.test.ts: install and remove refused without the user's yes, allowed with it; remove of an extension that isn't installed returns 404; a bad ID returns 400; activate returns 404.- CLI:
parseExtensionIdtests. - Desktop browser tests and CLI tests pass, the CLI typecheck is clean, and
check:pluginspasses after rebasing onto main. - Manual, in the dev app before the rebase (filmed for the #9221 demo): an agent ran
install, the confirm appeared and was approved in the UI; it then opened a page in its own pane, which ran no extensions; a declinedremovewas refused.
Summary by cubic
Adds superset browser extensions so users and agents can manage the Chrome extensions in their browser panes from the CLI: list, install (by Web Store ID or URL), remove, pin, and unpin.
Safety
- Install and remove reuse the same in-app confirm as the Web Store and the overflow menu; a "no" returns 403, so an agent can't add or remove an extension on its own.
- Install asks with the warnings of the CRX that was downloaded and signature-checked, not the store page's claims.
- Nothing opens, clicks, or reads an extension, since that would put an agent inside a password manager;
/extensions/activatereturns 404. - List, pin, and remove only see extensions installed from the Web Store into the user's folder; the app's bundled extension is hidden.
- IDs are validated (32 chars, a-p) so path-like input is refused with 400; a successful install is pinned to the toolbar, and pin/unpin are reversible without a confirm.
Summary by CodeRabbit
- New Features
- Manage browser extensions through CLI commands: list, install, remove, pin, and unpin.
- Install extensions using a Chrome Web Store URL or extension ID. Installs and removals prompt for confirmation.
- View each extension’s name, version, and toolbar pin status. New installations are pinned automatically.