World Interface
A world is a directory with aworld.toml.
World(dir=...) identifies the world. world.start(...) launches one running
instance of it.
Before Start
World(dir=...) exposes everything known from world.toml:
After Start
Afterstart, a world has:
world.start(...) returns the same runtime details as data:
Agent Access
Connect an agent to a running world:api_access is ordinary data: headers/session information that scripts can put
into prompts however they want.
The agent does not need to know what a world is. It only receives prompts and
paths.
Schema Direction
The existing schema stays valid. Today,world.toml can configure the built-in Clawblox engine or delegate
startup with:
clawblox run starts the
command with a small environment contract:
WORLD_* values as defaults. Explicit command
line flags should still override environment defaults. CLAWBLOX_BIN is
namespaced because it points back to the Clawblox executable rather than to a
world runtime setting.
If we add schema, it should be justified by engine-agnostic needs that the
current schema cannot express clearly:
World interface without
pretending they all use the Clawblox Lua engine.
Save / Load
A world supports save/load by implementing exactly two things:docs/checkpoints.md).
Everything else is generic and lives in Clawblox:
Run Manifest Annotation
Orchestration scripts can label the manifest for the bounded run they just performed:start, save,
and stop; record_run exists so app/replay tooling can order and label run
directories without depending on folder-name conventions or a separate CSV file.
Semantic requirements for a conforming world:
- Restore is exact. A restored instance is observationally identical to the
instance at snapshot time: physics state, sim time, sessions (the same
X-Sessionids keep working without re-join), and chat history. - If the snapshot is JSON with top-level
formatandtimefields, Clawblox records them in the manifest; otherwise the checkpoint is registered with formatworld-snapshot. - Snapshots should identify their world content (for example a scene hash) and refuse to restore into a mismatched world.
- Agent-visible payloads expose simulation time only, never host wall-clock time. Wall time both leaks the host and makes restores observable; the save/load design keeps checkpoints invisible to agents.
GET /snapshot. If a world’s state is too large for that, a future revision may
let the endpoint return a file reference instead; do not invent a private
variant.