Liking cljdoc? Tell your friends :D
Clojure only.

com.blockether.vis.ext.language-clojure.nrepl-ctx

Per-turn :ext/ctx-fn contribution for the Clojure pack.

Instead of forcing the model to call clj_repl() over and over, the engine injects live nREPL state into context as standing knowledge, nested UNDER the active language so a polyglot repo accumulates :languages {:clojure {...} :typescript {...}}:

{"session_env" {"languages" {"clojure" {"nrepl" {"default" <id|nil> "repls" [{"id" "dir" "port" "aliases" "tool" "status" "managed" ["dialect" "versions"]} ...]}}}}}

OWNERSHIP: we surface ONLY the REPLs THIS session started + owns (from repl-manager/session-repls). There is no external-port discovery and no .nrepl-port scanning — a REPL vis did not start is not vis's to show or stop.

The default is the id of the SINGLE owned REPL (nil when zero or many): with one REPL that id is the implicit eval target; with several, eval still resolves WITHOUT the model naming an id — it defaults to the workspace-root REPL (else the first) and the eval result reports which REPL ran under its repl field, so the model can pass an explicit id to override. Each REPL is mirrored into the session resource registry (footer badge

  • F4 stop/restart) and carries a liveness status from a per-turn probe.

All best-effort: any failure degrades to an empty contribution and never blocks the render.

Per-turn `:ext/ctx-fn` contribution for the Clojure pack.

Instead of forcing the model to call `clj_repl()` over and over, the engine
injects live nREPL state into context as standing knowledge, nested UNDER the
active language so a polyglot repo accumulates
`:languages {:clojure {...} :typescript {...}}`:

  {"session_env" {"languages" {"clojure"
     {"nrepl" {"default" <id|nil>
               "repls"   [{"id" "dir" "port" "aliases" "tool"
                           "status" "managed" ["dialect" "versions"]} ...]}}}}}

OWNERSHIP: we surface ONLY the REPLs THIS session started + owns (from
`repl-manager/session-repls`). There is no external-port discovery and no
`.nrepl-port` scanning — a REPL vis did not start is not vis's to show or stop.

The `default` is the id of the SINGLE owned REPL (nil when zero or many): with
one REPL that id is the implicit eval target; with several, eval still resolves
WITHOUT the model naming an id — it defaults to the workspace-root REPL (else the
first) and the eval result reports which REPL ran under its `repl` field, so the
model can pass an explicit `id` to override. Each REPL is mirrored into the
session resource registry (footer badge
+ F4 stop/restart) and carries a liveness `status` from a per-turn probe.

All best-effort: any failure degrades to an empty contribution and never
blocks the render.
raw docstring

contributeclj

(contribute env)

:ext/ctx-fn fn. Returns the {"session_env" {"languages" {"clojure" {"nrepl" ...}}}} slice (STRING-keyed) for THIS session's owned REPLs, and mirrors each into the session resource registry (footer + F4 dialog). {} when no workspace root is on env. Never throws — degrades to an empty contribution.

`:ext/ctx-fn` fn. Returns the `{"session_env" {"languages" {"clojure"
{"nrepl" ...}}}}` slice (STRING-keyed) for THIS session's owned REPLs, and
mirrors each into the session resource registry (footer + F4 dialog). `{}` when
no workspace root is on env. Never throws — degrades to an empty contribution.
sourceraw docstring

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