The web browser over a KB: the upper ontology, any term, any sentex and its justifications, all cross-linked.
Public because it is a documented entry point — lein browser, or
lein run -m vaelii.web. The implementation is vaelii.browser.web, which is free to
change; the dev-only affordances (dev-repl, dev-stop) stay there.
It binds loopback and authenticates nobody; read .github/SECURITY.md before
--listen names an address.
The web browser over a KB: the upper ontology, any term, any sentex and its justifications, all cross-linked. Public because it is a documented entry point — `lein browser`, or `lein run -m vaelii.web`. The implementation is `vaelii.browser.web`, which is free to change; the dev-only affordances (`dev-repl`, `dev-stop`) stay there. It binds loopback and authenticates nobody; read `.github/SECURITY.md` before `--listen` names an address.
(-main & args)Serve a starter-loaded KB on http://localhost:3000.
lein run -m vaelii.web lein run -m vaelii.web --listen 0.0.0.0 ; reachable off-machine (opt-in)
Serve a starter-loaded KB on http://localhost:3000. lein run -m vaelii.web lein run -m vaelii.web --listen 0.0.0.0 ; reachable off-machine (opt-in)
(consequences view heading batch)The panel of what batch ({:add [[sentence context] …] :remove [handle …]}) would
do, previewed over the view's KB under heading. It asserts and rolls back, so call
it from a :write route.
The panel of what `batch` (`{:add [[sentence context] …] :remove [handle …]}`) would
do, previewed over the view's KB under `heading`. It asserts and rolls back, so call
it from a `:write` route.(handler target)(handler target opts)The ring handler for target — a KB, an access value, or a catalog holder —
behind the Host allowlist for the network interface it will be served on (:host,
default loopback). Pure request -> response, so it is tested without a socket.
The ring handler for `target` — a KB, an access value, or a catalog holder — behind the `Host` allowlist for the network interface it will be served on (`:host`, default loopback). Pure `request -> response`, so it is tested without a socket.
(local-kb view)The in-process KB behind view, or nil when the browser reads a remote daemon.
The in-process KB behind `view`, or nil when the browser reads a remote daemon.
(read-form s)Read a request parameter as EDN, or nil when it does not read — never a throw, since the value is whatever the request carried.
Read a request parameter as EDN, or nil when it does not read — never a throw, since the value is whatever the request carried.
(register-extension ext-name ext)File ext under ext-name, a lower-case keyword, replacing any extension of that
name; answers the name. Keys, all optional: :routes (under /ext/<name>/, methods
:get :post :write, each (fn [view req] …)), :term-panel
((fn [view term] …)), :on-start ((fn [])), :stylesheet and :script
(classpath resources). vaelii.browser.web/register-extension has the contract.
File `ext` under `ext-name`, a lower-case keyword, replacing any extension of that name; answers the name. Keys, all optional: `:routes` (under `/ext/<name>/`, methods `:get` `:post` `:write`, each `(fn [view req] …)`), `:term-panel` (`(fn [view term] …)`), `:on-start` (`(fn [])`), `:stylesheet` and `:script` (classpath resources). `vaelii.browser.web/register-extension` has the contract.
(render-form view form)A sentence or term as the browser draws it: every atomic subterm a role-coloured link to its term page.
A sentence or term as the browser draws it: every atomic subterm a role-coloured link to its term page.
(start target opts)Start a Jetty server for target and return it (non-blocking). Opts: :port
(default 3000), :host (default loopback) and :token (default VAELII_API_TOKEN),
which a :host naming an address requires. :reload? is refused: a served browser
never reloads, and scripts/start-vaelii-dev.sh runs the one that does.
Start a Jetty server for `target` and return it (non-blocking). Opts: `:port` (default 3000), `:host` (default loopback) and `:token` (default `VAELII_API_TOKEN`), which a `:host` naming an address requires. `:reload?` is refused: a served browser never reloads, and `scripts/start-vaelii-dev.sh` runs the one that does.
(stored-sentexes view result)What a write stored — a row per sentex, then what followed from them — from
vaelii.core/edit-with-consequences!'s answer.
What a write stored — a row per sentex, then what followed from them — from `vaelii.core/edit-with-consequences!`'s answer.
(term-link view term)A role-coloured link to term's page.
A role-coloured link to `term`'s page.
(unregister-extension ext-name)Take the extension filed under ext-name out of the browser, from the next request.
Take the extension filed under `ext-name` out of the browser, from the next request.
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 |