Skip to content
API reference

API reference

See the generated API reference for the SDK exported from @fungi.computer/vishnu.

Kind Export Description
class CartridgeError Thrown by authoring factories and defineCartridge; carries every problem.
interface Vec3
interface MoveDestination
interface RouteCostRequest
interface RouteToAnyRequest
interface WorkMaterialFacts
interface Pose
interface WorldPosition
interface SupportSurface
interface WorldPose
interface ComponentDefinition
interface VisualVariantRule View-only selection of an art binding from one committed authored field.
interface EntityRecord
interface QuerySpec
interface QueryRow
interface QueryView Retained, read-only membership in canonical identity order. Read values are shared immutable versions; make an explicit draft before editing a value. A view is a phase-local read capability, not an array or a saved world.
interface JobStep
interface JobPlan
interface ActionResult
interface Impact
interface AdvanceResult
interface ActionOutcome
interface WorkAttemptKey
interface WorkAttempt
interface SimulationClock
interface ProcessRequirements
interface RandomSource
interface ReadContext
interface ScopedAction
interface ScopedCreate
interface ScopedRemove
interface CrowdMotion Ground-plane crowd destination, advanced by the native simulation phase.
interface WriteContext
interface SystemDefinition
interface ProjectileAim
interface CollisionFact
interface RenderFact
interface DeliveryActivity
interface ActivityBinding
interface AtmosphereSample
interface AtmosphereSamples
interface ConstructionReadiness
interface PlacementCandidate
interface PlacementDecision
interface PlacementDecisionResponse
interface ConstructionAccess
interface SurfaceWaterContact
interface TerrainPresentationDefinition
interface ComponentReadChanges Process-local acknowledgements of the native component reader, never save frontiers. Only the Session advances the slowest system’s read checkpoint.
interface KernelPort
interface InterestVisualGroup Fixed visual groups are observed only when their complete footprint is in range.
interface GamePack
interface GameScenario A named dev/test setup for a fresh world (see GamePack.scenarios).
interface GameCommandResult
interface GameCommandDefinition
interface GamePackTransport
interface FeedbackSwing A weapon trail on the world plane. Direction is normalized at intake; angle is the full sweep in radians and height is above the cue’s anchor. This draws contact intent; collision and damage remain simulation-owned.
interface SystemOptions
interface ActorCapability
interface ActorDefinitionCapability Authoring-only capability compiled by an owning engine module.
interface ActorDefinitionCapabilityValue
interface ActorInput
interface ActorDefinition
interface PredicateDefinition A named, deterministic question used by an authored behavior branch.
interface BehaviorActionDefinition A named proposal producer. The existing system/session owners commit its work.
interface BehaviorDefinition A prepared actor behavior. It is not a system: pack preparation installs it once for every actor that attaches it (installActorBehaviors).
interface BehaviorSelection
interface BehaviorScene
interface BehaviorOptions
interface ActorBuilder
interface BlueprintOpening One opening on a module’s side; at counts cells along that side. style names the game’s own variant of it (a barred cell door), over the side’s style.
interface BlueprintModule One room: size is [width along x, depth along z] in cells.
interface BlueprintPlacement A module placed in a recipe: its north-west corner at at, then turned rotate quarter turns clockwise and mirrored east-west if asked.
interface BlueprintRecipe
interface BlueprintPiece One wall, door or window: the face after cell along axis, in the style a room gave it (absent: the plain piece).
interface BlueprintRoom
interface BlueprintSlot
interface Blueprint An assembled building: its pieces, rooms and slots, in a fixed order.
interface BlueprintLevel An authored storey. Room assembly and piece compilation have distinct owners.
interface BlueprintStair Stair origin on its lower level; the buildable declares its run and rise.
interface BlueprintKit
interface ConstructionOptions
interface ConstructionVisual One staged construction sprite, ready for the visual projection.
interface Construction Everything the Construction extension derives from its buildables.
interface VisualBinding One sprite id’s art: a static art-bank frame, a bank figure, or a rigged paper doll. Data only; the client checks it when it draws.
interface CartridgeArtPackFiles One checked cartridge art pack’s files, as bundler-resolved URLs (a build renames every file, so the pack names each page’s URL).
interface CartridgeShelf How the hub shelf lists a cartridge. Presentation only.
interface SelectionCard A selected object whose visual starts with visualPrefix gets its own named card in the selection panel.
interface CartridgeAim Aiming on the page, twin-stick style. pointer: a plain click on the world sends command with { at: { x, z } } (the clicked actor, or the ground at the direct-control actor’s height). arrows: a held arrow key sends { toward: { x, z } } (up is north) at once, then every repeatSeconds (default 0.25) while held, and arrows stop moving the direct-control actor. A gamepad’s right stick aims the same way, and its left stick drives the direct-control actor. hold: a held aim is a lease the game keeps firing on at its own cadence: each send is { toward: { x, z }, held: true }, and letting go sends { release: true }. The command decides what each one does.
interface CartridgePage What the player shell shows around the world. Read-only presentation.
interface CartridgeSpec
interface Cartridge The checked, compiled cartridge. The only thing the Worker, page and host accept.
interface SceneEntity
interface CompiledBuildable
interface ConstructionPlanOptions
interface ConstructionSiteState
interface Diagnostic
interface Effect
interface FeedbackStrength A bounded response to contact strength; no simulation clock or RNG.
interface AnchoredFeedback
interface ShotFeedback
interface SwingFeedback
interface ContactFeedback
interface SplatFeedback
interface FeedbackProfile
interface FlowBarrier A structure standing across a face, and how much it would take.
interface FlowGeometry Navigation facts: blocked cells and weighted breakable edges are game data.
interface FlowNavigation
interface HordeSlot
interface HordeSlotBody
interface HordeSlotAssignment
interface LookSpec How a cartridge looks. Everything is optional: a cartridge without a palette renders in full colour, exactly as the engine always has.
interface MoodStop From at simulation seconds on, the view shows mood.
interface PhaseClock
interface PhaseAdvance
interface Placement One actor in the fresh world. Compiled by defineCartridge, never spawned.
interface CompiledScene The fresh world compiled from a scene.
interface EntityClass
interface SeatView The same named world view is available to every authorized seat.
interface SeatGoal A cartridge-authored challenge and its committed-state scoring rule.
interface SeatDefinition
interface VoxelTerrainChoice
interface SeaTerrainChoice
interface CartridgeWindow
interface GenerationFingerprint
interface WorldSpec What a cartridge’s world needs; meadow() fills it in.
type alias EntityId Public boundary between authored TypeScript and the authoritative kernel.
type alias ComponentId
type alias GameId
type alias RouteCostResult
type alias RouteToAnyResult
type alias FieldType
type alias RelationRemovalPolicy
type alias ComponentValue
type alias WriteIntent
type alias JobEntityBinding
type alias JobOperation
type alias JobContinuation
type alias CardinalOrientation
type alias EdgeTarget
type alias ConstructionTarget
type alias ActionRequest
type alias WorkActivityRef
type alias WorkInterruptCause
type alias WorkBlockReason
type alias WorkOutcome
type alias WorkAttemptPhase
type alias ProcessInputPolicy
type alias ProcessInputDisposition
type alias NativeFact Native read doors available to authored decisions beyond ECS/query state.
type alias CommandScope
type alias PartyJoinIdentity
type alias SpawnArgument Spawn arguments bind values or existing entities; slots and joining players belong to party join.
type alias ActorArgument
type alias ActorInstantiationPlan
type alias PartyJoinCapability
type alias ActionScope
type alias GameCommandContext
type alias VisualPlacement
type alias DeliveryActivityPhase fetching: walking to the source with empty hands; pickup: the tick custody moved into the hands; carrying: walking with the held load; putting-down: the tick the load left the hands.
type alias ActivityKind
type alias KernelSnapshot
type alias ConstructionReadinessStatus
type alias ConstructionAccessContact
type alias DeconstructionAccess
type alias PhysicalContact
type alias TerrainSurface
type alias TerrainSurfaceCover
type alias StructureSurface
type alias FloorOperation
type alias FloorOperationRequest
type alias TerrainChangeSet
type alias GameLocalBinding
type alias JsonValue
type alias ComponentValues
type alias GameCommandAvailability
type alias EnvironmentFacts
type alias AuthoredFeedbackCue What WriteContext.cue() accepts: a feedback cue before the session stamps its sequence and commit time.
type alias CartridgeAudio
type alias CapabilityReference
type alias ActorInitial
type alias BlueprintSide A side of a module: north is -z, south +z, west -x, east +x.
type alias BlueprintOpeningKind What an opening in a side is: a door, a window, or a doorway (an open gap into the room next door, which must be there).
type alias CameraFollowPolicy
type alias CartridgeCameraPolicy
type alias BankPath
type alias PailPoses
type alias VisualBindings
type alias StaticVisualBinding A static frame by its path in the art (the bank’s, or a cartridge pack’s under its root).
type alias CartridgeDirectControl A cartridge-owned actor driven directly by the player’s movement keys. The world moves it in fixed steps. A walker with Traversal keeps its feet on the ground: it climbs or drops at most its step height, never steps onto no floor, and never passes a finished wall, a closed door or a filled cell. An open door lets it through. Moving it by route later starts from wherever it stands, even between cells.
type alias HostFeature
type alias ComponentFields One component’s field values as they cross into the kernel.
type alias BuildableDefinition
type alias ConstructionProposalInput
type alias DiagnosticCode
type alias EffectFields Fields declared by an effect, including its world time and step order.
type alias FlowCell
type alias PresentationLight
type alias CartridgeLighting
type alias Mood
type alias TerrainLook
type alias Look A checked look: either full colour, or a palette with its dither and mood.
type alias Cell2 A ground cell: [x, z]. The actor settles onto the surface there.
type alias ActorParams Values for an actor’s declared inputs, by input name.
type alias SeatFacts
type alias TerrainChoice
type alias WindowWorld What a window body reads: the committed world, through typed queries, and who is looking. Each viewer gets their own pass: a player sees { kind: "player", player }, a host or spectator { kind: "host" }.
type alias RunCommand The single command door: "garden:plantSeeds" or "ui:garden.goals".
type alias WindowBody Pure: world in, blocks out. It runs where the world lives (the Worker or the host) on every presentation, so only data crosses to the page.
type alias WorldgenAssembly
type alias RoomDefinition
type alias BuildingDefinition
type alias WorldgenCheck
type alias BuildingLayout
type alias BuildingGraph
type alias CompileRequest
type alias CompiledBuilding
type alias GenerationIdentity
type alias PopulationPolicy
type alias ChunkPolicy
type alias ChunkWindow
type alias ChunkFacts
type alias GenerationKey
type alias ChunkPlan
type alias WindowBlock One block of a game window: plain data a person or a model can write.
type alias WindowRole Where the shell shows a window.
type alias WindowOpening When a window first opens on its own.
constant RESERVED_COMPONENTS
constant sampledSoundSchema A sampled replacement for one existing feedback sound name. URLs are resolved by the cartridge bundler; variants cycle without simulation RNG.
constant cartridgeAudioSchema View-only audio bank. Omission preserves the engine’s procedural recipes. Named samples replace that recipe; a failed sample stays silent.
constant actorInput Declared instance inputs; templates bind these to checked component fields.
constant actorInputSchema Parses an actor input placeholder inside an initial component value.
constant ActorKind Membership marker for actors that attach behaviors. Pack preparation adds it to every attaching template, so an installed behavior runs only for entities created from an actor that attached it, never for look-alikes.
constant cameraFollowSchema Presentation tuning only; following never changes actor movement or aim.
constant cartridgeCameraSchema Camera policy shared by cartridge authoring and the remote player boundary. Follow is opt-in for a direct-control actor; manual pan suspends it until movement resumes. Unset zoom preserves the engine’s desktop/phone defaults. Whole zoom levels keep pixel art crisp; the wheel remains player-controlled.
constant HOST_FEATURES Engine features a host switches on for the shared worlds it opens.
constant Collider Physical collision dimensions are independent of a sprite’s bounds.
constant Launcher
constant ImpactMaterial Contact policy supplied by a game; collision geometry remains independent.
constant Body Native movement capability; game systems may query it but cannot write it.
constant Emitter Native finite-emission capability; catalog admission remains native-owned.
constant Container Native carrying capacity; authored systems may query but cannot write it.
constant Traversal Authored walking geometry; native routing owns its interpretation and state.
constant Position
constant Visual Native authored sprite identity. Presentation projections must not replace it.
constant Support
constant Surface
constant MaterialLot
constant Hands Native hands slot: the one lot an actor holds and carries. Separate from the actor’s container (inventory); filled only by a pickup and emptied only by a deposit, drop or transfer of that lot. Absent means empty hands.
constant VesselCapability Native vessel eligibility; physical capability is authored as content and consumed by the native field-water planner.
constant LotWater
constant SupplyAllocation Native reservation for one exact material portion. Physical custody remains in MaterialLot; this record exposes the durable planner obligation.
constant DeliveryRequest Durable intent submitted with requestDelivery; native allocation rows expose reserved and delivered portions without authored worker choreography.
constant FiniteResource
constant JobTaskWork Native durable effort for a generic job task; authored code may query it for progress presentation but cannot write it.
constant ResourceSite
constant Destination
constant placedAt A Position declared without values is bound where the actor is placed or spawned: these are the inputs the compiled template exposes for it.
constant ExcavationWork Native progress is observable but cannot be written by authored systems.
constant ExcavationOrder
constant Buildable A structure actor is created by native construction, on its existing site identity.
constant constructionProposalInput Friendly gesture input. Physical admission remains native and transactional.
constant SealedContainer Native custody is observable; authored writes cannot lock or unlock goods.
constant ConstructionSite The site owns earned effort; active worker ownership lives in WorkAttempt.
constant FloorReplacement
constant DeconstructionOrder Native-owned teardown intent projected for game UI and save inspection.
constant DIAGNOSTICS The stable catalog. A code never changes meaning once published.
constant FLOW_NEIGHBOURS
constant HordeTarget Saved autonomous intent. An empty profile is a direct local destination.
constant presentationLightSchema Presentation lights never participate in simulation sight or noise.
constant cartridgeLightingSchema Small, bounded authoring data; select committed visuals, not game callbacks.
constant MOODS The light a world is shown in. Every mood’s sky and light come from the declared palette.
constant moodSchema Parses a mood from untrusted input (a URL parameter, a tool call).
constant terrainLookSchema
constant FULL_COLOUR Full colour: no palette constraint.
constant Party Gameplay group identity. Membership and ownership are separate facts.
constant OwnedBy Stable player property. Access rules decide which operations it permits.
constant PartyMember A person belongs to this party without duplicating their physical identity.
constant OwnedByParty Party ownership for property and stationary stores.
constant StagedProcess
constant FieldWaterWork Native durable field-water acquisition intent. Once its lot is withdrawn, the native owner replaces this record with SupplyAllocation.
constant ResourceOrder Engine-owned durable intent for one tended resource lifecycle.
constant Spawned Where the kernel keeps a spawned entity’s cause and request digest.
constant terrainChoiceSchema
constant block
constant SHELL_KEYS Keys the player shell already owns: the dock (Build, Orders, Zones) and the camera turn. A cartridge key may not shadow them.
constant WorkParticipation Player participation policy for the shared automatic work owner.
constant WorkPolicy
constant WorkExecution
constant WorkSchedule
constant worldgenAssemblySchema
constant roomDefinitionSchema
constant buildingDefinitionSchema
constant worldgenCheckSchema
constant buildingLayoutSchema
constant buildingGraphSchema
constant compileRequestSchema
constant generationIdentitySchema
constant populationPolicySchema
constant chunkPolicySchema
constant chunkWindowSchema
constant chunkFactsSchema
constant generationKeySchema
constant generationKeyResultSchema
constant chunkPlanSchema
constant MEADOW_VERTICAL_METRES Metres per vertical terrain cell in the library worlds.
function isReservedComponent()
function isNativeComponentSchema() Native registration and mutation authority are distinct. These schemas are installed by the kernel even when a pack does not use them. Some accept scoped authored policy/intent, so they must not become reserved writes.
function component()
function relation() Register a one-target relation through the same component definition path.
function setRelation()
function clearRelation()
function query()
function system()
function command()
function entity()
function definitionCapability()
function predicate()
function action()
function behavior() Prepare friendly behavior syntax into the existing checked system runtime. The callback records branches once; it never reads or mutates a live world.
function installActorBehaviors() Pack preparation: install every attached behavior exactly once, with its subject membership compiled from the actors that attached it. Distinct behaviors sharing one id fail here, before any world starts.
function actor() Compose an immutable actor definition; spawning remains an admitted world operation.
function blueprintModule() Declare one room. Openings and slots are checked against its size.
function assembleBlueprint() Join a recipe’s rooms into one building. Rooms may not overlap; a wall two rooms share becomes one piece; a doorway must open into another room, and two rooms must agree on what fills a shared wall.
function compileBlueprint() Compile a ground-level blueprint through the same native owner as storeys.
function compileBlueprintLevels() Rust compiles floors, facades, roofs and stairs bottom-up, leaves stairwells open and rejects unsupported upper rooms. TS supplies declarations and samples; construction keeps its existing site identity and transactional admission.
function prebuildBatches() Plans split into prebuild actions of at most 256 structures each.
function buildable() Declare a buildable once. Its structure catalog entry, build-bar binding, placement ghost and staged art all derive from this one definition.
function buildBindingDetail() Compact build-bar copy: cost, size, gesture and facing.
function construction() The Construction extension: compile buildables once, derive every view. Its build command keeps at most 128 plans open (not yet finished) at once. Finished structures do not count toward that limit; the kernel’s caps on structure instances and cells bound how many a world can hold.
function defineCartridge() Compile one cartridge: install attached behaviors, collect components, encode the definition and environment, and derive the host variant. Every failure is thrown here, before any world starts.
function launch() Velocity is in world axes, relative to the launcher’s motion.
function displace() Bounded grounded knockback; the native owner checks obstacles and supports. A terrain walker (an actor with Traversal) is pushed as it would walk: the push stops at a wall, a closed door, a filled cell, a ledge past its step height or no floor, and the actor can be routed again from where it lands.
function beginEmission()
function exchangeFieldWater()
function move()
function dropLot()
function transfer()
function requestDelivery()
function consume()
function extractResource()
function establishResourceSite()
function tendResourceSite()
function encodeDefinition()
function cancelWork()
function compileBuildable() Compile one actor capability set into the existing native structure owner.
function compileBuildableEnvironment() Add actor-authored structures to one environment and run its full validator.
function constructionCandidates() Compile a creator gesture into canonical physical proposals. The definition owns geometry; this layer owns normalization; native placement owns permission.
function constructionPlanActions() Turn checked proposals into ordinary engine actions. This resolves existing floors and duplicate sites; native action admission still rechecks all laws.
function constructionTarget() Decode the native flat component wire into its exhaustive physical target.
function constructionCell()
function replaceFloor()
function planConstructions()
function prebuildStructures() Stand structures up at once, finished, with no work and no materials: the buildings a fresh world starts with (a town, a harbour, a starter base). They are ordinary finished sites afterwards: workers deconstruct them, rules break them. Issue it once (a starting rule with a saved flag, or the world’s opening actions); a restored world already has them. All the plans stand, or none do.
function bindConstructionStage()
function setStructureOpen() Request a desired aperture state; native contact and physical admission decide.
function breakStructure() Break a finished structure: the native teardown deconstruction uses, but with no worker (a wall smashed, a door torn off, a dock blown apart). Any salvage the buildable declares lands as ground stock where it stood. The game decides when; the engine keeps no hit points of its own.
function deconstruct()
function formatDiagnostic() VD013 <message>\n hint: <hint> — the terminal and overlay rendering.
function fail() Throw one diagnostic.
function effect() Declare an effect record kind. Its records live keep seconds after the producer’s sweep; a consumer that runs every step sees each one once.
function createFeedback() The engine constructs cues; the cartridge supplies only words, assets and tuning.
function felt() One cue split for a shared world: what everyone near it sees (the word, the flash, the sound, the bits), and what only by, the actor who landed it, fired it or took it, feels (the freeze, the slow-mo, the kick, the rumble, the screen tint). Another viewer sees the shared contact without their own screen stopping. Both name by as subject, so the owner’s client can match them to what it already predicted.
function hordeMovement() Geometry is projected once per phase; all bodies share fields and neighbour lookup.
function perceptionFrame() Immutable, step-local sensor frame. Games supply emitters, targets and geometry.
function assignHordeSlots() Nearest eligible bodies fill interchangeable slots; one body and one occupant per slot.
function localSteering() Stateless local steering. Native collision remains the final movement authority.
function resolveLook() Check a cartridge’s look. Throws a coded VD diagnostic on a bad look.
function ambientLightForMood() Brightness follows the one mood chosen by the cartridge’s presentation.
function moodAt() The mood a look shows at committed world time seconds: the last stop at or before it, else the look’s own mood. Full colour is always day.
function instantiateActors()
function partyMemberIds() The people of a player viewer’s parties (PartyMember of a party whose OwnedBy names them): their characters, as distinct from other things they own (a party’s own bookkeeping marker, a stash).
function ownedActorIds()
function definePhaseCycle() A repeating, simulation-time schedule. Games declare phases; the engine owns boundary progression. Only the returned clock needs to be saved.
function requestProcess()
function admitProcess()
function place() Put an actor in the starting scene. id defaults to ${actor.id}.${n} in placement order; give one when other content refers to the entity.
function compileScene() Compile placements into the fresh world’s records and surface settling.
function spawn() Spawn one actor into a running world (from a rule or a command). The receipt is the new entity’s id and makes the request idempotent. A cell chooses terrain height; a native standing contact preserves its support height and is checked for clearance and occupancy before spawning.
function defineSeatGoal() Erase the goal’s fact shape after binding its scorer to that same shape.
function voxel()
function seaTerrain() A voxel environment whose wet columns are presented at the sea line.
function actorTarget() One actor target contract for the command parser, subject projection, and local click binding. Admission still belongs to the command’s run handler.
function gameWindow() Declare a game window as data. The game shell (@fungi.computer/vishnu-ui) draws it by its role with the shared kit (a floating Caps panel by default), and it gets a Whistle command ui:<id> so a key, the palette, a menu and a remote player all open it the same way.
function checkWindows() Cartridge-wide checks: unique ids and non-conflicting keys.
function checkKeys() Every single-key shortcut a cartridge declares (window keys and command control keys) is distinct and clear of the shell’s own keys.
function windowContents() Compile window bodies into the presentation projection.
function workAttemptsFor() Query native attempt ownership without leaking the port’s non-empty batch contract.
function workAttempt() Read the one native attempt projection for a task.
function beginRouteWorkAttempt()
function interruptWorkAttempt()
function retargetRouteWorkAttempt() Replace only the current route operation, preserving its attempt generation.
function continueRouteWorkAttempt()
function acknowledgeWorkAttempt() Acknowledge only the currently projected terminal operation.
function continueDeconstructionWorkAttempt()
function continueResourceEstablishWorkAttempt()
function continueResourceTendWorkAttempt()
function continueResourceExtractWorkAttempt()
function continueFieldWaterWorkAttempt()
function continueMaterialTransferAttempt() Continue one admitted attempt through the native material transfer owner.
function continueMaterialDropAttempt() Continue an admitted attempt through the native ground-custody owner.
function checkRoom() JSON syntax and authored geometry are decoded together at the native boundary.
function checkBuilding()
function compileBuilding() Rust compiles all geometry and bounded host actions; the action owner decodes them.
function parseGenerationKey() serde parses authoring JSON; Zod parses the kernel’s typed wire result.
function planChunk()
function chunkGroundAt() Bounded presentation cache; generation and road geometry stay native.
function compileChunkLot() Uses the same native layout/rotation/compiler as first-wake construction.
function meadow() A generated grassy world: soil over stone, rolling from seed, radius cells out from the origin. Everything a cartridge’s world needs.
function sea() A chart sea with a rectangular sand shore in native terrain.

Thrown by authoring factories and defineCartridge; carries every problem.

  • Error
Signature
new CartridgeError(diagnostics): CartridgeError;
Parameter Type
diagnostics readonly Diagnostic[]

CartridgeError

Signature
Error.constructor;
Signature
readonly diagnostics: readonly Diagnostic[];
Signature
readonly x: number;
Signature
readonly y: number;
Signature
readonly z: number;

MoveDestinationinterface

Section titled “MoveDestination”
Signature
readonly x: number;

Vec3.x

Signature
readonly y: number;

Vec3.y

Signature
readonly z: number;

Vec3.z

Signature
readonly frame: EntityId | null;

RouteCostRequestinterface

Section titled “RouteCostRequest”
Signature
readonly actor: EntityId;
Signature
readonly target: MoveDestination;
Signature
readonly optional excavationTarget?: readonly [number, number, number];

Native excavation contact must be possible from the proposed approach.


RouteToAnyRequestinterface

Section titled “RouteToAnyRequest”
Signature
readonly actor: EntityId;
Signature
readonly targets: readonly MoveDestination[];
Signature
readonly optional excavationTarget?: readonly [number, number, number];

Native excavation contact must be possible from the selected approach.


WorkMaterialFactsinterface

Section titled “WorkMaterialFacts”
Signature
readonly version: 1;
Signature
readonly containers: readonly object[];
Signature
readonly lots: readonly object[];

Signature
readonly position: Vec3;
Signature
readonly facing: number;

WorldPositioninterface

Section titled “WorldPosition”
Signature
readonly x: number;

Vec3.x

Signature
readonly y: number;

Vec3.y

Signature
readonly z: number;

Vec3.z

Signature
readonly facing: number;

SupportSurfaceinterface

Section titled “SupportSurface”
Signature
readonly minX: number;
Signature
readonly maxX: number;
Signature
readonly minZ: number;
Signature
readonly maxZ: number;
Signature
readonly height: number;

Signature
readonly id: EntityId;
Signature
readonly local: WorldPosition;
Signature
readonly world: WorldPosition;
Signature
readonly support: EntityId | null;
Signature
readonly surface: SupportSurface | null;

ComponentDefinitioninterface

Section titled “ComponentDefinition”
Type Parameter
T extends object
Signature
readonly id: `${string}.${string}`;
Signature
readonly version: number;
Signature
readonly fields: Readonly<Record<keyof T & string, FieldType>>;
Signature
readonly optional targetField?: keyof T & string;

The single entity field targeted by this registered relation, when present.

Signature
readonly optional sourceRequires?: readonly `${string}.${string}`[];

Capability IDs required on the source and target relation endpoints.

Signature
readonly optional targetRequires?: readonly `${string}.${string}`[];
Signature
readonly optional onTargetRemoved?: RelationRemovalPolicy;
Signature
readonly optional allowSelf?: boolean;
Signature
readonly validate: (value) => value is T;
Parameter Type
value T | JsonValue

value is T


VisualVariantRuleinterface

Section titled “VisualVariantRule”

View-only selection of an art binding from one committed authored field.

Signature
readonly visual: string;
Signature
readonly component: ComponentDefinition<any>;
Signature
readonly field: string;
Signature
readonly cases: Readonly<Record<string, string>>;

EntityRecordinterface

Section titled “EntityRecord”
Signature
readonly id: EntityId;
Signature
readonly components: Readonly<Record<ComponentId, ComponentValues>>;

Type Parameter Default type
T extends object object
Signature
readonly components: readonly ComponentDefinition<any>[];
Signature
readonly optional __value?: T;

Type Parameter Default type
_T extends object object
Signature
readonly id: EntityId;
Signature
readonly get: <V>(definition) => Readonly<V>;
Type Parameter
V extends object
Parameter Type
definition ComponentDefinition<V>

Readonly<V>


Retained, read-only membership in canonical identity order. Read values are shared immutable versions; make an explicit draft before editing a value. A view is a phase-local read capability, not an array or a saved world.

Type Parameter Default type
T extends object object
Signature
readonly size: number;
Signature
get(id): QueryRow<T> | undefined;
Parameter Type
id string

QueryRow<T> | undefined

Signature
first(): QueryRow<T> | undefined;

QueryRow<T> | undefined


Signature
readonly key: string;
Signature
readonly after: string | null;
Signature
readonly operation: JobOperation;
Signature
readonly optional continuation?: JobContinuation;

Signature
readonly definition: string;
Signature
readonly definitionVersion: number;
Signature
readonly steps: readonly JobStep[];

ActionResultinterface

Section titled “ActionResult”
Signature
readonly accepted: boolean;
Signature
readonly optional reason?: string | null;
Signature
readonly optional projectileId?: EntityId;
Signature
readonly optional launchPoint?: Vec3;
Signature
readonly optional entityId?: EntityId;
Signature
readonly revision: number;
Signature
readonly optional attempt?: WorkAttemptKey;

Signature
readonly id: string;
Signature
readonly sequence: number;
Signature
readonly optional projectileId?: EntityId;
Signature
readonly sourceId: EntityId;
Signature
readonly targetId: EntityId;
Signature
readonly time: number;
Signature
readonly point: Vec3;
Signature
readonly normal: Vec3;
Signature
readonly velocity: Vec3;

AdvanceResultinterface

Section titled “AdvanceResult”
Signature
readonly revision: number;
Signature
readonly results: readonly ActionResult[];
Signature
readonly impacts: readonly Impact[];

ActionOutcomeinterface

Section titled “ActionOutcome”
Signature
readonly action: ActionRequest;
Signature
readonly result: ActionResult;

WorkAttemptKeyinterface

Section titled “WorkAttemptKey”
Signature
readonly task: EntityId;
Signature
readonly generation: number;

Signature
readonly continuationOwner: "external" | "native";
Signature
readonly key: WorkAttemptKey;
Signature
readonly worker: EntityId;
Signature
readonly execution: WorkExecution;
Signature
readonly phase: WorkAttemptPhase;

SimulationClockinterface

Section titled “SimulationClock”
Signature
readonly now: number;
Signature
readonly delta: number;
Signature
readonly tick: number;

ProcessRequirementsinterface

Section titled “ProcessRequirements”
Signature
readonly definition: string;
Signature
readonly version: number;
Signature
readonly stationCatalog: string;
Signature
readonly inputs: readonly object[];
Signature
readonly stages: readonly object[];
Signature
readonly phase: "blocked" | "complete" | "working" | "waiting";

RandomSourceinterface

Section titled “RandomSource”
Signature
next(): number;

number


Signature
readonly clock: SimulationClock;
Signature
readonly outcomes: readonly ActionOutcome[];
Signature
readonly random: RandomSource;
Signature
readonly impacts: readonly Impact[];
Signature
readonly optional workAttempts?: (taskIds) => readonly WorkAttempt[];
Parameter Type
taskIds readonly EntityId[]

readonly WorkAttempt[]

Signature
readonly workAttemptForWorker: (worker) => WorkAttempt | null;
Parameter Type
worker EntityId

WorkAttempt | null

Signature
readonly processRequirements: (definition, station) => ProcessRequirements;
Parameter Type
definition string
station EntityId

ProcessRequirements

Signature
readonly floorOperations: (requests) => readonly FloorOperation[];
Parameter Type
requests readonly FloorOperationRequest[]

readonly FloorOperation[]

Signature
flowFields(geometry): FlowNavigation;

Session-owned shared navigation, derived from declared world geometry.

Parameter Type
geometry FlowGeometry

FlowNavigation

Signature
query<T>(spec): QueryView<T>;
Type Parameter
T extends object
Parameter Type
spec QuerySpec<T>

QueryView<T>

Signature
workMaterialFacts(): WorkMaterialFacts;

One committed physical projection shared by all work phases in a step.

WorkMaterialFacts

Signature
worldPoses(entities): readonly WorldPose[];
Parameter Type
entities readonly EntityId[]

readonly WorldPose[]

Signature
routeCosts(requests): readonly RouteCostResult[];
Parameter Type
requests readonly RouteCostRequest[]

readonly RouteCostResult[]

Signature
routeToAny(request): RouteToAnyResult;
Parameter Type
request RouteToAnyRequest

RouteToAnyResult

Signature
transferContacts(request):
| {
kind: "ready";
targets: readonly MoveDestination[];
}
| {
kind: "blocked";
reason: "sealed" | "unavailable-frame" | "no-contact";
};
Parameter Type
request { worker: EntityId; container: EntityId; }
request.worker EntityId
request.container EntityId

| { kind: "ready"; targets: readonly MoveDestination[]; } | { kind: "blocked"; reason: "sealed" | "unavailable-frame" | "no-contact"; }

Signature
physicalContacts(cells): readonly PhysicalContact[];
Parameter Type
cells readonly [number, number, number][]

readonly PhysicalContact[]

Signature
environmentFacts(): object;

object

Name Type Default value
terrainRevision number -
chunks? object -
chunks.policy object chunkPolicySchema
chunks.policy.identity object generationIdentitySchema
chunks.policy.identity.seed string -
chunks.policy.identity.version "worldgen-v1" -
chunks.policy.identity.kitHash string -
chunks.policy.focusComponent string -
chunks.policy.chunkCells number -
chunks.policy.windowCells number -
chunks.policy.prefetchRings number -
chunks.policy.batchesPerStep number -
chunks.policy.population? object -
chunks.policy.population.party string -
chunks.policy.population.townRadius number -
chunks.policy.population.fringeChunks number -
chunks.policy.population.fringePercent number -
chunks.policy.population.ruralPercent number -
chunks.policy.population.decorationPiecesPerStep number -
chunks.policy.population.rooms object[] -
chunks.policy.population.slotKinds string[] -
chunks.policy.population.buildings object[] -
chunks.policy.population.kit object compileRequestSchema.shape.kit
chunks.policy.population.kit.wall string -
chunks.policy.population.kit.door string -
chunks.policy.population.kit.window string -
chunks.policy.population.kit.floor string -
chunks.policy.population.kit.roof string -
chunks.policy.population.kit.stair string -
chunks.policy.population.kit.styles Record<string, { wall: string; door: string; window: string; }> -
chunks.defaultWindow object chunkWindowSchema
chunks.defaultWindow.minX number -
chunks.defaultWindow.maxX number -
chunks.defaultWindow.minZ number -
chunks.defaultWindow.maxZ number -
chunks.windows object[] -
chunks.materializedCount number -
chunks.exhausted boolean -
chunks.queuedCount number -
placementRevision number -
totalKg number -
residualKg number -
initialTotalKg number -
boundaryKg number -
cells object[] -
emissions object[] -
Signature
atmosphereSamples(cells): AtmosphereSamples;

Returns modeled atmosphere at each cell; null means the receiver is unmodeled, not clean air.

Parameter Type
cells readonly [number, number, number][]

AtmosphereSamples

Signature
constructionReadiness(sites): readonly ConstructionReadiness[];
Parameter Type
sites readonly EntityId[]

readonly ConstructionReadiness[]

Signature
constructionAccess(sites): readonly ConstructionAccess[];

Ordered structural, material, and work-contact facts for construction allocation.

Parameter Type
sites readonly EntityId[]

readonly ConstructionAccess[]

Signature
deconstructionAccess(sites): readonly DeconstructionAccess[];
Parameter Type
sites readonly EntityId[]

readonly DeconstructionAccess[]

Signature
terrainMaterials(cells): readonly number[];
Parameter Type
cells readonly [number, number, number][]

readonly number[]

Signature
terrainSurfaces(columns): readonly (
| Readonly<{
cell: readonly [number, number, number];
material: number;
generatedTop: number;
art?: string;
cover?: Readonly<{
kind: string;
condition: string;
height: string;
}>;
}>
| null)[];
Parameter Type
columns readonly [number, number][]

readonly ( | Readonly<{ cell: readonly [number, number, number]; material: number; generatedTop: number; art?: string; cover?: Readonly<{ kind: string; condition: string; height: string; }>; }> | null)[]

Signature
structureSurfaces(columns): readonly readonly StructureSurface[][];

Visible horizontal faces, including non-standing covers; not movement authority.

Parameter Type
columns readonly [number, number][]

readonly readonly StructureSurface[][]

Signature
waterContacts(centers): readonly object[];
Parameter Type
centers readonly [number, number, number][]

readonly object[]


ScopedActioninterface

Section titled “ScopedAction”
Signature
readonly scope: ActionScope;
Signature
readonly request: ActionRequest;

ScopedCreateinterface

Section titled “ScopedCreate”
Signature
readonly scope: ActionScope;
Signature
readonly record: EntityRecord;

ScopedRemoveinterface

Section titled “ScopedRemove”
Signature
readonly scope: ActionScope;
Signature
readonly entity: EntityId;

Ground-plane crowd destination, advanced by the native simulation phase.

Signature
readonly entity: EntityId;
Signature
readonly x: number;
Signature
readonly z: number;
Signature
readonly speed: number;

WriteContextinterface

Section titled “WriteContext”
Signature
readonly clock: SimulationClock;

ReadContext.clock

Signature
readonly outcomes: readonly ActionOutcome[];

ReadContext.outcomes

Signature
readonly random: RandomSource;

ReadContext.random

Signature
readonly impacts: readonly Impact[];

ReadContext.impacts

Signature
readonly optional workAttempts?: (taskIds) => readonly WorkAttempt[];
Parameter Type
taskIds readonly EntityId[]

readonly WorkAttempt[]

ReadContext.workAttempts

Signature
readonly workAttemptForWorker: (worker) => WorkAttempt | null;
Parameter Type
worker EntityId

WorkAttempt | null

ReadContext.workAttemptForWorker

Signature
readonly processRequirements: (definition, station) => ProcessRequirements;
Parameter Type
definition string
station EntityId

ProcessRequirements

ReadContext.processRequirements

Signature
readonly floorOperations: (requests) => readonly FloorOperation[];
Parameter Type
requests readonly FloorOperationRequest[]

readonly FloorOperation[]

ReadContext.floorOperations

Signature
flowFields(geometry): FlowNavigation;

Session-owned shared navigation, derived from declared world geometry.

Parameter Type
geometry FlowGeometry

FlowNavigation

ReadContext.flowFields

Signature
query<T>(spec): QueryView<T>;
Type Parameter
T extends object
Parameter Type
spec QuerySpec<T>

QueryView<T>

ReadContext.query

Signature
workMaterialFacts(): WorkMaterialFacts;

One committed physical projection shared by all work phases in a step.

WorkMaterialFacts

ReadContext.workMaterialFacts

Signature
worldPoses(entities): readonly WorldPose[];
Parameter Type
entities readonly EntityId[]

readonly WorldPose[]

ReadContext.worldPoses

Signature
routeCosts(requests): readonly RouteCostResult[];
Parameter Type
requests readonly RouteCostRequest[]

readonly RouteCostResult[]

ReadContext.routeCosts

Signature
routeToAny(request): RouteToAnyResult;
Parameter Type
request RouteToAnyRequest

RouteToAnyResult

ReadContext.routeToAny

Signature
transferContacts(request):
| {
kind: "ready";
targets: readonly MoveDestination[];
}
| {
kind: "blocked";
reason: "sealed" | "unavailable-frame" | "no-contact";
};
Parameter Type
request { worker: EntityId; container: EntityId; }
request.worker EntityId
request.container EntityId

| { kind: "ready"; targets: readonly MoveDestination[]; } | { kind: "blocked"; reason: "sealed" | "unavailable-frame" | "no-contact"; }

ReadContext.transferContacts

Signature
physicalContacts(cells): readonly PhysicalContact[];
Parameter Type
cells readonly [number, number, number][]

readonly PhysicalContact[]

ReadContext.physicalContacts

Signature
environmentFacts(): object;

object

Name Type Default value
terrainRevision number -
chunks? object -
chunks.policy object chunkPolicySchema
chunks.policy.identity object generationIdentitySchema
chunks.policy.identity.seed string -
chunks.policy.identity.version "worldgen-v1" -
chunks.policy.identity.kitHash string -
chunks.policy.focusComponent string -
chunks.policy.chunkCells number -
chunks.policy.windowCells number -
chunks.policy.prefetchRings number -
chunks.policy.batchesPerStep number -
chunks.policy.population? object -
chunks.policy.population.party string -
chunks.policy.population.townRadius number -
chunks.policy.population.fringeChunks number -
chunks.policy.population.fringePercent number -
chunks.policy.population.ruralPercent number -
chunks.policy.population.decorationPiecesPerStep number -
chunks.policy.population.rooms object[] -
chunks.policy.population.slotKinds string[] -
chunks.policy.population.buildings object[] -
chunks.policy.population.kit object compileRequestSchema.shape.kit
chunks.policy.population.kit.wall string -
chunks.policy.population.kit.door string -
chunks.policy.population.kit.window string -
chunks.policy.population.kit.floor string -
chunks.policy.population.kit.roof string -
chunks.policy.population.kit.stair string -
chunks.policy.population.kit.styles Record<string, { wall: string; door: string; window: string; }> -
chunks.defaultWindow object chunkWindowSchema
chunks.defaultWindow.minX number -
chunks.defaultWindow.maxX number -
chunks.defaultWindow.minZ number -
chunks.defaultWindow.maxZ number -
chunks.windows object[] -
chunks.materializedCount number -
chunks.exhausted boolean -
chunks.queuedCount number -
placementRevision number -
totalKg number -
residualKg number -
initialTotalKg number -
boundaryKg number -
cells object[] -
emissions object[] -

ReadContext.environmentFacts

Signature
atmosphereSamples(cells): AtmosphereSamples;

Returns modeled atmosphere at each cell; null means the receiver is unmodeled, not clean air.

Parameter Type
cells readonly [number, number, number][]

AtmosphereSamples

ReadContext.atmosphereSamples

Signature
constructionReadiness(sites): readonly ConstructionReadiness[];
Parameter Type
sites readonly EntityId[]

readonly ConstructionReadiness[]

ReadContext.constructionReadiness

Signature
constructionAccess(sites): readonly ConstructionAccess[];

Ordered structural, material, and work-contact facts for construction allocation.

Parameter Type
sites readonly EntityId[]

readonly ConstructionAccess[]

ReadContext.constructionAccess

Signature
deconstructionAccess(sites): readonly DeconstructionAccess[];
Parameter Type
sites readonly EntityId[]

readonly DeconstructionAccess[]

ReadContext.deconstructionAccess

Signature
terrainMaterials(cells): readonly number[];
Parameter Type
cells readonly [number, number, number][]

readonly number[]

ReadContext.terrainMaterials

Signature
terrainSurfaces(columns): readonly (
| Readonly<{
cell: readonly [number, number, number];
material: number;
generatedTop: number;
art?: string;
cover?: Readonly<{
kind: string;
condition: string;
height: string;
}>;
}>
| null)[];
Parameter Type
columns readonly [number, number][]

readonly ( | Readonly<{ cell: readonly [number, number, number]; material: number; generatedTop: number; art?: string; cover?: Readonly<{ kind: string; condition: string; height: string; }>; }> | null)[]

ReadContext.terrainSurfaces

Signature
structureSurfaces(columns): readonly readonly StructureSurface[][];

Visible horizontal faces, including non-standing covers; not movement authority.

Parameter Type
columns readonly [number, number][]

readonly readonly StructureSurface[][]

ReadContext.structureSurfaces

Signature
waterContacts(centers): readonly object[];
Parameter Type
centers readonly [number, number, number][]

readonly object[]

ReadContext.waterContacts

Signature
changed<T>(spec): QueryView<T>;

Matching rows added or changed since this system’s last successful run. A new/restored world starts with all matching rows. Like query, reads are phase-local and include admitted pending edits.

Type Parameter
T extends object
Parameter Type
spec QuerySpec<T>

QueryView<T>

Signature
removed<T>(component): readonly EntityId[];

Component removals since this system’s last successful run in this world. Includes current pending removals. Restore establishes a new baseline, not historical removal replay; this is not a durable event stream.

Type Parameter
T extends object
Parameter Type
component ComponentDefinition<T>

readonly EntityId[]

Signature
checkpoint(name): void;

Ask the host to retain this committed simulation state for retry.

Parameter Type
name string

void

Signature
write<T>(
definition,
entity,
value
): void;
Type Parameter
T extends object
Parameter Type
definition ComponentDefinition<T>
entity EntityId
value T

void

Signature
action(request, scope?): void;
Parameter Type
request ActionRequest
scope? ActionScope

void

Signature
createAuthoredEntity(record, scope?): void;
Parameter Type
record EntityRecord
scope? ActionScope

void

Signature
removeAuthoredEntity(id): void;
Parameter Type
id EntityId

void

Signature
retireActor(id): void;

Retire a physical actor in this committed step. Rules only.

Parameter Type
id EntityId

void

Signature
cue(cue): void;

Author a bounded, presentation-only feedback cue for this committed step. Never changes simulation state; only surfaces when the game opts into presentation.feedback.

Parameter Type
cue AuthoredFeedbackCue

void


SystemDefinitioninterface

Section titled “SystemDefinition”
Signature
readonly id: `${string}.${string}`;
Signature
readonly version: number;
Signature
readonly reads: readonly ComponentDefinition<any>[];
Signature
readonly writes: readonly ComponentDefinition<any>[];
Signature
readonly optional every?: number;
Signature
readonly optional consumesImpacts?: boolean;
Signature
readonly run: (context) => void;
Parameter Type
context WriteContext

void


ProjectileAiminterface

Section titled “ProjectileAim”
Signature
readonly origin: Vec3;
Signature
readonly muzzle: Vec3;
Signature
readonly inheritedVelocity: Vec3;
Signature
readonly radius: number;
Signature
readonly gravity: number;
Signature
readonly penetration: number;
Signature
readonly maxRange: number;
Signature
readonly maxLifetime: number;
Signature
readonly speed: number;

CollisionFactinterface

Section titled “CollisionFact”
Signature
readonly id: EntityId;
Signature
readonly origin: Vec3;
Signature
readonly velocity: Vec3;
Signature
readonly geometry: "ball" | "cuboid";
Signature
readonly radius: number;
Signature
readonly halfX: number;
Signature
readonly halfY: number;
Signature
readonly halfZ: number;
Signature
readonly yaw: number;
Signature
readonly offsetX: number;
Signature
readonly offsetY: number;
Signature
readonly offsetZ: number;
Signature
readonly material: object;
Signature
readonly response: "ground" | "stop" | "pierce";
Signature
readonly resistance: number;
Signature
readonly restitution: number;
Signature
readonly friction: number;
Signature
readonly embedSpeed: number;

Signature
readonly optional activity?:
| {
kind: "dig" | "build" | "chop";
target: [number, number];
progress?: number;
}
| {
kind: "delivery";
phase: "fetching" | "pickup" | "carrying" | "putting-down";
material: string;
target: [number, number];
progress?: number;
};
Signature
readonly optional movement?:
| {
baseSpeed: number;
effectiveSpeed: number;
routed: boolean;
}
| null;

Native movement speed selected for the current route; base speed survives the order.

Signature
readonly optional view?: object;
Signature
readonly optional pickable?: boolean;
Signature
readonly optional cutawayTop?: number;
Signature
readonly optional aim?: ProjectileAim | null;
Signature
readonly optional collision?: CollisionFact | null;
Signature
readonly optional projectile?:
| {
velocity: Vec3;
gravity: number;
state: "flying" | "rolling" | "resting" | "embedded";
embedDepth: number;
rollNormal: Vec3;
penetration: number;
}
| null;
Signature
readonly id: EntityId;
Signature
readonly optional pose?: Pose;

Resolved world pose, including any moving or rotated support.

Signature
readonly optional local?: Pose;

Native local pose; for supported entities this is relative to frame.

Signature
readonly optional support?: EntityId | null;
Signature
readonly optional frame?: EntityId;

Observation frame for a supported entity; local is measured in this frame.

Signature
readonly optional surface?: SupportSurface | null;
Signature
readonly optional visual?: string | null;
Signature
readonly optional appearance?: object;

A rigged actor’s paper doll (vishnu.biped.v1): body profile, wardrobe slot → item, palette channel → swatch, and the cuts it has lost. Drawn instead of visual when present.

Signature
readonly profile: string;
Signature
readonly slots: Readonly<Partial<Record<string, string>>>;
Signature
readonly palette: Readonly<Partial<Record<string, string>>>;
Signature
readonly severed: readonly string[];
Signature
readonly optional limb?: string;

A loose limb: the cut it came off at (drawn from its severed bake).

Signature
readonly optional gaze?: readonly [number, number];

Where the actor aims or looks, as a ground point [x, z]: its body faces it even while walking (the game’s presentation gazes).

Signature
readonly optional act?: object;

A one-shot state the actor is in (the game’s presentation acts).

Signature
readonly state: string;
Signature
readonly since: number;
Signature
readonly seconds: number;
Signature
readonly optional label?: string | null;
Signature
readonly optional placement?: VisualPlacement;
Signature
readonly optional selected?: boolean;
Signature
readonly optional hands?: object;

What the actor holds in its hands, from the native hands slot only. Held props and carry poses derive from this, never from inventory, job intent or a route.

Signature
readonly lot: EntityId;
Signature
readonly kind: string;
Signature
readonly quantity: number;
Signature
readonly optional container?: object;
Signature
readonly capacity: number;
Signature
readonly contents: object;
Signature
readonly items: readonly object[];
Signature
readonly optional overflow?: boolean;
Signature
readonly optional inventory?: object;
Signature
readonly items: readonly object[];
Signature
readonly optional overflow?: boolean;
Signature
readonly optional direct?:
| {
stream: string;
lastQueued: number;
lastProcessed: number;
speed: number;
blocked: readonly [number, number, number][];
closedFaces: readonly object[];
bounds: | {
min_x: number;
max_x: number;
min_z: number;
max_z: number;
}
| null;
}
| null;

DeliveryActivityinterface

Section titled “DeliveryActivity”
Signature
readonly kind: "delivery";
Signature
readonly phase: DeliveryActivityPhase;
Signature
readonly material: string;
Signature
readonly target: readonly [number, number];

ActivityBindinginterface

Section titled “ActivityBinding”
Signature
readonly actor: EntityId;
Signature
readonly kind: "dig" | "build" | "chop";
Signature
readonly target: readonly [number, number];
Signature
readonly optional progress?: number;

AtmosphereSampleinterface

Section titled “AtmosphereSample”
Signature
readonly volumeId: string;
Signature
readonly temperatureC: number;
Signature
readonly smokeKgM3: number;

AtmosphereSamplesinterface

Section titled “AtmosphereSamples”
Signature
readonly revision: number;
Signature
readonly geometryRevision: number;
Signature
readonly samples: readonly (AtmosphereSample | null)[];

ConstructionReadinessinterface

Section titled “ConstructionReadiness”
Signature
readonly site: EntityId;
Signature
readonly status: ConstructionReadinessStatus;
Signature
readonly optional reason?: "missingStructuralSupport";

PlacementCandidateinterface

Section titled “PlacementCandidate”
Signature
readonly site: EntityId;
Signature
readonly catalog: string;
Signature
readonly target: ConstructionTarget;

PlacementDecisioninterface

Section titled “PlacementDecision”
Signature
readonly site: EntityId;
Signature
readonly status: "ready" | "rejected";
Signature
readonly optional reason?: string;

PlacementDecisionResponseinterface

Section titled “PlacementDecisionResponse”
Signature
readonly revision: number;
Signature
readonly placementRevision: number;
Signature
readonly decisions: readonly PlacementDecision[];

ConstructionAccessinterface

Section titled “ConstructionAccess”
Signature
readonly site: EntityId;
Signature
readonly support: ConstructionReadinessStatus;
Signature
readonly materialsReady: boolean;
Signature
readonly blockedActors: readonly EntityId[];
Signature
readonly contacts: readonly ConstructionAccessContact[];

SurfaceWaterContactinterface

Section titled “SurfaceWaterContact”
Signature
readonly cell: readonly [number, number, number];
Signature
readonly groundwaterHead: number;

TerrainPresentationDefinitioninterface

Section titled “TerrainPresentationDefinition”
Signature
readonly materials: readonly object[];

Content-owned art family for each physical material slot.

Signature
readonly optional generatedArt?: (input) => string | null;

Content-owned appearance of unchanged generated ground, never physical material.

Parameter Type
input { cell: readonly [number, number, number]; material: number; worldSeed: string; worldIdentity: string; }
input.cell readonly [number, number, number]
input.material number
input.worldSeed string
input.worldIdentity string

string | null

Signature
readonly optional generatedCover?: (input) =>
| Readonly<{
kind: string;
condition: string;
height: string;
}>
| null;

Pure fresh-world cover projection. Later physical cover mutations override it.

Parameter Type
input { cell: readonly [number, number, number]; material: number; generatedTop: number; worldSeed: string; worldIdentity: string; }
input.cell readonly [number, number, number]
input.material number
input.generatedTop number
input.worldSeed string
input.worldIdentity string

| Readonly<{ kind: string; condition: string; height: string; }> | null


ComponentReadChangesinterface

Section titled “ComponentReadChanges”

Process-local acknowledgements of the native component reader, never save frontiers. Only the Session advances the slowest system’s read checkpoint.

Signature
readonly version: number;
Signature
changed<T>(spec, since): readonly EntityId[];
Type Parameter
T extends object
Parameter Type
spec QuerySpec<T>
since number

readonly EntityId[]

Signature
removed<T>(component, since): readonly EntityId[];
Type Parameter
T extends object
Parameter Type
component ComponentDefinition<T>
since number

readonly EntityId[]

Signature
release(through): void;
Parameter Type
through number

void


Signature
readonly componentReads: ComponentReadChanges;
Signature
readonly partyJoinIdentity: (bindingId) => PartyJoinIdentity;
Parameter Type
bindingId string

PartyJoinIdentity

Signature
readonly floorOperations: (requests) => readonly FloorOperation[];
Parameter Type
requests readonly FloorOperationRequest[]

readonly FloorOperation[]

Signature
readonly transferContacts: (request) =>
| {
kind: "ready";
targets: readonly MoveDestination[];
}
| {
kind: "blocked";
reason: "sealed" | "unavailable-frame" | "no-contact";
};
Parameter Type
request { worker: EntityId; container: EntityId; }
request.worker EntityId
request.container EntityId

| { kind: "ready"; targets: readonly MoveDestination[]; } | { kind: "blocked"; reason: "sealed" | "unavailable-frame" | "no-contact"; }

Signature
readonly physicalContacts: (cells) => readonly PhysicalContact[];
Parameter Type
cells readonly [number, number, number][]

readonly PhysicalContact[]

Signature
readonly routeCosts: (requests) => readonly RouteCostResult[];
Parameter Type
requests readonly RouteCostRequest[]

readonly RouteCostResult[]

Signature
readonly routeToAny: (request) => RouteToAnyResult;
Parameter Type
request RouteToAnyRequest

RouteToAnyResult

Signature
readonly dispose: () => void;

void

Signature
readonly load: (definition) => void;
Parameter Type
definition Uint8Array

void

Signature
readonly loadEnvironment: (definition) => void;
Parameter Type
definition Uint8Array

void

Signature
readonly environmentFacts: () => object;

object

Name Type Default value
terrainRevision number -
chunks? object -
chunks.policy object chunkPolicySchema
chunks.policy.identity object generationIdentitySchema
chunks.policy.identity.seed string -
chunks.policy.identity.version "worldgen-v1" -
chunks.policy.identity.kitHash string -
chunks.policy.focusComponent string -
chunks.policy.chunkCells number -
chunks.policy.windowCells number -
chunks.policy.prefetchRings number -
chunks.policy.batchesPerStep number -
chunks.policy.population? object -
chunks.policy.population.party string -
chunks.policy.population.townRadius number -
chunks.policy.population.fringeChunks number -
chunks.policy.population.fringePercent number -
chunks.policy.population.ruralPercent number -
chunks.policy.population.decorationPiecesPerStep number -
chunks.policy.population.rooms object[] -
chunks.policy.population.slotKinds string[] -
chunks.policy.population.buildings object[] -
chunks.policy.population.kit object compileRequestSchema.shape.kit
chunks.policy.population.kit.wall string -
chunks.policy.population.kit.door string -
chunks.policy.population.kit.window string -
chunks.policy.population.kit.floor string -
chunks.policy.population.kit.roof string -
chunks.policy.population.kit.stair string -
chunks.policy.population.kit.styles Record<string, { wall: string; door: string; window: string; }> -
chunks.defaultWindow object chunkWindowSchema
chunks.defaultWindow.minX number -
chunks.defaultWindow.maxX number -
chunks.defaultWindow.minZ number -
chunks.defaultWindow.maxZ number -
chunks.windows object[] -
chunks.materializedCount number -
chunks.exhausted boolean -
chunks.queuedCount number -
placementRevision number -
totalKg number -
residualKg number -
initialTotalKg number -
boundaryKg number -
cells object[] -
emissions object[] -
Signature
readonly atmosphereSamples: (cells) => AtmosphereSamples;
Parameter Type
cells readonly [number, number, number][]

AtmosphereSamples

Signature
readonly constructionReadiness: (sites) => readonly ConstructionReadiness[];

Read-only support projection for pending construction, resolved in one native batch.

Parameter Type
sites readonly EntityId[]

readonly ConstructionReadiness[]

Signature
readonly placementDecisions: (party, candidates) => PlacementDecisionResponse;

Advisory native geometry decision; command admission always rechecks.

Parameter Type
party EntityId
candidates readonly PlacementCandidate[]

PlacementDecisionResponse

Signature
readonly constructionAccess: (sites) => readonly ConstructionAccess[];
Parameter Type
sites readonly EntityId[]

readonly ConstructionAccess[]

Signature
readonly deconstructionAccess: (sites) => readonly DeconstructionAccess[];
Parameter Type
sites readonly EntityId[]

readonly DeconstructionAccess[]

Signature
readonly terrainMaterials: (cells) => readonly number[];
Parameter Type
cells readonly [number, number, number][]

readonly number[]

Signature
readonly terrainSurfaces: (columns) => readonly (
| Readonly<{
cell: readonly [number, number, number];
material: number;
generatedTop: number;
art?: string;
cover?: Readonly<{
kind: string;
condition: string;
height: string;
}>;
}>
| null)[];
Parameter Type
columns readonly [number, number][]

readonly ( | Readonly<{ cell: readonly [number, number, number]; material: number; generatedTop: number; art?: string; cover?: Readonly<{ kind: string; condition: string; height: string; }>; }> | null)[]

Signature
readonly surfaceWaterTable: (columns) => readonly (SurfaceWaterContact | null)[];
Parameter Type
columns readonly [number, number][]

readonly (SurfaceWaterContact | null)[]

Signature
readonly waterContacts: (centers) => readonly object[];
Parameter Type
centers readonly [number, number, number][]

readonly object[]

Signature
readonly terrainChanges: (sinceRevision) => TerrainChangeSet;
Parameter Type
sinceRevision number

TerrainChangeSet

Signature
readonly structureSurfaces: (columns) => readonly readonly StructureSurface[][];
Parameter Type
columns readonly [number, number][]

readonly readonly StructureSurface[][]

Signature
readonly query: <T>(spec) => QueryView<T>;

Rows whose get returns a value its component definition has checked. Values may be shared between calls; callers copy before editing.

Type Parameter
T extends object
Parameter Type
spec QuerySpec<T>

QueryView<T>

Signature
readonly workMaterialFacts: () => WorkMaterialFacts;

Compact native owner projection for shared work/material planning.

WorkMaterialFacts

Signature
readonly workAttempts: (taskIds) => readonly WorkAttempt[];
Parameter Type
taskIds readonly EntityId[]

readonly WorkAttempt[]

Signature
readonly workAttemptForWorker: (worker) => WorkAttempt | null;
Parameter Type
worker EntityId

WorkAttempt | null

Signature
readonly processRequirements: (definition, station) => ProcessRequirements;
Parameter Type
definition string
station EntityId

ProcessRequirements

Signature
readonly entityMembership: (ids) => readonly boolean[];
Parameter Type
ids readonly EntityId[]

readonly boolean[]

Signature
readonly advanceCandidate: (delta, writes, actions, options?) => AdvanceResult;

Region-owned disposable attempt only: an error requires discarding the candidate.

Parameter Type
delta number
writes readonly WriteIntent[]
actions readonly ScopedAction[]
options? { creates?: readonly ScopedCreate[]; removes?: readonly ScopedRemove[]; retires?: readonly EntityId[]; crowd?: readonly CrowdMotion[]; }
options.creates? readonly ScopedCreate[]
options.removes? readonly ScopedRemove[]
options.retires? readonly EntityId[]
options.crowd? readonly CrowdMotion[]

AdvanceResult

Signature
readonly advance: (delta, writes, actions, options?) => AdvanceResult;
Parameter Type
delta number
writes readonly WriteIntent[]
actions readonly ScopedAction[]
options? { creates?: readonly ScopedCreate[]; removes?: readonly ScopedRemove[]; retires?: readonly EntityId[]; crowd?: readonly CrowdMotion[]; }
options.creates? readonly ScopedCreate[]
options.removes? readonly ScopedRemove[]
options.retires? readonly EntityId[]
options.crowd? readonly CrowdMotion[]

AdvanceResult

Signature
readonly snapshot: () => KernelRecordSnapshot;

KernelRecordSnapshot

Signature
readonly capture: () => KernelRecordCaptureResult;

Resident-only capture; do not mutate or expose its borrowed record bytes.

KernelRecordCaptureResult

Signature
readonly acceptCapture: () => void;

Called only after the Region transaction accepted the captured state.

void

