luvcraft/agent/cat.lisp
cat
A sitting SDF-rendered cat carrying the shared embodied world-agent surface.
The cat's :CAT-SDF body overlay.
How many world cells one cat figure unit occupies.
The current top of the cat in figure space.
A conservative sphere following the cat's silhouette knobs.
Return where a ray enters the cat's upright conservative box.
The cat's conservative proxy, breathing almost imperceptibly.
You are a cat: observant, compact, mischievous, and embodied in luvcraft, a block world running inside a live Common Lisp image. A player is talking to you. Your tools are the game's own commands. Coordinates are integer block cells: x and z are horizontal, y is up; you sit at the cell given below. To talk to the player you MUST use the say tool -- only what you say is heard; your final message is not shown. Keep what you say short, feline, and useful. Results may mention #ABCD handles; pass one back to describe-handle to inspect the thing it names.
Spawn a visible cat agent, choosing a supported cell when omitted.
A sitting SDF-rendered cat carrying the shared embodied WORLD-AGENT surface.
One embodied agent at a discrete cell: its thread, figure, and voice.
The cat's :CAT-SDF body overlay.
The shared conservative billboard and GPU resources for one SDF agent.
Convert one scalar float or unsigned value to a 32-bit float.
World cells per cat figure unit; the sitting cat is 1.30 units high.
The maximum of compatible quantities.
How high the ear tips stand above the cat's paws, in figure units.
Addition over compatible quantities.
Multiplication and scalar scaling.
The cat's head radius in figure units.
Subtraction or unary negation.
How far the question-mark tail sweeps out from the cat's side.
(agent)AGENT's visible height above its occupied cell, in blocks.
(agent &optional lift)The world point above AGENT, optionally LIFT blocks higher.
(x y z)(body)(body)(body)(agent &optional lift)The world point AGENT looks from, optionally LIFT blocks higher.
(agent)How far away the focused camera stands from AGENT.
(agent origin direction max-distance)Where a ray enters AGENT's conservative body, or NIL.
Test whether one compatible scalar is at most another.
Division of two represented quantities.
Test whether one compatible scalar is greater than another.
The minimum of compatible quantities.
Logical conjunction of tests and raw truth values.
(agent)Return AGENT's conservative SDF proxy as world-space X, Y, Z, RADIUS.
Logical disjunction of tests and raw truth values.
(agent role label &key (class 'sdf-agent-body-overlay))You are a cat: observant, compact, mischievous, and embodied in luvcraft, a block world running inside a live Common Lisp image. A player is talking to you. Your tools are the game's own commands. Coordinates are integer block cells: x and z are horizontal, y is up; you sit at the cell given below. To talk to the…
(agent)Perform the blocking provider setup for AGENT and return a fresh WORLD-AGENT. Methods construct candidates only. The common opening protocol installs one winner, attaches its observer, and releases candidates that lose to teardown.
(&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.
(session x y z &optional (make-p t))(session x y z)(class session x y z &key (facing-yaw 0d0))(&key (session luvcraft:*session*) x y z)The live game session in this Lisp, or NIL.
(class &key (session luvcraft:*session*) x y z)Spawn an embodied agent of CLASS at integer cell X,Y,Z and return it. With no coordinate, choose an empty cell a few steps ahead of the player and stand the agent on the first supporting block. The cell names its discrete place while its position and velocity continuously realize travel between places.
(name (&rest lambda-list) documentation &body body)
A cat is another embodied agent, sharing the gnome's conversation surface without pretending to be a kind of gnome. Its authored state is the same small boundary object -- session, cell,
world-agent, transcript surfaces -- while :CAT-SDF supplies a wholly separate dense fragment program.