Skip to content

[Feature]: CLI installation and lifecycle management for browser extensions #46537

Open

Description

@chirag127

Problem or use case

I want to develop and test browser extensions inside Orca, with a repeatable setup that an agent can perform for an explicitly selected browser profile.

Orca already supports loading unpacked extensions through Settings. In the inspected 1.4.268 CLI, extension list and extension reload are available; reload --path selects an already installed extension and does not install one. The reviewed desktop source also provides per-profile enable/disable, removal, and a Web Store installation flow. This request exposes the remaining lifecycle operations through a documented CLI/runtime interface.

The existing scopes matter: installation and source updates are shared on the desktop host; enablement is per profile. Reload affects the profiles where the extension is enabled, while uninstall removes the shared installation and its saved data. A clean browser profile alone therefore does not isolate changes to a shared extension ID.

Proposed solution

Extend the existing lifecycle implementation with a documented CLI interface and matching UI outcomes:

  • Install/load an unpacked development directory and select the profile in which to enable it. Reuse the existing supported Web Store installation path and its source-specific permission semantics when exposing store installation. Report supported source types and restrictions, including whether archive/CRX import is available.
  • Inspect extension ID, manifest version, installed version, source, load errors, enabled profiles, requested permissions, and the actual execution host.
  • Enable or disable a selected profile independently. Update or uninstall the host-shared installation with all affected profiles identified in the result. Provide an explicit retain-data/remove-data choice for uninstall as an extension of the current remove-data behavior.
  • Record source revisions and build identities, and restore a declared extension set from available artifacts for reproducible tests. Version pinning should state which versions the source can supply and report unavailable versions explicitly.
  • When a test extension ID is also used by a normal profile, use a separate test installation namespace/environment or report the scope conflict before changing the shared installation. Test cleanup must respect that same boundary.
  • Return structured outcomes and stable IDs. A repeated installation request should identify the existing installation rather than silently create a duplicate; a failed update should leave a diagnosable, recoverable state.
  • Make profile and host targeting explicit, including the distinction between a desktop-hosted browser and a server-hosted browser. Unsupported combinations should produce a specific capability result.

Acceptance criteria

  • From a fresh test profile, an agent can install a fixture extension, list it, enable/disable it, update it, and uninstall it using documented commands.
  • UI and CLI report the same extension identity, version, profile membership, and load errors after each operation.
  • Repeating an install and retrying an interrupted operation have documented, observable outcomes without duplicate registrations.
  • Two test profiles can use different extension sets without changing the user's normal browsing profile.
  • Disabling one profile preserves another profile's enablement. Update/reload receipts identify every affected profile, and uninstall identifies its host-wide scope and data-handling choice.
  • A fixture sharing an extension ID with a normal profile uses an isolated installation environment or reports a conflict before update, reload, or cleanup; it cannot remove the normal profile's extension.
  • Invalid manifests, missing directories, unsupported sources, and unavailable execution hosts return actionable errors.

Alternatives or additional context

The current workaround is to use Settings for initial installation and then use the existing list/reload commands. This request extends that working baseline.

Related groundwork: #20558 covers unpacked installation/management UI, and #39578 covers CLI listing/manual reload. #35178 separately tracks extension reach on desktop-rendered remote-workspace pages. This request adds CLI lifecycle operations and explicit scope reporting; reload-on-change and regression testing are separate requirements.

Source references: existing lifecycle and unpacked loading, Web Store flow, and CLI selection/reload semantics. These are source observations, not a claim of newly tested Store installation.

Activity

  1. chirag127 commented on Nov 21, 2026

    @chirag127
    ContributorAuthor

    Concrete API requirement from an Orca-only extension test

    Please make initial extension installation callable through the documented public API and CLI, so the complete install → configure → reload → test workflow can run automatically inside Orca.

    Observed on Windows with Orca 1.4.268: extension list and extension reload are available, and Settings → Browser exposes Load unpacked. An agent could open a synthetic localhost fixture and inspect/capture it through the Orca browser commands. However, the native directory-selection step was never completed; subsequent desktop-control observations returned action_timeout after 30,000 ms. The final intended-profile inventory was empty. Extension reload and functional preview testing therefore did not run. This is evidence of an automation gap in this attempt, not evidence that the selected extension is incompatible or that the installation handler failed.

    Public API / CLI contract

    • Explicit-path installation: accept an unpacked directory, execution host, target browser profile, and request ID directly. When these inputs are supplied, installation must not require opening Settings or a native file picker. Resolve the directory on the specified host and return actionable validation or capability errors.
    • Lifecycle parity: expose install, inspect/list, enable/disable, update, reload, and uninstall through the same documented semantic contract. Preserve existing source-specific permission requirements. Report supported source types instead of silently treating a store ID, archive, or CRX as an unpacked directory.
    • Resumable operations: return a stable operation ID and extension ID, with pending/succeeded/failed/cancelled outcomes and completion events. A client reconnecting after a timeout or restart must be able to read the original result or retry the same request ID without a second installation. State what cleanup or recovery remains after partial failure.
    • Accurate scope: report the actual host, installation identity, version/build identity, enabled profiles, and load errors. Distinguish host-shared installation/update/uninstall from per-profile enablement. Reload receipts must identify every affected profile; test cleanup must not remove an installation still used by a normal profile.
    • Addressable test surfaces: expose options, popup, background/service-worker diagnostics, and content-script readiness through stable targets or documented capability results. Include these operations in machine-readable command discovery and the version-matched agent skill.

    End-to-end acceptance scenario

    Starting from an explicitly selected test environment, an agent can:

    1. Install a local fixture extension through the API/CLI and verify its returned ID, version, profile membership, and load status.
    2. Open its options and apply test configuration before a popup or content action runs.
    3. Open a localhost test page in Orca; assert actual content-script injection, content-script/background messaging, and known preview metadata, corroborated by the fixture server's target-page request.
    4. On an explicit successful build-ready signal, reload the extension and affected test page, repeat the assertions against the new build identity, and collect browser screenshots and diagnostics.
    5. Report install, readiness, reload, and each functional assertion separately. Unsupported, blocked, failed, and untested steps must not be presented as passing. Leave the requested demonstration visible or perform explicitly scoped cleanup.

    This extends #46537 with the concrete no-file-picker API requirement and recovery semantics. It composes with #46542 for automatic reload/development workflows and #46544 for extension regression and compatibility testing. State-preserving hot reload should be reported separately from a full extension/page reload; neither should be assumed to work for every extension API or runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions