Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.foundation.introspection

Programmatic introspection of the agent's own state from inside :code. The public state surface is deliberately small:

  • (session-state [session-id]) -> canonical data map, including usage and raw LLM diagnostics
  • (sessions [channel]) -> metadata-only session index

Everything else in this namespace is implementation detail. The agent gets the data once and manipulates it with ordinary Python collection operations when filtering or presentation is needed.

Every function is a pure read off the same DB tables the projection layer reads from (or a classpath read for the doc accessors). Failures return nil/[], never throw, so a misbehaving introspection call cannot break iteration execution.

Gated: the extension registered at the bottom of this namespace binds its symbols and prompt only while the introspection toggle is ON (default OFF).

Programmatic introspection of the agent's own state from inside
`:code`. The public state surface is deliberately small:

- `(session-state [session-id])` -> canonical data map, including usage and raw LLM diagnostics
- `(sessions [channel])` -> metadata-only session index

Everything else in this namespace is implementation detail. The agent
gets the data once and manipulates it with ordinary Python collection
operations when filtering or presentation is needed.

Every function is a pure read off the same DB tables the projection
layer reads from (or a classpath read for the doc accessors).
Failures return nil/[], never throw, so a misbehaving introspection
call cannot break iteration execution.

Gated: the extension registered at the bottom of this namespace binds its
symbols and prompt only while the `introspection` toggle is ON (default OFF).
raw docstring

all-symbolsclj

source

session-stateclj

(session-state)
(session-state session-id)

await session_state(session_id=None) # current session by default; pass id for another String-keyed fields: session, current_turn, failures, diagnosis, session_forks, turn_retries, "usage", transcript. "usage" is compact token/cost/outcome/error/routing; tool rows overlap, so never sum them. Filter transcript/turns/iterations/blocks (code/result) in python_execution; don't dump. Use live session for current state. This is the recovery path for raw folded current-session content; it does not undo fold intents or restore them. Find ids via sessions().

await session_state(session_id=None)  # current session by default; pass id for another
String-keyed fields: `session`, `current_turn`, `failures`, `diagnosis`, `session_forks`, `turn_retries`, "usage", `transcript`. "usage" is compact token/cost/outcome/error/routing; tool rows overlap, so never sum them. Filter `transcript/turns/iterations/blocks` (`code`/`result`) in python_execution; don't dump. Use live `session` for current state. This is the recovery path for raw folded current-session content; it does not undo fold intents or restore them. Find ids via `sessions()`.
sourceraw docstring

session-state-symbolclj

source

sessionsclj

(sessions)
(sessions channel)

await sessions(channel=None) # newest-first conversation index String-keyed rows: {id,channel,title,turn_count,created_at,modified_at}; optional channel filter. Content: session_state(id). Filter in python_execution; don't stringify or slice blindly.

await sessions(channel=None)  # newest-first conversation index
String-keyed rows: `{id,channel,title,turn_count,created_at,modified_at}`; optional `channel` filter. Content: `session_state(id)`. Filter in python_execution; don't stringify or slice blindly.
sourceraw docstring

sessions-symbolclj

source

vis-extensionclj

source

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