A thin EDN-over-HTTP client for the vaelii daemon (vaelii.impl.serve). Runs no
engine: it POSTs {:op :args} and reads the result back, over JDK java.net.http
(no dependency — JDK 21 ships it).
Every call threads an explicit connection handle as its first argument —
(query conn '(dog ?x) 'Ctx) — the network mirror of vaelii.core's explicit-kb
API. A conn from client holds a reusable HttpClient; no socket opens until a
call. A daemon reply of {:ok false} becomes an ex-info carrying the daemon's
:error and :type, so a remote naming/disjointness refusal surfaces like a local
one.
A thin EDN-over-HTTP client for the vaelii daemon (`vaelii.impl.serve`). Runs no
engine: it POSTs `{:op :args}` and reads the result back, over JDK `java.net.http`
(no dependency — JDK 21 ships it).
Every call threads an **explicit connection handle** as its first argument —
`(query conn '(dog ?x) 'Ctx)` — the network mirror of `vaelii.core`'s explicit-`kb`
API. A `conn` from `client` holds a reusable `HttpClient`; no socket opens until a
call. A daemon reply of `{:ok false}` becomes an `ex-info` carrying the daemon's
`:error` and `:type`, so a remote naming/disjointness refusal surfaces like a local
one.(ask conn goal)(ask conn goal context)(ask? conn goal)(ask? conn goal context)(assert! conn sentence context)(assert! conn sentence context opts)Assert sentence in context (optional opts) — returns the handle(s).
Assert `sentence` in `context` (optional `opts`) — returns the handle(s).
(assert-many conn sentences context)(assert-many conn sentences context opts)(assert-rule! conn antecedents consequent context)(assert-rule! conn antecedents consequent context opts)(call conn op args)POST {:op op :args args} and return the :result, or throw ex-info on an
{:ok false} reply. The low-level entry the convenience fns wrap; use it for an op
with no wrapper yet.
POST `{:op op :args args}` and return the `:result`, or throw `ex-info` on an
`{:ok false}` reply. The low-level entry the convenience fns wrap; use it for an op
with no wrapper yet.(client host port)(client host port {:keys [timeout-ms] :or {timeout-ms 30000}})A connection handle to a daemon at host:port (opts: :timeout-ms, default
30000). Holds a reusable HttpClient; no network happens until a call.
A connection handle to a daemon at `host`:`port` (opts: `:timeout-ms`, default 30000). Holds a reusable `HttpClient`; no network happens until a call.
(conflicts conn)(contexts conn)(contradictions conn)(find-sentexes conn term)(genls conn t)(handle-of conn sentence context)(health conn)The daemon's liveness reply, {:ok true} — a GET, so it needs no op.
The daemon's liveness reply, `{:ok true}` — a GET, so it needs no op.
(in? conn handle)(isa? conn x t)(isa? conn x t context)(provable? conn goal)(provable? conn goal context)(prove conn goal)(prove conn goal context)(query conn goal)(query conn goal context)(query conn goal context opts)(retract! conn handle)(sentex conn handle)(sentexes-matching conn sentence)(sentexes-matching conn sentence context)(specs conn t)(types-of conn x)(types-of conn x context)(violations conn)(why conn handle)(why-not conn handle)(why-not conn sentence context)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 |