Language-neutral FORMAT / TEST / REPL_EVAL / START_REPL dispatch.
Language extensions register handlers under :ext/language-tools; this
foundation surface exposes stable bare tool names and dispatches to the
active handler for the requested/current language. REPL lifecycle is resource
backed: repl creates a language-owned session resource and repl_stop
stops one by id. Live REPLs also surface in the ctx resources block.
Language-neutral FORMAT / TEST / REPL_EVAL / START_REPL dispatch. Language extensions register handlers under `:ext/language-tools`; this foundation surface exposes stable bare tool names and dispatches to the active handler for the requested/current language. REPL lifecycle is resource backed: `repl` creates a language-owned session resource and `repl_stop` stops one by id. Live REPLs also surface in the ctx `resources` block.
(capability-data env)STRUCTURED capability map for the ACTIVE language packs:
{"clojure" ["format" "test" "repl_eval" "repl"], "python" [...]}
— nil when none active. Recomputed every turn from active-extensions, so it
GAINS a language the moment its pack activates (e.g. a .py file appears). Goes
in ctx (session["language_tools"]) so the model can read it programmatically
AND it always reflects the current turn.
STRUCTURED capability map for the ACTIVE language packs:
`{"clojure" ["format" "test" "repl_eval" "repl"], "python" [...]}`
— nil when none active. Recomputed every turn from active-extensions, so it
GAINS a language the moment its pack activates (e.g. a .py file appears). Goes
in ctx (`session["language_tools"]`) so the model can read it programmatically
AND it always reflects the current turn.(capability-matrix env)AUTO capability matrix for the system prompt — the active packs' facade verbs
AUTO capability matrix for the system prompt — the active packs' facade verbs
+ a CERTAIN statement of when each is the tool. nil when no pack is active.
LANGUAGE TOOLS (active packs; call via the facade, language first):
clojure : format_code · run_tests · repl_eval · repl
python : repl_eval · repl(connect-repl env & args)Attach to an external running REPL: repl_connect(language,{port,host?,cwd?}). Registers it for eval, tests, and context but never owns or kills its process; stop only detaches.
Attach to an external running REPL: `repl_connect(language,{port,host?,cwd?})`. Registers it for eval, tests, and context but never owns or kills its process; stop only detaches.
(format-code env & args)Format through a pack: format_code(language,arg); omit language only for paths-based inference. Source/{"code":...} returns changed + char-delta, never text. {"paths":[...]} (always a list) recursively formats files/dirs in place and returns per-file changes, never text. Omit code/paths for default source paths recursively.
Format through a pack: `format_code(language,arg)`; omit `language` only for paths-based inference. Source/`{"code":...}` returns changed + char-delta, never text. `{"paths":[...]}` (always a list) recursively formats files/dirs in place and returns per-file changes, never text. Omit code/paths for default source paths recursively.
(lint-code env & args)Lint through a pack: lint_code(language,arg); omit language only for file/workspace inference. Source/{"code":...} lints a snippet; {"paths":[...]} (always a list) lints disk. Omit code/paths for defaults. Returns findings and severity counts.
Lint through a pack: `lint_code(language,arg)`; omit `language` only for file/workspace inference. Source/`{"code":...}` lints a snippet; `{"paths":[...]}` (always a list) lints disk. Omit code/paths for defaults. Returns findings and severity counts.
(prompt env)The language-facade reference: the AUTO capability matrix (active packs only)
language is explicit only when several packs match.The language-facade reference: the AUTO capability matrix (active packs only) + the bare facade verbs. nil when no language pack is active, so a non-coding or single-language workspace carries nothing extra. Each verb's own docstring holds its args/return; `language` is explicit only when several packs match.
(repl-eval env & args)Eval in an already-running project REPL: repl_eval(language,arg). Pass language first; arg may set id/repl_id, cwd (root default), and timeout_ms.
Eval in an already-running project REPL: `repl_eval(language,arg)`. Pass `language` first; `arg` may set `id`/`repl_id`, `cwd` (root default), and `timeout_ms`.
(repl-status env)(repl-status env arg)List REPL resources, optionally filtered by language or id.
List REPL resources, optionally filtered by language or id.
(repl-stop env id)Stop a REPL by session resource id. This is the REPL-specific wrapper around resource_stop(id).
Stop a REPL by session resource id. This is the REPL-specific wrapper around resource_stop(id).
(run-tests env & args)Run through a pack: run_tests(language,arg). arg is a module string or map: namespaces/paths choose loading/discovery; only, include, exclude, and filter narrow tests; cwd chooses the project. List selectors stay lists, even one. Omit arg for all tests.
Run through a pack: `run_tests(language,arg)`. `arg` is a module string or map: `namespaces`/`paths` choose loading/discovery; `only`, `include`, `exclude`, and `filter` narrow tests; `cwd` chooses the project. List selectors stay lists, even one. Omit `arg` for all tests.
(start-repl env & args)Start or restart a language REPL resource: repl(language,{op,cwd,id,...}). Pass language first; op defaults to start.
Start or restart a language REPL resource: `repl(language,{op,cwd,id,...})`. Pass `language` first; `op` defaults to `start`.
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 |