Skip to content

Provider plugins v2, daemon ownership and host environment (umbrella) #3747

Open

Description

@thymikee

Purpose

One provider plugin contract loaded three ways, an explicit owner for every daemon, and a daemon that reads no process globals.

The three ways a plugin loads:

  • built-in providers;
  • agent-device plugins add (the store);
  • a JS host that imports the plugin package as an ordinary npm dependency.

This replaces the current workaround in e2e's @e2e-dev/testmu. It fakes the plugin store: it symlinks the package into plugins/<uuid>/node_modules, writes a private AGENT_DEVICE_HOME, and lets a client start a detached daemon implicitly.

Release rule

Every child lands additively in 0.21.x. Superseded shapes keep working until #3759 removes them in 0.22.

Children

Decisions (maintainer, 2026-10-16)

  • Plugins are factories called with options. A store install passes config.json options; a JS host calls testmu({ credentials }) directly.
  • No module-URL identity. Nothing relies on import.meta.url.
  • No Effect dependency.
  • { webDriver } stays a data descriptor. Plugins import only types from agent-device.
  • One registry. Sources compose in the order built-in → store → embedder. A plugin that fails is listed, not fatal.
  • The plugin set is fixed for a daemon's lifetime.
  • Clients never manage the daemon implicitly. Starting or replacing one is an explicit ensureDaemon() call. Embedders own their daemon through agent-device/host.
  • The ADR is brief. ADR 0034 records the plugin registry, with only a short note on daemon ownership.

External acceptance

Activity

  1. thymikee commented on Oct 17, 2026

    @thymikee
    MemberAuthor

    Decision needed before #3750/#3751 build on #3763: should HostEnvironment reach daemon handlers and platform modules explicitly (scope.host, host ports such as AndroidAdbHost.environment), or through the ambient commandHostEnvironment() that #3763 introduced? Recommendation: keep ambient only for spawn env and exec diagnostics (what withCommandHost already owns) and make everything else explicit, so a missing host is a type error and the throwing accessor and bindTestCommandHost suites go away. Context: the review on #3763.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions