luvcraft/agent/wall.lisp
A terminal wall showing one agent's transcript.
--------------------------------------------------------------------- Writing
text with every newline made a carriage return and line feed.
There is no tty discipline between us and Ghostty to do it.
Queue text for display's terminal; the frame boundary writes it.
--------------------------------------------------------------------- ANSI: the cassette as escape sequences.
Text with SGR colour, for a terminal wall.
Header: spine, name, arguments, clock at the right edge.
Window: a few lines of output, indented under the spine.
--------------------------------------------------------------------- Following a turn
Whatever prompt line was waiting -- typed here or not -- is replaced by the turn's own first line.
Write whatever of turn's thought or text (kind) has not been written.
--------------------------------------------------------------------- Typing at the wall
--------------------------------------------------------------------- Opening one
Give display its agent: an observer in, a prompt out, no PTY at all.
Open agent's transcript on the terminal wall the player is looking at.
hit may name another terminal block; by default it is the one under the
crosshair, as when activating a wall.
A terminal wall showing one agent's transcript.
(text)TEXT with every newline made a carriage return and line feed. There is no tty discipline between us and Ghostty to do it.
(display text)(display)(overlay session)Publish any complete pending render state for OVERLAY at a frame boundary.
An explicitly owned libghostty-vt terminal.
Test whether two compatible scalars are equal.
(terminal text)Text with SGR colour, for a terminal wall.
The width of the terminal an ANSI presentation is being written for.
(color)Multiplication and scalar scaling.
(color)(queue swapchain image-index
&key (wait-semaphores #()) present-id present-stage time-domain-id
target-time target-time-domain-present-stage)Headings, paragraphs, figures and their IDs, mentions, marks.
(call)(call)(call)The maximum of compatible quantities.
Subtraction or unary negation.
(text columns)Test whether one compatible scalar is greater than another.
(display)(terminal)(display turn)(display turn kind)Logical disjunction of tests and raw truth values.
(display call)(display call)(display turn)(display)(focus session canvas event)Handle EVENT while FOCUS owns SESSION's modal player interaction.
A native destination with a lifetime and frame clock.
(text &key agent)Logical conjunction of tests and raw truth values.
Logical negation of one test or raw truth value.
(display agent)(agent function)(overlay)Release resources owned by an object attached to luvcraft.
(agent function)(&key (agent (or *agent* (make-world-agent)))
(session (world-agent-session agent))
hit)Open AGENT's transcript on the terminal wall the player is looking at. HIT may name another terminal block; by default it is the one under the crosshair, as when activating a wall.
The most recently made Luvcraft WORLD-AGENT for REPL convenience.
(&key (session luvcraft:*session*)
(model *default-agent-model*)
(commands *default-agent-tools*)
(instructions *default-instructions*)
(reasoning-summary "auto")
reasoning-effort
(api-key (openai:default-api-key)))Open Luvcraft's thin WORLD-AGENT specialization for SESSION. Connection setup performs network I/O; call this from SLY or a setup worker, never from the canvas thread. Once open, ASK itself always returns at once.
(agent)(session &key (max-distance +luvcraft-target-reach+))(session hit material attach
&key (class 'terminal-display))Open the terminal display for the MATERIAL wall HIT names and ATTACH it. ATTACH receives the fresh display and gives the wall its process; if it fails, the display is taken down rather than left attached to nothing. CLASS is the display class to make, for walls that are not shells.
(name (&rest lambda-list) documentation &body body)The terminal wall does not rasterize anything into a texture. It places one instanced quad per glyph directly in world space -- see make-terminal-display-glyph-instances and the world text run it feeds -- and Slug evaluates the outline analytically in the fragment shader, at whatever resolution that pixel happens to…
Before nxt deleted its UI runtime (nxtui commit 3d692d0), a tool call was drawn as a cassette (#7FFNVT): a trace as XML (turn > thought | call[name, status, elapsed] > args, result[kind], affordances[key]), and one XSLT stylesheet, cassette/baltic-birch-v1.xsl, holding the whole visual language in about three hundred…
The agent's wall: the transcript on a terminal wall, drawn the way the phone and the shell walls are drawn -- Ghostty cells as Slug glyph geometry, sharp at any distance (#GJUPMQ) -- rather than through a McCLIM mirror.
The wall is a
terminal-displaywith no PTY. What it shows is VT bytes the agent writes into its Ghostty terminal: the prompt the player types at it, the thought as it streams, and each tool call as an ANSI cassette (#9K823O) once it has finished. The terminal does the scrolling and the wrapping; we do the colours.Two threads meet here and one thing crosses between them, the way the Telegram wall already does it: the turn's thread formats text and posts it to an outbox; the canvas thread drains the outbox into the terminal at the frame boundary, where it also reads the terminal to draw it. Nothing writes the terminal from anywhere else.