Malli value objects for the OPAQUE addon wire — the contract between a host proxying an IAddon and the out-of-process kernel that really implements it.
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}.
Opaque shapes are registered under :opaque/* keys (:opaque/wire, :opaque/request, :opaque/response, :opaque/describe, :opaque/spec).
The kernel side never loads this namespace: hive-addon.opaque.codec and hive-addon.opaque.serve are malli-free so a cljw-built binary carries no schema runtime. These schemas are the host-side single source the m/=> contracts (hive-addon.opaque.contracts) and the generated tests read.
Malli value objects for the OPAQUE addon wire — the contract between a host
proxying an IAddon and the out-of-process kernel that really implements it.
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}.
Opaque shapes are registered under :opaque/* keys (:opaque/wire,
:opaque/request, :opaque/response, :opaque/describe, :opaque/spec).
The kernel side never loads this namespace: hive-addon.opaque.codec and
hive-addon.opaque.serve are malli-free so a cljw-built binary carries no
schema runtime. These schemas are the host-side single source the m/=>
contracts (hive-addon.opaque.contracts) and the generated tests read.The :addon/describe result — the whole pure IAddon surface, as data.
The :addon/describe result — the whole pure IAddon surface, as data.
(explain ?s x)Registry-aware explain — nil on success, error map on failure.
Registry-aware explain — nil on success, error map on failure.
How one hook crosses the wire. A fn-valued hook is announced as :fn and the proxy installs a fn that calls back; a data-valued hook travels as its value.
How one hook crosses the wire. A fn-valued hook is announced as :fn and the proxy installs a fn that calls back; a data-valued hook travels as its value.
(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.
The verbs the proxy sends. CLOSED: the proxy implements IAddon, whose method set is closed, so the op set is closed with it (cardinality decides).
The verbs the proxy sends. CLOSED: the proxy implements IAddon, whose method set is closed, so the op set is closed with it (cardinality decides).
Everything the proxy needs to reach one opaque kernel: the executable and its argv. :opaque/id is the addon id the manifest promised; when present the kernel's own describe must agree. :opaque/capabilities is what the manifest advertises before the kernel is running. Rides as :addon/config of the mount manifest.
Everything the proxy needs to reach one opaque kernel: the executable and its argv. :opaque/id is the addon id the manifest promised; when present the kernel's own describe must agree. :opaque/capabilities is what the manifest advertises before the kernel is running. Rides as :addon/config of the mount manifest.
Composite malli registry: hive-addon.schema's registry (malli defaults + :addon/* schemas) plus this ns's :opaque/* 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 :opaque/* schemas. NOT installed as the
global default — reach it via the wrappers below or {:registry registry}.One request line: the op and its EDN-safe argument.
One request line: the op and its EDN-safe argument.
One response line: the op echoed with its result, or an error string. An error may omit :op — a line that failed to parse has no op to echo.
One response line: the op echoed with its result, or an error string. An error may omit :op — a line that failed to parse has no op to echo.
(schema ?s)Compile ?s against the local :opaque/* + :addon/* registry.
Compile ?s against the local :opaque/* + :addon/* registry.
An IAddon tool-def with its :handler removed: everything but the fn crosses the wire, and the proxy supplies a handler that calls back.
An IAddon tool-def with its :handler removed: everything but the fn crosses the wire, and the proxy supplies a handler that calls back.
(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 :opaque/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 :opaque/schema-violation and must be a qualified
keyword (hive-dsl taxonomy convention).A value the wire carries, recursively: the JSON-ish subset MCP hands a tool (nil, string, int, double, boolean, vector, map) plus keywords, so a param map, a tool result, a health report and an addon config all fit. Doubles exclude NaN/infinities, which do not round-trip through equality.
A value the wire carries, recursively: the JSON-ish subset MCP hands a tool (nil, string, int, double, boolean, vector, map) plus keywords, so a param map, a tool result, a health report and an addon config all fit. Doubles exclude NaN/infinities, which do not round-trip through equality.
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 |