Signature
readonly restore: (snapshot) => void;
Parameter Type
snapshot KernelRecordSnapshot

void

Signature
readonly renderFacts: (limit?) => readonly RenderFact[];

Retained immutable native records. Observation copies the selected public frame; consumers must replace records rather than mutate their fields.

Parameter Type
limit? number

readonly RenderFact[]

Signature
readonly worldPoses: (entities) => readonly WorldPose[];
Parameter Type
entities readonly EntityId[]

readonly WorldPose[]


InterestVisualGroupinterface

Section titled “InterestVisualGroup”

Fixed visual groups are observed only when their complete footprint is in range.

Signature
readonly minX: number;
Signature
readonly maxX: number;
Signature
readonly minZ: number;
Signature
readonly maxZ: number;
Signature
readonly visuals: readonly string[];
Signature
readonly optional ready?: boolean;

Withhold every piece until the generated building is complete.


Signature
readonly id: string;
Signature
readonly version: number;
Signature
readonly optional localScope?: CommandScope;
Signature
readonly optional localPartyBinding?: string;

The instantiate-actors binding that seats the local player’s party (from players.local.bootstrap): the local “party” event and a per-viewer directControl: { person } resolve from it.

Signature
readonly optional interest?: object;

A player viewer’s observation carries only render facts, presentation facts and cues within this many metres (xz distance) of an actor that viewer owns (see sdk/party ownedActorIds). Unset: unfiltered, as today. Mirrors page.interest.

Signature
readonly radius: number;
Signature
readonly optional groups?: readonly InterestVisualGroup[];
Signature
readonly optional dynamicGroups?: (context) => readonly InterestVisualGroup[];
Parameter Type
context Pick<ReadContext, "query">

readonly InterestVisualGroup[]

Signature
readonly definition: Uint8Array;
Signature
readonly optional environmentDefinition?: Uint8Array<ArrayBufferLike>;
Signature
readonly optional presentationWindow?: object;
Signature
readonly minX: number;
Signature
readonly maxX: number;
Signature
readonly minZ: number;
Signature
readonly maxZ: number;
Signature
readonly optional terrainPresentation?: TerrainPresentationDefinition;

Game-authored terrain vocabulary. The engine owns no grass or biome IDs.

Signature
readonly components: readonly ComponentDefinition<any>[];
Signature
readonly optional visualVariants?: readonly VisualVariantRule[];

Resolved into render facts; never written to the kernel or its digest.

Signature
readonly optional actors?: readonly ActorDefinition[];

Prepared content templates; native lifecycle owns their instantiation.

Signature
readonly systems: readonly SystemDefinition[];
Signature
readonly optional horde?: HordeSimulation;
Signature
readonly optional presentation?: GamePresentation;
Signature
readonly optional bootstrapActions?: readonly ActionRequest[];

Fresh-world setup that must commit before the first player command.

Signature
readonly optional opening?: object;

A fresh local world’s story start, played only when the session opts in: host actions (spawned scenery, say), then the local player’s commands (a pre-marked tree).

Signature
readonly actions: readonly ActionRequest[];
Signature
readonly commands: readonly object[];
Signature
readonly optional initialActions?: readonly ActionRequest[];
Signature
readonly optional scenarios?: Readonly<Record<string, GameScenario>>;

Dev and test scenarios: a fresh local world started with one of these ids plays its host actions after the initial actions, then queues its commands. Worlds started without a scenario never see them.

Signature
readonly optional partyJoin?: Readonly<{
footprint: readonly readonly [number, number][];
prepare: (spawn) => ActorInstantiationPlan;
}>;
Signature
readonly optional commands?: Readonly<Record<string, GameCommandDefinition>>;

Heterogeneous command inputs are erased at the pack registry boundary.

Signature
readonly optional persistentCharacters?: (context) => number;

Persistent characters living in this world right now (a player’s, or an AI stand-in’s), read from committed state. The hosted engine keeps an always-ticking world’s clock self-renewing while this is greater than zero, so offline characters stay in danger; at zero the world may rest after an idle grace window. A pack that omits this never keeps a world ticking on character count alone.

Parameter Type
context Pick<ReadContext, "query">

number


GameScenariointerface

Section titled “GameScenario”

A named dev/test setup for a fresh world (see GamePack.scenarios).

Signature
readonly actions: readonly ActionRequest[];
Signature
readonly commands: readonly object[];

GameCommandResultinterface

Section titled “GameCommandResult”
Signature
readonly actions: readonly ActionRequest[];
Signature
readonly writes: readonly WriteIntent[];
Signature
readonly optional creates?: readonly EntityRecord[];
Signature
readonly optional removes?: readonly EntityId[];

GameCommandDefinitioninterface

Section titled “GameCommandDefinition”
Signature
readonly input: ZodType;

The sole parser for input entering this command.

Signature
readonly title: string;

Semantic metadata shared by human and agent projections.

Signature
readonly category: string;
Signature
readonly description: string;
Signature
readonly optional localPresentation?: object;

Client-local acquisition metadata for the existing Vishnu gestures.

Signature
readonly bindings: readonly Readonly<{
id: string;
label: string;
detail?: string;
selection?: | "entities"
| Readonly<{
field: string;
cardinality: "one";
}>;
target?: | "actor"
| "terrain-cell"
| "terrain-area"
| "world-surface"
| "world-edge";
component?: `${string}.${string}`;
designation?: readonly ("entities" | "point" | "line" | "rectangle" | "edge-line")[];
footprint?: readonly readonly [number, number][];
placement?: "action-bar";
key?: string;
preset?: JsonValue;
}>[];
Signature
readonly optional availability?: (context) => GameCommandAvailability;

Host-owned discoverability state, evaluated against the committed world.

Parameter Type
context Pick<ReadContext, "query">

GameCommandAvailability

Signature
readonly optional subjects?: (context) => readonly EntityId[];

Stable subjects for contextual UI projection, evaluated from authoritative state.

Parameter Type
context Pick<ReadContext, "query">

readonly EntityId[]

Signature
readonly optional lifecycle?: readonly ComponentDefinition<any>[];

Authored record creation/removal only; does not grant progress writes.

Signature
readonly optional reads?: readonly ComponentDefinition<any>[];
Signature
readonly writes: readonly ComponentDefinition<any>[];
Signature
readonly invoke: (context, input) => GameCommandResult;

Erased invocation closes over the parsed handler input in the authoring factory.

Parameter Type
context GameCommandContext
input JsonValue | undefined

GameCommandResult


GamePackTransportinterface

Section titled “GamePackTransport”
Signature
readonly id: string;
Signature
readonly version: number;
Signature
readonly definition: Uint8Array;

FeedbackSwinginterface

Section titled “FeedbackSwing”

A weapon trail on the world plane. Direction is normalized at intake; angle is the full sweep in radians and height is above the cue’s anchor. This draws contact intent; collision and damage remain simulation-owned.

Signature
readonly direction: object;
Signature
readonly x: number;
Signature
readonly z: number;
Signature
readonly radius: number;
Signature
readonly angle: number;
Signature
readonly height: number;
Signature
readonly ms: number;
Signature
readonly color: string;

SystemOptionsinterface

Section titled “SystemOptions”
Signature
id: `${string}.${string}`;
Signature
version: number;
Signature
optional reads?: readonly ComponentDefinition<any>[];
Signature
optional writes?: readonly ComponentDefinition<any>[];
Signature
optional every?: number;
Signature
optional consumesImpacts?: boolean;
Signature
run: (context) => void;
Parameter Type
context WriteContext

void


ActorCapabilityinterface

Section titled “ActorCapability”
Signature
readonly component: ComponentDefinition<any>;
Signature
readonly optional initial?: object;

ActorDefinitionCapabilityinterface

Section titled “ActorDefinitionCapability”

Authoring-only capability compiled by an owning engine module.

Type Parameter
T extends object
Signature
readonly kind: "actor-definition-capability";
Signature
readonly id: `${string}.${string}`;
Signature
readonly schema: ZodType<T>;

The sole parser for this capability’s authored value.

Signature
readonly optional externalCreation?: boolean;

Another owner creates this actor; omit it from direct spawn templates.


ActorDefinitionCapabilityValueinterface

Section titled “ActorDefinitionCapabilityValue”
Signature
readonly capability: ActorDefinitionCapability<any>;
Signature
readonly value: object;

Signature
readonly kind: "actor-input";
Signature
readonly name: string;
Signature
readonly type: FieldType | "actor-reference";

ActorDefinitioninterface

Section titled “ActorDefinition”
Signature
readonly id: string;
Signature
readonly version: number;
Signature
readonly capabilities: readonly ActorCapability[];
Signature
readonly definitionCapabilities: readonly ActorDefinitionCapabilityValue[];
Signature
readonly behaviors: readonly BehaviorDefinition[];
Signature
with<T>(component, initial?): ActorDefinition;
Type Parameter
T extends object
Parameter Type
component ComponentDefinition<T>
initial? ActorInitial<T>

ActorDefinition

ActorBuilder.with

Signature
with<T>(capability, value): ActorDefinition;
Type Parameter
T extends object
Parameter Type
capability ActorDefinitionCapability<T>
value T

ActorDefinition

ActorBuilder.with

Signature
behaves(...behaviors): ActorDefinition;
Parameter Type
…behaviors readonly BehaviorDefinition[]

ActorDefinition

ActorBuilder.behaves


PredicateDefinitioninterface

Section titled “PredicateDefinition”

A named, deterministic question used by an authored behavior branch.

Signature
readonly id: `${string}.${string}`;
Signature
readonly reads: readonly ComponentDefinition<any>[];
Signature
readonly facts: readonly NativeFact[];
Signature
readonly test: (subject, context) => boolean;
Parameter Type
subject QueryRow
context ReadContext

boolean


BehaviorActionDefinitioninterface

Section titled “BehaviorActionDefinition”

A named proposal producer. The existing system/session owners commit its work.

Signature
readonly id: `${string}.${string}`;
Signature
readonly reads: readonly ComponentDefinition<any>[];
Signature
readonly writes: readonly ComponentDefinition<any>[];
Signature
readonly facts: readonly NativeFact[];
Signature
readonly optional exclusive?: string;
Signature
readonly run: (subject, context) => void;
Parameter Type
subject QueryRow
context WriteContext

void


BehaviorDefinitioninterface

Section titled “BehaviorDefinition”

A prepared actor behavior. It is not a system: pack preparation installs it once for every actor that attaches it (installActorBehaviors).

Signature
readonly kind: "behavior";
Signature
readonly id: `${string}.${string}`;
Signature
readonly version: number;
Signature
readonly optional every?: number;
Signature
readonly optional consumesImpacts?: true;

Whether its predicates and actions read the step’s projectile impacts.

Signature
readonly subjects: readonly ComponentDefinition<any>[];

Components every attaching actor must carry.


BehaviorSelectioninterface

Section titled “BehaviorSelection”
Signature
where(...predicates): BehaviorSelection;
Parameter Type
…predicates readonly PredicateDefinition[]

BehaviorSelection

Signature
do(action): void;
Parameter Type
action BehaviorActionDefinition

void


BehaviorSceneinterface

Section titled “BehaviorScene”
Signature
find(...subjects): BehaviorSelection;
Parameter Type
…subjects readonly ComponentDefinition<any>[]

BehaviorSelection


BehaviorOptionsinterface

Section titled “BehaviorOptions”
Signature
readonly optional version?: number;
Signature
readonly optional every?: number;

Run every n-th step instead of every step.

Signature
readonly optional consumesImpacts?: boolean;

Let its predicates and actions read context.impacts: the projectile impacts committed since this behavior last ran (a round hitting a body, a ball striking a hull). Each impact reaches the behavior once. Off by default, so a behavior that never asks sees no impacts.


ActorBuilderinterface

Section titled “ActorBuilder”
Signature
with<T>(component, initial?): ActorDefinition;
Type Parameter
T extends object
Parameter Type
component ComponentDefinition<T>
initial? ActorInitial<T>

ActorDefinition

Signature
with<T>(capability, value): ActorDefinition;
Type Parameter
T extends object
Parameter Type
capability ActorDefinitionCapability<T>
value T

ActorDefinition

Signature
behaves(...behaviors): ActorDefinition;
Parameter Type
…behaviors readonly BehaviorDefinition[]

ActorDefinition


BlueprintOpeninginterface

Section titled “BlueprintOpening”

One opening on a module’s side; at counts cells along that side. style names the game’s own variant of it (a barred cell door), over the side’s style.

Signature
readonly side: BlueprintSide;
Signature
readonly at: number;
Signature
readonly kind: BlueprintOpeningKind;
Signature
readonly optional style?: string;

BlueprintModuleinterface

Section titled “BlueprintModule”

One room: size is [width along x, depth along z] in cells.

Signature
readonly id: string;
Signature
readonly size: readonly [number, number];
Signature
readonly openings: readonly BlueprintOpening[];
Signature
readonly slots: Readonly<Record<string, readonly [number, number]>>;

Named cells inside the room ([x, z] from its north-west corner) a game fills with containers, fixtures or actors.

Signature
readonly tags: readonly string[];
Signature
readonly sides: Readonly<Partial<Record<BlueprintSide, string>>>;

A style for every piece on a side (bars along a cell’s front): the game maps each style to its own buildables (compileBlueprint).


BlueprintPlacementinterface

Section titled “BlueprintPlacement”

A module placed in a recipe: its north-west corner at at, then turned rotate quarter turns clockwise and mirrored east-west if asked.

Signature
readonly module: BlueprintModule;
Signature
readonly at: readonly [number, number];
Signature
readonly optional rotate?: 0 | 1 | 2 | 3;
Signature
readonly optional mirror?: boolean;

BlueprintRecipeinterface

Section titled “BlueprintRecipe”
Signature
readonly modules: readonly BlueprintPlacement[];

BlueprintPieceinterface

Section titled “BlueprintPiece”

One wall, door or window: the face after cell along axis, in the style a room gave it (absent: the plain piece).

Signature
readonly kind: "door" | "window" | "wall";
Signature
readonly cell: readonly [number, number];
Signature
readonly axis: "x" | "z";
Signature
readonly optional style?: string;

BlueprintRoominterface

Section titled “BlueprintRoom”
Signature
readonly index: number;

Index into the recipe’s modules.

Signature
readonly module: string;
Signature
readonly tags: readonly string[];
Signature
readonly cells: readonly readonly [number, number][];

Its cells in the world, sorted.


BlueprintSlotinterface

Section titled “BlueprintSlot”
Signature
readonly room: number;
Signature
readonly module: string;
Signature
readonly name: string;
Signature
readonly at: readonly [number, number];

An assembled building: its pieces, rooms and slots, in a fixed order.

Signature
readonly pieces: readonly BlueprintPiece[];
Signature
readonly rooms: readonly BlueprintRoom[];
Signature
readonly slots: readonly BlueprintSlot[];

BlueprintLevelinterface

Section titled “BlueprintLevel”

An authored storey. Room assembly and piece compilation have distinct owners.

Signature
readonly level: 0 | 1 | 2;
Signature
readonly blueprint: Blueprint;

BlueprintStairinterface

Section titled “BlueprintStair”

Stair origin on its lower level; the buildable declares its run and rise.

Signature
readonly level: 0 | 1;
Signature
readonly cell: readonly [number, number];
Signature
readonly facing: BlueprintSide;

BlueprintKitinterface

Section titled “BlueprintKit”
Signature
readonly construction: Pick<Construction, "candidates" | "catalog">;
Signature
readonly pieces: Readonly<Record<BlueprintPiece["kind"], string>>;
Signature
readonly optional floor?: string;
Signature
readonly optional roof?: string;
Signature
readonly optional stair?: string;
Signature
readonly optional stairs?: readonly BlueprintStair[];
Signature
readonly optional storeyRows?: number;
Signature
readonly optional styles?: Readonly<Record<string, Readonly<Partial<Record<"door" | "window" | "wall", string>>>>>;
Signature
readonly groundAt: (x, z) => number | undefined;

Native terrain’s support row at each authored column.

Parameter Type
x number
z number

number | undefined


ConstructionOptionsinterface

Section titled “ConstructionOptions”
Signature
readonly buildables: readonly ActorDefinition[];

Buildable actors, in build-bar order.

Signature
readonly verticalMetres: number;

Metres per vertical cell of the world these structures stand in.

Signature
readonly namespace: string;

Id prefix for construction sites and floor replacements.

Signature
readonly party: (context) => EntityId;

The party a player’s build command plans for.

Parameter Type
context Pick<GameCommandContext, "query" | "scope">

EntityId

Signature
readonly optional restyle?: (context) => ReadonlyMap<EntityId, string>;

State-dependent art for particular sites (a lit hearth, say).

Parameter Type
context Pick<ReadContext, "query" | "environmentFacts">

ReadonlyMap<EntityId, string>


ConstructionVisualinterface

Section titled “ConstructionVisual”

One staged construction sprite, ready for the visual projection.

Signature
readonly id: EntityId;
Signature
readonly cutawayTop: number;
Signature
readonly visual: string;
Signature
readonly label: string;
Signature
readonly pickable: true;
Signature
readonly optional placement?:
| {
kind: "edge";
edge: {
cell: readonly [number, number, number];
axis: "x" | "z";
};
}
| NonNullable<PlacementDatum | undefined> & { readonly orientation: CardinalOrientation; };
Signature
readonly pose: object;
Signature
readonly position: object;
Signature
readonly x: number;
Signature
readonly y: number;
Signature
readonly z: number;
Signature
readonly facing: number;

Constructioninterface

Section titled “Construction”

Everything the Construction extension derives from its buildables.

Signature
readonly buildables: readonly ActorDefinition[];
Signature
readonly catalog: ReadonlyMap<string, CompiledBuildable>;
Signature
readonly placement: Readonly<Record<string, PlacementPresentation>>;

Placement ghost art and facing per catalog id.

Signature
readonly candidates: (input) => readonly PlacementCandidate[];
Parameter Type
input { catalog: string; orientation?: "north" | "east" | "south" | "west"; target: | { cell: [number, number, number]; } | { area: { start: [number, number, number]; end: [number, number, number]; }; } | { edges: object[]; }; }
input.catalog string
input.orientation? "north" | "east" | "south" | "west"
input.target | { cell: [number, number, number]; } | { area: { start: [number, number, number]; end: [number, number, number]; }; } | { edges: object[]; }

readonly PlacementCandidate[]

Signature
readonly build: GameCommandDefinition;
Signature
readonly visuals: (context) => readonly ConstructionVisual[];

Staged art from the site’s catalog and phase alone.

Parameter Type
context Pick<ReadContext, "query">

readonly ConstructionVisual[]

Signature
readonly presented: (context) => readonly ConstructionVisual[];

Staged art with the cartridge’s state-dependent restyling applied.

Parameter Type
context Pick<ReadContext, "query" | "environmentFacts">

readonly ConstructionVisual[]

Signature
readonly environment: (base) => EnvironmentDefinition;

Add the buildables to a world’s structure catalog.

Parameter Type
base EnvironmentDefinition

EnvironmentDefinition


VisualBindinginterface

Section titled “VisualBinding”

One sprite id’s art: a static art-bank frame, a bank figure, or a rigged paper doll. Data only; the client checks it when it draws.

Signature
readonly kind: "static" | "figure" | "doll";
Signature
readonly worldRole: "actor" | "floor" | "item" | "structure";
Signature
readonly optional variants?: Readonly<{
component: ComponentDefinition<any>;
field: string;
cases: Readonly<Record<string, string>>;
}>;

Select another declared sprite from one committed authored field. An absent or unmapped value keeps this binding.

Signature
readonly optional path?: BankPath;

Static: the bank path, per-turn view paths, frames and anchor.

Signature
readonly optional viewPaths?: readonly BankPath[];
Signature
readonly optional frames?: boolean;
Signature
readonly optional frameMs?: number;

Static frames: milliseconds per frame (default: the shared idle rate).

Signature
readonly optional facing?: boolean;
Signature
readonly optional anchor?: "pawnAnchor" | "propAnchor" | "vehicleAnchor";
Signature
readonly optional drawsUpright?: boolean;

Order as an upright body rather than by its footprint.

Signature
readonly optional key?: string;

Figure: the bank figure key.

Signature
readonly optional dollPoses?: Readonly<Record<string, Readonly<{
clip: string;
held?: string;
last?: boolean;
}>>>;

Doll: each pose’s paper-doll clip, and the item it holds meanwhile. walk and idle choose the gait clips (default: the clips of those names), so a cast can shamble or crawl. last holds the clip’s last frame instead of playing it (a body that has fallen and lies still).

Signature
readonly optional motion?: Readonly<{
kind: string;
stride: number;
localOffset?: Readonly<{
x: number;
y: number;
z: number;
}>;
}>;
Signature
readonly optional workPoses?: Readonly<Record<string, string>>;
Signature
readonly optional gaitStride?: number;

Doll: metres per gait step, so a walk or run cycle follows the ground covered (no foot sliding at any speed). Defaults to motion.stride.

Signature
readonly optional actPoses?: Readonly<Record<string, Readonly<{
clip: string;
held?: string;
}>>>;

Doll: the clip for each one-shot act state (the presentation’s acts, such as a swing or a shot), played once over any gait.

Signature
readonly optional deliveryPoses?: Readonly<Record<string, string>>;
Signature
readonly optional luminous?: Readonly<{
path: BankPath;
}>;

Static: self-lit art (flames, sparks, smoke) at path, drawn with the same facing, frames and anchor above the graded world, so a night mood never darkens or requantizes it. View only.

Signature
readonly optional light?: Readonly<{
radius: number;
color: number;
flicker: number;
}>;

A view-only point light centered on this visual; never enters world state.

Signature
readonly optional carryPoses?: Readonly<Record<string,
| string
| Readonly<{
contentKind: string;
empty: string;
partial: string;
full: string;
}>>>;
Signature
readonly optional reactions?: Readonly<Record<string, Readonly<{
path: BankPath;
duration: number;
}>>>;
Signature
readonly optional edgeWall?: Readonly<{
kind: "segment";
stage: string;
axis: "x" | "z";
junction: string;
}>;

A wall-like edge segment and the junction art its corners use.


CartridgeArtPackFilesinterface

Section titled “CartridgeArtPackFiles”

One checked cartridge art pack’s files, as bundler-resolved URLs (a build renames every file, so the pack names each page’s URL).

Signature
readonly manifestUrl: string;
Signature
readonly optional partsUrl?: string;

Checked render fragments of existing frames; never physical occupants.

Signature
readonly pageUrls: Readonly<Record<string, string>>;

CartridgeShelfinterface

Section titled “CartridgeShelf”

How the hub shelf lists a cartridge. Presentation only.

Signature
readonly order: number;

Lower numbers appear first. Games own their position, not the engine.

Signature
readonly optional localOnly?: true;

A local scene has no hosted world; keep its shelf launch browser-local.

Signature
readonly genre: string;
Signature
readonly blurb: string;
Signature
readonly cover: object;
Signature
readonly src: string;
Signature
readonly alt: string;

SelectionCardinterface

Section titled “SelectionCard”

A selected object whose visual starts with visualPrefix gets its own named card in the selection panel.

Signature
readonly visualPrefix: string;
Signature
readonly heading: string;
Signature
readonly optional note?: string;

CartridgeAiminterface

Section titled “CartridgeAim”

Aiming on the page, twin-stick style. pointer: a plain click on the world sends command with { at: { x, z } } (the clicked actor, or the ground at the direct-control actor’s height). arrows: a held arrow key sends { toward: { x, z } } (up is north) at once, then every repeatSeconds (default 0.25) while held, and arrows stop moving the direct-control actor. A gamepad’s right stick aims the same way, and its left stick drives the direct-control actor. hold: a held aim is a lease the game keeps firing on at its own cadence: each send is { toward: { x, z }, held: true }, and letting go sends { release: true }. The command decides what each one does.

Signature
readonly command: string;
Signature
readonly optional pointer?: boolean;
Signature
readonly optional arrows?: boolean;
Signature
readonly optional repeatSeconds?: number;
Signature
readonly optional hold?: boolean;

CartridgePageinterface

Section titled “CartridgePage”

What the player shell shows around the world. Read-only presentation.

Signature
readonly subtitle: string;
Signature
readonly optional savedWorldNotice?: string;

Player-facing copy when an earlier saved world starts fresh.

Signature
readonly camera: CartridgeCameraPolicy;
Signature
readonly optional directControl?: CartridgeDirectControl;
Signature
readonly optional aim?: CartridgeAim;
Signature
readonly optional theme?:
| "vishnu"
| "light"
| "dark"
| "codec"
| "embed"
| "readout"
| "readout-night"
| "latte"
| "mocha"
| "field-guide"
| "field-guide-night"
| "embed-dark"
| "phosphor"
| "paper"
| "ember"
| "tide"
| "tape"
| "sunrise"
| "pirate-radio"
| "pirate-radio-night"
| "consulting"
| "consulting-ink"
| "consulting-night"
| "consulting-night-ink"
| "consulting-riso-latte"
| "consulting-riso-latte-ink"
| "consulting-riso-glomzy"
| "consulting-riso-glomzy-ink"
| "coin"
| "coin-night"
| "chamfer";

A tint or complete Stipe palette over the shared game paper.

Signature
readonly optional controlHelp?: string;
Signature
readonly optional dockKeys?: boolean;

Show the persistent dock keys. Palettes and keyboard commands remain available.

Signature
readonly optional audioBank?: Readonly<{
samples: Readonly<Record<string, Readonly<{
urls: readonly string[];
gain: number;
priority: number;
}>>>;
maxVoices?: number;
}>;

Sampled sounds under the shared audio owner, selected by feedback name.

Signature
readonly optional lighting?: Readonly<{
sources?: readonly Readonly<{
visual: string;
moods?: readonly ("day" | "dusk" | "night")[];
light: | Readonly<{
radius: number;
color: number;
intensity: number;
height: number;
kind: "point";
}>
| Readonly<{
radius: number;
color: number;
intensity: number;
height: number;
kind: "cone";
angle: number;
}>;
}>[];
occluders?: readonly Readonly<{
visual: string;
height: number;
}>[];
pulses?: readonly Readonly<{
cue: string;
light: | Readonly<{
radius: number;
color: number;
intensity: number;
height: number;
kind: "point";
}>
| Readonly<{
radius: number;
color: number;
intensity: number;
height: number;
kind: "cone";
angle: number;
}>;
ms: number;
}>[];
}>;

Declared, view-only world lights and opaque construction states.

Signature
readonly optional developerControls?: boolean;

Show the engine’s pixel-quality, voxel-layer and cutaway tools (default true). A finished game turns them off.

Signature
readonly optional emptyDrag?: "pan" | "select";

What a plain left drag that starts on empty ground does: box-select (the default) or pan the camera. Shift+drag always box-selects.

Signature
readonly optional orderCommand?: string;

The command a drafted selection’s secondary click issues.

Signature
readonly optional selectionShortcuts?: readonly object[];
Signature
readonly windows: readonly CartridgeWindow[];

Declared game windows, opened by ui:<id> commands.

Signature
readonly optional source?: string;

Where the page links “View TypeScript source”.

Signature
readonly optional visuals?: Readonly<Record<string, VisualBinding>>;

The art for this cartridge’s sprite ids, merged over the engine’s.

Signature
readonly optional artPacks?: readonly CartridgeArtPackFiles[];

Its own checked art packs (each the pack.ts module the art baker, scripts/export-cartridge-art.mjs, writes); its visuals point into them by root.

Signature
readonly optional groundArt?: object;

Checked static top frames projected onto native smooth ground, not actors.

Signature
readonly pack: CartridgeArtPackFiles;
Signature
readonly families: Readonly<Record<string, readonly (string | number)[]>>;

Each named family supplies two one-metre top frames through the prop camera.

Signature
readonly optional icons?: Readonly<Record<string, string>>;

The page’s UI icons by key (inventory item art, say): window blocks name an icon by key, and the browser resolves it here, so a hosted world’s server never sends a file path.

Signature
readonly optional effectArt?: object;

The art pack feedback cues draw from (splats, flashes, casings, bits, words): a cue names frames of it by bank path (art), and each frame lands on its world point by the pack’s anchors (the manifest’s anchors, or a separate anchorsUrl in the same contract). Without it, cues draw the view’s own placeholders.

Signature
readonly pack: CartridgeArtPackFiles;
Signature
readonly optional anchorsUrl?: string;
Signature
readonly optional dolls?: Readonly<Record<string, URL>>;

Its cast’s paper-doll pack: the pack.ts module the doll baker (scripts/export-paper-doll-art.mjs) writes beside the pack’s files.

Signature
readonly optional spectator3d?: () => Promise<{
cast: Cast;
heads: Readonly<Record<string, HeadBuilder>>;
propScene?: (visual) => Scene<Object3DEventMap> | null;
}>;

Loads authored live rig geometry only for an opted-in 3D spectator.

Promise<{ cast: Cast; heads: Readonly<Record<string, HeadBuilder>>; propScene?: (visual) => Scene<Object3DEventMap> | null; }>

Signature
readonly optional shelf?: CartridgeShelf;
Signature
readonly optional selectionCards?: readonly SelectionCard[];
Signature
readonly optional gainFeedbackFactPrefixes?: readonly string[];

Inventory owners whose item gains are player-facing. Other stock changes (such as a ship’s ammunition locker) never produce floating gain labels.

Signature
readonly optional sharedWorlds?: boolean;

The hosted engine serves invitation-shared worlds for this cartridge.

Signature
readonly optional clock?: "always";

How a hosted world’s clock runs. "always": while the world is open it keeps ticking with nobody connected (offline characters stay in danger, the town keeps living). Default: it rests shortly after the last player leaves.

Signature
readonly optional sharedClock?: "owner";

Who may pause and step a shared hosted world’s clock. "owner": the world’s owner (the principal who created its invitation) may pause and steer it; other participants cannot. Unset: nobody in a shared world may control the clock (it runs on its own schedule). Ignored outside a shared world (sharedWorlds); a personal hosted world’s own player always controls its clock regardless of this field.

Signature
readonly optional interest?: object;

The first distance-based interest cut: a player viewer’s observation carries only render facts, presentation facts and cues within radius metres (xz distance) of their own actors. A player with no drawn actor (dead, or not yet spawned) sees around where their actors last stood, else their spawn marker, else nothing: never the whole world, which a waiting player could scout and relay to friends. Only the host and a granted spectator (spectators) see everything. Terrain, whistle and windows are unaffected.

Signature
readonly radius: number;
Signature
readonly optional groups?: readonly InterestVisualGroup[];
Signature
readonly optional dynamicGroups?: (context) => readonly InterestVisualGroup[];
Parameter Type
context Pick<ReadContext, "query">

readonly InterestVisualGroup[]

Signature
readonly optional spectators?: true;

The world grants a spectator role: players may mint read-only spectator links, and spectators see the whole world. Unset, a hosted world has no spectators at all.

Signature
readonly optional placementVisuals?: Readonly<Record<string, PlacementPresentation>>;

Placement ghosts and candidates for build gestures, derived from the cartridge’s construction extension.

Signature
readonly optional placementCandidates?: (input) => readonly PlacementCandidate[];
Parameter Type
input { catalog: string; orientation?: "north" | "east" | "south" | "west"; target: | { cell: [number, number, number]; } | { area: { start: [number, number, number]; end: [number, number, number]; }; } | { edges: object[]; }; }
input.catalog string
input.orientation? "north" | "east" | "south" | "west"
input.target | { cell: [number, number, number]; } | { area: { start: [number, number, number]; end: [number, number, number]; }; } | { edges: object[]; }

readonly PlacementCandidate[]

Signature
readonly look: Look;

The checked look: full colour, or a palette the view constrains to.

Signature
readonly optional terrainLandform?: EnvironmentPlateau;

Authored floating plateau shape for the smooth terrain view.

Signature
readonly optional terrainSea?: Readonly<{
bounds: EnvironmentBounds;
seaLevel: number;
shore: EnvironmentPlateau;
}>;

Admitted sea extent and shore for the terrain’s visual water surface.


CartridgeSpecinterface

Section titled “CartridgeSpec”
Signature
readonly id: string;

Kebab-case identity; also the namespace for saves and URLs.

Signature
readonly title: string;
Signature
readonly version: number;

Bump when saved worlds can no longer restore with this content.

Signature
readonly optional actors?: readonly ActorDefinition[];

Spawnable templates. Their .behaves() attachments are installed once.

Signature
readonly optional components?: readonly ComponentDefinition<any>[];

Components used by commands, rules or the world. Authored components on the actors are collected automatically.

Signature
readonly world: object;
Signature
readonly materials: readonly object[];
Signature
readonly optional stockpileProfiles?: readonly object[];
Signature
readonly optional terrain?: TerrainChoice;
Signature
readonly optional presentationWindow?: object;
Signature
readonly minX: number;
Signature
readonly maxX: number;
Signature
readonly minZ: number;
Signature
readonly maxZ: number;
Signature
readonly optional characters?: Characters;

Rigged characters: appearance, wardrobe commands, dismemberment.

Signature
readonly optional horde?: HordeSimulation;

Batched autonomous movement, independent of player action admission.

Signature
readonly optional construction?: Construction;

Buildables: adds their structures, the build command and placement.

Signature
readonly optional scene?: readonly Placement[];

The fresh world: actors placed on the ground. Placed actors are also spawnable templates.

Signature
readonly optional rules?: readonly SystemDefinition[];

World-level systems. Actor behavior belongs on .behaves().

Signature
readonly optional commands?: Readonly<Record<string, GameCommandDefinition>>;
Signature
readonly optional seats?: SeatDefinition;

Goals, command grants and world view available to any authorized seat.

Signature
readonly optional presentation?: GamePresentation;
Signature
readonly optional persistentCharacters?: (context) => number;

Persistent characters living in this world right now (a player’s, or an AI stand-in’s), read from committed state. Declare this for a page.clock "always" cartridge so its hosted world’s clock keeps self-renewing while a character is present, and can rest once none remain.

Parameter Type
context Pick<ReadContext, "query">

number

Signature
readonly optional initialActions?: readonly ActionRequest[];

Fresh-world setup (host spawns, say), committed when the world is born, before its first step, so a world waiting on its title shows its start. Every action must be accepted.

Signature
readonly optional scenarios?: Readonly<Record<string, {
actions?: readonly ActionRequest[];
commands?: readonly object[];
}>>;

Dev and test scenarios, by id: a fresh local world opened with ?scenario=<id> plays the scenario’s host actions after the initial actions, then its commands, as if the player gave them. A proof uses one to stage a moment (a zombie at the door) without the game checking for tests. Worlds started without a scenario never see them.

Signature
readonly optional players?: object;
Signature
readonly join: PartyJoinCapability;
Signature
readonly optional shared?: object;

A hosted shared world’s own setup, after initialActions and never in browser-local play (seats that stand-ins fill while players are missing, say).

Signature
readonly optional initialActions?: readonly ActionRequest[];
Signature
readonly optional features?: Readonly<Partial<Record<"minded-seats", readonly ActionRequest[]>>>;

Setups the host adds to a new shared world only while one of its engine features is switched on (minded-seats: players may hand their character to something that plays it for them while they are away; a host switch), after initialActions.

Signature
readonly local: object;

Browser-local play: the local player’s scope and fresh-world setup.

Signature
readonly scope: CommandScope;
Signature
readonly bootstrap: readonly ActionRequest[];
Signature
readonly optional opening?: object;

A fresh player world’s story start: host actions (spawned scenery), then commands the player “has already given”.

Signature
readonly optional actions?: readonly ActionRequest[];
Signature
readonly optional commands?: readonly object[];
Signature
readonly page: Omit<CartridgePage, "placementVisuals" | "placementCandidates" | "windows" | "look">;
Signature
readonly optional ui?: object;

Small game windows (Maosaico frames styled by Caps), each with a Whistle command.

Signature
readonly optional windows?: readonly CartridgeWindow[];
Signature
readonly optional mood?: (world) => "day" | "dusk" | "night";

The light the world is shown in, read from committed state on every presentation (a game clock that is not simulation time, say). When given it replaces look.moods; it never changes the simulation.

Parameter Type
world WindowWorld

"day" | "dusk" | "night"

Signature
readonly optional look?: LookSpec;

An optional palette constraint and mood. Omit it for full colour.


The checked, compiled cartridge. The only thing the Worker, page and host accept.

Signature
readonly id: string;
Signature
readonly title: string;
Signature
readonly version: number;
Signature
readonly pack: GamePack;

Browser-local pack: the local player joins at world start.

Signature
readonly hostPack: GamePack;

Shared-world pack for the hosted engine: players join by command.

Signature
readonly page: CartridgePage;
Signature
readonly optional seats?: SeatDefinition;
Signature
readonly optional sharedFeatures?: Readonly<Partial<Record<"minded-seats", readonly ActionRequest[]>>>;

A shared world’s feature-gated setups (players.shared.features).

Signature
readonly optional dismemberment?: object;

Which cuts can come off and how the stump looks, when characters are on.

Signature
severable: string[];
Signature
gore: "moss" | "classic" | "off";
Signature
readonly optional cast?: Cast;

The cartridge’s own cast, when characters are on; its paper-doll pack is page.dolls. The engine’s cast tools find a cast only here.


Signature
readonly id: EntityId;
Signature
readonly components: Readonly<Record<string, ComponentFields>>;

CompiledBuildableinterface

Section titled “CompiledBuildable”
Signature
readonly definition: EnvironmentStructureDefinition;
Signature
readonly placement: object;
Signature
alignment: "fixed" | "stroke";
Signature
optional facing?: object;
Signature
north: number;
Signature
east: number;
Signature
south: number;
Signature
west: number;
Signature
readonly name: string;
Signature
readonly sprites: string;
Signature
readonly optional key?: string;
Signature
readonly optional palette?: false;

Set when players may not plan it (the definition’s palette).


ConstructionPlanOptionsinterface

Section titled “ConstructionPlanOptions”
Signature
readonly party: EntityId;
Signature
readonly definition: EnvironmentStructureDefinition;
Signature
readonly candidates: readonly PlacementCandidate[];
Signature
readonly existingSites: readonly EntityId[];
Signature
readonly floorOperations: (requests) => readonly FloorOperation[];
Parameter Type
requests readonly object[]

readonly FloorOperation[]

Signature
readonly replacementGenerations: ReadonlyMap<EntityId, number>;
Signature
readonly replacementId: (floor, generation) => EntityId;
Parameter Type
floor EntityId
generation number

EntityId


ConstructionSiteStateinterface

Section titled “ConstructionSiteState”
Signature
catalog: string;
Signature
targetKind: "edge" | "cell";
Signature
targetX: number;
Signature
targetY: number;
Signature
targetZ: number;
Signature
targetDirection: "x" | "z" | CardinalOrientation;
Signature
seconds: number;
Signature
phase: "working" | "planned" | "finished";

Signature
readonly code:
| "VD001"
| "VD002"
| "VD003"
| "VD004"
| "VD005"
| "VD006"
| "VD007"
| "VD008"
| "VD009"
| "VD010"
| "VD011"
| "VD012"
| "VD013"
| "VD014"
| "VD015"
| "VD016"
| "VD017"
| "VD020"
| "VD021"
| "VD022"
| "VD023"
| "VD024"
| "VD025"
| "VD030"
| "VD031"
| "VD032"
| "VD033"
| "VD034"
| "VD040"
| "VD041"
| "VD050"
| "VD051"
| "VD052"
| "VD060"
| "VD061"
| "VD070"
| "VD071"
| "VD072"
| "VD073"
| "VD074"
| "VD080"
| "VD083"
| "VD082"
| "VD085"
| "VD086"
| "VD087"
| "VD088"
| "VD089"
| "VD090"
| "VD091"
| "VD081"
| "VD092"
| "VD084";
Signature
readonly message: string;

One sentence naming the author’s ids, never engine internals.

Signature
readonly hint: string;

The fix, as an instruction.

Signature
readonly path: readonly (string | number)[];

Where in the cartridge spec, when known: ["scene", 3].


Type Parameter
T extends object
Signature
readonly component: ComponentDefinition<T & object>;

The record component (add it to the producing behavior’s writes).

Signature
emit(
context,
key,
value,
at
): void;

Record one effect at world time at; key (unique among one step’s records) and the time make its id.

Parameter Type
context Pick<WriteContext, "createAuthoredEntity">
key string
value T
at number

void

Signature
all(context): T & object[];

Every live record, oldest first.

Parameter Type
context Pick<ReadContext, "query">

T & object[]

Signature
since(context, seen): T & object[];

Records newer than seen (a consumer’s marker), oldest first.

Parameter Type
context Pick<ReadContext, "query">
seen number

T & object[]

Signature
sweep(
context,
now,
keep
): void;

Remove records older than keep seconds (the producer only).

Parameter Type
context Pick<ReadContext, "query"> & Pick<WriteContext, "removeAuthoredEntity">
now number
keep number

void


FeedbackStrengthinterface

Section titled “FeedbackStrength”

A bounded response to contact strength; no simulation clock or RNG.

Signature
readonly base: number;
Signature
readonly optional perDamage?: number;
Signature
readonly optional damageDivisor?: number;
Signature
readonly optional killBonus?: number;
Signature
readonly min: number;
Signature
readonly max: number;

AnchoredFeedbackinterface

Section titled “AnchoredFeedback”
Signature
readonly height: number;
Signature
readonly cue: AuthoredFeedbackCue;

ShotFeedbackinterface

Section titled “ShotFeedback”
Signature
readonly height: number;

AnchoredFeedback.height

Signature
readonly cue: AuthoredFeedbackCue;

AnchoredFeedback.cue

Signature
readonly forward: number;
Signature
readonly recoil: number;
Signature
readonly optional muzzleArt?: readonly FeedbackArtPath[];

SwingFeedbackinterface

Section titled “SwingFeedback”
Signature
readonly cue: AuthoredFeedbackCue;
Signature
readonly radius: number;
Signature
readonly angle: number;
Signature
readonly height: number;
Signature
readonly ms: number;
Signature
readonly color: string;

ContactFeedbackinterface

Section titled “ContactFeedback”
Signature
readonly height: number;
Signature
readonly heavyDamage: number;
Signature
readonly ranged: AuthoredFeedbackCue;
Signature
readonly melee: AuthoredFeedbackCue;
Signature
readonly heavy: AuthoredFeedbackCue;
Signature
readonly kill: AuthoredFeedbackCue;
Signature
readonly headKill: AuthoredFeedbackCue;
Signature
readonly hitstop: FeedbackStrength;
Signature
readonly shake: FeedbackStrength;
Signature
readonly slowMotion: object;
Signature
readonly scale: number;
Signature
readonly killMs: number;
Signature
readonly headMs: number;
Signature
readonly bits: object;
Signature
readonly regular: FeedbackBitsKind;
Signature
readonly gore: FeedbackBitsKind;
Signature
readonly optional art?: readonly FeedbackArtPath[];
Signature
readonly count: FeedbackStrength;
Signature
readonly spread: FeedbackStrength;
Signature
readonly rumble: object;
Signature
readonly strong: FeedbackStrength;
Signature
readonly weak: number;
Signature
readonly hitMs: number;
Signature
readonly killMs: number;

SplatFeedbackinterface

Section titled “SplatFeedback”
Signature
readonly cue: AuthoredFeedbackCue;
Signature
readonly size: FeedbackStrength;
Signature
readonly minSize: number;
Signature
readonly maxSize: number;
Signature
readonly art: readonly object[];

Ordered size bands, each with shape variants and their quarter turns.

Signature
readonly seed: object;
Signature
readonly x: number;
Signature
readonly z: number;

FeedbackProfileinterface

Section titled “FeedbackProfile”
Type Parameter Default type
Weapon extends string string
Simple extends string string
Swing extends string string
Signature
readonly optional contact?: ContactFeedback;
Signature
readonly optional shots?: Readonly<Record<Weapon, ShotFeedback>>;
Signature
readonly optional swings?: Readonly<Record<Swing, SwingFeedback>>;
Signature
readonly optional splat?: SplatFeedback;
Signature
readonly optional wound?: object;
Signature
readonly height: number;
Signature
readonly bites: readonly AuthoredFeedbackCue[];
Signature
readonly claw: AuthoredFeedbackCue;
Signature
readonly optional simple?: Readonly<Record<Simple, AnchoredFeedback>>;

A structure standing across a face, and how much it would take.

Signature
readonly site: string;
Signature
readonly cost: number;

FlowGeometryinterface

Section titled “FlowGeometry”

Navigation facts: blocked cells and weighted breakable edges are game data.

Signature
readonly profile: string;
Signature
readonly radius: number;
Signature
readonly center: FlowCell;
Signature
readonly terrainRevision: number;

Change when terrain heights/passability change. Static worlds use zero.

Signature
readonly blocked: ReadonlySet<string>;
Signature
readonly occupied: ReadonlySet<string>;
Signature
readonly edges: ReadonlyMap<string, FlowBarrier>;

FlowNavigationinterface

Section titled “FlowNavigation”
Signature
height(cell): number | undefined;
Parameter Type
cell FlowCell

number | undefined

Signature
crossing(from, to): FlowBarrier | "corner" | null;
Parameter Type
from FlowCell
to FlowCell

FlowBarrier | "corner" | null

Signature
next(goal, from):
| {
to: FlowCell;
barrier: FlowBarrier | null;
}
| null;
Parameter Type
goal FlowCell
from FlowCell

| { to: FlowCell; barrier: FlowBarrier | null; } | null


Signature
readonly id: string;
Signature
readonly x: number;
Signature
readonly z: number;
Signature
readonly reach: number;

HordeSlotBodyinterface

Section titled “HordeSlotBody”
Signature
readonly id: EntityId;
Signature
readonly x: number;
Signature
readonly z: number;
Signature
readonly eligible: readonly string[];

HordeSlotAssignmentinterface

Section titled “HordeSlotAssignment”
Signature
readonly slot: HordeSlot;
Signature
readonly arrived: boolean;

How a cartridge looks. Everything is optional: a cartridge without a palette renders in full colour, exactly as the engine always has.

Signature
look: { palette: "glomzy-07" } // a built-in palette
look: { palette: { id: "two-tone", name: "Two Tone", colors: ["#0f380f", "#cadc9f"] } }
look: { palette: parseLospecPalette("sweetie-16", hexFileText), mood: "dusk" }
Signature
readonly optional palette?: string | Palette;

A built-in palette id, or a palette (see parseLospecPalette in @fungi.computer/vishnu-pixel for Lospec exports).

Signature
readonly optional dither?: Partial<PaletteDither>;

Ordered dithering between palette neighbours; omit for the default.

Signature
readonly optional mood?: "day" | "dusk" | "night";

The mood a fresh world is shown in (default day).

Signature
readonly optional moods?: readonly MoodStop[];

Moods by committed world time: from each stop’s at (simulation seconds) the view shows its mood, before the first stop mood. Stops rise strictly. Presentation only: the simulation never reads it. moods: [{ at: 20, mood: "night" }, { at: 100, mood: "day" }]

Signature
readonly optional ambientLight?: Readonly<Record<"day" | "dusk" | "night", number>>;

View-only brightness levels keyed by the world’s chosen mood.

Signature
readonly optional ambientTint?: Readonly<Record<"day" | "dusk" | "night", readonly [number, number, number]>>;

View-only RGB light multipliers (0..1), independent of palette mapping.

Signature
readonly optional terrain?: "voxel" | "smooth";

Render voxel cells as authored faces or a sculpted surface net.

Signature
readonly optional backdrop?: "ocean";

Presentation-only horizon behind a bounded sea world.


From at simulation seconds on, the view shows mood.

Signature
readonly at: number;
Signature
readonly mood: "day" | "dusk" | "night";

Type Parameter
Phase extends string
Signature
readonly phase: Phase;
Signature
readonly cycle: number;
Signature
readonly phaseAt: number;

PhaseAdvanceinterface

Section titled “PhaseAdvance”
Type Parameter
Phase extends string
Signature
readonly phase: Phase;

PhaseClock.phase

Signature
readonly cycle: number;

PhaseClock.cycle

Signature
readonly phaseAt: number;

PhaseClock.phaseAt

Signature
readonly completed: ReadonlyMap<Phase, number>;

Completed phases since the supplied clock, including skipped cycles.


One actor in the fresh world. Compiled by defineCartridge, never spawned.

Signature
readonly actor: ActorDefinition;
Signature
readonly id: EntityId;
Signature
readonly at: Cell2;
Signature
readonly params: ActorParams;
Signature
readonly optional surface?: "sea";

CompiledSceneinterface

Section titled “CompiledScene”

The fresh world compiled from a scene.

Signature
readonly initial: readonly SceneEntity[];
Signature
readonly placements: readonly InitialSurfacePlacement[];

Signature
readonly relation: EntityRelation;
Signature
readonly kind: string;
Signature
readonly glyph: string;
Signature
readonly optional state?: string;
Signature
readonly optional designated?: boolean;
Signature
readonly optional job?: EntityId;

The same named world view is available to every authorized seat.

Signature
readonly sightRadius: number;
Signature
readonly verticalMetres: number;
Signature
readonly optional environment?: Pick<EnvironmentDefinition, "processes" | "resourceSites">;
Signature
optional ownActors(reads, scope): ReadonlyMap<EntityId, Omit<EntityClass, "relation">>;
Parameter Type
reads SeatReads
scope CommandScope | undefined

ReadonlyMap<EntityId, Omit<EntityClass, "relation">>

Signature
terrainClass(surface): TerrainClass;
Parameter Type
surface TerrainSurface

TerrainClass

Signature
classify(reads): ReadonlyMap<EntityId, EntityClass>;
Parameter Type
reads SeatReads

ReadonlyMap<EntityId, EntityClass>

Signature
buildableTitle(catalog): string;
Parameter Type
catalog string

string


A cartridge-authored challenge and its committed-state scoring rule.

Type Parameter Default type
F extends SeatFacts SeatFacts
Signature
readonly id: string;
Signature
readonly title: string;
Signature
readonly cartridge: string;
Signature
readonly setting: string;
Signature
readonly seeds: readonly number[];
Signature
readonly turnBudget: number;
Signature
readonly spendCapUsd: number;
Signature
readonly maxSimSeconds: number;
Signature
readonly goal: string;
Signature
facts(reads): F;
Parameter Type
reads SeatReads

F

Signature
outcome(start, end): SeatOutcome<F>;
Parameter Type
start F
end F

SeatOutcome<F>


SeatDefinitioninterface

Section titled “SeatDefinition”
Signature
readonly view: SeatView;
Signature
readonly grants: Readonly<Record<string, readonly string[]>>;
Signature
readonly goals: readonly SeatGoal<Readonly<Record<string, number>>>[];

VoxelTerrainChoiceinterface

Section titled “VoxelTerrainChoice”
Signature
readonly kind: "voxel";
Signature
readonly environment: EnvironmentDefinition;
Signature
readonly art: TerrainPresentationDefinition;

SeaTerrainChoiceinterface

Section titled “SeaTerrainChoice”
Signature
readonly kind: "sea";
Signature
readonly environment: EnvironmentDefinition;
Signature
readonly art: TerrainPresentationDefinition;

CartridgeWindowinterface

Section titled “CartridgeWindow”
  • WindowDeclaration
Signature
readonly kind: "window";
Signature
readonly body: WindowBody;
Signature
id: string;
Signature
WindowDeclaration.id;
Signature
title: string;
Signature
WindowDeclaration.title;
Signature
optional theme?:
| "vishnu"
| "light"
| "dark"
| "codec"
| "embed"
| "readout"
| "readout-night"
| "latte"
| "mocha"
| "field-guide"
| "field-guide-night"
| "embed-dark"
| "phosphor"
| "paper"
| "ember"
| "tide"
| "tape"
| "sunrise"
| "pirate-radio"
| "pirate-radio-night"
| "consulting"
| "consulting-ink"
| "consulting-night"
| "consulting-night-ink"
| "consulting-riso-latte"
| "consulting-riso-latte-ink"
| "consulting-riso-glomzy"
| "consulting-riso-glomzy-ink"
| "coin"
| "coin-night"
| "chamfer";
Signature
WindowDeclaration.theme;
Signature
role:
| "end"
| "goal"
| "minimap"
| "letter"
| "context"
| "panel"
| "hud"
| "actions";
Signature
WindowDeclaration.role;
Signature
optional end?: object;
Signature
pause: "local" | "none";
Signature
optional illustration?: "dawn" | "recording";
Signature
closeLabel: string;
Signature
restartLabel: string;
Signature
WindowDeclaration.end;
Signature
optional key?: string;
Signature
WindowDeclaration.key;
Signature
opens:
| {
on: "start";
}
| {
on: "command";
}
| {
on: "content";
repeat?: boolean;
}
| {
on: "presented-content";
repeat?: boolean;
}
| {
on: "time";
seconds: number;
};
Signature
WindowDeclaration.opens;
Signature
size: object;
Signature
width: number;
Signature
height: number;
Signature
WindowDeclaration.size;

GenerationFingerprintinterface

Section titled “GenerationFingerprint”
Signature
readonly key: object;
Signature
identity: object = generationIdentitySchema;
Signature
seed: string;
Signature
version: "worldgen-v1";
Signature
kitHash: string;
Signature
layer: string;
Signature
id: string;
Signature
readonly digest: string;

What a cartridge’s world needs; meadow() fills it in.

Signature
readonly materials: readonly object[];
Signature
readonly terrain: TerrainChoice;
Signature
type EntityId = string & object;

Public boundary between authored TypeScript and the authoritative kernel.

Name Type
__entityId unique symbol

ComponentIdtype alias

Section titled “ComponentId”
Signature
type ComponentId = `${string}.${string}`;

Signature
type GameId = string;

RouteCostResulttype alias

Section titled “RouteCostResult”
Signature
type RouteCostResult =
| {
actor: EntityId;
status: "reachable";
cost: number;
}
| {
actor: EntityId;
status: "unavailable";
reason: string;
};

RouteToAnyResulttype alias

Section titled “RouteToAnyResult”
Signature
type RouteToAnyResult =
| {
actor: EntityId;
status: "reachable";
targetIndex: number;
cost: number;
}
| {
actor: EntityId;
status: "unavailable";
reason: string;
};

FieldTypetype alias

Section titled “FieldType”
Signature
type FieldType =
| "number"
| "boolean"
| "string"
| "nullable-string"
| "entity"
| "nullable-entity";

RelationRemovalPolicytype alias

Section titled “RelationRemovalPolicy”
Signature
type RelationRemovalPolicy = "detach" | "restrict";

ComponentValuetype alias

Section titled “ComponentValue”
Signature
type ComponentValue<T> = object;
Type Parameter
T
Signature
readonly id: EntityId;
Signature
readonly value: T;

WriteIntenttype alias

Section titled “WriteIntent”
Signature
type WriteIntent = object;
Signature
readonly component: ComponentId;
Signature
readonly entity: EntityId;
Signature
readonly value: JsonValue;

JobEntityBindingtype alias

Section titled “JobEntityBinding”
Signature
type JobEntityBinding =
| {
kind: "exact";
value: EntityId;
}
| {
kind: "result";
value: {
step: string;
slot: string;
};
};

JobOperationtype alias

Section titled “JobOperation”
Signature
type JobOperation =
| {
kind: "finiteToItem";
source: JobEntityBinding;
inputKind: string;
inputQuantity: number;
outputKind: string;
outputQuantity: number;
workSeconds: number;
resultSlot: string;
}
| {
kind: "itemToItems";
source: JobEntityBinding;
inputKind: string;
inputQuantity: number;
outputKind: string;
outputQuantity: number;
workSeconds: number;
resultSlot: string;
};

JobContinuationtype alias

Section titled “JobContinuation”
Signature
type JobContinuation =
| "any-eligible"
| "prefer-starter"
| "bind-on-first-progress"
| {
assigned-actor: EntityId;
};

CardinalOrientationtype alias

Section titled “CardinalOrientation”
Signature
type CardinalOrientation = "north" | "east" | "south" | "west";

EdgeTargettype alias

Section titled “EdgeTarget”
Signature
type EdgeTarget = object;
Signature
readonly cell: readonly [number, number, number];
Signature
readonly axis: "x" | "z";

ConstructionTargettype alias

Section titled “ConstructionTarget”
Signature
type ConstructionTarget =
| {
kind: "cell";
cell: Vec3;
orientation: CardinalOrientation;
}
| {
kind: "edge";
edge: {
cell: Vec3;
axis: "x" | "z";
};
};

ActionRequesttype alias

Section titled “ActionRequest”
Signature
type ActionRequest =
| {
kind: "wake-chunks";
}
| {
kind: "instantiate-actors";
bindingId: string;
expectedSequence: number;
plan: ActorInstantiationPlan;
}
| {
kind: "spawn-actor";
receipt: EntityId;
definition: string;
cause: string;
arguments: Readonly<Record<string, SpawnArgument>>;
surfaceColumn?: readonly [number, number];
standingAt?: Vec3 & object;
}
| {
kind: "set-relation";
relation: ComponentId;
source: EntityId;
target: EntityId;
}
| {
kind: "clear-relation";
relation: ComponentId;
source: EntityId;
}
| {
kind: "begin-work-attempt";
task: EntityId;
worker: EntityId;
operation: WorkActivityRef;
}
| {
kind: "retarget-work-attempt";
task: EntityId;
generation: number;
sequence: number;
destination: MoveDestination;
}
| {
kind: "interrupt-work-attempt";
task: EntityId;
generation: number;
sequence: number;
cause: WorkInterruptCause;
}
| {
kind: "acknowledge-work-attempt";
task: EntityId;
generation: number;
sequence: number;
}
| {
kind: "continue-work-attempt";
task: EntityId;
generation: number;
sequence: number;
nextActivity: WorkActivityRef;
}
| {
kind: "create-job";
id: EntityId;
pool: EntityId;
plan: JobPlan;
}
| {
kind: "resume-job";
id: EntityId;
pool: EntityId;
plan: JobPlan;
}
| {
kind: "cancel-job";
id: EntityId;
}
| {
kind: "establish-resource-site";
operation: string;
worker: EntityId;
site: EntityId;
definition: string;
x: number;
y: number;
z: number;
}
| {
kind: "tend-resource-site";
operation: string;
worker: EntityId;
site: EntityId;
vessel: EntityId;
}
| {
kind: "designate-resource";
order: EntityId;
party: EntityId;
definition: string;
x: number;
y: number;
z: number;
}
| {
kind: "request-field-water";
party: EntityId;
material: string;
portions: number;
}
| {
kind: "request-process";
definition: string;
station: EntityId;
}
| {
kind: "admit-process";
process: EntityId;
definition: string;
station: EntityId;
}
| {
kind: "designate-stockpile";
party: EntityId;
zone: EntityId;
cells: readonly object[];
}
| {
kind: "update-stockpile";
party: EntityId;
zone: EntityId;
filterProfile: string;
priority: number;
}
| {
kind: "clear-stockpile";
party: EntityId;
zone: EntityId;
cells: readonly object[];
}
| {
kind: "set-structure-open";
worker: EntityId;
site: EntityId;
open: boolean;
}
| {
kind: "deconstruct";
worker: EntityId;
site: EntityId;
}
| {
kind: "break-structure";
site: EntityId;
}
| {
kind: "plan-deconstruction";
site: EntityId;
party: EntityId;
}
| {
kind: "plan-constructions";
party: EntityId;
plans: readonly PlacementCandidate[];
}
| {
kind: "prebuild-structures";
party: EntityId;
plans: readonly PlacementCandidate[];
}
| {
kind: "plan-excavation";
party: EntityId;
prefix: string;
start: readonly [number, number, number];
end: readonly [number, number, number];
}
| {
kind: "cancel-excavation";
party: EntityId;
area: {
start: readonly [number, number, number];
end: readonly [number, number, number];
} | null;
workers: readonly EntityId[];
}
| {
kind: "replace-floor";
orderId: EntityId;
existingFloorId: EntityId;
desiredCatalog: string;
}
| {
kind: "bind-construction-stage";
site: EntityId;
contact: Vec3 & object;
}
| {
kind: "cancel-work";
entity: EntityId;
}
| {
kind: "begin-direct";
entity: EntityId;
stream: string;
}
| {
kind: "begin-emission";
worker: EntityId;
station: EntityId;
}
| {
kind: "exchange-field-water";
operation: string;
worker: EntityId;
vessel: EntityId;
x: number;
y: number;
z: number;
direction: "withdraw" | "deposit";
portions: number;
}
| {
kind: "direct-input";
entity: EntityId;
stream: string;
inputs: readonly object[];
}
| {
kind: "launch";
launcher: EntityId;
ammunition: EntityId;
velocity: Vec3;
}
| {
kind: "displace";
entity: EntityId;
delta: Vec3;
}
| {
kind: "move";
entity: EntityId;
destination: MoveDestination;
facing?: number;
speed?: number;
}
| {
kind: "drop-lot";
entity: EntityId;
lot: EntityId;
}
| {
kind: "transfer";
lot: EntityId;
from: EntityId;
to: EntityId;
quantity: number;
}
| {
kind: "request-delivery";
source: EntityId;
destination: EntityId;
material: string;
quantity: number;
party: EntityId;
}
| {
kind: "consume";
entity: EntityId;
lot: EntityId;
quantity: number;
}
| {
kind: "extract-resource";
operation: string;
worker: EntityId;
source: EntityId;
};
Signature
{
kind: "wake-chunks";
}

