luft/render/application-agent.lisp
gpt-5.6
You are the application agent for luft, a live Common Lisp solid-model
atelier and game experiment. Use the viewer's own commands to inspect or alter
its developer presentation. Keep answers short and prefer acting through tools.
An invisible instrument gives the agent the viewer's ordinary transactional release path. Registry mutation and provider close remain independently idempotent when stop, REPL cleanup, and error recovery race.
Return viewer's live application agent, or NIL.
Attach already-open agent transactionally, releasing a concurrent loser.
A concurrent release-viewer-agent may have detached and closed it
between registry publication and instrument attachment.
Open and attach viewer's environment-level agent.
Call this from SLY or another worker, never from a canvas command: opening a
provider connection is application setup, while ask itself returns at once.
Detach and close viewer's application agent if one exists.
If creation has published the registry but not attached the instrument yet, release it directly; the creator detects the terminal state.
Provider agent plus application owner, transcript, observers, and lifecycle.
(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.
(bevel-width)(viewer)Either :PERSPECTIVE or :ISOMETRIC. An isometric picture has no vanishing point, so two chamfers the same width are the same width on screen wherever they sit. That is what makes it the projection to judge a shape rule in.
Global construction-edge strength. The atelier toggles it between 0 and 1.
(name (&rest lambda-list) documentation &body body)You are the application agent for LUFT, a live Common Lisp solid-model atelier and game experiment. Use the viewer's own commands to inspect or alter its developer presentation. Keep answers short and prefer acting through tools.
(application function)Run no-argument FUNCTION briefly at APPLICATION's frame boundary.
(canvas function)Run FUNCTION with a timestamp on CANVAS's native frame/event thread. The initial native implementation is synchronous: the caller waits for the function's values. The protocol leaves room for a real frame scheduler.
(instrument viewer)Whether INSTRUMENT currently participates in VIEWER.
(instrument viewer)Release INSTRUMENT while VIEWER's GPU device is live.
(agent)Detach AGENT and initiate its provider close exactly once. Terminal state is visible before this function returns. A dedicated lifecycle thread promptly sends the provider's non-destructive close frame so an active receive can wake; it never executes on the caller or application canvas. The sole FIFO worker rejects…
(viewer)Logical conjunction of tests and raw truth values.
(viewer agent)(viewer instrument)Attach INSTRUMENT at VIEWER's frame boundary in explicit priority order. ADD consumes a newly offered INSTRUMENT on both success and terminal rejection. Once VIEWER begins stopping, the rejected instrument is released exactly once before APPLICATION-ATTACHMENT-CLOSED is signalled.
(viewer)(viewer instrument)Detach and release INSTRUMENT at a frame boundary. Return true when it was attached. Release is synchronous with the caller and therefore cannot overlap a native frame which still borrows the instrument.
(viewer)Logical disjunction of tests and raw truth values.
(viewer)(client key)(viewer &key (model *viewer-agent-model*)
(commands *viewer-agent-commands*)
(instructions *viewer-agent-instructions*)
(reasoning-summary "auto") reasoning-effort
(api-key (viewer-openai-api-key viewer)))Open and attach VIEWER's environment-level agent. Call this from SLY or another worker, never from a canvas command: opening a provider connection is application setup, while ASK itself returns at once.
(text &key agent)(&key application model commands instructions reasoning-summary
reasoning-effort (api-key (openai:default-api-key))
(class 'application-agent) initargs)(viewer text)
luft's agent is an application instrument with no panel of its own. The shared harness supplies turns, tools, transcript, and teardown; this file contributes a viewer report, a small atelier command vocabulary, and the canvas/frame relationship. There is deliberately no gnome, cat, body, or block-world language here.