Konjure DSL
A small language for scenes, geometry, behavior, interaction and conversation.
Konjure source uses .kj. The compiler produces a versioned .konjure JSON document. The first language is deliberately bounded: it describes a scene and declares behavior. It does not expose filesystem access, networking, arbitrary code execution, or unbounded loops.
Scene and entities
scene workspace {
title "A shared workspace";
node base { box 2m 0.1m 1m; color #8193aa; }
node marker {
sphere 0.12m;
parent base;
at 0m 0.5m 0m;
scale 1 1 1;
color #6fe3ff;
}
}Identifiers use letters, digits, underscores and hyphens, beginning with a letter or underscore. Parents may be declared later. Every identifier must be unique; cycles and unsupported depths are rejected. Duplicate singular properties are errors. Comments begin with //.
Coordinates are right handed: +X right, +Y up, −Z forward. Lengths use meters. Scale is dimensionless. The authored transform belongs to its parent frame; the runtime emits composed world matrices.
Use rotate 0deg 0deg 90deg; for an initial rotation. Angles use Euler XYZ composition and compile to a unit quaternion. The runtime composes authored orientation with animated spin.
Geometry and material
| Statement | Meaning |
|---|---|
group; | Transform-only entity |
sphere 0.2m; | Sphere radius |
box 1m 0.5m 0.3m; | Width, height, depth |
cylinder 0.1m 0.8m; | Radius and height, along Y |
torus 1.2m 0.02m; | Major radius and tube radius, around Y |
plane 4m 3m; | Width and depth, in XZ |
line 0m 0m 0m to 1m 1m 0m; | A line segment between two local points |
color #6fe3ff; | sRGB color |
roughness 0.3; | Surface roughness |
emissive 0.2; | Emission strength |
Rust prepares the mesh buffers. Renderers own lighting and drawing. External mesh asset references are reserved in the document model, but the current runtime rejects unresolved assets. Custom shader authoring is a later language module; the current material contract is deliberately small.
Animation
node probe {
sphere 0.1m;
orbit 1.5m period 8s;
bob 0.2m period 3s;
spin 30deg;
}Orbit adds motion in the local XZ plane, bob adds a Y offset, and spin rotates about local Y. In this version, spin 30deg means 30 degrees per second. Behavior samples absolute scene time. Toggling motion disables or enables those time-based offsets; it is not a clock pause. Use the runtime consumer’s playback control to freeze scene time.
Actions and effects
node marker {
sphere 0.2m;
action motion toggle_motion;
action highlight change_color #efb778;
action inspect propose_effect "inspect_workspace";
}Actions are named and declared on an entity. An input adapter sends invoke_action with the entity and action IDs. The Rust runtime validates the request and returns a receipt. An external effect is proposed, never executed by the scene runtime. A robot or service adapter needs its own authorization, validation, execution and completion receipt.
Conversation
chat user "Show the workspace.";
chat assistant "The cyan marker is the selected object.";The roles are user, assistant, and system. Text is UTF-8, including non-Latin scripts. These are authored conversation records, not an automatic model connection. The Rust document API also supports entity references in messages.
Bounds and diagnostics
Source is capped at 64 KiB and a scene at 256 entities. Geometry, transforms, identifiers, hierarchy, material values and animation parameters have additional finite limits enforced by Rust. Errors contain a message and, for syntax errors, source offsets plus line and column. Direct JSON/native construction goes through the same scene validator.