Skip to content

Extract HarmonyOS behind a platform plugin interface, then ship it as @agent-device/harmonyos (0.22) #4317

Closed

Description

@thymikee

Purpose

HarmonyOS is wired into core today. packages/platform-harmonyos is a private package, and harmonyos is hard-coded in packages/kernel/src/device.ts (PLATFORMS) and packages/kernel/src/contracts.ts (SESSION_RUNTIME_PLATFORMS and the harmonyos-instance backend). Every HarmonyOS change therefore lands in core and is reviewed against core, even though CI has no HarmonyOS device or HDC lane to verify it.

Providers already plug in through the provider plugin registry (ADR 0034), and first-party providers ship as plugins: @agent-device/webos, and planned for 0.22 @agent-device/limrun (#3311) and @agent-device/browserstack (#3309). Platforms have no equivalent interface. HarmonyOS should be the first platform to move behind one, in the same 0.22 window as the other extractions under #3747.

Required behavior

Two steps, in order:

  1. Platform plugin interface. A platform registers itself, along with its device kinds, selector flags, session runtime and backend, through a plugin registry like the provider registry, instead of being listed in closed kernel enums. Core keeps one owner for platform admission. Built-in platforms (Apple, Android, Linux, web, Vega) can stay built in; the interface only has to let a platform live outside core.
  2. HarmonyOS as a plugin. Move platform-harmonyos behind that interface and publish it as @agent-device/harmonyos, loaded the way provider plugins are. Remove the HarmonyOS entries from the kernel enums in the same change. Add no compatibility shims; this is a 0.22 break, like the other extractions.

Completion conditions

  • No harmonyos literal remains in packages/kernel outside a test fixture.
  • With the plugin installed, devices, open, snapshot, press and close work on a HarmonyOS device. The live evidence is committed under docs/evidence/, since CI cannot run HarmonyOS.
  • Without the plugin installed, HarmonyOS selectors fail with a typed reason naming the plugin to install.
  • An ADR amendment, or a new ADR next to ADR 0034, records the platform plugin interface.

Dependencies

Activity

  1. apex-sentinel-staging commented on Nov 7, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: feature

    The issue proposes a new platform plugin interface and extraction of HarmonyOS from core into a separately published package, with concrete required behavior and completion conditions.

  2. added this to the 0.22 - lean core milestone on Nov 18, 2026
  3. thymikee commented on Nov 18, 2026

    @thymikee
    MemberAuthor

    Decision: platform registration: #4597 owns the shared registration and lifecycle design, with HarmonyOS reviewed as a second consumer of the same contract. #4317 owns the HarmonyOS implementation and verification, including the move to @agent-device/harmonyos. The contract review will identify which existing vocabulary belongs to shared help and typed recovery and which platform definitions move into the plugin. Use one managed registry. Keep the existing HDC and live verification requirements.

  4. thymikee commented on Nov 20, 2026

    @thymikee
    MemberAuthor

    Status: #4857 (open against 0.22) ships HarmonyOS as the @agent-device/harmonyos platform plugin. Scope follows the web and Vega design: the family name stays known to core as an optional family, and the remaining harmonyos literals in packages/kernel are listed in the PR under "Not in this PR" for a maintainer decision. A maintainer review round is being fixed now (all process spawns through the plugin host, a layering rule for managed platform packages, a packed-plugin test). Blocker for the label: no HarmonyOS device or emulator is reachable on the build host (hdc list targets is empty), so the required live run has not been done.

  5. thymikee commented on Nov 21, 2026

    @thymikee
    MemberAuthor

    Done in #4857 (merged into 0.22 as b758908): HarmonyOS ships as the managed platform plugin @agent-device/harmonyos, with a live packed-plugin run on a real device (#4857 (comment)). The canonical harmonyos vocabulary left in packages/kernel moves with the open registry in #4597. Publication: #4866. Follow-ups: #4906, #4907.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions