Liking cljdoc? Tell your friends :D

vaelii.impl.client

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.
raw docstring

askclj

(ask conn goal)
(ask conn goal context)

ask?clj

(ask? conn goal)
(ask? conn goal context)

assert!clj

(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).
raw docstring

assert-manyclj

(assert-many conn sentences context)
(assert-many conn sentences context opts)

assert-rule!clj

(assert-rule! conn antecedents consequent context)
(assert-rule! conn antecedents consequent context opts)

callclj

(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.
raw docstring

clientclj

(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.
raw docstring

conflictsclj

(conflicts conn)

contextsclj

(contexts conn)

contradictionsclj

(contradictions conn)

find-sentexesclj

(find-sentexes conn term)

genlsclj

(genls conn t)

handle-ofclj

(handle-of conn sentence context)

healthclj

(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.
raw docstring

in?clj

(in? conn handle)

isa?clj

(isa? conn x t)
(isa? conn x t context)

provable?clj

(provable? conn goal)
(provable? conn goal context)

proveclj

(prove conn goal)
(prove conn goal context)

queryclj

(query conn goal)
(query conn goal context)
(query conn goal context opts)

retract!clj

(retract! conn handle)

sentexclj

(sentex conn handle)

sentexes-matchingclj

(sentexes-matching conn sentence)
(sentexes-matching conn sentence context)

specsclj

(specs conn t)

types-ofclj

(types-of conn x)
(types-of conn x context)

violationsclj

(violations conn)

whyclj

(why conn handle)

why-notclj

(why-not conn handle)
(why-not conn sentence context)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close