Malli value objects for the addon mounter.
Declarative mount manifests (MountSpec), the pure solver output (MountPlan),
and the effectful outcome reports (MountResult, MountReport, TeardownReport).
Shapes are uncompiled malli DATA (house idiom: PascalCase defs) seeded into a
LOCAL composite registry that COMPOSES hive-addon.schema's registry — the
AddonId/AddonType/CapabilitySet value objects are reused, never redefined.
The registry is NEVER installed as the malli global default; reach it via
schema/validate/explain/validate* or by passing {:registry registry}
yourself.
Mount shapes are registered under :mount/* keys (:mount/spec, :mount/plan, :mount/result, :mount/report, :mount/teardown-report).
TeardownReport carries the no-nuke invariant as data: :teardown/data-preserved? is [:= true], so a report can only validate when teardown preserved data.
Malli value objects for the addon mounter.
Declarative mount manifests (MountSpec), the pure solver output (MountPlan),
and the effectful outcome reports (MountResult, MountReport, TeardownReport).
Shapes are uncompiled malli DATA (house idiom: PascalCase defs) seeded into a
LOCAL composite registry that COMPOSES hive-addon.schema's registry — the
AddonId/AddonType/CapabilitySet value objects are reused, never redefined.
The registry is NEVER installed as the malli global default; reach it via
`schema`/`validate`/`explain`/`validate*` or by passing {:registry registry}
yourself.
Mount shapes are registered under :mount/* keys (:mount/spec, :mount/plan,
:mount/result, :mount/report, :mount/teardown-report).
TeardownReport carries the no-nuke invariant as data: :teardown/data-preserved?
is [:= true], so a report can only validate when teardown preserved data.(explain ?s x)Registry-aware explain — nil on success, error map on failure.
Registry-aware explain — nil on success, error map on failure.
(humanize-errors ?s x)Human-readable error data for x against ?s, or nil if x conforms.
Human-readable error data for x against ?s, or nil if x conforms.
Bounded initializer retry policy. :max-attempts includes the first call.
Bounded initializer retry policy. :max-attempts includes the first call.
Pure output of solve — the ordered mount plan plus diagnostics as data. No IO, no resolved constructors. :ordered is the deterministic topo order (deps before dependents); :cycles/:missing/:unmet-capabilities/:duplicates record the graceful diagnostics (:duplicates maps an :addon/id shared by >1 spec to its count; one surviving spec still appears in :ordered). Open.
Pure output of solve — the ordered mount plan plus diagnostics as data. No IO, no resolved constructors. :ordered is the deterministic topo order (deps before dependents); :cycles/:missing/:unmet-capabilities/:duplicates record the graceful diagnostics (:duplicates maps an :addon/id shared by >1 spec to its count; one surviving spec still appears in :ordered). Open.
Aggregate outcome of mounting a plan. :ok? is true only when every attempted spec succeeded (graceful degrade still yields a report). Open.
Aggregate outcome of mounting a plan. :ok? is true only when every attempted spec succeeded (graceful degrade still yields a report). Open.
Per-addon mount outcome. :phase records how far the addon got; :success? whether that addon mounted; :errors the accumulated failure strings.
:entitlement is the earliest phase: a refused spec never has its constructor namespace loaded. Open.
Per-addon mount outcome. :phase records how far the addon got; :success? whether that addon mounted; :errors the accumulated failure strings. :entitlement is the earliest phase: a refused spec never has its constructor namespace loaded. Open.
The declarative mount manifest value object — a data description of an addon to mount (identity, constructor coordinates, deps, capabilities). Reuses hive-addon.schema value objects for :addon/id, :addon/type, :addon/capabilities.
:addon/trust-class defaults to :foss when absent; :proprietary makes the spec gated, and a gated spec mounts only through a licence gate. :addon/entitlement names the unit a gate checks the licence against.
:addon/reload-strategy names the hot-reload strategy this addon requires (hive-addon.hot.strategy). Absent means the default chain selects one. It is an open :keyword, never an enum — the strategy set is extensible by any module, and closing it here would be the defect. Open.
The declarative mount manifest value object — a data description of an addon to mount (identity, constructor coordinates, deps, capabilities). Reuses hive-addon.schema value objects for :addon/id, :addon/type, :addon/capabilities. :addon/trust-class defaults to :foss when absent; :proprietary makes the spec gated, and a gated spec mounts only through a licence gate. :addon/entitlement names the unit a gate checks the licence against. :addon/reload-strategy names the hot-reload strategy this addon requires (hive-addon.hot.strategy). Absent means the default chain selects one. It is an open :keyword, never an enum — the strategy set is extensible by any module, and closing it here would be the defect. Open.
Composite malli registry: hive-addon.schema's registry (malli defaults + :addon/* schemas) plus this ns's :mount/* schemas. NOT installed as the global default — reach it via the wrappers below or {:registry registry}.
Composite malli registry: hive-addon.schema's registry (malli defaults +
:addon/* schemas) plus this ns's :mount/* schemas. NOT installed as the
global default — reach it via the wrappers below or {:registry registry}.(schema ?s)Compile ?s against the local :mount/* + :addon/* registry.
Compile ?s against the local :mount/* + :addon/* registry.
Outcome of tearing down a mounted system. :teardown/data-preserved? is the [:= true] no-nuke invariant — teardown MUST preserve data, so a report can only validate when the flag is true. Open.
Outcome of tearing down a mounted system. :teardown/data-preserved? is the [:= true] no-nuke invariant — teardown MUST preserve data, so a report can only validate when the flag is true. Open.
(validate ?s x)Registry-aware validate — true/false.
Registry-aware validate — true/false.
(validate* ?s x)(validate* ?s x category)Validate x against ?s, bridging to hive-dsl Result.
(r/ok x) on success; (r/err category {:explanation <humanized>}) on failure.
category defaults to :mount/schema-violation and must be a qualified
keyword (hive-dsl taxonomy convention).
Validate x against ?s, bridging to hive-dsl Result.
(r/ok x) on success; (r/err category {:explanation <humanized>}) on failure.
`category` defaults to :mount/schema-violation and must be a qualified
keyword (hive-dsl taxonomy convention).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 |