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 the model MUST name
the id. Each REPL is mirrored into the session resource registry (footer badge
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 the model MUST name
the id. 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.(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.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 |