Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.foundation.environment.core

vis-foundation — the agent's environment-awareness layer.

Owns the environment facts: cwd, user, platform, shell, plus:

  • git repository facts via the git binary (root, branch, dirty status, submodules, worktree),
  • a bounded language scan over the working tree (top languages by file count, primary language),
  • monorepo / multi-package shape detection (polylith, workspace, submodules) by counting per-ecosystem manifests.

Model-facing VCS/workspace truth lives in session['workspace']; session['env']['project'] supplies project kind and primary language. Detailed scans remain host data for context and language-tool dispatch.

Runtime facts are computed lazily on first access and cached per working-directory. The cache is invalidated automatically when cwd changes between calls, and explicitly by the HOST-ONLY refresh! — which /reload runs and the sandbox cannot call.

vis-foundation — the agent's environment-awareness layer.

Owns the environment facts: cwd, user, platform, shell, plus:

  * git repository facts via the git binary (root, branch, dirty status,
    submodules, worktree),
  * a bounded language scan over the working tree (top languages
    by file count, primary language),
  * monorepo / multi-package shape detection (polylith, workspace,
    submodules) by counting per-ecosystem manifests.

Model-facing VCS/workspace truth lives in `session['workspace']`;
`session['env']['project']` supplies project kind and primary language.
Detailed scans remain host data for context and language-tool dispatch.

Runtime facts are computed lazily on first access and cached per
working-directory. The cache is invalidated automatically when
`cwd` changes between calls, and explicitly by the HOST-ONLY
`refresh!` — which `/reload` runs and the sandbox cannot call.
raw docstring

environment-ctxclj

(environment-ctx _environment)

Foundation-owned structured ctx contribution. Runtime facts, project guidance, and Python extension warnings live under (:project ctx).

Foundation-owned structured ctx contribution. Runtime facts, project
guidance, and Python extension warnings live under `(:project ctx)`.
sourceraw docstring

environment-symbolsclj

source

gitclj

(git)

Git facts for the environment block (host helper, not a model tool). Returns {"root", "branch", "is_detached": bool, "is_submodules": bool, "is_worktree": bool, "stash_count", "upstream", "ahead", "behind", "is_stale", "is_dirty", "is_clean", "modified", "untracked", "added", "changed", "removed", "missing", "conflicting"}, or None outside a repo.

Git facts for the environment block (host helper, not a model tool).
Returns {"root", "branch", "is_detached": bool, "is_submodules": bool, "is_worktree": bool, "stash_count", "upstream", "ahead", "behind", "is_stale", "is_dirty", "is_clean", "modified", "untracked", "added", "changed", "removed", "missing", "conflicting"}, or None outside a repo.
sourceraw docstring

main-agent-instructionsclj

(main-agent-instructions)

The project's own guidance file — AGENTS.md or CLAUDE.md — whole, with where it was found. Returns {"is_found": True, "source", "path", "bytes": N, "content", "files"}, else {"is_found": False}. Check is_found first.

The project's own guidance file — AGENTS.md or CLAUDE.md — whole, with where
it was found.
Returns {"is_found": True, "source", "path", "bytes": N, "content", "files"}, else {"is_found": False}. Check is_found first.
sourceraw docstring

main-agent-instructions-symbolclj

source

refresh!clj

(refresh!)

Drop the cached env snapshot, forget the repository inventory, rescan project guidance, and return the fresh snapshot.

HOST-ONLY: refreshing the environment is a USER action registered as a /reload hook. The sandbox receives project facts through session.

Drop the cached env snapshot, forget the repository inventory, rescan project
guidance, and return the fresh snapshot.

HOST-ONLY: refreshing the environment is a USER action registered as a
`/reload` hook. The sandbox receives project facts through `session`.
sourceraw docstring

snapshotclj

(snapshot)

Full environment snapshot map {:host :git :languages :monorepo :repositories}. Cached per cwd; host helper, not a model tool.

Full environment snapshot map {:host :git :languages :monorepo :repositories}. Cached per cwd; host helper, not a model tool.
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