Signature
{
kind: "instantiate-actors";
bindingId: string;
expectedSequence: number;
plan: ActorInstantiationPlan;
}

Signature
{
kind: "spawn-actor";
receipt: EntityId;
definition: string;
cause: string;
arguments: Readonly<Record<string, SpawnArgument>>;
surfaceColumn?: readonly [number, number];
standingAt?: Vec3 & object;
}
Name Type Description
kind "spawn-actor" Ordinary spawn of one template outside party join. The receipt is the new entity’s id: replaying the same request is a no-op, a different request under a used receipt is refused. Host scope only.
receipt EntityId -
definition string -
cause string -
arguments Readonly<Record<string, SpawnArgument>> -
surfaceColumn? readonly [number, number] -
standingAt? Vec3 & object Native standing contact, retaining its support height.

Signature
{
kind: "set-relation";
relation: ComponentId;
source: EntityId;
target: EntityId;
}

Signature
{
kind: "clear-relation";
relation: ComponentId;
source: EntityId;
}

Signature
{
kind: "begin-work-attempt";
task: EntityId;
worker: EntityId;
operation: WorkActivityRef;
}

Signature
{
kind: "retarget-work-attempt";
task: EntityId;
generation: number;
sequence: number;
destination: MoveDestination;
}

Signature
{
kind: "interrupt-work-attempt";
task: EntityId;
generation: number;
sequence: number;
cause: WorkInterruptCause;
}

Signature
{
kind: "acknowledge-work-attempt";
task: EntityId;
generation: number;
sequence: number;
}

Signature
{
kind: "continue-work-attempt";
task: EntityId;
generation: number;
sequence: number;
nextActivity: WorkActivityRef;
}

Signature
{
kind: "create-job";
id: EntityId;
pool: EntityId;
plan: JobPlan;
}

Signature
{
kind: "resume-job";
id: EntityId;
pool: EntityId;
plan: JobPlan;
}

Signature
{
kind: "cancel-job";
id: EntityId;
}

Signature
{
kind: "establish-resource-site";
operation: string;
worker: EntityId;
site: EntityId;
definition: string;
x: number;
y: number;
z: number;
}

Signature
{
kind: "tend-resource-site";
operation: string;
worker: EntityId;
site: EntityId;
vessel: EntityId;
}

Signature
{
kind: "designate-resource";
order: EntityId;
party: EntityId;
definition: string;
x: number;
y: number;
z: number;
}

Signature
{
kind: "request-field-water";
party: EntityId;
material: string;
portions: number;
}

Signature
{
kind: "request-process";
definition: string;
station: EntityId;
}

Signature
{
kind: "admit-process";
process: EntityId;
definition: string;
station: EntityId;
}

Signature
{
kind: "designate-stockpile";
party: EntityId;
zone: EntityId;
cells: readonly object[];
}

Signature
{
kind: "update-stockpile";
party: EntityId;
zone: EntityId;
filterProfile: string;
priority: number;
}

Signature
{
kind: "clear-stockpile";
party: EntityId;
zone: EntityId;
cells: readonly object[];
}

Signature
{
kind: "set-structure-open";
worker: EntityId;
site: EntityId;
open: boolean;
}

Signature
{
kind: "deconstruct";
worker: EntityId;
site: EntityId;
}

Signature
{
kind: "break-structure";
site: EntityId;
}
Name Type Description
kind "break-structure" Tear down a finished structure with no worker: it was broken.
site EntityId -

Signature
{
kind: "plan-deconstruction";
site: EntityId;
party: EntityId;
}

Signature
{
kind: "plan-constructions";
party: EntityId;
plans: readonly PlacementCandidate[];
}

Signature
{
kind: "prebuild-structures";
party: EntityId;
plans: readonly PlacementCandidate[];
}
Name Type Description
kind "prebuild-structures" Plan structures and finish them at once: a fresh world’s buildings.
party EntityId -
plans readonly PlacementCandidate[] -

Signature
{
kind: "plan-excavation";
party: EntityId;
prefix: string;
start: readonly[(number, number, number)];
end: readonly[(number, number, number)];
}

Signature
{
kind: "cancel-excavation";
party: EntityId;
area: | {
start: readonly [number, number, number];
end: readonly [number, number, number];
}
| null;
workers: readonly EntityId[];
}

Signature
{
kind: "replace-floor";
orderId: EntityId;
existingFloorId: EntityId;
desiredCatalog: string;
}

Signature
{
kind: "bind-construction-stage";
site: EntityId;
contact: Vec3 & object;
}

Signature
{
kind: "cancel-work";
entity: EntityId;
}

Signature
{
kind: "begin-direct";
entity: EntityId;
stream: string;
}

Signature
{
kind: "begin-emission";
worker: EntityId;
station: EntityId;
}

Signature
{
kind: "exchange-field-water";
operation: string;
worker: EntityId;
vessel: EntityId;
x: number;
y: number;
z: number;
direction: "withdraw" | "deposit";
portions: number;
}

Signature
{
kind: "direct-input";
entity: EntityId;
stream: string;
inputs: readonly object[];
}

Signature
{
kind: "launch";
launcher: EntityId;
ammunition: EntityId;
velocity: Vec3;
}

Signature
{
kind: "displace";
entity: EntityId;
delta: Vec3;
}

Signature
{
kind: "move";
entity: EntityId;
destination: MoveDestination;
facing?: number;
speed?: number;
}

Signature
{
kind: "drop-lot";
entity: EntityId;
lot: EntityId;
}

Signature
{
kind: "transfer";
lot: EntityId;
from: EntityId;
to: EntityId;
quantity: number;
}

Signature
{
kind: "request-delivery";
source: EntityId;
destination: EntityId;
material: string;
quantity: number;
party: EntityId;
}

Signature
{
kind: "consume";
entity: EntityId;
lot: EntityId;
quantity: number;
}

Signature
{
kind: "extract-resource";
operation: string;
worker: EntityId;
source: EntityId;
}

WorkActivityReftype alias

Section titled “WorkActivityRef”
Signature
type WorkActivityRef =
| {
kind: "route";
destination: MoveDestination;
}
| {
kind: "construction";
site: EntityId;
contact: Vec3 & object;
mode: "bind" | "work";
}
| {
kind: "excavation";
cell: readonly [number, number, number];
expectedMaterial: number;
replacementMaterial: number;
}
| {
kind: "deconstruction";
site: EntityId;
contact: Vec3 & object;
}
| {
kind: "process-attendance";
process: EntityId;
}
| {
kind: "material-transfer";
lot: EntityId;
from: EntityId;
to: EntityId;
quantity: number;
}
| {
kind: "material-drop";
lot: EntityId;
}
| {
kind: "resource-establish";
site: EntityId;
definition: string;
cell: readonly [number, number, number];
}
| {
kind: "resource-tend";
site: EntityId;
vessel: EntityId;
}
| {
kind: "resource-extract";
source: EntityId;
}
| {
kind: "field-water";
vessel: EntityId;
cell: readonly [number, number, number];
direction: "withdraw" | "deposit";
portions: number;
}
| {
kind: "job-transform";
task: EntityId;
contact: MoveDestination;
};

WorkInterruptCausetype alias

Section titled “WorkInterruptCause”
Signature
type WorkInterruptCause =
"drafted" | "cancelled" | "workerUnavailable" | "accessLost";

WorkBlockReasontype alias

Section titled “WorkBlockReason”
Signature
type WorkBlockReason =
| "accessLost"
| "missingInputs"
| "capacityUnavailable"
| "unsupportedStructure"
| "workerUnavailable";

WorkOutcometype alias

Section titled “WorkOutcome”
Signature
type WorkOutcome =
| {
kind: "completed";
}
| {
kind: "blocked";
reason: WorkBlockReason;
}
| {
kind: "interrupted";
cause: WorkInterruptCause;
};

WorkAttemptPhasetype alias

Section titled “WorkAttemptPhase”
Signature
type WorkAttemptPhase =
| {
kind: "ready";
}
| {
kind: "executing";
operation: {
attempt: WorkAttemptKey;
sequence: number;
};
activity: WorkActivityRef;
}
| {
kind: "outcome";
operation: {
attempt: WorkAttemptKey;
sequence: number;
};
activity: WorkActivityRef;
result: WorkOutcome;
}
| {
kind: "settling";
operation: {
attempt: WorkAttemptKey;
sequence: number;
};
cause: WorkInterruptCause;
};

ProcessInputPolicytype alias

Section titled “ProcessInputPolicy”
Signature
type ProcessInputPolicy = "portion" | "whole-lot";

ProcessInputDispositiontype alias

Section titled “ProcessInputDisposition”
Signature
type ProcessInputDisposition = "consume" | "retain" | "emission-source";

NativeFacttype alias

Section titled “NativeFact”
Signature
type NativeFact = Exclude<
keyof ReadContext,
"clock" | "outcomes" | "random" | "impacts" | "query"
>;

Native read doors available to authored decisions beyond ECS/query state.


CommandScopetype alias

Section titled “CommandScope”
Signature
type CommandScope =
| {
kind: "host";
}
| {
kind: "player";
player: string;
};

PartyJoinIdentitytype alias

Section titled “PartyJoinIdentity”
Signature
type PartyJoinIdentity = Readonly<{
status: "existing" | "available";
sequence: number;
player: string;
party: EntityId;
people: readonly EntityId[];
}>;

SpawnArgumenttype alias

Section titled “SpawnArgument”
Signature
type SpawnArgument = Extract<
ActorArgument,
| {
kind: "value";
}
| {
kind: "existing";
}
>;

Spawn arguments bind values or existing entities; slots and joining players belong to party join.


ActorArgumenttype alias

Section titled “ActorArgument”
Signature
type ActorArgument =
| {
kind: "value";
value: string | number | boolean | null;
}
| {
kind: "spawned";
slot: string;
}
| {
kind: "existing";
id: EntityId;
}
| {
kind: "joining-player";
};

ActorInstantiationPlantype alias

Section titled “ActorInstantiationPlan”
Signature
type ActorInstantiationPlan = Readonly<{
actors: readonly Readonly<{
slot: string;
definition: string;
arguments: Readonly<Record<string, ActorArgument>>;
surfaceColumn?: readonly [number, number];
}>[];
initialMaterials: readonly Readonly<{
container: ActorArgument;
kind: string;
quantity: number;
actorDefinition?: string;
arguments?: Readonly<Record<string, ActorArgument>>;
}>[];
partySlot: string;
peopleSlots: readonly string[];
}>;

PartyJoinCapabilitytype alias

Section titled “PartyJoinCapability”
Signature
type PartyJoinCapability = Readonly<{
footprint: readonly (readonly [number, number][]);
prepare: (spawn) => ActorInstantiationPlan;
}>;

ActionScopetype alias

Section titled “ActionScope”
Signature
type ActionScope =
| {
kind: "host";
}
| {
kind: "player";
player: string;
};

GameCommandContexttype alias

Section titled “GameCommandContext”
Signature
type GameCommandContext = Pick<
ReadContext,
| "query"
| "physicalContacts"
| "terrainMaterials"
| "terrainSurfaces"
| "structureSurfaces"
| "transferContacts"
> &
object;
Name Type
scope CommandScope
workAttempts() (taskIds) => readonly WorkAttempt[]
workAttemptForWorker() (worker) => WorkAttempt | null
floorOperations() (requests) => readonly FloorOperation[]

VisualPlacementtype alias

Section titled “VisualPlacement”
Signature
type VisualPlacement =
| {
kind: "edge";
edge: EdgeTarget;
}
| {
kind: "footprint";
footprint: readonly (readonly [number, number][]);
orientation: CardinalOrientation;
}
| {
kind: "stair";
entrance: readonly [number, number, number];
landing: readonly [number, number, number];
orientation: CardinalOrientation;
};

DeliveryActivityPhasetype alias

Section titled “DeliveryActivityPhase”
Signature
type DeliveryActivityPhase =
"fetching" | "pickup" | "carrying" | "putting-down";

fetching: walking to the source with empty hands; pickup: the tick custody moved into the hands; carrying: walking with the held load; putting-down: the tick the load left the hands.


ActivityKindtype alias

Section titled “ActivityKind”
Signature
type ActivityKind = "dig" | "build" | "chop" | "delivery";

KernelSnapshottype alias

Section titled “KernelSnapshot”
Signature
type KernelSnapshot = KernelRecordSnapshot;

ConstructionReadinessStatustype alias

Section titled “ConstructionReadinessStatus”
Signature
type ConstructionReadinessStatus = "ready" | "waitingForSupport" | "unknown";

ConstructionAccessContacttype alias

Section titled “ConstructionAccessContact”
Signature
type ConstructionAccessContact = Vec3 & object;
Name Type
frame null
kind "origin" | "landing"

DeconstructionAccesstype alias

Section titled “DeconstructionAccess”
Signature
type DeconstructionAccess = object;
Signature
readonly site: EntityId;
Signature
readonly status: "ready" | "occupiedPort" | "structuralDependency" | "invalidGeometry";
Signature
readonly contacts: readonly ConstructionAccessContact[];
Signature
readonly salvageQuantity: number;
Signature
readonly workSeconds: number;

PhysicalContacttype alias

Section titled “PhysicalContact”
Signature
type PhysicalContact = object;
Signature
readonly solid: boolean;
Signature
readonly sealedTop: boolean;
Signature
readonly outside: boolean;

TerrainSurfacetype alias

Section titled “TerrainSurface”
Signature
type TerrainSurface = z.infer<typeof terrainSurfaceSchema>;

TerrainSurfaceCovertype alias

Section titled “TerrainSurfaceCover”
Signature
type TerrainSurfaceCover = NonNullable<TerrainSurface["cover"]>;

StructureSurfacetype alias

Section titled “StructureSurface”
Signature
type StructureSurface = object;
Signature
readonly cell: readonly [number, number, number];

FloorOperationtype alias

Section titled “FloorOperation”
Signature
type FloorOperation =
| {
kind: "build";
}
| {
kind: "unchanged";
floor: EntityId;
}
| {
kind: "replace";
floor: EntityId;
}
| {
kind: "conflict";
floor: EntityId;
}
| {
kind: "waiting-for-support";
}
| {
kind: "invalid";
reason: string;
};

FloorOperationRequesttype alias

Section titled “FloorOperationRequest”
Signature
type FloorOperationRequest = object;
Signature
readonly cell: readonly [number, number, number];
Signature
readonly desiredCatalog: string;

TerrainChangeSettype alias

Section titled “TerrainChangeSet”
Signature
type TerrainChangeSet =
| {
kind: "changed-columns";
revision: number;
columns: readonly (readonly [number, number][]);
}
| {
kind: "full-reset";
revision: number;
reason: "history" | "restored" | "stale";
};

GameLocalBindingtype alias

Section titled “GameLocalBinding”
Signature
type GameLocalBinding = Readonly<{
id: string;
label: string;
detail?: string;
selection?:
| "entities"
| Readonly<{
field: string;
cardinality: "one";
}>;
target?:
"terrain-cell" | "terrain-area" | "world-surface" | "world-edge" | "actor";
component?: ComponentId;
designation?: readonly (
"point" | "line" | "rectangle" | "edge-line" | "entities"
)[];
footprint?: readonly (readonly [number, number][]);
placement?: "action-bar";
key?: string;
preset?: JsonValue;
}>;

JsonValuetype alias

Section titled “JsonValue”
Signature
type JsonValue =
| null
| boolean
| number
| string
| readonly JsonValue[]
| {
[key: string]: JsonValue;
};

ComponentValuestype alias

Section titled “ComponentValues”
Signature
type ComponentValues = Readonly<Record<string, JsonValue>>;

GameCommandAvailabilitytype alias

Section titled “GameCommandAvailability”
Signature
type GameCommandAvailability =
| {
status: "available";
}
| {
status: "unavailable";
reason: string;
};

EnvironmentFactstype alias

Section titled “EnvironmentFacts”
Signature
type EnvironmentFacts = z.infer<typeof environmentFactsSchema>;

AuthoredFeedbackCuetype alias

Section titled “AuthoredFeedbackCue”
Signature
type AuthoredFeedbackCue = Omit<
FeedbackPresentationCue,
"sequence" | "time" | "kind"
>;

What WriteContext.cue() accepts: a feedback cue before the session stamps its sequence and commit time.


CartridgeAudiotype alias

Section titled “CartridgeAudio”
Signature
type CartridgeAudio = z.infer<typeof cartridgeAudioSchema>;

CapabilityReferencetype alias

Section titled “CapabilityReference”
Signature
type CapabilityReference = ComponentDefinition<any> | ComponentId;

ActorInitialtype alias

Section titled “ActorInitial”
Signature
type ActorInitial<T> = { readonly [K in keyof T]: T[K] | ActorInput };
Type Parameter
T extends object

BlueprintSidetype alias

Section titled “BlueprintSide”
Signature
type BlueprintSide = "north" | "south" | "east" | "west";

A side of a module: north is -z, south +z, west -x, east +x.


BlueprintOpeningKindtype alias

Section titled “BlueprintOpeningKind”
Signature
type BlueprintOpeningKind = "door" | "window" | "doorway";

What an opening in a side is: a door, a window, or a doorway (an open gap into the room next door, which must be there).


CameraFollowPolicytype alias

Section titled “CameraFollowPolicy”
Signature
type CameraFollowPolicy = z.infer<typeof cameraFollowSchema>;

CartridgeCameraPolicytype alias

Section titled “CartridgeCameraPolicy”
Signature
type CartridgeCameraPolicy = z.infer<typeof cartridgeCameraSchema>;

Signature
type BankPath = readonly (string | number)[];

PailPosestype alias

Section titled “PailPoses”
Signature
type PailPoses = Readonly<{
contentKind: string;
empty: string;
partial: string;
full: string;
}>;

VisualBindingstype alias

Section titled “VisualBindings”
Signature
type VisualBindings = Readonly<Record<string, VisualBinding>>;

StaticVisualBindingtype alias

Section titled “StaticVisualBinding”
Signature
type StaticVisualBinding = VisualBinding & object;

A static frame by its path in the art (the bank’s, or a cartridge pack’s under its root).

Name Type Description
kind "static" -
worldRole "floor" | "structure" | "item" -
path BankPath -
facing boolean The path ends in one frame per view turn (0 to 3).
frames? true The path (after its view) ends in an animation’s frames.
anchor "propAnchor" | "vehicleAnchor" -

CartridgeDirectControltype alias

Section titled “CartridgeDirectControl”
Signature
type CartridgeDirectControl =
| {
entity: string;
}
| {
person: number;
};

A cartridge-owned actor driven directly by the player’s movement keys. The world moves it in fixed steps. A walker with Traversal keeps its feet on the ground: it climbs or drops at most its step height, never steps onto no floor, and never passes a finished wall, a closed door or a filled cell. An open door lets it through. Moving it by route later starts from wherever it stands, even between cells.

Signature
{
entity: string;
}

One fixed actor, the same for every viewer.


Signature
{
person: number;
}

Each viewer drives their own: this index into the people of the party the viewer joined with (players.join), or the local party.


HostFeaturetype alias

Section titled “HostFeature”
Signature
type HostFeature = (typeof HOST_FEATURES)[number];

ComponentFieldstype alias

Section titled “ComponentFields”
Signature
type ComponentFields = Readonly<Record<string, JsonValue>>;

One component’s field values as they cross into the kernel.


BuildableDefinitiontype alias

Section titled “BuildableDefinition”
Signature
type BuildableDefinition = z.infer<typeof buildableDefinitionSchema>;

ConstructionProposalInputtype alias

Section titled “ConstructionProposalInput”
Signature
type ConstructionProposalInput = z.infer<typeof constructionProposalInput>;

DiagnosticCodetype alias

Section titled “DiagnosticCode”
Signature
type DiagnosticCode = keyof typeof DIAGNOSTICS;

EffectFieldstype alias

Section titled “EffectFields”
Signature
type EffectFields<T> = Readonly<
Record<(keyof T & string) | "at" | "seq", "number" | "string" | "boolean">
>;

Fields declared by an effect, including its world time and step order.

Type Parameter
T extends object

Signature
type FlowCell = readonly [number, number];

PresentationLighttype alias

Section titled “PresentationLight”
Signature
type PresentationLight = z.infer<typeof presentationLightSchema>;

CartridgeLightingtype alias

Section titled “CartridgeLighting”
Signature
type CartridgeLighting = z.infer<typeof cartridgeLightingSchema>;

Signature
type Mood = (typeof MOODS)[number];

TerrainLooktype alias

Section titled “TerrainLook”
Signature
type TerrainLook = z.infer<typeof terrainLookSchema>;

Signature
type Look =
| {
palette: null;
ambientLight?: Readonly<Record<Mood, number>>;
ambientTint?: Readonly<Record<Mood, readonly [number, number, number]>>;
terrain: TerrainLook;
backdrop?: "ocean";
}
| {
palette: Palette;
dither: PaletteDither;
mood: Mood;
moods?: readonly MoodStop[];
ambientLight?: Readonly<Record<Mood, number>>;
ambientTint?: Readonly<Record<Mood, readonly [number, number, number]>>;
terrain: TerrainLook;
backdrop?: "ocean";
};

A checked look: either full colour, or a palette with its dither and mood.

Signature
{
palette: null;
ambientLight?: Readonly<Record<Mood, number>>;
ambientTint?: Readonly<Record<Mood, readonly [number, number, number]>>;
terrain: TerrainLook;
backdrop?: "ocean";
}
Name Type Description
palette null -
ambientLight? Readonly<Record<Mood, number>> -
ambientTint? Readonly<Record<Mood, readonly [number, number, number]>> View-only RGB light multipliers (0..1), independent of palette mapping.
terrain TerrainLook -
backdrop? "ocean" -

Signature
{
palette: Palette;
dither: PaletteDither;
mood: Mood;
moods?: readonly MoodStop[];
ambientLight?: Readonly<Record<Mood, number>>;
ambientTint?: Readonly<Record<Mood, readonly [number, number, number]>>;
terrain: TerrainLook;
backdrop?: "ocean";
}
Name Type Description
palette Palette -
dither PaletteDither -
mood Mood -
moods? readonly MoodStop[] The checked schedule, when the cartridge gives one.
ambientLight? Readonly<Record<Mood, number>> -
ambientTint? Readonly<Record<Mood, readonly [number, number, number]>> View-only RGB light multipliers (0..1), independent of palette mapping.
terrain TerrainLook -
backdrop? "ocean" -

Signature
type Cell2 = readonly [number, number];

A ground cell: [x, z]. The actor settles onto the surface there.


ActorParamstype alias

Section titled “ActorParams”
Signature
type ActorParams = Readonly<Record<string, string | number | boolean | null>>;

Values for an actor’s declared inputs, by input name.


SeatFactstype alias

Section titled “SeatFacts”
Signature
type SeatFacts = Readonly<Record<string, number>>;

TerrainChoicetype alias

Section titled “TerrainChoice”
Signature
type TerrainChoice = VoxelTerrainChoice | SeaTerrainChoice;

WindowWorldtype alias

Section titled “WindowWorld”
Signature
type WindowWorld = Pick<
ReadContext,
"query" | "atmosphereSamples" | "constructionReadiness"
> &
PresentationViewer;

What a window body reads: the committed world, through typed queries, and who is looking. Each viewer gets their own pass: a player sees { kind: "player", player }, a host or spectator { kind: "host" }.


RunCommandtype alias

Section titled “RunCommand”
Signature
type RunCommand = (command, input?) => void;

The single command door: "garden:plantSeeds" or "ui:garden.goals".

Parameter Type
command string
input? JsonValue

void


WindowBodytype alias

Section titled “WindowBody”
Signature
type WindowBody = (world) => readonly WindowBlock[];

Pure: world in, blocks out. It runs where the world lives (the Worker or the host) on every presentation, so only data crosses to the page.

Parameter Type
world WindowWorld

readonly WindowBlock[]


WorldgenAssemblytype alias

Section titled “WorldgenAssembly”
Signature
type WorldgenAssembly = z.infer<typeof worldgenAssemblySchema>;

RoomDefinitiontype alias

Section titled “RoomDefinition”
Signature
type RoomDefinition = z.infer<typeof roomDefinitionSchema>;

BuildingDefinitiontype alias

Section titled “BuildingDefinition”
Signature
type BuildingDefinition = z.infer<typeof buildingDefinitionSchema>;

WorldgenChecktype alias

Section titled “WorldgenCheck”
Signature
type WorldgenCheck = Extract<
z.infer<typeof worldgenCheckSchema>,
{
status: "valid";
}
>;

BuildingLayouttype alias

Section titled “BuildingLayout”
Signature
type BuildingLayout = z.infer<typeof buildingLayoutSchema>;

BuildingGraphtype alias

Section titled “BuildingGraph”
Signature
type BuildingGraph = z.infer<typeof buildingGraphSchema>;

CompileRequesttype alias

Section titled “CompileRequest”
Signature
type CompileRequest = z.infer<typeof compileRequestSchema>;

CompiledBuildingtype alias

Section titled “CompiledBuilding”
Signature
type CompiledBuilding = z.infer<typeof compiledBuilding>;

GenerationIdentitytype alias

Section titled “GenerationIdentity”
Signature
type GenerationIdentity = z.infer<typeof generationIdentitySchema>;

PopulationPolicytype alias

Section titled “PopulationPolicy”
Signature
type PopulationPolicy = z.infer<typeof populationPolicySchema>;

ChunkPolicytype alias

Section titled “ChunkPolicy”
Signature
type ChunkPolicy = z.infer<typeof chunkPolicySchema>;

ChunkWindowtype alias

Section titled “ChunkWindow”
Signature
type ChunkWindow = z.infer<typeof chunkWindowSchema>;

ChunkFactstype alias

Section titled “ChunkFacts”
Signature
type ChunkFacts = z.infer<typeof chunkFactsSchema>;

GenerationKeytype alias

Section titled “GenerationKey”
Signature
type GenerationKey = z.infer<typeof generationKeySchema>;

ChunkPlantype alias

Section titled “ChunkPlan”
Signature
type ChunkPlan = z.infer<typeof chunkPlanSchema>;

WindowBlocktype alias

Section titled “WindowBlock”
Signature
type WindowBlock = z.infer<typeof windowBlockSchema>;

One block of a game window: plain data a person or a model can write.


WindowRoletype alias

Section titled “WindowRole”
Signature
type WindowRole = z.infer<typeof windowRoleSchema>;

Where the shell shows a window.


WindowOpeningtype alias

Section titled “WindowOpening”
Signature
type WindowOpening = z.infer<typeof windowOpeningSchema>;

When a window first opens on its own.

RESERVED_COMPONENTSconstant

Section titled “RESERVED_COMPONENTS”
Signature
const RESERVED_COMPONENTS: readonly [
"vishnu.party",
"vishnu.owned-by",
"vishnu.party-member",
"vishnu.owned-by-party",
"vishnu.stockpile-cell",
"vishnu.storage-provider",
"vishnu.position",
"vishnu.body",
"vishnu.traversal",
"vishnu.container",
"vishnu.sealed-container",
"vishnu.ground-stock",
"vishnu.construction-site",
"vishnu.floor-replacement",
"vishnu.lot",
"vishnu.lot-water",
"vishnu.hands",
"vishnu.process-binding",
"vishnu.finite-resource",
"vishnu.resource-site",
"vishnu.resource-order",
"vishnu.excavation-work",
"vishnu.excavation-order",
"vishnu.deconstruction-work",
"vishnu.supply-allocation",
"vishnu.delivery-request",
"vishnu.field-water-work",
"vishnu.vessel-capability",
"vishnu.work-policy",
"vishnu.work-execution",
"vishnu.work-schedule",
"vishnu.job-task-work",
"vishnu.destination",
"vishnu.support",
"vishnu.surface",
"vishnu.obstacle",
"vishnu.visual",
"vishnu.collider",
"vishnu.launcher",
"vishnu.emitter",
"vishnu.projectile",
"vishnu.impact-material",
"vishnu.owned-by-party",
"vishnu.party-member",
];

sampledSoundSchemaconstant

Section titled “sampledSoundSchema”
Signature
const sampledSoundSchema: ZodReadonly<
ZodObject<
{
urls: ZodReadonly<ZodArray<ZodString>>;
gain: ZodNumber;
priority: ZodNumber;
},
$strict
>
>;

A sampled replacement for one existing feedback sound name. URLs are resolved by the cartridge bundler; variants cycle without simulation RNG.


cartridgeAudioSchemaconstant

Section titled “cartridgeAudioSchema”
Signature
const cartridgeAudioSchema: ZodReadonly<
ZodObject<
{
samples: ZodReadonly<
ZodRecord<
ZodString,
ZodReadonly<
ZodObject<
{
urls: ZodReadonly<ZodArray<ZodString>>;
gain: ZodNumber;
priority: ZodNumber;
},
$strict
>
>
>
>;
maxVoices: ZodOptional<ZodNumber>;
},
$strict
>
>;

View-only audio bank. Omission preserves the engine’s procedural recipes. Named samples replace that recipe; a failed sample stays silent.


actorInputconstant

Section titled “actorInput”
Signature
const actorInput: Readonly<{
number: (name) => ActorInput;
boolean: (name) => ActorInput;
string: (name) => ActorInput;
reference: (name) => ActorInput;
optionalReference: (name) => ActorInput;
}>;

Declared instance inputs; templates bind these to checked component fields.


actorInputSchemaconstant

Section titled “actorInputSchema”
Signature
const actorInputSchema: ZodObject<{
kind: ZodLiteral<"actor-input">;
name: ZodString;
type: ZodEnum<{
string: "string";
number: "number";
boolean: "boolean";
nullable-string: "nullable-string";
entity: "entity";
nullable-entity: "nullable-entity";
actor-reference: "actor-reference";
}>;
}, $strict>;

Parses an actor input placeholder inside an initial component value.


ActorKindconstant

Section titled “ActorKind”
Signature
const ActorKind: ComponentDefinition<{
definition: string;
}>;

Membership marker for actors that attach behaviors. Pack preparation adds it to every attaching template, so an installed behavior runs only for entities created from an actor that attached it, never for look-alikes.


cameraFollowSchemaconstant

Section titled “cameraFollowSchema”
Signature
const cameraFollowSchema: ZodReadonly<
ZodObject<
{
deadZone: ZodOptional<ZodNumber>;
halfLife: ZodOptional<ZodNumber>;
lookAhead: ZodOptional<ZodNumber>;
lookAheadSource: ZodOptional<
ZodEnum<{
movement: "movement";
aim: "aim";
}>
>;
resumeDistance: ZodOptional<ZodNumber>;
},
$strict
>
>;

Presentation tuning only; following never changes actor movement or aim.


cartridgeCameraSchemaconstant

