DIP seam for the addon mounter — the host registry abstraction.
IMountHost is the port through which the effectful boundary registers, initializes, shuts down, and looks up addon instances. hive-addon ships one in-memory implementation (atom-mount-host) for tests, dry-run, and non-MCP hosts; a real host (an MCP server) supplies its own. resolve-config-default is the identity-ish config resolver — a host may inject a richer one (e.g. hive-di-backed) at the boundary.
register!/shutdown! are no-nuke: a duplicate register! MUST NOT throw and shutdown! MUST NOT delete data.
DIP seam for the addon mounter — the host registry abstraction. IMountHost is the port through which the effectful boundary registers, initializes, shuts down, and looks up addon instances. hive-addon ships one in-memory implementation (atom-mount-host) for tests, dry-run, and non-MCP hosts; a real host (an MCP server) supplies its own. resolve-config-default is the identity-ish config resolver — a host may inject a richer one (e.g. hive-di-backed) at the boundary. register!/shutdown! are no-nuke: a duplicate register! MUST NOT throw and shutdown! MUST NOT delete data.
(atom-mount-host)Construct an in-memory IMountHost backed by an atom map id->addon. init! calls hive-addon.protocol/initialize!; shutdown! calls hive-addon.protocol/shutdown!.
Construct an in-memory IMountHost backed by an atom map id->addon. init! calls hive-addon.protocol/initialize!; shutdown! calls hive-addon.protocol/shutdown!.
Abstraction over an addon host registry. The mounter depends on this port, never a concrete registry.
Abstraction over an addon host registry. The mounter depends on this port, never a concrete registry.
(init! host addon-id config)Initialize the registered addon with config. Returns the InitResult map ({:success? bool ...}).
Initialize the registered addon with config. Returns the InitResult map
({:success? bool ...}).(register! host addon)Put an addon instance into the host registry, keyed by its addon-id. Returns host. MUST NOT throw for a normal duplicate (idempotent-ish).
Put an addon instance into the host registry, keyed by its addon-id. Returns host. MUST NOT throw for a normal duplicate (idempotent-ish).
(registered host addon-id)Fetch a mounted addon instance for sibling injection, or nil.
Fetch a mounted addon instance for sibling injection, or nil.
(shutdown! host addon-id)Shutdown the registered addon. Returns nil. MUST NOT delete data.
Shutdown the registered addon. Returns nil. MUST NOT delete data.
(resolve-config-default spec)Default config resolver: a spec's own :addon/config (or {}). The host may inject a richer resolver (fn [spec] -> config-map) at the boundary.
Default config resolver: a spec's own :addon/config (or {}). The host may
inject a richer resolver (fn [spec] -> config-map) at the boundary.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |