Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.channel.form

The canonical per-form DISPLAY contract — ONE source of truth for the fields a channel reads to render an executed form, live (via the gateway) and restored (via the DB).

Why this exists: the SAME field set used to be hand-listed in independent allowlists across the loop, persistence, gateway, progress, and restored display paths. Now every layer projects the WHOLE set through ->display (outbound) / <-wire (inbound), so a new display field is a ONE-line change to display-keys and form-roundtrip-test fails if a boundary stops carrying it.

Transformed fields (:stdout/:error bounded, :silent/:duration_ms renamed) stay as explicit gateway overrides — they are not carried verbatim, so they are NOT in this set.

The canonical per-form DISPLAY contract — ONE source of truth for the fields a
channel reads to render an executed form, live (via the gateway) and restored
(via the DB).

Why this exists: the SAME field set used to be hand-listed in independent
allowlists across the loop, persistence, gateway, progress, and restored display
paths. Now every layer projects the WHOLE set through `->display` (outbound) /
`<-wire` (inbound), so a new display field is a ONE-line change to
`display-keys` and `form-roundtrip-test` fails if a boundary stops carrying it.

Transformed fields (`:stdout`/`:error` bounded, `:silent`/`:duration_ms`
renamed) stay as explicit gateway overrides — they are not carried verbatim, so
they are NOT in this set.
raw docstring

->displayclj

(->display m)

Project canonical display fields from a source map, dropping nils.

Project canonical display fields from a source map, dropping nils.
sourceraw docstring

<-wireclj

(<-wire event)

Read the canonical display fields back off a gateway WIRE event into a form, using the literal wire spelling declared beside each engine key in display-fields. The single inbound projection channels use — the mirror of ->display.

Read the canonical display fields back off a gateway WIRE event into a form,
using the literal wire spelling declared beside each engine key in
`display-fields`. The single inbound projection channels use — the mirror of
`->display`.
sourceraw docstring

clip-to-wireclj

(clip-to-wire s)
(clip-to-wire s form)

Project one stdout body for model replay, gateway wire and human display. The same Svar tokenizer selection used for request estimates prices the body and its marker; a head/tail binary search keeps the entire excerpt inside the budget. Raw stdout remains in the saved form. form supplies the serving model and recoverable iteration scope/tool-call identity. Live events may add /fN to the display scope; saved read_session() blocks use only tN/iM.

Project one stdout body for model replay, gateway wire and human display. The
same Svar tokenizer selection used for request estimates prices the body and its
marker; a head/tail binary search keeps the entire excerpt inside the budget.
Raw stdout remains in the saved form. `form` supplies the serving model and
recoverable iteration scope/tool-call identity. Live events may add `/fN` to
the display scope; saved `read_session()` blocks use only `tN/iM`.
sourceraw docstring

display-keysclj

The canonical engine keys projected by ->display and recovered by <-wire.

The canonical engine keys projected by `->display` and recovered by `<-wire`.
sourceraw docstring

envelope-duration-msclj

(envelope-duration-ms envelope)

Wall-clock ms an executed form took, derived from the timing keys its envelope already carries — nil when the envelope carries no complete pair, so a caller can tell "took no measurable time" from "was never timed".

The ONE derivation of a form's duration: the loop, the CLI trace, the progress projection, the ctx envelope and a DB-restored transcript each used to carry a private copy of this arithmetic.

Wall-clock ms an executed form took, derived from the timing keys its envelope
already carries — nil when the envelope carries no complete pair, so a caller
can tell "took no measurable time" from "was never timed".

The ONE derivation of a form's duration: the loop, the CLI trace, the progress
projection, the ctx envelope and a DB-restored transcript each used to carry a
private copy of this arithmetic.
sourceraw docstring

MAX_FORM_OUTPUT_TOKENSclj

Maximum estimated tokens in one printed result, including its recovery pointer.

Maximum estimated tokens in one printed result, including its recovery pointer.
sourceraw docstring

result-cardclj

(result-card {:keys [op] :as form})

Canonical result CARD descriptor derived only from the form's :stdout:

{:op grep — optional form metadata :body …markdown… — local projection of printed output :collapsible? true}

nil means the form printed nothing. A label or operation can never manufacture successful output.

Canonical result CARD descriptor derived only from the form's `:stdout`:

  {:op           `grep`       — optional form metadata
   :body         …markdown…    — local projection of printed output
   :collapsible? true}

nil means the form printed nothing. A label or operation can never manufacture
successful output.
sourceraw docstring

stdout-displayclj

(stdout-display form)

Project a form's printed stdout into a human card. Artifact fences are passed through only when complete; clipped fences become ordinary fenced text, never a broken inline image, document or table. Model, gateway and card all use the same tokenizer-bounded stdout projection.

Project a form's printed stdout into a human card. Artifact fences are passed
through only when complete; clipped fences become ordinary fenced text, never a
broken inline image, document or table. Model, gateway and card all use the same
tokenizer-bounded stdout projection.
sourceraw docstring

with-displayclj

(with-display form)

Attach the cached formatted rendering of a form's Python source when the form did not author its own :display-code. Result presentation is always derived locally from canonical facts and is never attached to the form.

Attach the cached formatted rendering of a form's Python source when the form did not
author its own `:display-code`. Result presentation is always derived locally
from canonical facts and is never attached to the form.
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