Full session transcript - DATA first, presentation second.
transcript returns one canonical Clojure map with every turn,
every iteration, every executed block plus the LLM-side context
(system prompt, message envelope, reasoning trace, top-level
provider error, per-iteration vars, answer-form pointer,
returned-empty-blocks flag) and the per-block forensic detail
(code, comment, result, error, duration, timeout?, repaired?).
Pure data. The agent can pattern-match on it; the CLI
renders Markdown on top; a future TUI screen, JSON exporter, or
analytics extension consumes the same shape.
Lives in foundation because it's an introspection surface, not host
plumbing. The sandbox-visible public surface is (session-state)
for data and (session-report-md) for Markdown; this namespace
owns the transcript portion behind that deeper interface.
Public Clojure surface:
(transcript db-info session-id) -> transcript data map
(transcript->md data) -> Markdown string
(transcript-md db-info session-id) -> DB lookup + Markdown string
Canonical data shape:
{:session {:id :title :channel :model :provider :created-at} :totals {:turns N :iterations N :tokens {:input :output :reasoning :cached} :cost-usd D} :dialog [{:role :turn-id :content}] :calls [{:kind :ref :parent-ref :turn-id :iteration-id :op :tool :var :code :status :duration-ms :command :target :result :result-summary :info}] :timeline [{:kind :ref :turn-id :iteration-id :content :code :status :duration-ms :result-summary}] :turns [{:id :user-request :status :prior-outcome :provider :model :iteration-count :failure-count :tokens :cost-usd :answer :iterations [{:id :position :status :duration-ms :provider :model :thinking :error :tokens :cost-usd :answer-position :returned-empty-blocks? :vars [{:name :code :value :version}] :blocks [{:position :code :comment :result :error :duration-ms :timeout? :repaired?}]}]}]}
The Markdown renderer renders thinking, iteration-level errors, vars, per-block forensic previews, and final answer text. Large fields are bounded so reports stay safe to open.
Full session transcript - DATA first, presentation second.
`transcript` returns one canonical Clojure map with every turn,
every iteration, every executed block plus the LLM-side context
(system prompt, message envelope, reasoning trace, top-level
provider error, per-iteration vars, answer-form pointer,
returned-empty-blocks flag) and the per-block forensic detail
(code, comment, result, error, duration, timeout?, repaired?).
Pure data. The agent can pattern-match on it; the CLI
renders Markdown on top; a future TUI screen, JSON exporter, or
analytics extension consumes the same shape.
Lives in foundation because it's an introspection surface, not host
plumbing. The sandbox-visible public surface is `(session-state)`
for data and `(session-report-md)` for Markdown; this namespace
owns the transcript portion behind that deeper interface.
Public Clojure surface:
`(transcript db-info session-id)` -> transcript data map
`(transcript->md data)` -> Markdown string
`(transcript-md db-info session-id)` -> DB lookup + Markdown string
Canonical data shape:
{:session {:id :title :channel :model :provider :created-at}
:totals {:turns N :iterations N
:tokens {:input :output :reasoning :cached}
:cost-usd D}
:dialog [{:role :turn-id :content}]
:calls [{:kind :ref :parent-ref :turn-id :iteration-id :op :tool
:var :code :status :duration-ms :command :target
:result :result-summary :info}]
:timeline [{:kind :ref :turn-id :iteration-id :content :code
:status :duration-ms :result-summary}]
:turns
[{:id :user-request :status :prior-outcome :provider :model
:iteration-count :failure-count
:tokens :cost-usd :answer
:iterations
[{:id :position :status :duration-ms
:provider :model :thinking :error
:tokens :cost-usd
:answer-position :returned-empty-blocks?
:vars
[{:name :code :value :version}]
:blocks
[{:position :code :comment :result :error
:duration-ms :timeout? :repaired?}]}]}]}
The Markdown renderer renders thinking, iteration-level errors,
vars, per-block forensic previews, and final answer text. Large
fields are bounded so reports stay safe to open.(session-summary {:keys [session totals calls turns]})Grouped [[group-label [[key value mono?] ...]] ...] rows shared by the
Markdown summary and the HTML summary card. Pure over the transcript
data map - one canonical summary shape for every surface.
Grouped [[group-label [[key value mono?] ...]] ...] rows shared by the Markdown summary and the HTML summary card. Pure over the `transcript` data map - one canonical summary shape for every surface.
(session-summary-md db-info session-id)Canonical Markdown session-summary block (title heading + grouped facts) for a session - the SAME summary the HTML card renders. DB lookup + render; returns "" (no throw) on a missing id so shell pipelines and headers degrade cleanly.
Canonical Markdown session-summary block (title heading + grouped facts) for a session - the SAME summary the HTML card renders. DB lookup + render; returns "" (no throw) on a missing id so shell pipelines and headers degrade cleanly.
(transcript db-info session-id)Full session transcript as one Clojure data map. See ns docstring for the canonical shape. Returns nil when the session id does not resolve.
session-id accepts either the canonical UUID or an
unambiguous string prefix.
Pure with respect to the database - no writes, no logging.
(:db-info env) is the standard handle; the sandbox-bound symbol
variant uses the live env automatically.
Full session transcript as one Clojure data map. See ns docstring for the canonical shape. Returns nil when the session id does not resolve. `session-id` accepts either the canonical UUID or an unambiguous string prefix. Pure with respect to the database - no writes, no logging. `(:db-info env)` is the standard handle; the sandbox-bound symbol variant uses the live env automatically.
(transcript->html data)(transcript->html data
{:keys [mode theme-id] :or {mode :full theme-id :vis-light}})Render transcript data as a STANDALONE HTML document, styled with the
vis-light theme's shared web CSS variables so an exported transcript
matches the web TUI's colors. Pure transformation over transcript's
data shape (via the Markdown surface). Returns a string.
Opts:
:mode - :full (default) or :dialog, forwarded to transcript->md.:theme-id - theme id for the embedded CSS (default :vis-light).Render transcript data as a STANDALONE HTML document, styled with the vis-light theme's shared web CSS variables so an exported transcript matches the web TUI's colors. Pure transformation over `transcript`'s data shape (via the Markdown surface). Returns a string. Opts: - `:mode` - `:full` (default) or `:dialog`, forwarded to `transcript->md`. - `:theme-id` - theme id for the embedded CSS (default `:vis-light`).
(transcript->md data)(transcript->md data {:keys [mode] :or {mode :full}})Render transcript data as Markdown. Pure transformation over
transcript's canonical data shape. Returns a string.
Modes:
:full - bounded diagnostic report (default).:dialog - user/assistant dialog only.Render transcript data as Markdown. Pure transformation over `transcript`'s canonical data shape. Returns a string. Modes: - `:full` - bounded diagnostic report (default). - `:dialog` - user/assistant dialog only.
(transcript-md db-info session-id)(transcript-md db-info session-id opts)Render the session as Markdown. Single transformation over
transcript's data. Returns a string; returns
"Session not found: <id>\n" (no throw) on a missing id so
shell pipelines stay clean.
Render the session as Markdown. Single transformation over `transcript`'s data. Returns a string; returns `"Session not found: <id>\n"` (no throw) on a missing id so shell pipelines stay clean.
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 |