Section titled “cartridgeCameraSchema”
Signature
const cartridgeCameraSchema: ZodReadonly<
ZodObject<
{
pan: ZodBoolean;
rotate: ZodBoolean;
follow: ZodOptional<
ZodReadonly<
ZodObject<
{
deadZone: ZodOptional<ZodNumber>;
halfLife: ZodOptional<ZodNumber>;
lookAhead: ZodOptional<ZodNumber>;
lookAheadSource: ZodOptional<
ZodEnum<{
movement: "movement";
aim: "aim";
}>
>;
resumeDistance: ZodOptional<ZodNumber>;
},
$strict
>
>
>;
initialZoom: ZodOptional<
ZodUnion<
readonly [ZodLiteral<1>, ZodLiteral<2>, ZodLiteral<3>, ZodLiteral<4>]
>
>;
cutaway: ZodOptional<ZodLiteral<"auto">>;
},
$strict
>
>;

Camera policy shared by cartridge authoring and the remote player boundary. Follow is opt-in for a direct-control actor; manual pan suspends it until movement resumes. Unset zoom preserves the engine’s desktop/phone defaults. Whole zoom levels keep pixel art crisp; the wheel remains player-controlled.


HOST_FEATURESconstant

Section titled “HOST_FEATURES”
Signature
const HOST_FEATURES: readonly ["minded-seats"];

Engine features a host switches on for the shared worlds it opens.


Colliderconstant

Section titled “Collider”
Signature
const Collider: ComponentDefinition<{
geometry: "ball" | "cuboid";
radius: number;
halfX: number;
halfY: number;
halfZ: number;
yaw: number;
offsetX: number;
offsetY: number;
offsetZ: number;
}>;

Physical collision dimensions are independent of a sprite’s bounds.


Launcherconstant

Section titled “Launcher”
Signature
const Launcher: ComponentDefinition<{
ammoKind: string;
muzzleX: number;
muzzleY: number;
muzzleZ: number;
maxSpeed: number;
projectileRadius: number;
maxRange: number;
maxLifetime: number;
projectileSprite: string;
projectileLabel: string;
gravity: number;
penetration: number;
}>;

ImpactMaterialconstant

Section titled “ImpactMaterial”
Signature
const ImpactMaterial: ComponentDefinition<{
response: "ground" | "stop" | "pierce";
resistance: number;
restitution: number;
friction: number;
embedSpeed: number;
}>;

Contact policy supplied by a game; collision geometry remains independent.


Bodyconstant

Section titled “Body”
Signature
const Body: ComponentDefinition<{
speed: number;
}>;

Native movement capability; game systems may query it but cannot write it.


Emitterconstant

Section titled “Emitter”
Signature
const Emitter: ComponentDefinition<{
catalog: string;
}>;

Native finite-emission capability; catalog admission remains native-owned.


Containerconstant

Section titled “Container”
Signature
const Container: ComponentDefinition<{
capacity: number;
}>;

Native carrying capacity; authored systems may query but cannot write it.


Traversalconstant

Section titled “Traversal”
Signature
const Traversal: ComponentDefinition<{
clearanceCells: number;
maxStepCells: number;
}>;

Authored walking geometry; native routing owns its interpretation and state.


Positionconstant

Section titled “Position”
Signature
const Position: ComponentDefinition<{
x: number;
y: number;
z: number;
facing: number;
}>;

Visualconstant

Section titled “Visual”
Signature
const Visual: ComponentDefinition<{
sprite: string;
label: string;
}>;

Native authored sprite identity. Presentation projections must not replace it.


Supportconstant

Section titled “Support”
Signature
const Support: ComponentDefinition<{
entity: EntityId;
}>;

Surfaceconstant

Section titled “Surface”
Signature
const Surface: ComponentDefinition<{
minX: number;
maxX: number;
minZ: number;
maxZ: number;
height: number;
}>;

MaterialLotconstant

Section titled “MaterialLot”
Signature
const MaterialLot: ComponentDefinition<{
quantity: number;
kind: string;
container: EntityId;
}>;

Handsconstant

Section titled “Hands”
Signature
const Hands: ComponentDefinition<{
lot: EntityId;
}>;

Native hands slot: the one lot an actor holds and carries. Separate from the actor’s container (inventory); filled only by a pickup and emptied only by a deposit, drop or transfer of that lot. Absent means empty hands.


VesselCapabilityconstant

Section titled “VesselCapability”
Signature
const VesselCapability: ComponentDefinition<{
acceptsWater: boolean;
}>;

Native vessel eligibility; physical capability is authored as content and consumed by the native field-water planner.


LotWaterconstant

Section titled “LotWater”
Signature
const LotWater: ComponentDefinition<{
waterKg: number;
}>;

SupplyAllocationconstant

Section titled “SupplyAllocation”
Signature
const SupplyAllocation: ComponentDefinition<{
requirementOwner: EntityId;
requirementRole: string;
requirementGeneration: number;
party: EntityId;
material: string;
portion: EntityId;
destination: EntityId;
quantity: number;
state: "reserved" | "delivered" | "cancelled";
}>;

Native reservation for one exact material portion. Physical custody remains in MaterialLot; this record exposes the durable planner obligation.


DeliveryRequestconstant

Section titled “DeliveryRequest”
Signature
const DeliveryRequest: ComponentDefinition<{
source: EntityId;
destination: EntityId;
party: EntityId;
material: string;
quantity: number;
deliveredQuantity: number;
}>;

Durable intent submitted with requestDelivery; native allocation rows expose reserved and delivered portions without authored worker choreography.


FiniteResourceconstant

Section titled “FiniteResource”
Signature
const FiniteResource: ComponentDefinition<{
kind: string;
quantity: number;
}>;

JobTaskWorkconstant

Section titled “JobTaskWork”
Signature
const JobTaskWork: ComponentDefinition<{
seconds: number;
}>;

Native durable effort for a generic job task; authored code may query it for progress presentation but cannot write it.


ResourceSiteconstant

Section titled “ResourceSite”
Signature
const ResourceSite: ComponentDefinition<{
definition: string;
stage: number;
nextDue: number;
}>;

Destinationconstant

Section titled “Destination”
Signature
const Destination: ComponentDefinition<{
x: number;
y: number;
z: number;
facing: number;
frame: EntityId | null;
}>;

placedAtconstant

Section titled “placedAt”
Signature
const placedAt: Readonly<{
x: "at-x";
z: "at-z";
}>;

A Position declared without values is bound where the actor is placed or spawned: these are the inputs the compiled template exposes for it.


ExcavationWorkconstant

Section titled “ExcavationWork”
Signature
const ExcavationWork: ComponentDefinition<{
x: number;
y: number;
z: number;
expected: number;
replacement: number;
seconds: number;
}>;

Native progress is observable but cannot be written by authored systems.


ExcavationOrderconstant

Section titled “ExcavationOrder”
Signature
const ExcavationOrder: ComponentDefinition<{
cellX: number;
cellY: number;
cellZ: number;
expected: number;
status: "queued" | "blocked" | "cancelling";
reason: string;
}>;

Buildableconstant

Section titled “Buildable”
Signature
const Buildable: ActorDefinitionCapability<{
name: string;
sprites: string;
geometry:
| {
kind: "fixture";
footprint: [number, number][];
}
| {
kind: "aperture";
height: number;
openingBottom: number;
openingHeight: number;
closed?: boolean;
}
| {
kind: "floor";
}
| {
kind: "cover";
}
| {
kind: "wall";
height: number;
}
| {
kind: "stair";
run: number;
rise: number;
};
materials: object[];
workSeconds: number;
workReachBelowCells: number;
placement?: {
alignment: "fixed" | "stroke";
facing?: {
north: number;
east: number;
south: number;
west: number;
};
};
ports?: object[];
onRemove?: {
salvage?: object[];
emptyPorts?: string[];
};
palette?: boolean;
key?: string;
}>;

A structure actor is created by native construction, on its existing site identity.


constructionProposalInputconstant

Section titled “constructionProposalInput”
Signature
const constructionProposalInput: ZodObject<{
catalog: ZodString;
orientation: ZodOptional<ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>>;
target: ZodUnion<readonly [ZodObject<{
cell: ZodTuple<[ZodNumber, ZodNumber, ZodNumber], null>;
}, $strict>, ZodObject<{
area: ZodObject<{
start: ZodTuple<[ZodNumber, ZodNumber, ZodNumber], null>;
end: ZodTuple<[ZodNumber, ZodNumber, ZodNumber], null>;
}, $strict>;
}, $strict>, ZodObject<{
edges: ZodArray<ZodObject<{
cell: ZodTuple<[..., ..., ...], null>;
axis: ZodEnum<{
x: ...;
z: ...;
}>;
}, $strict>>;
}, $strict>]>;
}, $strict>;

Friendly gesture input. Physical admission remains native and transactional.


SealedContainerconstant

Section titled “SealedContainer”
Signature
const SealedContainer: ComponentDefinition<Record<string, never>>;

Native custody is observable; authored writes cannot lock or unlock goods.


ConstructionSiteconstant

Section titled “ConstructionSite”
Signature
const ConstructionSite: ComponentDefinition<ConstructionSiteState>;

The site owns earned effort; active worker ownership lives in WorkAttempt.


FloorReplacementconstant

Section titled “FloorReplacement”
Signature
const FloorReplacement: ComponentDefinition<{
version: number;
targetFloor: EntityId;
expectedCatalog: string;
desiredCatalog: string;
supportX: number;
supportY: number;
supportZ: number;
phase: "cancelled" | "queued" | "working" | "completed";
}>;

DeconstructionOrderconstant

Section titled “DeconstructionOrder”
Signature
const DeconstructionOrder: ComponentDefinition<{
site: string;
contactX: number;
contactY: number;
contactZ: number;
salvageQuantity: number;
workSeconds: number;
status: "queued" | "blocked" | "complete";
reason: string;
retryKey: string;
}>;

Native-owned teardown intent projected for game UI and save inspection.


DIAGNOSTICSconstant

Section titled “DIAGNOSTICS”
Signature
const DIAGNOSTICS: object;

The stable catalog. A code never changes meaning once published.

Name Type Default value
VD001 "cartridge header is invalid" "cartridge header is invalid"
VD002 "a system is installed twice" "a system is installed twice"
VD003 "two components share an id" "two components share an id"
VD004 "a buildable is listed as an ordinary actor" "a buildable is listed as an ordinary actor"
VD005 "a build command is defined next to construction()" "a build command is defined next to construction()"
VD006 "buildables have no world to stand in" "buildables have no world to stand in"
VD007 "buildables need voxel terrain" "buildables need voxel terrain"
VD008 "terrain kind is unknown" "terrain kind is unknown"
VD009 "shelf presentation is invalid" "shelf presentation is invalid"
VD010 "an actor id is invalid" "an actor id is invalid"
VD011 "an actor has a component twice" "an actor has a component twice"
VD012 "an actor's initial value does not fit its component" "an actor's initial value does not fit its component"
VD013 "a behavior needs components its actor lacks" "a behavior needs components its actor lacks"
VD014 "an actor attaches a behavior twice" "an actor attaches a behavior twice"
VD015 "two different behaviors share an id" "two different behaviors share an id"
VD016 "an actor is defined twice in one cartridge" "an actor is defined twice in one cartridge"
VD017 "membership is set by hand" "membership is set by hand"
VD020 "a placed actor is missing a param" "a placed actor is missing a param"
VD021 "a placed actor is given an unknown param" "a placed actor is given an unknown param"
VD022 "the scene places one id twice" "the scene places one id twice"
VD023 "a placed actor has a component without values" "a placed actor has a component without values"
VD024 "a placed actor has no position" "a placed actor has no position"
VD025 "two placed actors have the same target cell" "two placed actors have the same target cell"
VD030 "a window id is not namespaced" "a window id is not namespaced"
VD031 "a window is declared twice" "a window is declared twice"
VD032 "two windows share a key" "two windows share a key"
VD033 "a control key is not one lowercase letter or digit" "a control key is not one lowercase letter or digit"
VD034 "two controls, windows or shell keys share a key" "two controls, windows or shell keys share a key"
VD040 "an actor given to construction() is not buildable" "an actor given to construction() is not buildable"
VD041 "a buildable is declared twice" "a buildable is declared twice"
VD050 "dismemberment settings are invalid" "dismemberment settings are invalid"
VD051 "a cast has no look of that name" "a cast has no look of that name"
VD052 "a cast is invalid" "a cast is invalid"
VD060 "a cartridge's look is invalid" "a cartridge's look is invalid"
VD061 "a game window's options are invalid" "a game window's options are invalid"
VD070 "a blueprint module is invalid" "a blueprint module is invalid"
VD071 "two blueprint rooms overlap" "two blueprint rooms overlap"
VD072 "a blueprint doorway leads outside" "a blueprint doorway leads outside"
VD073 "two blueprint rooms disagree about a shared wall" "two blueprint rooms disagree about a shared wall"
VD074 "a styled blueprint piece has no buildable" "a styled blueprint piece has no buildable"
VD080 "local play seats more than one party" "local play seats more than one party"
VD083 "world lighting presentation is invalid" "world lighting presentation is invalid"
VD082 "camera presentation is invalid" "camera presentation is invalid"
VD085 "a worldgen room footprint or bay edge is invalid" "a worldgen room footprint or bay edge is invalid"
VD086 "worldgen rooms disagree at a shared edge" "worldgen rooms disagree at a shared edge"
VD087 "worldgen stairs or stairwells do not match" "worldgen stairs or stairwells do not match"
VD088 "an upper worldgen bay is unsupported" "an upper worldgen bay is unsupported"
VD089 "a worldgen room is unreachable or its entry misses the frontage" "a worldgen room is unreachable or its entry misses the frontage"
VD090 "a worldgen slot kind is undeclared" "a worldgen slot kind is undeclared"
VD091 "a worldgen building exceeds its piece limit" "a worldgen building exceeds its piece limit"
VD081 "page interest radius is invalid" "page interest radius is invalid"
VD092 "blueprint compilation is invalid" "blueprint compilation is invalid"
VD084 "generation key is invalid" "generation key is invalid"

FLOW_NEIGHBOURSconstant

Section titled “FLOW_NEIGHBOURS”
Signature
const FLOW_NEIGHBOURS: readonly [
readonly [0, 1],
readonly [1, 0],
readonly [0, -1],
readonly [-1, 0],
readonly [1, 1],
readonly [1, -1],
readonly [-1, 1],
readonly [-1, -1],
];

HordeTargetconstant

Section titled “HordeTarget”
Signature
const HordeTarget: ComponentDefinition<{
x: number;
z: number;
speed: number;
active: boolean;
profile: string;
}>;

Saved autonomous intent. An empty profile is a direct local destination.


presentationLightSchemaconstant

Section titled “presentationLightSchema”
Signature
const presentationLightSchema: ZodDiscriminatedUnion<
[
ZodReadonly<
ZodObject<
{
radius: ZodNumber;
color: ZodNumber;
intensity: ZodNumber;
height: ZodNumber;
kind: ZodLiteral<"point">;
},
$strict
>
>,
ZodReadonly<
ZodObject<
{
radius: ZodNumber;
color: ZodNumber;
intensity: ZodNumber;
height: ZodNumber;
kind: ZodLiteral<"cone">;
angle: ZodNumber;
},
$strict
>
>,
],
"kind"
>;

Presentation lights never participate in simulation sight or noise.


cartridgeLightingSchemaconstant

Section titled “cartridgeLightingSchema”
Signature
const cartridgeLightingSchema: ZodReadonly<ZodObject<{
sources: ZodOptional<ZodReadonly<ZodArray<ZodReadonly<ZodObject<{
visual: ZodString;
moods: ZodOptional<ZodReadonly<...>>;
light: ZodDiscriminatedUnion<[..., ...], "kind">;
}, $strict>>>>>;
occluders: ZodOptional<ZodReadonly<ZodArray<ZodReadonly<ZodObject<{
visual: ZodString;
height: ZodNumber;
}, $strict>>>>>;
pulses: ZodOptional<ZodReadonly<ZodArray<ZodReadonly<ZodObject<{
cue: ZodString;
light: ZodDiscriminatedUnion<[..., ...], "kind">;
ms: ZodNumber;
}, $strict>>>>>;
}, $strict>>;

Small, bounded authoring data; select committed visuals, not game callbacks.


MOODSconstant

Section titled “MOODS”
Signature
const MOODS: readonly ["day", "dusk", "night"];

The light a world is shown in. Every mood’s sky and light come from the declared palette.


moodSchemaconstant

Section titled “moodSchema”
Signature
const moodSchema: ZodEnum<{
day: "day";
dusk: "dusk";
night: "night";
}>;

Parses a mood from untrusted input (a URL parameter, a tool call).


terrainLookSchemaconstant

Section titled “terrainLookSchema”
Signature
const terrainLookSchema: ZodEnum<{
voxel: "voxel";
smooth: "smooth";
}>;

FULL_COLOURconstant

Section titled “FULL_COLOUR”
Signature
const FULL_COLOUR: Look;

Full colour: no palette constraint.


Partyconstant

Section titled “Party”
Signature
const Party: ComponentDefinition<Record<string, never>>;

Gameplay group identity. Membership and ownership are separate facts.


OwnedByconstant

Section titled “OwnedBy”
Signature
const OwnedBy: ComponentDefinition<{
player: string;
}>;

Stable player property. Access rules decide which operations it permits.


PartyMemberconstant

Section titled “PartyMember”
Signature
const PartyMember: ComponentDefinition<{
party: EntityId;
}>;

A person belongs to this party without duplicating their physical identity.


OwnedByPartyconstant

Section titled “OwnedByParty”
Signature
const OwnedByParty: ComponentDefinition<{
party: EntityId;
}>;

Party ownership for property and stationary stores.


StagedProcessconstant

Section titled “StagedProcess”
Signature
const StagedProcess: ComponentDefinition<{
version: number;
definition: string;
definitionVersion: number;
station: EntityId;
stageIndex: number;
progressSeconds: number;
enteredTick: number;
phase: "blocked" | "complete" | "working" | "waiting";
blockedReason: string;
}>;

FieldWaterWorkconstant

Section titled “FieldWaterWork”
Signature
const FieldWaterWork: ComponentDefinition<{
process: EntityId;
role: string;
generation: number;
party: EntityId;
destination: EntityId;
material: string;
retainInVessel: boolean;
portions: number;
vessel: EntityId | null;
cellX: number;
cellY: number;
cellZ: number;
lot: EntityId | null;
}>;

Native durable field-water acquisition intent. Once its lot is withdrawn, the native owner replaces this record with SupplyAllocation.


ResourceOrderconstant

Section titled “ResourceOrder”
Signature
const ResourceOrder: ComponentDefinition<{
definition: string;
cellX: number;
cellY: number;
cellZ: number;
status: ResourceOrderStatus;
progressSeconds: number;
reason: string;
}>;

Engine-owned durable intent for one tended resource lifecycle.


Spawnedconstant

Section titled “Spawned”
Signature
const Spawned: ComponentDefinition<{
cause: string;
digest: string;
}>;

Where the kernel keeps a spawned entity’s cause and request digest.


terrainChoiceSchemaconstant

Section titled “terrainChoiceSchema”
Signature
const terrainChoiceSchema: ZodDiscriminatedUnion<
[
ZodObject<
{
kind: ZodLiteral<"voxel">;
environment: ZodCustom<EnvironmentDefinition, EnvironmentDefinition>;
art: ZodCustom<
TerrainPresentationDefinition,
TerrainPresentationDefinition
>;
},
$strip
>,
ZodObject<
{
kind: ZodLiteral<"sea">;
environment: ZodCustom<EnvironmentDefinition, EnvironmentDefinition>;
art: ZodCustom<
TerrainPresentationDefinition,
TerrainPresentationDefinition
>;
},
$strip
>,
],
"kind"
>;

blockconstant

Section titled “block”
Signature
const block: Readonly<{
heading: (text) => object;
text: (text) => object;
check: (label, done) => object;
stat: (label, value, glyph?) => object;
meter: (label, value, max, tone, glyph?) => object;
items: (label, grid, items) => object;
action: (label, command, input?) => object;
keyAction: (label, shortcut, command, input?) => object;
clock: (label, options) => object;
portrait: (name, status, mood?) => object;
minimap: (label, grid, marks) => object;
offer: (label, price, command, options) => object;
recipe: (label, inputs, output, command, input?) => object;
notice: (text, tone?) => object;
group: (
id,
label,
blocks,
initiallyOpen,
) =>
| {
kind: "heading";
text: string;
}
| {
kind: "text";
text: string;
}
| {
kind: "check";
label: string;
done: boolean;
}
| {
kind: "stat";
label: string;
value: string | number;
glyph?: string;
}
| {
kind: "meter";
label: string;
value: number;
max: number;
tone?: "success" | "error" | "info" | "warning";
glyph?: string;
}
| {
kind: "items";
label: string;
columns: number;
rows: number;
items: object[];
}
| {
kind: "action";
label: string;
command: string;
input?: JSONType;
shortcut?: string;
}
| {
kind: "clock";
label: string;
detail?: string;
phase?: "day" | "dusk" | "night" | "dawn";
time?: boolean;
}
| {
kind: "portrait";
name: string;
status: string;
mood?: "ok" | "warn" | "bad";
}
| {
kind: "minimap";
label: string;
columns: number;
rows: number;
marks: object[];
}
| {
kind: "offer";
label: string;
price: string;
detail?: string;
act?: string;
command: string;
input?: JSONType;
}
| {
kind: "recipe";
label: string;
inputs: object[];
output: {
label: string;
glyph: string;
have?: number;
need?: number;
quantity?: number;
};
command: string;
input?: JSONType;
}
| {
kind: "notice";
text: string;
tone?: "success" | "error" | "info" | "warning";
}
| {
kind: "group";
id: string;
label: string;
initiallyOpen: boolean;
blocks: (
| {
kind: "heading";
text: string;
}
| {
kind: "text";
text: string;
}
| {
kind: "check";
label: string;
done: boolean;
}
| {
kind: "stat";
label: string;
value: string | number;
glyph?: string;
}
| {
kind: "meter";
label: string;
value: number;
max: number;
tone?: "success" | "error" | "info" | "warning";
glyph?: string;
}
| {
kind: "items";
label: string;
columns: number;
rows: number;
items: object[];
}
| {
kind: "action";
label: string;
command: string;
input?: JSONType;
shortcut?: string;
}
| {
kind: "clock";
label: string;
detail?: string;
phase?: "day" | "dusk" | "night" | "dawn";
time?: boolean;
}
| {
kind: "portrait";
name: string;
status: string;
mood?: "ok" | "warn" | "bad";
}
| {
kind: "minimap";
label: string;
columns: number;
rows: number;
marks: object[];
}
| {
kind: "offer";
label: string;
price: string;
detail?: string;
act?: string;
command: string;
input?: JSONType;
}
| {
kind: "recipe";
label: string;
inputs: object[];
output: {
label: string;
glyph: string;
have?: number;
need?: number;
quantity?: number;
};
command: string;
input?: JSONType;
}
| {
kind: "notice";
text: string;
tone?: "success" | "error" | "info" | "warning";
}
)[];
};
}>;

SHELL_KEYSconstant

Section titled “SHELL_KEYS”
Signature
const SHELL_KEYS: ReadonlyMap<string, string>;

Keys the player shell already owns: the dock (Build, Orders, Zones) and the camera turn. A cartridge key may not shadow them.


WorkParticipationconstant

Section titled “WorkParticipation”
Signature
const WorkParticipation: ComponentDefinition<{
automatic: boolean;
}>;

Player participation policy for the shared automatic work owner.


WorkPolicyconstant

Section titled “WorkPolicy”
Signature
const WorkPolicy: ComponentDefinition<{
pool: string;
priority: number;
enabled: boolean;
}>;

WorkExecutionconstant

Section titled “WorkExecution”
Signature
const WorkExecution: ComponentDefinition<{
pool: string;
initiatingPlayer: string | null;
policyId: string;
}>;

WorkScheduleconstant

Section titled “WorkSchedule”
Signature
const WorkSchedule: ComponentDefinition<{
nextReviewTick: number;
lastConsidered: number;
}>;

worldgenAssemblySchemaconstant

Section titled “worldgenAssemblySchema”
Signature
const worldgenAssemblySchema: ZodObject<{
floors: ZodArray<ZodObject<{
level: ZodNumber;
cells: ZodArray<ZodTuple<[ZodNumber, ZodNumber], null>>;
}, $strict>>;
levels: ZodArray<ZodObject<{
level: ZodNumber;
blueprint: ZodObject<{
pieces: ZodArray<ZodObject<{
kind: ZodEnum<...>;
cell: ZodTuple<..., ...>;
axis: ZodEnum<...>;
style: ZodOptional<...>;
}, $strict>>;
rooms: ZodArray<ZodObject<{
index: ZodNumber;
module: ZodString;
tags: ZodArray<...>;
cells: ZodArray<...>;
}, $strict>>;
slots: ZodArray<ZodObject<{
room: ZodNumber;
module: ZodString;
name: ZodString;
at: ZodTuple<..., ...>;
}, $strict>>;
}, $strict>;
}, $strict>>;
stairs: ZodArray<ZodObject<{
level: ZodNumber;
cell: ZodTuple<[ZodNumber, ZodNumber], null>;
facing: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
}, $strict>>;
}, $strict>;

roomDefinitionSchemaconstant

Section titled “roomDefinitionSchema”
Signature
const roomDefinitionSchema: ZodObject<{
id: ZodString;
pool: ZodArray<ZodString>;
footprint: ZodEnum<{
1x1: "1x1";
2x1: "2x1";
2x2: "2x2";
L3: "L3";
corridor2: "corridor2";
corridor3: "corridor3";
}>;
level: ZodEnum<{
any: "any";
ground: "ground";
upper: "upper";
}>;
edges: ZodRecord<ZodString, ZodTuple<[ZodEnum<{
door: "door";
archway: "archway";
window: "window";
wall: "wall";
}>, ZodEnum<{
door: "door";
archway: "archway";
window: "window";
wall: "wall";
}>, ZodEnum<{
door: "door";
archway: "archway";
window: "window";
wall: "wall";
}>], null>>;
stairs: ZodDefault<ZodArray<ZodObject<{
kind: ZodEnum<{
up: "up";
down: "down";
}>;
bay: ZodTuple<[ZodNumber, ZodNumber], null>;
facing: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
}, $strict>>>;
slots: ZodRecord<ZodString, ZodObject<{
at: ZodTuple<[ZodNumber, ZodNumber], null>;
kind: ZodString;
}, $strict>>;
styles: ZodDefault<ZodRecord<ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}> & $partial, ZodString>>;
}, $strict>;

buildingDefinitionSchemaconstant

Section titled “buildingDefinitionSchema”
Signature
const buildingDefinitionSchema: ZodObject<
{
rooms: ZodArray<
ZodObject<
{
id: ZodString;
room: ZodString;
at: ZodTuple<[ZodNumber, ZodNumber], null>;
level: ZodNumber;
rotate: ZodDefault<ZodNumber>;
mirror: ZodDefault<ZodBoolean>;
},
$strict
>
>;
entry: ZodObject<
{
node: ZodString;
edge: ZodString;
},
$strict
>;
frontage: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
},
$strict
>;

worldgenCheckSchemaconstant

Section titled “worldgenCheckSchema”
Signature
const worldgenCheckSchema: ZodDiscriminatedUnion<[ZodObject<{
status: ZodLiteral<"valid">;
value: ZodUnion<readonly [ZodObject<{
id: ZodString;
pool: ZodArray<ZodString>;
footprint: ZodEnum<{
1x1: "1x1";
2x1: "2x1";
2x2: "2x2";
L3: "L3";
corridor2: "corridor2";
corridor3: "corridor3";
}>;
level: ZodEnum<{
any: "any";
ground: "ground";
upper: "upper";
}>;
edges: ZodRecord<ZodString, ZodTuple<[..., ..., ...], null>>;
stairs: ZodDefault<ZodArray<ZodObject<..., ...>>>;
slots: ZodRecord<ZodString, ZodObject<{
at: ...;
kind: ...;
}, $strict>>;
styles: ZodDefault<ZodRecord<... & ..., ZodString>>;
}, $strict>, ZodObject<{
rooms: ZodArray<ZodObject<{
id: ...;
room: ...;
at: ...;
level: ...;
rotate: ...;
mirror: ...;
}, $strict>>;
entry: ZodObject<{
node: ZodString;
edge: ZodString;
}, $strict>;
frontage: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
}, $strict>]>;
preview: ZodObject<{
floors: ZodArray<ZodObject<{
level: ZodNumber;
cells: ZodArray<ZodTuple<..., ...>>;
}, $strict>>;
levels: ZodArray<ZodObject<{
level: ZodNumber;
blueprint: ZodObject<{
pieces: ...;
rooms: ...;
slots: ...;
}, $strict>;
}, $strict>>;
stairs: ZodArray<ZodObject<{
level: ZodNumber;
cell: ZodTuple<[..., ...], null>;
facing: ZodEnum<{
north: ...;
east: ...;
south: ...;
west: ...;
}>;
}, $strict>>;
}, $strict>;
neighbours: ZodArray<ZodObject<{
room: ZodString;
at: ZodTuple<[ZodNumber, ZodNumber], null>;
rotate: ZodNumber;
mirror: ZodBoolean;
preview: ZodObject<{
floors: ZodArray<ZodObject<..., ...>>;
levels: ZodArray<ZodObject<..., ...>>;
stairs: ZodArray<ZodObject<..., ...>>;
}, $strict>;
}, $strict>>;
}, $strict>, ZodObject<{
status: ZodLiteral<"invalid">;
diagnostics: ZodArray<ZodObject<{
code: ZodEnum<{
VD085: "VD085";
VD086: "VD086";
VD087: "VD087";
VD088: "VD088";
VD089: "VD089";
VD090: "VD090";
VD091: "VD091";
}>;
message: ZodString;
hint: ZodString;
path: ZodString;
}, $strict>>;
}, $strict>], "status">;

buildingLayoutSchemaconstant

Section titled “buildingLayoutSchema”
Signature
const buildingLayoutSchema: ZodObject<{
rooms: ZodArray<ZodObject<{
id: ZodString;
room: ZodObject<{
id: ZodString;
pool: ZodArray<ZodString>;
footprint: ZodEnum<{
1x1: "1x1";
2x1: "2x1";
2x2: "2x2";
L3: "L3";
corridor2: "corridor2";
corridor3: "corridor3";
}>;
level: ZodEnum<{
any: "any";
ground: "ground";
upper: "upper";
}>;
edges: ZodRecord<ZodString, ZodTuple<[ZodEnum<...>, ZodEnum<...>, ZodEnum<...>], null>>;
stairs: ZodDefault<ZodArray<ZodObject<{
kind: ...;
bay: ...;
facing: ...;
}, $strict>>>;
slots: ZodRecord<ZodString, ZodObject<{
at: ZodTuple<..., ...>;
kind: ZodString;
}, $strict>>;
styles: ZodDefault<ZodRecord<ZodEnum<...> & $partial, ZodString>>;
}, $strict>;
at: ZodTuple<[ZodInt, ZodInt], null>;
level: ZodInt;
rotate: ZodDefault<ZodInt>;
mirror: ZodDefault<ZodBoolean>;
}, $strict>>;
entry: ZodObject<{
node: ZodString;
edge: ZodString;
}, $strict>;
frontage: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
slotKinds: ZodArray<ZodString>;
}, $strict>;

buildingGraphSchemaconstant

Section titled “buildingGraphSchema”
Signature
const buildingGraphSchema: ZodObject<
{
type: ZodString;
storeys: ZodInt;
nodes: ZodArray<
ZodObject<
{
id: ZodString;
pool: ZodString;
count: ZodOptional<ZodNullable<ZodTuple<[ZodInt, ZodInt], null>>>;
level: ZodInt;
},
$strict
>
>;
edges: ZodArray<
ZodObject<
{
from: ZodString;
to: ZodString;
via: ZodEnum<{
door: "door";
archway: "archway";
stairs: "stairs";
}>;
},
$strict
>
>;
entry: ZodObject<
{
node: ZodString;
faces: ZodLiteral<"frontage">;
},
$strict
>;
},
$strict
>;

compileRequestSchemaconstant

Section titled “compileRequestSchema”
Signature
const compileRequestSchema: ZodObject<{
id: ZodString;
party: ZodString;
origin: ZodObject<{
x: ZodNumber;
y: ZodInt;
z: ZodNumber;
}, $strict>;
layout: ZodObject<{
rooms: ZodArray<ZodObject<{
id: ZodString;
room: ZodObject<{
id: ZodString;
pool: ZodArray<ZodString>;
footprint: ZodEnum<{
1x1: ...;
2x1: ...;
2x2: ...;
L3: ...;
corridor2: ...;
corridor3: ...;
}>;
level: ZodEnum<{
any: ...;
ground: ...;
upper: ...;
}>;
edges: ZodRecord<ZodString, ZodTuple<..., ...>>;
stairs: ZodDefault<ZodArray<...>>;
slots: ZodRecord<ZodString, ZodObject<..., ...>>;
styles: ZodDefault<ZodRecord<..., ...>>;
}, $strict>;
at: ZodTuple<[ZodInt, ZodInt], null>;
level: ZodInt;
rotate: ZodDefault<ZodInt>;
mirror: ZodDefault<ZodBoolean>;
}, $strict>>;
entry: ZodObject<{
node: ZodString;
edge: ZodString;
}, $strict>;
frontage: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
slotKinds: ZodArray<ZodString>;
}, $strict>;
kit: ZodObject<{
wall: ZodString;
door: ZodString;
window: ZodString;
floor: ZodString;
roof: ZodString;
stair: ZodString;
styles: ZodDefault<ZodRecord<ZodString, ZodObject<{
wall: ZodString;
door: ZodString;
window: ZodString;
}, $strict>>>;
}, $strict>;
}, $strict>;

generationIdentitySchemaconstant

Section titled “generationIdentitySchema”
Signature
const generationIdentitySchema: ZodObject<
{
seed: ZodString;
version: ZodLiteral<"worldgen-v1">;
kitHash: ZodString;
},
$strict
>;

populationPolicySchemaconstant

Section titled “populationPolicySchema”
Signature
const populationPolicySchema: ZodObject<{
party: ZodString;
townRadius: ZodInt;
fringeChunks: ZodInt;
fringePercent: ZodInt;
ruralPercent: ZodInt;
decorationPiecesPerStep: ZodDefault<ZodInt>;
rooms: ZodArray<ZodObject<{
id: ZodString;
pool: ZodArray<ZodString>;
footprint: ZodEnum<{
1x1: "1x1";
2x1: "2x1";
2x2: "2x2";
L3: "L3";
corridor2: "corridor2";
corridor3: "corridor3";
}>;
level: ZodEnum<{
any: "any";
ground: "ground";
upper: "upper";
}>;
edges: ZodRecord<ZodString, ZodTuple<[ZodEnum<{
door: "door";
archway: "archway";
window: "window";
wall: "wall";
}>, ZodEnum<{
door: "door";
archway: "archway";
window: "window";
wall: "wall";
}>, ZodEnum<{
door: "door";
archway: "archway";
window: "window";
wall: "wall";
}>], null>>;
stairs: ZodDefault<ZodArray<ZodObject<{
kind: ZodEnum<{
up: ...;
down: ...;
}>;
bay: ZodTuple<[..., ...], null>;
facing: ZodEnum<{
north: ...;
east: ...;
south: ...;
west: ...;
}>;
}, $strict>>>;
slots: ZodRecord<ZodString, ZodObject<{
at: ZodTuple<[ZodNumber, ZodNumber], null>;
kind: ZodString;
}, $strict>>;
styles: ZodDefault<ZodRecord<ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}> & $partial, ZodString>>;
}, $strict>>;
slotKinds: ZodArray<ZodString>;
buildings: ZodArray<ZodObject<{
id: ZodString;
weight: ZodInt;
building: ZodObject<{
rooms: ZodArray<ZodObject<{
id: ZodString;
room: ZodString;
at: ZodTuple<..., ...>;
level: ZodNumber;
rotate: ZodDefault<...>;
mirror: ZodDefault<...>;
}, $strict>>;
entry: ZodObject<{
node: ZodString;
edge: ZodString;
}, $strict>;
frontage: ZodEnum<{
north: "north";
east: "east";
south: "south";
west: "west";
}>;
}, $strict>;
}, $strict>>;
kit: ZodObject<{
wall: ZodString;
door: ZodString;
window: ZodString;
floor: ZodString;
roof: ZodString;
stair: ZodString;
styles: ZodDefault<ZodRecord<ZodString, ZodObject<{
wall: ZodString;
door: ZodString;
window: ZodString;
}, $strict>>>;
}, $strict>;
}, $strict>;

chunkPolicySchemaconstant

Section titled “chunkPolicySchema”
Signature
const chunkPolicySchema: ZodObject<{
identity: ZodObject<{
seed: ZodString;
version: ZodLiteral<"worldgen-v1">;
kitHash: ZodString;
}, $strict>;
focusComponent: ZodString;
chunkCells: ZodInt;
windowCells: ZodInt;
prefetchRings: ZodInt;
batchesPerStep: ZodInt;
population: ZodOptional<ZodObject<{
party: ZodString;
townRadius: ZodInt;
fringeChunks: ZodInt;
fringePercent: ZodInt;
ruralPercent: ZodInt;
decorationPiecesPerStep: ZodDefault<ZodInt>;
rooms: ZodArray<ZodObject<{
id: ZodString;
pool: ZodArray<ZodString>;
footprint: ZodEnum<{
1x1: "1x1";
2x1: "2x1";
2x2: "2x2";
L3: "L3";
corridor2: "corridor2";
corridor3: "corridor3";
}>;
level: ZodEnum<{
any: "any";
ground: "ground";
upper: "upper";
}>;
edges: ZodRecord<ZodString, ZodTuple<[..., ..., ...], null>>;
stairs: ZodDefault<ZodArray<ZodObject<..., ...>>>;
slots: ZodRecord<ZodString, ZodObject<{
at: ...;
kind: ...;
}, $strict>>;
styles: ZodDefault<ZodRecord<... & ..., ZodString>>;
}, $strict>>;
slotKinds: ZodArray<ZodString>;
buildings: ZodArray<ZodObject<{
id: ZodString;
weight: ZodInt;
building: ZodObject<{
rooms: ZodArray<...>;
entry: ZodObject<..., ...>;
frontage: ZodEnum<...>;
}, $strict>;
}, $strict>>;
kit: ZodObject<{
wall: ZodString;
door: ZodString;
window: ZodString;
floor: ZodString;
roof: ZodString;
stair: ZodString;
styles: ZodDefault<ZodRecord<ZodString, ZodObject<{
wall: ...;
door: ...;
window: ...;
}, $strict>>>;
}, $strict>;
}, $strict>>;
}, $strict>;

chunkWindowSchemaconstant

Section titled “chunkWindowSchema”
Signature
const chunkWindowSchema: ZodObject<
{
minX: ZodInt;
maxX: ZodInt;
minZ: ZodInt;
maxZ: ZodInt;
},
$strict
>;

chunkFactsSchemaconstant

Section titled “chunkFactsSchema”
Signature
const chunkFactsSchema: ZodObject<{
policy: ZodObject<{
identity: ZodObject<{
seed: ZodString;
version: ZodLiteral<"worldgen-v1">;
kitHash: ZodString;
}, $strict>;
focusComponent: ZodString;
chunkCells: ZodInt;
windowCells: ZodInt;
prefetchRings: ZodInt;
batchesPerStep: ZodInt;
population: ZodOptional<ZodObject<{
party: ZodString;
townRadius: ZodInt;
fringeChunks: ZodInt;
fringePercent: ZodInt;
ruralPercent: ZodInt;
decorationPiecesPerStep: ZodDefault<ZodInt>;
rooms: ZodArray<ZodObject<{
id: ZodString;
pool: ZodArray<...>;
footprint: ZodEnum<...>;
level: ZodEnum<...>;
edges: ZodRecord<..., ...>;
stairs: ZodDefault<...>;
slots: ZodRecord<..., ...>;
styles: ZodDefault<...>;
}, $strict>>;
slotKinds: ZodArray<ZodString>;
buildings: ZodArray<ZodObject<{
id: ZodString;
weight: ZodInt;
building: ZodObject<..., ...>;
}, $strict>>;
kit: ZodObject<{
wall: ZodString;
door: ZodString;
window: ZodString;
floor: ZodString;
roof: ZodString;
stair: ZodString;
styles: ZodDefault<ZodRecord<..., ...>>;
}, $strict>;
}, $strict>>;
}, $strict>;
defaultWindow: ZodObject<{
minX: ZodInt;
maxX: ZodInt;
minZ: ZodInt;
maxZ: ZodInt;
}, $strict>;
windows: ZodArray<ZodObject<{
actor: ZodString;
window: ZodObject<{
minX: ZodInt;
maxX: ZodInt;
minZ: ZodInt;
maxZ: ZodInt;
}, $strict>;
}, $strict>>;
materializedCount: ZodInt;
exhausted: ZodBoolean;
queuedCount: ZodInt;
}, $strict>;

generationKeySchemaconstant

Section titled “generationKeySchema”
Signature
const generationKeySchema: ZodObject<
{
identity: ZodObject<
{
seed: ZodString;
version: ZodLiteral<"worldgen-v1">;
kitHash: ZodString;
},
$strict
>;
layer: ZodString;
id: ZodString;
},
$strict
>;

generationKeyResultSchemaconstant

Section titled “generationKeyResultSchema”
Signature
const generationKeyResultSchema: ZodDiscriminatedUnion<
[
ZodObject<
{
status: ZodLiteral<"valid">;
key: ZodObject<
{
identity: ZodObject<
{
seed: ZodString;
version: ZodLiteral<"worldgen-v1">;
kitHash: ZodString;
},
$strict
>;
layer: ZodString;
id: ZodString;
},
$strict
>;
digest: ZodString;
},
$strict
>,
ZodObject<
{
status: ZodLiteral<"invalid">;
code: ZodLiteral<"VD084">;
message: ZodString;
hint: ZodString;
},
$strict
>,
],
"status"
>;

chunkPlanSchemaconstant

Section titled “chunkPlanSchema”
Signature
const chunkPlanSchema: ZodObject<
{
key: ZodObject<
{
x: ZodInt;
z: ZodInt;
},
$strict
>;
roads: ZodArray<
ZodObject<
{
minX: ZodInt;
maxX: ZodInt;
minZ: ZodInt;
maxZ: ZodInt;
},
$strict
>
>;
lots: ZodArray<
ZodObject<
{
id: ZodString;
building: ZodString;
origin: ZodTuple<[ZodInt, ZodInt], null>;
rotate: ZodInt;
mirror: ZodBoolean;
},
$strict
>
>;
},
$strict
>;

MEADOW_VERTICAL_METRESconstant

Section titled “MEADOW_VERTICAL_METRES”
Signature
const MEADOW_VERTICAL_METRES: 0.54 = 0.54;

Metres per vertical terrain cell in the library worlds.

isReservedComponent()function

Section titled “isReservedComponent()”
Signature
function isReservedComponent(id): boolean;
Parameter Type
id string

boolean


isNativeComponentSchema()function

Section titled “isNativeComponentSchema()”
Signature
function isNativeComponentSchema(id): boolean;

Native registration and mutation authority are distinct. These schemas are installed by the kernel even when a pack does not use them. Some accept scoped authored policy/intent, so they must not become reserved writes.

Parameter Type
id string

boolean


Signature
function component<T>(id, options): ComponentDefinition<T>;
Type Parameter
T extends object
Parameter Type
id `${string}.${string}`
options { version: number; fields: Readonly<Record<keyof T & string, FieldType>>; targetField?: keyof T & string; sourceRequires?: readonly `${string}.${string}`[]; targetRequires?: readonly `${string}.${string}`[]; onTargetRemoved?: RelationRemovalPolicy; allowSelf?: boolean; }
options.version number
options.fields Readonly<Record<keyof T & string, FieldType>>
options.targetField? keyof T & string
options.sourceRequires? readonly `${string}.${string}`[]
options.targetRequires? readonly `${string}.${string}`[]
options.onTargetRemoved? RelationRemovalPolicy
options.allowSelf? boolean

ComponentDefinition<T>


Signature
function relation<T>(id, options): ComponentDefinition<T>;

Register a one-target relation through the same component definition path.

Type Parameter
T extends object
Parameter Type
id `${string}.${string}`
options { version: number; fields: Readonly<Record<keyof T & string, FieldType>>; targetField: keyof T & string; sourceRequires?: readonly CapabilityReference[]; targetRequires?: readonly CapabilityReference[]; onTargetRemoved?: RelationRemovalPolicy; allowSelf?: boolean; }
options.version number
options.fields Readonly<Record<keyof T & string, FieldType>>
options.targetField keyof T & string
options.sourceRequires? readonly CapabilityReference[]
options.targetRequires? readonly CapabilityReference[]
options.onTargetRemoved? RelationRemovalPolicy
options.allowSelf? boolean

ComponentDefinition<T>


setRelation()function

Section titled “setRelation()”
Signature
function setRelation<T>(definition, source, target): ActionRequest;
Type Parameter
T extends object
Parameter Type
definition ComponentDefinition<T>
source EntityId
target EntityId

ActionRequest


clearRelation()function

Section titled “clearRelation()”
Signature
function clearRelation<T>(definition, source): ActionRequest;
Type Parameter
T extends object
Parameter Type
definition ComponentDefinition<T>
source EntityId

ActionRequest


Signature
function query<T>(...components): QuerySpec<T>;
Type Parameter
T extends object
Parameter Type
…components readonly ComponentDefinition<any>[]

QuerySpec<T>


Signature
function system(options): SystemDefinition;
Parameter Type
options SystemOptions

SystemDefinition


Signature
function command<TInput>(options): GameCommandDefinition;
Type Parameter
TInput
Parameter Type
options Omit<GameCommandDefinition, | "input" | "title" | "description" | "subjects" | "invoke" | "category" | "availability"> & object

GameCommandDefinition


Signature
function entity(id): EntityId;
Parameter Type
id string

EntityId


definitionCapability()function

Section titled “definitionCapability()”
Signature
function definitionCapability<T>(id, options): ActorDefinitionCapability<T>;
Type Parameter
T extends object
Parameter Type
id `${string}.${string}`
options { schema: ZodType<T>; externalCreation?: boolean; }
options.schema ZodType<T>
options.externalCreation? boolean

ActorDefinitionCapability<T>


Signature
function predicate(id, options): PredicateDefinition;
Parameter Type
id `${string}.${string}`
options { reads?: readonly ComponentDefinition<any>[]; facts?: readonly NativeFact[]; test: (subject, context) => boolean; }
options.reads? readonly ComponentDefinition<any>[]
options.facts? readonly NativeFact[]
options.test (subject, context) => boolean

PredicateDefinition


Signature
function action(id, options): BehaviorActionDefinition;
Parameter Type
id `${string}.${string}`
options { reads?: readonly ComponentDefinition<any>[]; writes?: readonly ComponentDefinition<any>[]; facts?: readonly NativeFact[]; exclusive?: string; run: (subject, context) => void; }
options.reads? readonly ComponentDefinition<any>[]
options.writes? readonly ComponentDefinition<any>[]
options.facts? readonly NativeFact[]
options.exclusive? string
options.run (subject, context) => void

BehaviorActionDefinition


Signature
function behavior(id, define, options?): BehaviorDefinition;

Prepare friendly behavior syntax into the existing checked system runtime. The callback records branches once; it never reads or mutates a live world.

Parameter Type
id `${string}.${string}`
define (scene) => void
options BehaviorOptions

BehaviorDefinition


installActorBehaviors()function

Section titled “installActorBehaviors()”
Signature
function installActorBehaviors(actors): readonly SystemDefinition[];

Pack preparation: install every attached behavior exactly once, with its subject membership compiled from the actors that attached it. Distinct behaviors sharing one id fail here, before any world starts.

Parameter Type
actors readonly ActorDefinition[]

readonly SystemDefinition[]


Signature
function actor(id, options?): ActorDefinition;

Compose an immutable actor definition; spawning remains an admitted world operation.

Parameter Type
id string
options { version?: number; }
options.version? number

ActorDefinition


blueprintModule()function

Section titled “blueprintModule()”
Signature
function blueprintModule(id, spec): BlueprintModule;

Declare one room. Openings and slots are checked against its size.

Parameter Type
id string
spec { size: readonly [number, number]; openings?: readonly BlueprintOpening[]; slots?: Readonly<Record<string, readonly [number, number]>>; tags?: readonly string[]; sides?: Readonly<Partial<Record<BlueprintSide, string>>>; }
spec.size readonly [number, number]
spec.openings? readonly BlueprintOpening[]
spec.slots? Readonly<Record<string, readonly [number, number]>>
spec.tags? readonly string[]
spec.sides? Readonly<Partial<Record<BlueprintSide, string>>>

BlueprintModule


assembleBlueprint()function

Section titled “assembleBlueprint()”
Signature
function assembleBlueprint(recipe): Blueprint;

Join a recipe’s rooms into one building. Rooms may not overlap; a wall two rooms share becomes one piece; a doorway must open into another room, and two rooms must agree on what fills a shared wall.

Parameter Type
recipe BlueprintRecipe

Blueprint


compileBlueprint()function

Section titled “compileBlueprint()”
Signature
function compileBlueprint(blueprint, kit): object;

Compile a ground-level blueprint through the same native owner as storeys.

Parameter Type
blueprint Blueprint
kit BlueprintKit

object

Name Type
plans readonly PlacementCandidate[]
unplaced readonly object[]

compileBlueprintLevels()function

Section titled “compileBlueprintLevels()”
Signature
function compileBlueprintLevels(levels, kit): object;

Rust compiles floors, facades, roofs and stairs bottom-up, leaves stairwells open and rejects unsupported upper rooms. TS supplies declarations and samples; construction keeps its existing site identity and transactional admission.

Parameter Type
levels readonly BlueprintLevel[]
kit BlueprintKit

object

Name Type
plans readonly PlacementCandidate[]
unplaced readonly object[]

prebuildBatches()function

Section titled “prebuildBatches()”
Signature
function prebuildBatches(party, plans): readonly ActionRequest[];

Plans split into prebuild actions of at most 256 structures each.

Parameter Type
party EntityId
plans readonly PlacementCandidate[]

readonly ActionRequest[]


Signature
function buildable(id, definition): ActorDefinition;

Declare a buildable once. Its structure catalog entry, build-bar binding, placement ghost and staged art all derive from this one definition.

Parameter Type Description
id string -
definition { name: string; sprites: string; geometry: | { kind: "fixture"; footprint: [number, number][]; } | { kind: "aperture"; height: number; openingBottom: number; openingHeight: number; closed?: boolean; } | { kind: "floor"; } | { kind: "cover"; } | { kind: "wall"; height: number; } | { kind: "stair"; run: number; rise: number; }; materials: object[]; workSeconds: number; workReachBelowCells: number; placement?: { alignment: "fixed" | "stroke"; facing?: { north: number; east: number; south: number; west: number; }; }; ports?: object[]; onRemove?: { salvage?: object[]; emptyPorts?: string[]; }; palette?: boolean; key?: string; } -
definition.name string The player-facing noun: “Build wall”, “stair north”.
definition.sprites string Sprite family; stages derive as `${sprites}.stakes frame finished(cells) or${sprites}.segment.${stage}.${axis}` (edges).
definition.geometry | { kind: "fixture"; footprint: [number, number][]; } | { kind: "aperture"; height: number; openingBottom: number; openingHeight: number; closed?: boolean; } | { kind: "floor"; } | { kind: "cover"; } | { kind: "wall"; height: number; } | { kind: "stair"; run: number; rise: number; } -
definition.materials object[] -
definition.workSeconds number -
definition.workReachBelowCells number -
definition.placement? { alignment: "fixed" | "stroke"; facing?: { north: number; east: number; south: number; west: number; }; } Optional gesture override. Omitted, the ghost, gesture and facing all derive from the geometry: boundaries stroke along a drag, everything else is fixed and turns through the four cardinal facings. Nobody authors a placement ghost; it is always the buildable’s own finished art.
definition.placement.alignment "fixed" | "stroke" -
definition.placement.facing? { north: number; east: number; south: number; west: number; } -
definition.placement.facing.north number -
definition.placement.facing.east number -
definition.placement.facing.south number -
definition.placement.facing.west number -
definition.ports? object[] -
definition.onRemove? { salvage?: object[]; emptyPorts?: string[]; } -
definition.onRemove.salvage? object[] -
definition.onRemove.emptyPorts? string[] -
definition.palette? boolean False: only a founding or a blueprint stands it (a cell’s bars, a police station’s cell door); players never plan one, so it has no build binding and the build command refuses it.
definition.key? string A key that picks this buildable while the build palette applies.

ActorDefinition


buildBindingDetail()function

Section titled “buildBindingDetail()”
Signature
function buildBindingDetail(compiled, orientation?): string;

Compact build-bar copy: cost, size, gesture and facing.

Parameter Type
compiled CompiledBuildable
orientation? string

string


construction()function

Section titled “construction()”
Signature
function construction(options): Construction;

The Construction extension: compile buildables once, derive every view. Its build command keeps at most 128 plans open (not yet finished) at once. Finished structures do not count toward that limit; the kernel’s caps on structure instances and cells bound how many a world can hold.

Parameter Type
options ConstructionOptions

Construction


defineCartridge()function

Section titled “defineCartridge()”
Signature
function defineCartridge(spec): Cartridge;

Compile one cartridge: install attached behaviors, collect components, encode the definition and environment, and derive the host variant. Every failure is thrown here, before any world starts.

Parameter Type
spec CartridgeSpec

Cartridge


Signature
function launch(launcher, ammunition, velocity): ActionRequest;

Velocity is in world axes, relative to the launcher’s motion.

Parameter Type
launcher EntityId
ammunition EntityId
velocity Vec3

ActionRequest


Signature
function displace(entity, delta): ActionRequest;

Bounded grounded knockback; the native owner checks obstacles and supports. A terrain walker (an actor with Traversal) is pushed as it would walk: the push stops at a wall, a closed door, a filled cell, a ledge past its step height or no floor, and the actor can be routed again from where it lands.

Parameter Type
entity EntityId
delta Vec3

ActionRequest


beginEmission()function

Section titled “beginEmission()”
Signature
function beginEmission(worker, station): ActionRequest;
Parameter Type
worker EntityId
station EntityId

ActionRequest


exchangeFieldWater()function

Section titled “exchangeFieldWater()”
Signature
function exchangeFieldWater(
operation,
worker,
vessel,
cell,
portions?,
): ActionRequest;
Parameter Type Default value
operation string undefined
worker EntityId undefined
vessel EntityId undefined
cell { x: number; y: number; z: number; } undefined
cell.x number undefined
cell.y number undefined
cell.z number undefined
portions number 1

ActionRequest


Signature
function move(entity, destination, facing?, speed?): ActionRequest;
Parameter Type Default value
entity EntityId undefined
destination MoveDestination undefined
facing number 0
speed? number undefined

ActionRequest


Signature
function dropLot(entity, lot): ActionRequest;
Parameter Type
entity EntityId
lot EntityId

ActionRequest


Signature
function transfer(lot, from, to, quantity): ActionRequest;
Parameter Type
lot EntityId
from EntityId
to EntityId
quantity number

ActionRequest


requestDelivery()function

Section titled “requestDelivery()”
Signature
function requestDelivery(request): ActionRequest;
Parameter Type
request { source: EntityId; destination: EntityId; material: string; quantity: number; party: EntityId; }
request.source EntityId
request.destination EntityId
request.material string
request.quantity number
request.party EntityId

ActionRequest


Signature
function consume(entity, lot, quantity): ActionRequest;
Parameter Type
entity EntityId
lot EntityId
quantity number

ActionRequest


extractResource()function

Section titled “extractResource()”
Signature
function extractResource(operation, worker, source): ActionRequest;
Parameter Type
operation string
worker EntityId
source EntityId

ActionRequest


establishResourceSite()function

Section titled “establishResourceSite()”
Signature
function establishResourceSite(
operation,
worker,
site,
definition,
cell,
): ActionRequest;
Parameter Type
operation string
worker EntityId
site EntityId
definition string
cell { x: number; y: number; z: number; }
cell.x number
cell.y number
cell.z number

ActionRequest


tendResourceSite()function

Section titled “tendResourceSite()”
Signature
function tendResourceSite(operation, worker, site, vessel): ActionRequest;
Parameter Type
operation string
worker EntityId
site EntityId
vessel EntityId

ActionRequest


encodeDefinition()function

Section titled “encodeDefinition()”
Signature
function encodeDefinition(
game,
components,
initial?,
materialCatalog,
stockpileProfiles?,
actors?,
): Uint8Array<ArrayBuffer>;
Parameter Type Default value
game string undefined
components readonly ComponentDefinition<any>[] undefined
initial readonly SceneEntity[] []
materialCatalog readonly object[] undefined
stockpileProfiles readonly object[] []
actors readonly ActorDefinition[] []

Uint8Array<ArrayBuffer>


cancelWork()function

Section titled “cancelWork()”
Signature
function cancelWork(entity): ActionRequest;
Parameter Type
entity EntityId

ActionRequest


compileBuildable()function

Section titled “compileBuildable()”
Signature
function compileBuildable(actor): CompiledBuildable | null;

Compile one actor capability set into the existing native structure owner.

Parameter Type
actor ActorDefinition

CompiledBuildable | null


compileBuildableEnvironment()function

Section titled “compileBuildableEnvironment()”
Signature
function compileBuildableEnvironment(
environment,
actors,
): EnvironmentDefinition;

Add actor-authored structures to one environment and run its full validator.

Parameter Type
environment EnvironmentDefinition
actors readonly ActorDefinition[]

EnvironmentDefinition


constructionCandidates()function

Section titled “constructionCandidates()”
Signature
function constructionCandidates(
definition,
alignment,
raw,
namespace,
): readonly PlacementCandidate[];

Compile a creator gesture into canonical physical proposals. The definition owns geometry; this layer owns normalization; native placement owns permission.

Parameter Type
definition EnvironmentStructureDefinition
alignment PlacementAlignment
raw { catalog: string; orientation?: "north" | "east" | "south" | "west"; target: | { cell: [number, number, number]; } | { area: { start: [number, number, number]; end: [number, number, number]; }; } | { edges: object[]; }; }
raw.catalog string
raw.orientation? "north" | "east" | "south" | "west"
raw.target | { cell: [number, number, number]; } | { area: { start: [number, number, number]; end: [number, number, number]; }; } | { edges: object[]; }
namespace string

readonly PlacementCandidate[]


constructionPlanActions()function

Section titled “constructionPlanActions()”
Signature
function constructionPlanActions(options): readonly ActionRequest[];

Turn checked proposals into ordinary engine actions. This resolves existing floors and duplicate sites; native action admission still rechecks all laws.

Parameter Type
options ConstructionPlanOptions

readonly ActionRequest[]


constructionTarget()function

Section titled “constructionTarget()”
Signature
function constructionTarget(site): ConstructionTarget;

Decode the native flat component wire into its exhaustive physical target.

Parameter Type
site ConstructionSiteState

ConstructionTarget


constructionCell()function

Section titled “constructionCell()”
Signature
function constructionCell(site): Vec3;
Parameter Type
site ConstructionSiteState

Vec3


replaceFloor()function

Section titled “replaceFloor()”
Signature
function replaceFloor(orderId, existingFloorId, desiredCatalog): ActionRequest;
Parameter Type
orderId EntityId
existingFloorId EntityId
desiredCatalog string

ActionRequest


planConstructions()function

Section titled “planConstructions()”
Signature
function planConstructions(party, plans): ActionRequest;
Parameter Type
party EntityId
plans readonly PlacementCandidate[]

ActionRequest


prebuildStructures()function

Section titled “prebuildStructures()”
Signature
function prebuildStructures(party, plans): ActionRequest;

Stand structures up at once, finished, with no work and no materials: the buildings a fresh world starts with (a town, a harbour, a starter base). They are ordinary finished sites afterwards: workers deconstruct them, rules break them. Issue it once (a starting rule with a saved flag, or the world’s opening actions); a restored world already has them. All the plans stand, or none do.

Parameter Type
party EntityId
plans readonly PlacementCandidate[]

ActionRequest


bindConstructionStage()function

Section titled “bindConstructionStage()”
Signature
function bindConstructionStage(site, contact): ActionRequest;
Parameter Type
site EntityId
contact Vec3

ActionRequest


setStructureOpen()function

Section titled “setStructureOpen()”
Signature
function setStructureOpen(worker, site, open): ActionRequest;

Request a desired aperture state; native contact and physical admission decide.

Parameter Type
worker EntityId
site EntityId
open boolean

ActionRequest


breakStructure()function

Section titled “breakStructure()”
Signature
function breakStructure(site): ActionRequest;

Break a finished structure: the native teardown deconstruction uses, but with no worker (a wall smashed, a door torn off, a dock blown apart). Any salvage the buildable declares lands as ground stock where it stood. The game decides when; the engine keeps no hit points of its own.

Parameter Type
site EntityId

ActionRequest


deconstruct()function

Section titled “deconstruct()”
Signature
function deconstruct(worker, site): ActionRequest;
Parameter Type
worker EntityId
site EntityId

