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

Ouverte
#3,747 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
8/100
Type d'issue
Refactorisation
Clarté
À clarifier
Activité
Active
Stack technique
node.js, typescript
Domaine
backend, devtools

Piste de recherche

This is a tracking umbrella with no code change of its own; the work sits in the child issues listed in the checklist (#3748 to #3759). The unblocked starting points are #3748 (refuse leases for providers without a registered runtime) and #3749 (HostEnvironment captured once at entry points), and the payload names no files or tests. Done means each child lands additively in 0.21.x and the external acceptance items are met.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

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

  • #3748 — refuse leases for providers without a registered runtime
  • #3749 — HostEnvironment captured once at entry points (foundation)
  • #3750 — HostEnvironment in platform and capture packages (blocked by #3749)
  • #3751 — HostEnvironment in root src and remaining packages (blocked by #3749)
  • #3752 — daemon runtime owns no process globals; ShutdownReport (blocked by #3749)
  • #3794 — explicit host for configuration reads; one entered runtime store (follow-up to #3763/#3772)
  • #3753 — gate: no process globals outside entry points (after #3794 part 1) (blocked by #3750, #3751, #3752)
  • #3754 — explicit daemon lifecycle: ensureDaemon() and attach clients
  • #3755 — plugin contract v2, one provider registry, inventory, ADR 0034 (blocked by #3748)
  • #3756 — @agent-device/testmu on plugin contract v2 (blocked by #3755)
  • #3757 — agent-device/host startAgentDevice() (blocked by #3772 and the HostEnvironment PRs #3763/#3775/#3777; design pass done 2026-10-17)
  • #3758 — proposal: per-lease provider options (not scheduled)
  • #3759 — 0.22 removals (blocked by all of the above and #3311)

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

  • e2e: tester-army/e2e migrates @e2e-dev/testmu and @e2e-dev/limrun to agent-device/host, deleting installPlugin and the CLI-based daemon stop. That work is tracked in e2e after #3757 ships.
  • #3311: the Limrun extraction ships @agent-device/limrun on the v2 contract from #3755.
Langage dominant
TypeScript
Étoiles
5.3k
Forks
377
Merge moyen
13 h 18 min
PR mergées (30 j)
653

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de callstack/agent-device

Toutes les issues de callstack/agent-device

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.