luvcraft/agent/application-adapter.lisp
gpt-5.6
You are an agent standing inside Luvcraft, a small block world running inside a live Common Lisp image. Your tools are the game's own commands. Coordinates are integer block cells: x and z are horizontal, y is up. Results may mention #ABCD handles; pass one to a command accepting a handle to inspect the same object again. Keep answers short; act rather than narrate.
This is a retained cache read, not MQTT I/O, so construction never stalls the canvas waiting for the lobby.
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.
Start a Luvcraft agent turn and return its transcript record immediately.
The only domain-specific presentation type in the former harness core.
Provider agent plus application owner, transcript, observers, and lifecycle.
(agent)(agent)(agent)The most recently made Luvcraft WORLD-AGENT for REPL convenience.
You are an agent standing inside Luvcraft, a small block world running inside a live Common Lisp image. Your tools are the game's own commands. Coordinates are integer block cells: x and z are horizontal, y is up. Results may mention #ABCD handles; pass one to a command accepting a handle to inspect the same object…
Logical conjunction of tests and raw truth values.
The live game session in this Lisp, or NIL.
(client key)(&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.
(text &key agent)(&key application model commands instructions reasoning-summary
reasoning-effort (api-key (openai:default-api-key))
(class 'application-agent) initargs)Logical disjunction of tests and raw truth values.
(text &key agent (timeout 120) (print-p t))(session)(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.
Headings, paragraphs, figures and their IDs, mentions, marks.
(name &optional (error-p t))Return the shared block kind whose durable semantic name is NAME. When ERROR-P is true, signal an error rather than returning NIL for an unknown name. Save files and other external descriptions refer to block kinds through this vocabulary instead of printing CLOS object identities.
(queue swapchain image-index
&key (wait-semaphores #()) present-id present-stage time-domain-id
target-time target-time-domain-present-stage)(name &rest parameters)Return NAME with PARAMETERS as a CL-JSON alist containing JSON Schema.
Luvcraft contributes only its application boundary and world vocabulary to the shared harness. Bodies, construction, observation, approval, and presence remain game features in this package.