ActionRequest


formatDiagnostic()function

Section titled “formatDiagnostic()”
Signature
function formatDiagnostic(diagnostic): string;

VD013 <message>\n hint: <hint> — the terminal and overlay rendering.

Parameter Type
diagnostic Diagnostic

string


Signature
function fail(code, message, hint, path?): never;

Throw one diagnostic.

Parameter Type Default value
code | "VD001" | "VD002" | "VD003" | "VD004" | "VD005" | "VD006" | "VD007" | "VD008" | "VD009" | "VD010" | "VD011" | "VD012" | "VD013" | "VD014" | "VD015" | "VD016" | "VD017" | "VD020" | "VD021" | "VD022" | "VD023" | "VD024" | "VD025" | "VD030" | "VD031" | "VD032" | "VD033" | "VD034" | "VD040" | "VD041" | "VD050" | "VD051" | "VD052" | "VD060" | "VD061" | "VD070" | "VD071" | "VD072" | "VD073" | "VD074" | "VD080" | "VD083" | "VD082" | "VD085" | "VD086" | "VD087" | "VD088" | "VD089" | "VD090" | "VD091" | "VD081" | "VD092" | "VD084" undefined
message string undefined
hint string undefined
path readonly (string | number)[] []

never


Signature
function effect<T>(id, fields): Effect<T>;

Declare an effect record kind. Its records live keep seconds after the producer’s sweep; a consumer that runs every step sees each one once.

Type Parameter
T extends object
Parameter Type Description
id `${string}.${string}` -
fields EffectFields<T> Every field, at and seq included: { ..., at: "number", seq: "number" }.

Effect<T>


createFeedback()function

Section titled “createFeedback()”
Signature
function createFeedback<Weapon, Simple, Swing>(
profile,
): Readonly<{
swing: AuthoredFeedbackCue;
hit: AuthoredFeedbackCue;
shot: AuthoredFeedbackCue;
splatSize: number;
splat: AuthoredFeedbackCue;
wound: AuthoredFeedbackCue;
cue: AuthoredFeedbackCue;
}>;

The engine constructs cues; the cartridge supplies only words, assets and tuning.

Type Parameter
Weapon extends string
Simple extends string
Swing extends string
Parameter Type
profile FeedbackProfile<Weapon, Simple, Swing>

Readonly<{ swing: AuthoredFeedbackCue; hit: AuthoredFeedbackCue; shot: AuthoredFeedbackCue; splatSize: number; splat: AuthoredFeedbackCue; wound: AuthoredFeedbackCue; cue: AuthoredFeedbackCue; }>


Signature
function felt(cue, by): readonly AuthoredFeedbackCue[];

One cue split for a shared world: what everyone near it sees (the word, the flash, the sound, the bits), and what only by, the actor who landed it, fired it or took it, feels (the freeze, the slow-mo, the kick, the rumble, the screen tint). Another viewer sees the shared contact without their own screen stopping. Both name by as subject, so the owner’s client can match them to what it already predicted.

Parameter Type
cue AuthoredFeedbackCue
by string

readonly AuthoredFeedbackCue[]


hordeMovement()function

Section titled “hordeMovement()”
Signature
function hordeMovement(options?): HordeSimulation;

Geometry is projected once per phase; all bodies share fields and neighbour lookup.

Parameter Type
options { geometry?: { reads: readonly `${string}.${string}`[]; project: readonly FlowGeometry[]; }; steering?: { radius?: number; separation?: number; alignment?: number; neighbours?: number; candidates?: number; }; }
options.geometry? { reads: readonly `${string}.${string}`[]; project: readonly FlowGeometry[]; }
options.geometry.reads readonly `${string}.${string}`[]
options.geometry.project
options.steering? { radius?: number; separation?: number; alignment?: number; neighbours?: number; candidates?: number; }
options.steering.radius? number
options.steering.separation? number
options.steering.alignment? number
options.steering.neighbours? number
options.steering.candidates? number

HordeSimulation


perceptionFrame()function

Section titled “perceptionFrame()”
Signature
function perceptionFrame(input, geometry?): object;

Immutable, step-local sensor frame. Games supply emitters, targets and geometry.

Parameter Type
input { targets: object[]; sounds: object[]; now: number; soundBarrierLoss: number; }
input.targets object[]
input.sounds? object[]
input.now? number
input.soundBarrierLoss? number
geometry? { sight: FlowNavigation; sound: FlowNavigation; }
geometry.sight? FlowNavigation
geometry.sound? FlowNavigation

object

Name Type
targets readonly object[]
observe() (input) => object

assignHordeSlots()function

Section titled “assignHordeSlots()”
Signature
function assignHordeSlots(input): ReadonlyMap<EntityId, HordeSlotAssignment>;

Nearest eligible bodies fill interchangeable slots; one body and one occupant per slot.

Parameter Type
input { slots: readonly HordeSlot[]; bodies: readonly HordeSlotBody[]; }
input.slots readonly HordeSlot[]
input.bodies readonly HordeSlotBody[]

ReadonlyMap<EntityId, HordeSlotAssignment>


localSteering()function

Section titled “localSteering()”
Signature
function localSteering(input): object;

Stateless local steering. Native collision remains the final movement authority.

Parameter Type
input { radius?: number; separation?: number; alignment?: number; neighbours?: number; candidates?: number; }
input.radius? number
input.separation? number
input.alignment? number
input.neighbours? number
input.candidates? number

object

Name Type
advance() (input) => object

resolveLook()function

Section titled “resolveLook()”
Signature
function resolveLook(spec): Look;

Check a cartridge’s look. Throws a coded VD diagnostic on a bad look.

Parameter Type
spec LookSpec | undefined

Look


ambientLightForMood()function

Section titled “ambientLightForMood()”
Signature
function ambientLightForMood(look, mood): number;

Brightness follows the one mood chosen by the cartridge’s presentation.

Parameter Type
look Look
mood "day" | "dusk" | "night"

number


Signature
function moodAt(look, seconds): "day" | "dusk" | "night";

The mood a look shows at committed world time seconds: the last stop at or before it, else the look’s own mood. Full colour is always day.

Parameter Type
look Look
seconds number

"day" | "dusk" | "night"


instantiateActors()function

Section titled “instantiateActors()”
Signature
function instantiateActors(bindingId, expectedSequence, plan): ActionRequest;
Parameter Type
bindingId string
expectedSequence number
plan ActorInstantiationPlan

ActionRequest


partyMemberIds()function

Section titled “partyMemberIds()”
Signature
function partyMemberIds(read, viewer): ReadonlySet<EntityId>;

The people of a player viewer’s parties (PartyMember of a party whose OwnedBy names them): their characters, as distinct from other things they own (a party’s own bookkeeping marker, a stash).

Parameter Type
read <T>(spec) => QueryView<T>
viewer CommandScope

ReadonlySet<EntityId>


ownedActorIds()function

Section titled “ownedActorIds()”
Signature
function ownedActorIds(read, viewer): ReadonlySet<EntityId>;
Parameter Type
read <T>(spec) => QueryView<T>
viewer CommandScope

ReadonlySet<EntityId>


definePhaseCycle()function

Section titled “definePhaseCycle()”
Signature
function definePhaseCycle<Phase>(definitions): object;

A repeating, simulation-time schedule. Games declare phases; the engine owns boundary progression. Only the returned clock needs to be saved.

Type Parameter
Phase extends string
Parameter Type
definitions readonly object[]

object

Name Type
seconds number
duration() (id) => number
advance() (clock, now) => PhaseAdvance<Phase>

requestProcess()function

Section titled “requestProcess()”
Signature
function requestProcess(definition, station): object;
Parameter Type
definition string
station EntityId

object

Name Type
kind "request-process"
definition string
station EntityId

admitProcess()function

Section titled “admitProcess()”
Signature
function admitProcess(process, definition, station): object;
Parameter Type
process EntityId
definition string
station EntityId

object

Name Type
kind "admit-process"
process EntityId
definition string
station EntityId

Signature
function place(actor, options): Placement;

Put an actor in the starting scene. id defaults to ${actor.id}.${n} in placement order; give one when other content refers to the entity.

Parameter Type
actor ActorDefinition
options { at: Cell2; id?: string; params?: Readonly<Record<string, string | number | boolean | null>>; surface?: "sea"; }
options.at Cell2
options.id? string
options.params? Readonly<Record<string, string | number | boolean | null>>
options.surface? "sea"

Placement


compileScene()function

Section titled “compileScene()”
Signature
function compileScene(scene): CompiledScene;

Compile placements into the fresh world’s records and surface settling.

Parameter Type
scene readonly Placement[]

CompiledScene


Signature
function spawn(actor, options): ActionRequest;

Spawn one actor into a running world (from a rule or a command). The receipt is the new entity’s id and makes the request idempotent. A cell chooses terrain height; a native standing contact preserves its support height and is checked for clearance and occupancy before spawning.

Parameter Type
actor ActorDefinition
options { receipt: string; cause: string; at: Cell2 | Vec3 & object; params?: Readonly<Record<string, string | number | boolean | null>>; refs?: Readonly<Record<string, EntityId>>; }
options.receipt string
options.cause string
options.at Cell2 | Vec3 & object
options.params? Readonly<Record<string, string | number | boolean | null>>
options.refs? Readonly<Record<string, EntityId>>

ActionRequest


defineSeatGoal()function

Section titled “defineSeatGoal()”
Signature
function defineSeatGoal<F>(goal): SeatGoal;

Erase the goal’s fact shape after binding its scorer to that same shape.

Type Parameter
F extends Readonly<Record<string, number>>
Parameter Type
goal SeatGoal<F>

SeatGoal


Signature
function voxel(input): VoxelTerrainChoice;
Parameter Type
input { environment: EnvironmentDefinition; art: TerrainPresentationDefinition; }
input.environment EnvironmentDefinition
input.art TerrainPresentationDefinition

VoxelTerrainChoice


seaTerrain()function

Section titled “seaTerrain()”
Signature
function seaTerrain(input): SeaTerrainChoice;

A voxel environment whose wet columns are presented at the sea line.

Parameter Type
input { environment: EnvironmentDefinition; art: TerrainPresentationDefinition; }
input.environment EnvironmentDefinition
input.art TerrainPresentationDefinition

SeaTerrainChoice


actorTarget()function

Section titled “actorTarget()”
Signature
function actorTarget<T>(component): object;

One actor target contract for the command parser, subject projection, and local click binding. Admission still belongs to the command’s run handler.

Type Parameter
T extends object
Parameter Type
component ComponentDefinition<T>

object

Name Type
input ZodObject<{ entity: ZodString; }>
subjects() (context) => readonly EntityId[]
binding Pick<GameLocalBinding, "target" | "component">

gameWindow()function

Section titled “gameWindow()”
Signature
function gameWindow(id, spec): CartridgeWindow;

Declare a game window as data. The game shell (@fungi.computer/vishnu-ui) draws it by its role with the shared kit (a floating Caps panel by default), and it gets a Whistle command ui:<id> so a key, the palette, a menu and a remote player all open it the same way.

Parameter Type
id string
spec object & object

CartridgeWindow


checkWindows()function

Section titled “checkWindows()”
Signature
function checkWindows(windows): readonly CartridgeWindow[];

Cartridge-wide checks: unique ids and non-conflicting keys.

Parameter Type
windows readonly CartridgeWindow[]

readonly CartridgeWindow[]


Signature
function checkKeys(windows, controls): void;

Every single-key shortcut a cartridge declares (window keys and command control keys) is distinct and clear of the shell’s own keys.

Parameter Type
windows readonly CartridgeWindow[]
controls readonly object[]

void


windowContents()function

Section titled “windowContents()”
Signature
function windowContents(windows): (world) => readonly Readonly<{
id: string;
blocks: readonly (
| {
kind: "heading";
text: string;
}
| {
kind: "text";
text: string;
}
| {
kind: "check";
label: string;
done: boolean;
}
| {
kind: "stat";
label: string;
value: string | number;
glyph?: string;
}
| {
kind: "meter";
label: string;
value: number;
max: number;
tone?: "success" | "error" | "info" | "warning";
glyph?: string;
}
| {
kind: "items";
label: string;
columns: number;
rows: number;
items: object[];
}
| {
kind: "action";
label: string;
command: string;
input?: JSONType;
shortcut?: string;
}
| {
kind: "clock";
label: string;
detail?: string;
phase?: "day" | "dusk" | "night" | "dawn";
time?: boolean;
}
| {
kind: "portrait";
name: string;
status: string;
mood?: "ok" | "warn" | "bad";
}
| {
kind: "minimap";
label: string;
columns: number;
rows: number;
marks: object[];
}
| {
kind: "offer";
label: string;
price: string;
detail?: string;
act?: string;
command: string;
input?: JSONType;
}
| {
kind: "recipe";
label: string;
inputs: object[];
output: {
label: string;
glyph: string;
have?: number;
need?: number;
quantity?: number;
};
command: string;
input?: JSONType;
}
| {
kind: "notice";
text: string;
tone?: "success" | "error" | "info" | "warning";
}
| {
kind: "group";
id: string;
label: string;
initiallyOpen: boolean;
blocks: (
| {
kind: "heading";
text: string;
}
| {
kind: "text";
text: string;
}
| {
kind: "check";
label: string;
done: boolean;
}
| {
kind: "stat";
label: string;
value: ... | ...;
glyph?: ... | ...;
}
| {
kind: "meter";
label: string;
value: number;
max: number;
tone?: ... | ... | ... | ... | ...;
glyph?: ... | ...;
}
| {
kind: "items";
label: string;
columns: number;
rows: number;
items: ...[];
}
| {
kind: "action";
label: string;
command: string;
input?: ... | ...;
shortcut?: ... | ...;
}
| {
kind: "clock";
label: string;
detail?: ... | ...;
phase?: ... | ... | ... | ... | ...;
time?: ... | ... | ...;
}
| {
kind: "portrait";
name: string;
status: string;
mood?: ... | ... | ... | ...;
}
| {
kind: "minimap";
label: string;
columns: number;
rows: number;
marks: ...[];
}
| {
kind: "offer";
label: string;
price: string;
detail?: ... | ...;
act?: ... | ...;
command: string;
input?: ... | ...;
}
| {
kind: "recipe";
label: string;
inputs: ...[];
output: {
label: ...;
glyph: ...;
have?: ...;
need?: ...;
quantity?: ...;
};
command: string;
input?: ... | ...;
}
| {
kind: "notice";
text: string;
tone?: ... | ... | ... | ... | ...;
})[];
})[];
}>[];

Compile window bodies into the presentation projection.

Parameter Type
windows readonly CartridgeWindow[]

(world) => readonly Readonly<{ id: string; blocks: readonly ( | { kind: "heading"; text: string; } | { kind: "text"; text: string; } | { kind: "check"; label: string; done: boolean; } | { kind: "stat"; label: string; value: string | number; glyph?: string; } | { kind: "meter"; label: string; value: number; max: number; tone?: "success" | "error" | "info" | "warning"; glyph?: string; } | { kind: "items"; label: string; columns: number; rows: number; items: object[]; } | { kind: "action"; label: string; command: string; input?: JSONType; shortcut?: string; } | { kind: "clock"; label: string; detail?: string; phase?: "day" | "dusk" | "night" | "dawn"; time?: boolean; } | { kind: "portrait"; name: string; status: string; mood?: "ok" | "warn" | "bad"; } | { kind: "minimap"; label: string; columns: number; rows: number; marks: object[]; } | { kind: "offer"; label: string; price: string; detail?: string; act?: string; command: string; input?: JSONType; } | { kind: "recipe"; label: string; inputs: object[]; output: { label: string; glyph: string; have?: number; need?: number; quantity?: number; }; command: string; input?: JSONType; } | { kind: "notice"; text: string; tone?: "success" | "error" | "info" | "warning"; } | { kind: "group"; id: string; label: string; initiallyOpen: boolean; blocks: ( | { kind: "heading"; text: string; } | { kind: "text"; text: string; } | { kind: "check"; label: string; done: boolean; } | { kind: "stat"; label: string; value: … | …; glyph?: … | …; } | { kind: "meter"; label: string; value: number; max: number; tone?: … | … | … | … | …; glyph?: … | …; } | { kind: "items"; label: string; columns: number; rows: number; items: …[]; } | { kind: "action"; label: string; command: string; input?: … | …; shortcut?: … | …; } | { kind: "clock"; label: string; detail?: … | …; phase?: … | … | … | … | …; time?: … | … | …; } | { kind: "portrait"; name: string; status: string; mood?: … | … | … | …; } | { kind: "minimap"; label: string; columns: number; rows: number; marks: …[]; } | { kind: "offer"; label: string; price: string; detail?: … | …; act?: … | …; command: string; input?: … | …; } | { kind: "recipe"; label: string; inputs: …[]; output: { label: …; glyph: …; have?: …; need?: …; quantity?: …; }; command: string; input?: … | …; } | { kind: "notice"; text: string; tone?: … | … | … | … | …; })[]; })[]; }>[]


workAttemptsFor()function

Section titled “workAttemptsFor()”
Signature
function workAttemptsFor(context, tasks): readonly WorkAttempt[];

Query native attempt ownership without leaking the port’s non-empty batch contract.

Parameter Type
context Pick<ReadContext, "workAttempts">
tasks readonly EntityId[]

readonly WorkAttempt[]


workAttempt()function

Section titled “workAttempt()”
Signature
function workAttempt(context, task): WorkAttempt | null;

Read the one native attempt projection for a task.

Parameter Type
context Pick<ReadContext, "workAttempts">
task EntityId

WorkAttempt | null


beginRouteWorkAttempt()function

Section titled “beginRouteWorkAttempt()”
Signature
function beginRouteWorkAttempt(context, task, worker, destination): void;
Parameter Type
context Pick<WriteContext, "action">
task EntityId
worker EntityId
destination MoveDestination

void


interruptWorkAttempt()function

Section titled “interruptWorkAttempt()”
Signature
function interruptWorkAttempt(context, attempt, operationSequence, cause): void;
Parameter Type
context Pick<WriteContext, "action">
attempt WorkAttemptKey
operationSequence number
cause WorkInterruptCause

void


retargetRouteWorkAttempt()function

Section titled “retargetRouteWorkAttempt()”
Signature
function retargetRouteWorkAttempt(
context,
attempt,
operationSequence,
destination,
): void;

Replace only the current route operation, preserving its attempt generation.

Parameter Type
context Pick<WriteContext, "action">
attempt WorkAttemptKey
operationSequence number
destination MoveDestination

void


continueRouteWorkAttempt()function

Section titled “continueRouteWorkAttempt()”
Signature
function continueRouteWorkAttempt(
context,
attempt,
operationSequence,
destination,
): void;
Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
destination MoveDestination

void


acknowledgeWorkAttempt()function

Section titled “acknowledgeWorkAttempt()”
Signature
function acknowledgeWorkAttempt(context, attempt, operationSequence): void;

Acknowledge only the currently projected terminal operation.

Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number

void


continueDeconstructionWorkAttempt()function

Section titled “continueDeconstructionWorkAttempt()”
Signature
function continueDeconstructionWorkAttempt(
context,
attempt,
operationSequence,
site,
contact,
): void;
Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
site EntityId
contact ConstructionAccessContact

void


continueResourceEstablishWorkAttempt()function

Section titled “continueResourceEstablishWorkAttempt()”
Signature
function continueResourceEstablishWorkAttempt(
context,
attempt,
operationSequence,
site,
definition,
cell,
): void;
Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
site EntityId
definition string
cell readonly [number, number, number]

void


continueResourceTendWorkAttempt()function

Section titled “continueResourceTendWorkAttempt()”
Signature
function continueResourceTendWorkAttempt(
context,
attempt,
operationSequence,
site,
vessel,
): void;
Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
site EntityId
vessel EntityId

void


continueResourceExtractWorkAttempt()function

Section titled “continueResourceExtractWorkAttempt()”
Signature
function continueResourceExtractWorkAttempt(
context,
attempt,
operationSequence,
source,
): void;
Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
source EntityId

void


continueFieldWaterWorkAttempt()function

Section titled “continueFieldWaterWorkAttempt()”
Signature
function continueFieldWaterWorkAttempt(
context,
attempt,
operationSequence,
vessel,
cell,
direction,
portions,
): void;
Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
vessel EntityId
cell readonly [number, number, number]
direction "withdraw" | "deposit"
portions number

void


continueMaterialTransferAttempt()function

Section titled “continueMaterialTransferAttempt()”
Signature
function continueMaterialTransferAttempt(
context,
attempt,
operationSequence,
lot,
from,
to,
quantity,
): void;

Continue one admitted attempt through the native material transfer owner.

Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
lot EntityId
from EntityId
to EntityId
quantity number

void


continueMaterialDropAttempt()function

Section titled “continueMaterialDropAttempt()”
Signature
function continueMaterialDropAttempt(
context,
attempt,
operationSequence,
lot,
): void;

Continue an admitted attempt through the native ground-custody owner.

Parameter Type
context Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts">
attempt WorkAttemptKey
operationSequence number
lot EntityId

void


Signature
function checkRoom(json, context): object;

JSON syntax and authored geometry are decoded together at the native boundary.

Parameter Type
json string
context string

object

Name Type Default value
status "valid" -
value | { id: string; pool: string[]; footprint: "1x1" | "2x1" | "2x2" | "L3" | "corridor2" | "corridor3"; level: "any" | "ground" | "upper"; edges: Record<string, ["door" | "archway" | "window" | "wall", "door" | "archway" | "window" | "wall", "door" | "archway" | "window" | "wall"]>; stairs: object[]; slots: Record<string, { at: [number, number]; kind: string; }>; styles: Partial<Record<"north" | "east" | "south" | "west", string>>; } | { rooms: object[]; entry: { node: string; edge: string; }; frontage: "north" | "east" | "south" | "west"; } -
preview object worldgenAssemblySchema
preview.floors object[] -
preview.levels object[] -
preview.stairs object[] -
neighbours object[] -

checkBuilding()function

Section titled “checkBuilding()”
Signature
function checkBuilding(json, context): object;
Parameter Type
json string
context string

object

Name Type Default value
status "valid" -
value | { id: string; pool: string[]; footprint: "1x1" | "2x1" | "2x2" | "L3" | "corridor2" | "corridor3"; level: "any" | "ground" | "upper"; edges: Record<string, ["door" | "archway" | "window" | "wall", "door" | "archway" | "window" | "wall", "door" | "archway" | "window" | "wall"]>; stairs: object[]; slots: Record<string, { at: [number, number]; kind: string; }>; styles: Partial<Record<"north" | "east" | "south" | "west", string>>; } | { rooms: object[]; entry: { node: string; edge: string; }; frontage: "north" | "east" | "south" | "west"; } -
preview object worldgenAssemblySchema
preview.floors object[] -
preview.levels object[] -
preview.stairs object[] -
neighbours object[] -

compileBuilding()function

Section titled “compileBuilding()”
Signature
function compileBuilding(request): object;

Rust compiles all geometry and bounded host actions; the action owner decodes them.

Parameter Type
request { id: string; party: string; origin: { x: number; y: number; z: number; }; layout: { rooms: object[]; entry: { node: string; edge: string; }; frontage: "north" | "east" | "south" | "west"; slotKinds: string[]; }; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }
request.id string
request.party string
request.origin { x: number; y: number; z: number; }
request.origin.x number
request.origin.y number
request.origin.z number
request.layout { rooms: object[]; entry: { node: string; edge: string; }; frontage: "north" | "east" | "south" | "west"; slotKinds: string[]; }
request.layout.rooms object[]
request.layout.entry { node: string; edge: string; }
request.layout.entry.node string
request.layout.entry.edge string
request.layout.frontage "north" | "east" | "south" | "west"
request.layout.slotKinds string[]
request.kit { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }
request.kit.wall string
request.kit.door string
request.kit.window string
request.kit.floor string
request.kit.roof string
request.kit.stair string
request.kit.styles Record<string, { wall: string; door: string; window: string; }>

object

Name Type
batches object[]
slots object[]

parseGenerationKey()function

Section titled “parseGenerationKey()”
Signature
function parseGenerationKey(json): GenerationFingerprint;

serde parses authoring JSON; Zod parses the kernel’s typed wire result.

Parameter Type
json string

GenerationFingerprint


Signature
function planChunk(policy, key): object;
Parameter Type
policy { identity: { seed: string; version: "worldgen-v1"; kitHash: string; }; focusComponent: string; chunkCells: number; windowCells: number; prefetchRings: number; batchesPerStep: number; population?: { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }; }
policy.identity { seed: string; version: "worldgen-v1"; kitHash: string; }
policy.identity.seed string
policy.identity.version "worldgen-v1"
policy.identity.kitHash string
policy.focusComponent string
policy.chunkCells number
policy.windowCells number
policy.prefetchRings number
policy.batchesPerStep number
policy.population? { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }
policy.population.party string
policy.population.townRadius number
policy.population.fringeChunks number
policy.population.fringePercent number
policy.population.ruralPercent number
policy.population.decorationPiecesPerStep number
policy.population.rooms object[]
policy.population.slotKinds string[]
policy.population.buildings object[]
policy.population.kit { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }
policy.population.kit.wall string
policy.population.kit.door string
policy.population.kit.window string
policy.population.kit.floor string
policy.population.kit.roof string
policy.population.kit.stair string
policy.population.kit.styles Record<string, { wall: string; door: string; window: string; }>
key { x: number; z: number; }
key.x number
key.z number

object

Name Type Default value
key object chunkKeySchema
key.x number -
key.z number -
roads object[] -
lots object[] -

chunkGroundAt()function

Section titled “chunkGroundAt()”
Signature
function chunkGroundAt(policy): (x, z) => "grass" | "gravel";

Bounded presentation cache; generation and road geometry stay native.

Parameter Type
policy { identity: { seed: string; version: "worldgen-v1"; kitHash: string; }; focusComponent: string; chunkCells: number; windowCells: number; prefetchRings: number; batchesPerStep: number; population?: { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }; }
policy.identity { seed: string; version: "worldgen-v1"; kitHash: string; }
policy.identity.seed string
policy.identity.version "worldgen-v1"
policy.identity.kitHash string
policy.focusComponent string
policy.chunkCells number
policy.windowCells number
policy.prefetchRings number
policy.batchesPerStep number
policy.population? { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }
policy.population.party string
policy.population.townRadius number
policy.population.fringeChunks number
policy.population.fringePercent number
policy.population.ruralPercent number
policy.population.decorationPiecesPerStep number
policy.population.rooms object[]
policy.population.slotKinds string[]
policy.population.buildings object[]
policy.population.kit { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }
policy.population.kit.wall string
policy.population.kit.door string
policy.population.kit.window string
policy.population.kit.floor string
policy.population.kit.roof string
policy.population.kit.stair string
policy.population.kit.styles Record<string, { wall: string; door: string; window: string; }>

(x, z) => "grass" | "gravel"


compileChunkLot()function

Section titled “compileChunkLot()”
Signature
function compileChunkLot(policy, key, support): object;

Uses the same native layout/rotation/compiler as first-wake construction.

Parameter Type
policy { identity: { seed: string; version: "worldgen-v1"; kitHash: string; }; focusComponent: string; chunkCells: number; windowCells: number; prefetchRings: number; batchesPerStep: number; population?: { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }; }
policy.identity { seed: string; version: "worldgen-v1"; kitHash: string; }
policy.identity.seed string
policy.identity.version "worldgen-v1"
policy.identity.kitHash string
policy.focusComponent string
policy.chunkCells number
policy.windowCells number
policy.prefetchRings number
policy.batchesPerStep number
policy.population? { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }
policy.population.party string
policy.population.townRadius number
policy.population.fringeChunks number
policy.population.fringePercent number
policy.population.ruralPercent number
policy.population.decorationPiecesPerStep number
policy.population.rooms object[]
policy.population.slotKinds string[]
policy.population.buildings object[]
policy.population.kit { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }
policy.population.kit.wall string
policy.population.kit.door string
policy.population.kit.window string
policy.population.kit.floor string
policy.population.kit.roof string
policy.population.kit.stair string
policy.population.kit.styles Record<string, { wall: string; door: string; window: string; }>
key { x: number; z: number; }
key.x number
key.z number
support number

object

Name Type
batches object[]
slots object[]

Signature
function meadow(options?): WorldSpec;

A generated grassy world: soil over stone, rolling from seed, radius cells out from the origin. Everything a cartridge’s world needs.

Parameter Type
options { seed: string; radius?: number; chunks?: { identity: { seed: string; version: "worldgen-v1"; kitHash: string; }; focusComponent: string; chunkCells: number; windowCells: number; prefetchRings: number; batchesPerStep: number; population?: { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }; }; }
options.seed string
options.radius? number
options.chunks? { identity: { seed: string; version: "worldgen-v1"; kitHash: string; }; focusComponent: string; chunkCells: number; windowCells: number; prefetchRings: number; batchesPerStep: number; population?: { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }; }
options.chunks.identity { seed: string; version: "worldgen-v1"; kitHash: string; }
options.chunks.identity.seed string
options.chunks.identity.version "worldgen-v1"
options.chunks.identity.kitHash string
options.chunks.focusComponent string
options.chunks.chunkCells number
options.chunks.windowCells number
options.chunks.prefetchRings number
options.chunks.batchesPerStep number
options.chunks.population? { party: string; townRadius: number; fringeChunks: number; fringePercent: number; ruralPercent: number; decorationPiecesPerStep: number; rooms: object[]; slotKinds: string[]; buildings: object[]; kit: { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }; }
options.chunks.population.party string
options.chunks.population.townRadius number
options.chunks.population.fringeChunks number
options.chunks.population.fringePercent number
options.chunks.population.ruralPercent number
options.chunks.population.decorationPiecesPerStep number
options.chunks.population.rooms object[]
options.chunks.population.slotKinds string[]
options.chunks.population.buildings object[]
options.chunks.population.kit { wall: string; door: string; window: string; floor: string; roof: string; stair: string; styles: Record<string, { wall: string; door: string; window: string; }>; }
options.chunks.population.kit.wall string
options.chunks.population.kit.door string
options.chunks.population.kit.window string
options.chunks.population.kit.floor string
options.chunks.population.kit.roof string
options.chunks.population.kit.stair string
options.chunks.population.kit.styles Record<string, { wall: string; door: string; window: string; }>

WorldSpec


Signature
function sea(options): WorldSpec;

A chart sea with a rectangular sand shore in native terrain.

Parameter Type
options { seed: string; radius?: number; shore: { minX: number; maxX: number; minZ: number; maxZ: number; }; }
options.seed string
options.radius? number
options.shore { minX: number; maxX: number; minZ: number; maxZ: number; }
options.shore.minX number
options.shore.maxX number
options.shore.minZ number
options.shore.maxZ number

WorldSpec