Plumb
Reading stable · switch to edge
Reference

The module contract

For programmers contributing a module. The twin of the adapter contract, one seam over: adapters supply the manifest to the core; modules consume what the core derives from it.

The mount is real: plumb series is itself a module, declared under the plumb.modules entry-point group by Plumb's own distribution, and plumb modules lists what is mounted. Where a clause below is not yet something the core provides, it says so. Together the two contracts are the whole extension story — a language in, a capability out, and the core untouched by either.

The lifecycle: absent, inert, active

A module is absent unless somebody installed it — nothing mounts that was not installed. It is inert when it cannot reach what it needs: an unreachable service makes the module's verbs report their own standing, and never makes the tool broken. And the core's own gates — policy-freedom, a board complete without the network — run with no modules mounted, so a hosted dependency can never become load-bearing one commit at a time while the gate stays green. Softening that gate is the failure its own text names; this clause exists so the cheap repair is never on the table.

What a module receives

Three published surfaces, each with its own version — board 3, series 1 and transport 1 in this release:

And:

What a module owes

What a module may never do

The mount, mechanically

A module package declares its verbs under the plumb.modules entry-point group. At startup the CLI discovers installed declarations and mounts each module's verb group; the core builds the parser from the declaration, and a module is never handed the parser. plumb modules lists what is mounted, with names, versions, verbs, the surfaces each speaks, its network reach and its writes:

series 1.0.0  verbs: series (push|show|pull)  speaks: series 1  network: yes
    writes the series file named on the command line
    writes its `.sent` mark, beside it

A module that fails to import is reported as an install fault and the rest still mount — one broken extension never costs the tool. Discovery reads installed distributions' metadata, so a module is found only where its distribution is installed.