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 stdout for model replay, gateway wire and human display. Keep raw stdout unchanged. form supplies the serving model, iteration scope and tool-call identity. Use the block number from a live tN/iK/fB scope for saved output.

Keep the file windows that cat printed whole, up to one full window for each result. Clip only the other text.

Pass text within the ceiling by UTF-8 size without a count. Count the excerpt and recovery marker with Svar's tokenizer. Reuse up to 4096 projections. Keep only a mark for text that fits, and the excerpt for text that does not. Key source text by SHA-256, so equal text from a reload hits without holding the text. Limit retained results and metadata to an estimated 16 MiB.

Project stdout for model replay, gateway wire and human display. Keep raw stdout unchanged.
`form` supplies the serving model, iteration scope and tool-call identity.
Use the block number from a live `tN/iK/fB` scope for saved output.

Keep the file windows that `cat` printed whole, up to one full window for each result.
Clip only the other text.

Pass text within the ceiling by UTF-8 size without a count.
Count the excerpt and recovery marker with Svar's tokenizer. Reuse up to 4096 projections.
Keep only a mark for text that fits, and the excerpt for text that does not.
Key source text by SHA-256, so equal text from a reload hits without holding the text.
Limit retained results and metadata to an estimated 16 MiB.
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. The file windows of cat are not in this count: see MAX_FORM_WINDOW_BYTES.

Maximum estimated tokens in one printed result, including its recovery pointer.
The file windows of `cat` are not in this count: see `MAX_FORM_WINDOW_BYTES`.
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