Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.env-digest

Slim "session_env" digest. Internal, not extension-owned. STRING-KEYED — crosses the Python boundary as session["env"], so keys AND enum values (os/shell/kind/primary_language) are strings, never keywords.

Produces a bounded map the model reads each iter:

{"host" {"os" "shell" "clock"} ; cwd lives in session["workspace"]["root"] "project" {"kind" "primary_language"} "extensions" {"active_count" "aliases"}}

Each slice is small (~50 bytes), so the section costs <200 bytes/turn. Extensions deep-merge their own slices via :ext/ctx-fn returning {"session_env" {their-key {…}}}; the merge happens in ctx-loop/render-block! so internal owns the base section, extensions layer on top.

Heavy environment scans (full byte-counted language tables, polylith brick listings, multi-repo git status) live in the foundation-core focused project-shape helpers for explicit deep-dives. The digest never calls into extensions — host facts come from System/getProperty, project shape from a single directory peek. AGENTS.md / CLAUDE.md contents ride in their own system block (internal.prompt), not here.

Slim `"session_env"` digest. Internal, not extension-owned. STRING-KEYED —
crosses the Python boundary as `session["env"]`, so keys AND enum values
(os/shell/kind/primary_language) are strings, never keywords.

Produces a bounded map the model reads each iter:

  {"host"       {"os" "shell" "clock"}   ; cwd lives in session["workspace"]["root"]
   "project"    {"kind" "primary_language"}
   "extensions" {"active_count" "aliases"}}

Each slice is small (~50 bytes), so the section costs <200 bytes/turn.
Extensions deep-merge their own slices via `:ext/ctx-fn` returning
`{"session_env" {their-key {…}}}`; the merge happens in
`ctx-loop/render-block!` so internal owns the base section, extensions
layer on top.

Heavy environment scans (full byte-counted language tables, polylith
brick listings, multi-repo git status) live in the foundation-core
focused project-shape helpers for explicit deep-dives. The digest never calls
into extensions — host facts come from `System/getProperty`,
project shape from a single directory peek. AGENTS.md / CLAUDE.md
contents ride in their own system block (`internal.prompt`), not here.
raw docstring

base-digestclj

(base-digest environment)

Compose the internal-owned base :session/env digest. Extensions layer additional slices on top via :ext/ctx-fn (render-block! deep-merges before render).

Compose the internal-owned base `:session/env` digest. Extensions
layer additional slices on top via `:ext/ctx-fn` (`render-block!`
deep-merges before render).
sourceraw docstring

deep-mergeclj

(deep-merge a b)

Merge maps recursively. Latter map wins on scalar collision; nested maps merge key-by-key. Used to fold extension :ext/ctx-fn contributions into the internal-base :session/env.

Merge maps recursively. Latter map wins on scalar collision; nested
maps merge key-by-key. Used to fold extension `:ext/ctx-fn` contributions
into the internal-base `:session/env`.
sourceraw docstring

extension-contributionsclj

(extension-contributions environment active-extensions)

Collect "session_env" slices from every active extension's :ext/ctx-fn fn. Returns a single deep-merged map. Extensions that contribute under other top-level keys (e.g. their own "session_voice") are silently ignored here — those go straight onto ctx through the broader :ext/ctx-fn merge path.

Collect `"session_env"` slices from every active extension's `:ext/ctx-fn`
fn. Returns a single deep-merged map. Extensions that contribute
under other top-level keys (e.g. their own `"session_voice"`) are
silently ignored here — those go straight onto ctx through the
broader `:ext/ctx-fn` merge path.
sourceraw docstring

session-envclj

(session-env environment active-extensions)

Top-level helper: compose internal base + extension contributions into the final "session_env" value that the renderer pins into the ctx text.

Top-level helper: compose internal base + extension contributions
into the final `"session_env"` value that the renderer pins into the
ctx text.
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