Skip to content

Plugin API seam: api.plugins — a plugin can't enumerate its co-loaded siblings #610

Description

@melvincarvalho

A plugin-API seam surfaced by building 33 out-of-tree plugins on the #206 loader (report). Lower-demand than the four ranked seams (#601#604), but it is the single blocker for an honest read-only ops/status console — see "why now" below.

The gap

A plugin cannot ask what else is loaded. The loader already holds the entry list (id, prefix, module) but exposes none of it on the api object. So the one kind of plugin whose whole job is describing the deployment has to be hand-fed a duplicate of the createServer({ plugins }) array, and the two silently drift — an added plugin never appears, a removed one keeps getting probed, and the default "<500 = alive" rule reports the stale entry as healthy.

Consumers

  • dashboard/ (first live consumer) — a live plugin-status page. Today it takes a config.plugins array that must mirror the real loader list by hand.
  • admin/ — the operator home; same hand-copied inventory.

Concrete evidence: the demo composition (serve.js) now maintains a single INVENTORY array beside the real plugins array and feeds it to both — a workaround that exists only because the introspection seam is missing.

Sketch

api.plugins  // → [{ id, prefix, module }], read-only

A frozen snapshot of the loaded entries (not the config objects — no secrets). Optionally a per-entry health/probe hint later, but the minimal { id, prefix, module } is enough to de-fiction the dashboard.

Cost

Small — the loader constructs this list at boot; this is a read-only view onto data it already has.

Not to be confused with (distinct, adjacent issues)

Why now

This is the phase-1 blocker for a blessed read-only status console for JSS. dashboard/ is read-only and probes anonymously (a 401 counts as "alive"), so it needs no operator/auth seam — only this one, to stop the inventory being a hand-maintained fiction. With api.plugins landed, dashboard/ becomes a faithful, self-maintaining status page worth shipping as an official plugin. (The richer admin/ console — pod stats + an operator gate — is a later phase that additionally needs an operator-identity seam.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpluginCould be implemented as a plugin (#206); core/plugin line defined in #564priority: mediumP2 - Do when time allows

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions