API reference
See the generated API reference for the SDK exported from
@fungi.computer/vishnu.
Exports
Section titled “Exports”| 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. |
CartridgeErrorclass
Section titled “CartridgeError”Thrown by authoring factories and defineCartridge; carries every problem.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CartridgeError(diagnostics): CartridgeError;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
diagnostics |
readonly Diagnostic[] |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor;Properties
Section titled “Properties”diagnostics
Section titled “diagnostics”readonly diagnostics: readonly Diagnostic[];Vec3interface
Section titled “Vec3”Extended by
Section titled “Extended by”Properties
Section titled “Properties”readonly x: number;readonly y: number;readonly z: number;MoveDestinationinterface
Section titled “MoveDestination”Extends
Section titled “Extends”Properties
Section titled “Properties”readonly x: number;Inherited from
Section titled “Inherited from”readonly y: number;Inherited from
Section titled “Inherited from”readonly z: number;Inherited from
Section titled “Inherited from”readonly frame: EntityId | null;RouteCostRequestinterface
Section titled “RouteCostRequest”Properties
Section titled “Properties”readonly actor: EntityId;target
Section titled “target”readonly target: MoveDestination;excavationTarget?
Section titled “excavationTarget?”readonly optional excavationTarget?: readonly [number, number, number];Native excavation contact must be possible from the proposed approach.
RouteToAnyRequestinterface
Section titled “RouteToAnyRequest”Properties
Section titled “Properties”readonly actor: EntityId;targets
Section titled “targets”readonly targets: readonly MoveDestination[];excavationTarget?
Section titled “excavationTarget?”readonly optional excavationTarget?: readonly [number, number, number];Native excavation contact must be possible from the selected approach.
WorkMaterialFactsinterface
Section titled “WorkMaterialFacts”Properties
Section titled “Properties”version
Section titled “version”readonly version: 1;containers
Section titled “containers”readonly containers: readonly object[];readonly lots: readonly object[];Poseinterface
Section titled “Pose”Properties
Section titled “Properties”position
Section titled “position”readonly position: Vec3;facing
Section titled “facing”readonly facing: number;WorldPositioninterface
Section titled “WorldPosition”Extends
Section titled “Extends”Properties
Section titled “Properties”readonly x: number;Inherited from
Section titled “Inherited from”readonly y: number;Inherited from
Section titled “Inherited from”readonly z: number;Inherited from
Section titled “Inherited from”facing
Section titled “facing”readonly facing: number;SupportSurfaceinterface
Section titled “SupportSurface”Properties
Section titled “Properties”readonly minX: number;readonly maxX: number;readonly minZ: number;readonly maxZ: number;height
Section titled “height”readonly height: number;WorldPoseinterface
Section titled “WorldPose”Properties
Section titled “Properties”readonly id: EntityId;readonly local: WorldPosition;readonly world: WorldPosition;support
Section titled “support”readonly support: EntityId | null;surface
Section titled “surface”readonly surface: SupportSurface | null;ComponentDefinitioninterface
Section titled “ComponentDefinition”Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Properties
Section titled “Properties”readonly id: `${string}.${string}`;version
Section titled “version”readonly version: number;fields
Section titled “fields”readonly fields: Readonly<Record<keyof T & string, FieldType>>;targetField?
Section titled “targetField?”readonly optional targetField?: keyof T & string;The single entity field targeted by this registered relation, when present.
sourceRequires?
Section titled “sourceRequires?”readonly optional sourceRequires?: readonly `${string}.${string}`[];Capability IDs required on the source and target relation endpoints.
targetRequires?
Section titled “targetRequires?”readonly optional targetRequires?: readonly `${string}.${string}`[];onTargetRemoved?
Section titled “onTargetRemoved?”readonly optional onTargetRemoved?: RelationRemovalPolicy;allowSelf?
Section titled “allowSelf?”readonly optional allowSelf?: boolean;validate
Section titled “validate”readonly validate: (value) => value is T;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value |
T | JsonValue |
Returns
Section titled “Returns”value is T
VisualVariantRuleinterface
Section titled “VisualVariantRule”View-only selection of an art binding from one committed authored field.
Properties
Section titled “Properties”visual
Section titled “visual”readonly visual: string;component
Section titled “component”readonly component: ComponentDefinition<any>;readonly field: string;readonly cases: Readonly<Record<string, string>>;EntityRecordinterface
Section titled “EntityRecord”Properties
Section titled “Properties”readonly id: EntityId;components
Section titled “components”readonly components: Readonly<Record<ComponentId, ComponentValues>>;QuerySpecinterface
Section titled “QuerySpec”Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T extends object |
object |
Properties
Section titled “Properties”components
Section titled “components”readonly components: readonly ComponentDefinition<any>[];__value?
Section titled “__value?”readonly optional __value?: T;QueryRowinterface
Section titled “QueryRow”Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
_T extends object |
object |
Properties
Section titled “Properties”readonly id: EntityId;readonly get: <V>(definition) => Readonly<V>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
V extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
ComponentDefinition<V> |
Returns
Section titled “Returns”Readonly<V>
QueryViewinterface
Section titled “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.
Extends
Section titled “Extends”Iterable<QueryRow<T>>
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T extends object |
object |
Properties
Section titled “Properties”readonly size: number;Methods
Section titled “Methods”get(id): QueryRow<T> | undefined;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”QueryRow<T> | undefined
first()
Section titled “first()”first(): QueryRow<T> | undefined;Returns
Section titled “Returns”QueryRow<T> | undefined
JobStepinterface
Section titled “JobStep”Properties
Section titled “Properties”readonly key: string;readonly after: string | null;operation
Section titled “operation”readonly operation: JobOperation;continuation?
Section titled “continuation?”readonly optional continuation?: JobContinuation;JobPlaninterface
Section titled “JobPlan”Properties
Section titled “Properties”definition
Section titled “definition”readonly definition: string;definitionVersion
Section titled “definitionVersion”readonly definitionVersion: number;readonly steps: readonly JobStep[];ActionResultinterface
Section titled “ActionResult”Properties
Section titled “Properties”accepted
Section titled “accepted”readonly accepted: boolean;reason?
Section titled “reason?”readonly optional reason?: string | null;projectileId?
Section titled “projectileId?”readonly optional projectileId?: EntityId;launchPoint?
Section titled “launchPoint?”readonly optional launchPoint?: Vec3;entityId?
Section titled “entityId?”readonly optional entityId?: EntityId;revision
Section titled “revision”readonly revision: number;attempt?
Section titled “attempt?”readonly optional attempt?: WorkAttemptKey;Impactinterface
Section titled “Impact”Properties
Section titled “Properties”readonly id: string;sequence
Section titled “sequence”readonly sequence: number;projectileId?
Section titled “projectileId?”readonly optional projectileId?: EntityId;sourceId
Section titled “sourceId”readonly sourceId: EntityId;targetId
Section titled “targetId”readonly targetId: EntityId;readonly time: number;readonly point: Vec3;normal
Section titled “normal”readonly normal: Vec3;velocity
Section titled “velocity”readonly velocity: Vec3;AdvanceResultinterface
Section titled “AdvanceResult”Properties
Section titled “Properties”revision
Section titled “revision”readonly revision: number;results
Section titled “results”readonly results: readonly ActionResult[];impacts
Section titled “impacts”readonly impacts: readonly Impact[];ActionOutcomeinterface
Section titled “ActionOutcome”Properties
Section titled “Properties”action
Section titled “action”readonly action: ActionRequest;result
Section titled “result”readonly result: ActionResult;WorkAttemptKeyinterface
Section titled “WorkAttemptKey”Properties
Section titled “Properties”readonly task: EntityId;generation
Section titled “generation”readonly generation: number;WorkAttemptinterface
Section titled “WorkAttempt”Properties
Section titled “Properties”continuationOwner
Section titled “continuationOwner”readonly continuationOwner: "external" | "native";readonly key: WorkAttemptKey;worker
Section titled “worker”readonly worker: EntityId;execution
Section titled “execution”readonly execution: WorkExecution;readonly phase: WorkAttemptPhase;SimulationClockinterface
Section titled “SimulationClock”Properties
Section titled “Properties”readonly now: number;readonly delta: number;readonly tick: number;ProcessRequirementsinterface
Section titled “ProcessRequirements”Properties
Section titled “Properties”definition
Section titled “definition”readonly definition: string;version
Section titled “version”readonly version: number;stationCatalog
Section titled “stationCatalog”readonly stationCatalog: string;inputs
Section titled “inputs”readonly inputs: readonly object[];stages
Section titled “stages”readonly stages: readonly object[];readonly phase: "blocked" | "complete" | "working" | "waiting";RandomSourceinterface
Section titled “RandomSource”Methods
Section titled “Methods”next()
Section titled “next()”next(): number;Returns
Section titled “Returns”number
ReadContextinterface
Section titled “ReadContext”Extended by
Section titled “Extended by”Properties
Section titled “Properties”readonly clock: SimulationClock;outcomes
Section titled “outcomes”readonly outcomes: readonly ActionOutcome[];random
Section titled “random”readonly random: RandomSource;impacts
Section titled “impacts”readonly impacts: readonly Impact[];workAttempts?
Section titled “workAttempts?”readonly optional workAttempts?: (taskIds) => readonly WorkAttempt[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
taskIds |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttemptForWorker
Section titled “workAttemptForWorker”readonly workAttemptForWorker: (worker) => WorkAttempt | null;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worker |
EntityId |
Returns
Section titled “Returns”WorkAttempt | null
processRequirements
Section titled “processRequirements”readonly processRequirements: (definition, station) => ProcessRequirements;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
string |
station |
EntityId |
Returns
Section titled “Returns”floorOperations
Section titled “floorOperations”readonly floorOperations: (requests) => readonly FloorOperation[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly FloorOperationRequest[] |
Returns
Section titled “Returns”readonly FloorOperation[]
Methods
Section titled “Methods”flowFields()
Section titled “flowFields()”flowFields(geometry): FlowNavigation;Session-owned shared navigation, derived from declared world geometry.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
geometry |
FlowGeometry |
Returns
Section titled “Returns”query()
Section titled “query()”query<T>(spec): QueryView<T>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
QuerySpec<T> |
Returns
Section titled “Returns”QueryView<T>
workMaterialFacts()
Section titled “workMaterialFacts()”workMaterialFacts(): WorkMaterialFacts;One committed physical projection shared by all work phases in a step.
Returns
Section titled “Returns”worldPoses()
Section titled “worldPoses()”worldPoses(entities): readonly WorldPose[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entities |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorldPose[]
routeCosts()
Section titled “routeCosts()”routeCosts(requests): readonly RouteCostResult[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly RouteCostRequest[] |
Returns
Section titled “Returns”readonly RouteCostResult[]
routeToAny()
Section titled “routeToAny()”routeToAny(request): RouteToAnyResult;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
RouteToAnyRequest |
Returns
Section titled “Returns”transferContacts()
Section titled “transferContacts()”transferContacts(request): | { kind: "ready"; targets: readonly MoveDestination[];} | { kind: "blocked"; reason: "sealed" | "unavailable-frame" | "no-contact";};Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
{ worker: EntityId; container: EntityId; } |
request.worker |
EntityId |
request.container |
EntityId |
Returns
Section titled “Returns”| { kind: "ready"; targets: readonly
MoveDestination[]; } | { kind: "blocked"; reason:
"sealed" | "unavailable-frame" | "no-contact"; }
physicalContacts()
Section titled “physicalContacts()”physicalContacts(cells): readonly PhysicalContact[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly PhysicalContact[]
environmentFacts()
Section titled “environmentFacts()”environmentFacts(): object;Returns
Section titled “Returns”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[] |
- |
atmosphereSamples()
Section titled “atmosphereSamples()”atmosphereSamples(cells): AtmosphereSamples;Returns modeled atmosphere at each cell; null means the receiver is unmodeled, not clean air.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”constructionReadiness()
Section titled “constructionReadiness()”constructionReadiness(sites): readonly ConstructionReadiness[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly ConstructionReadiness[]
constructionAccess()
Section titled “constructionAccess()”constructionAccess(sites): readonly ConstructionAccess[];Ordered structural, material, and work-contact facts for construction allocation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly ConstructionAccess[]
deconstructionAccess()
Section titled “deconstructionAccess()”deconstructionAccess(sites): readonly DeconstructionAccess[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly DeconstructionAccess[]
terrainMaterials()
Section titled “terrainMaterials()”terrainMaterials(cells): readonly number[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly number[]
terrainSurfaces()
Section titled “terrainSurfaces()”terrainSurfaces(columns): readonly ( | Readonly<{ cell: readonly [number, number, number]; material: number; generatedTop: number; art?: string; cover?: Readonly<{ kind: string; condition: string; height: string; }>;}> | null)[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly ( | Readonly<{ cell: readonly [number, number, number];
material: number; generatedTop: number; art?: string; cover?:
Readonly<{ kind: string; condition: string; height: string;
}>; }> | null)[]
structureSurfaces()
Section titled “structureSurfaces()”structureSurfaces(columns): readonly readonly StructureSurface[][];Visible horizontal faces, including non-standing covers; not movement authority.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly readonly StructureSurface[][]
waterContacts()
Section titled “waterContacts()”waterContacts(centers): readonly object[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
centers |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly object[]
ScopedActioninterface
Section titled “ScopedAction”Properties
Section titled “Properties”readonly scope: ActionScope;request
Section titled “request”readonly request: ActionRequest;ScopedCreateinterface
Section titled “ScopedCreate”Properties
Section titled “Properties”readonly scope: ActionScope;record
Section titled “record”readonly record: EntityRecord;ScopedRemoveinterface
Section titled “ScopedRemove”Properties
Section titled “Properties”readonly scope: ActionScope;entity
Section titled “entity”readonly entity: EntityId;CrowdMotioninterface
Section titled “CrowdMotion”Ground-plane crowd destination, advanced by the native simulation phase.
Properties
Section titled “Properties”entity
Section titled “entity”readonly entity: EntityId;readonly x: number;readonly z: number;readonly speed: number;WriteContextinterface
Section titled “WriteContext”Extends
Section titled “Extends”Properties
Section titled “Properties”readonly clock: SimulationClock;Inherited from
Section titled “Inherited from”outcomes
Section titled “outcomes”readonly outcomes: readonly ActionOutcome[];Inherited from
Section titled “Inherited from”random
Section titled “random”readonly random: RandomSource;Inherited from
Section titled “Inherited from”impacts
Section titled “impacts”readonly impacts: readonly Impact[];Inherited from
Section titled “Inherited from”workAttempts?
Section titled “workAttempts?”readonly optional workAttempts?: (taskIds) => readonly WorkAttempt[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
taskIds |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorkAttempt[]
Inherited from
Section titled “Inherited from”workAttemptForWorker
Section titled “workAttemptForWorker”readonly workAttemptForWorker: (worker) => WorkAttempt | null;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worker |
EntityId |
Returns
Section titled “Returns”WorkAttempt | null
Inherited from
Section titled “Inherited from”ReadContext.workAttemptForWorker
processRequirements
Section titled “processRequirements”readonly processRequirements: (definition, station) => ProcessRequirements;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
string |
station |
EntityId |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ReadContext.processRequirements
floorOperations
Section titled “floorOperations”readonly floorOperations: (requests) => readonly FloorOperation[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly FloorOperationRequest[] |
Returns
Section titled “Returns”readonly FloorOperation[]
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”flowFields()
Section titled “flowFields()”flowFields(geometry): FlowNavigation;Session-owned shared navigation, derived from declared world geometry.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
geometry |
FlowGeometry |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”query()
Section titled “query()”query<T>(spec): QueryView<T>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
QuerySpec<T> |
Returns
Section titled “Returns”QueryView<T>
Inherited from
Section titled “Inherited from”workMaterialFacts()
Section titled “workMaterialFacts()”workMaterialFacts(): WorkMaterialFacts;One committed physical projection shared by all work phases in a step.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”worldPoses()
Section titled “worldPoses()”worldPoses(entities): readonly WorldPose[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entities |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorldPose[]
Inherited from
Section titled “Inherited from”routeCosts()
Section titled “routeCosts()”routeCosts(requests): readonly RouteCostResult[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly RouteCostRequest[] |
Returns
Section titled “Returns”readonly RouteCostResult[]
Inherited from
Section titled “Inherited from”routeToAny()
Section titled “routeToAny()”routeToAny(request): RouteToAnyResult;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
RouteToAnyRequest |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”transferContacts()
Section titled “transferContacts()”transferContacts(request): | { kind: "ready"; targets: readonly MoveDestination[];} | { kind: "blocked"; reason: "sealed" | "unavailable-frame" | "no-contact";};Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
{ worker: EntityId; container: EntityId; } |
request.worker |
EntityId |
request.container |
EntityId |
Returns
Section titled “Returns”| { kind: "ready"; targets: readonly
MoveDestination[]; } | { kind: "blocked"; reason:
"sealed" | "unavailable-frame" | "no-contact"; }
Inherited from
Section titled “Inherited from”physicalContacts()
Section titled “physicalContacts()”physicalContacts(cells): readonly PhysicalContact[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly PhysicalContact[]
Inherited from
Section titled “Inherited from”environmentFacts()
Section titled “environmentFacts()”environmentFacts(): object;Returns
Section titled “Returns”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[] |
- |
Inherited from
Section titled “Inherited from”atmosphereSamples()
Section titled “atmosphereSamples()”atmosphereSamples(cells): AtmosphereSamples;Returns modeled atmosphere at each cell; null means the receiver is unmodeled, not clean air.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”constructionReadiness()
Section titled “constructionReadiness()”constructionReadiness(sites): readonly ConstructionReadiness[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly ConstructionReadiness[]
Inherited from
Section titled “Inherited from”ReadContext.constructionReadiness
constructionAccess()
Section titled “constructionAccess()”constructionAccess(sites): readonly ConstructionAccess[];Ordered structural, material, and work-contact facts for construction allocation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly ConstructionAccess[]
Inherited from
Section titled “Inherited from”ReadContext.constructionAccess
deconstructionAccess()
Section titled “deconstructionAccess()”deconstructionAccess(sites): readonly DeconstructionAccess[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly DeconstructionAccess[]
Inherited from
Section titled “Inherited from”ReadContext.deconstructionAccess
terrainMaterials()
Section titled “terrainMaterials()”terrainMaterials(cells): readonly number[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly number[]
Inherited from
Section titled “Inherited from”terrainSurfaces()
Section titled “terrainSurfaces()”terrainSurfaces(columns): readonly ( | Readonly<{ cell: readonly [number, number, number]; material: number; generatedTop: number; art?: string; cover?: Readonly<{ kind: string; condition: string; height: string; }>;}> | null)[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly ( | Readonly<{ cell: readonly [number, number, number];
material: number; generatedTop: number; art?: string; cover?:
Readonly<{ kind: string; condition: string; height: string;
}>; }> | null)[]
Inherited from
Section titled “Inherited from”structureSurfaces()
Section titled “structureSurfaces()”structureSurfaces(columns): readonly readonly StructureSurface[][];Visible horizontal faces, including non-standing covers; not movement authority.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly readonly StructureSurface[][]
Inherited from
Section titled “Inherited from”waterContacts()
Section titled “waterContacts()”waterContacts(centers): readonly object[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
centers |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly object[]
Inherited from
Section titled “Inherited from”changed()
Section titled “changed()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
QuerySpec<T> |
Returns
Section titled “Returns”QueryView<T>
removed()
Section titled “removed()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
ComponentDefinition<T> |
Returns
Section titled “Returns”readonly EntityId[]
checkpoint()
Section titled “checkpoint()”checkpoint(name): void;Ask the host to retain this committed simulation state for retry.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
Returns
Section titled “Returns”void
write()
Section titled “write()”write<T>( definition, entity, value): void;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
ComponentDefinition<T> |
entity |
EntityId |
value |
T |
Returns
Section titled “Returns”void
action()
Section titled “action()”action(request, scope?): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
ActionRequest |
scope? |
ActionScope |
Returns
Section titled “Returns”void
createAuthoredEntity()
Section titled “createAuthoredEntity()”createAuthoredEntity(record, scope?): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
record |
EntityRecord |
scope? |
ActionScope |
Returns
Section titled “Returns”void
removeAuthoredEntity()
Section titled “removeAuthoredEntity()”removeAuthoredEntity(id): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
EntityId |
Returns
Section titled “Returns”void
retireActor()
Section titled “retireActor()”retireActor(id): void;Retire a physical actor in this committed step. Rules only.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
EntityId |
Returns
Section titled “Returns”void
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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cue |
AuthoredFeedbackCue |
Returns
Section titled “Returns”void
SystemDefinitioninterface
Section titled “SystemDefinition”Properties
Section titled “Properties”readonly id: `${string}.${string}`;version
Section titled “version”readonly version: number;readonly reads: readonly ComponentDefinition<any>[];writes
Section titled “writes”readonly writes: readonly ComponentDefinition<any>[];every?
Section titled “every?”readonly optional every?: number;consumesImpacts?
Section titled “consumesImpacts?”readonly optional consumesImpacts?: boolean;readonly run: (context) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
WriteContext |
Returns
Section titled “Returns”void
ProjectileAiminterface
Section titled “ProjectileAim”Properties
Section titled “Properties”origin
Section titled “origin”readonly origin: Vec3;muzzle
Section titled “muzzle”readonly muzzle: Vec3;inheritedVelocity
Section titled “inheritedVelocity”readonly inheritedVelocity: Vec3;radius
Section titled “radius”readonly radius: number;gravity
Section titled “gravity”readonly gravity: number;penetration
Section titled “penetration”readonly penetration: number;maxRange
Section titled “maxRange”readonly maxRange: number;maxLifetime
Section titled “maxLifetime”readonly maxLifetime: number;readonly speed: number;CollisionFactinterface
Section titled “CollisionFact”Properties
Section titled “Properties”readonly id: EntityId;origin
Section titled “origin”readonly origin: Vec3;velocity
Section titled “velocity”readonly velocity: Vec3;geometry
Section titled “geometry”readonly geometry: "ball" | "cuboid";radius
Section titled “radius”readonly radius: number;readonly halfX: number;readonly halfY: number;readonly halfZ: number;readonly yaw: number;offsetX
Section titled “offsetX”readonly offsetX: number;offsetY
Section titled “offsetY”readonly offsetY: number;offsetZ
Section titled “offsetZ”readonly offsetZ: number;material
Section titled “material”readonly material: object;response
Section titled “response”readonly response: "ground" | "stop" | "pierce";resistance
Section titled “resistance”readonly resistance: number;restitution
Section titled “restitution”readonly restitution: number;friction
Section titled “friction”readonly friction: number;embedSpeed
Section titled “embedSpeed”readonly embedSpeed: number;RenderFactinterface
Section titled “RenderFact”Properties
Section titled “Properties”activity?
Section titled “activity?”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;};movement?
Section titled “movement?”readonly optional movement?: | { baseSpeed: number; effectiveSpeed: number; routed: boolean;} | null;Native movement speed selected for the current route; base speed survives the order.
readonly optional view?: object;pickable?
Section titled “pickable?”readonly optional pickable?: boolean;cutawayTop?
Section titled “cutawayTop?”readonly optional cutawayTop?: number;readonly optional aim?: ProjectileAim | null;collision?
Section titled “collision?”readonly optional collision?: CollisionFact | null;projectile?
Section titled “projectile?”readonly optional projectile?: | { velocity: Vec3; gravity: number; state: "flying" | "rolling" | "resting" | "embedded"; embedDepth: number; rollNormal: Vec3; penetration: number;} | null;readonly id: EntityId;readonly optional pose?: Pose;Resolved world pose, including any moving or rotated support.
local?
Section titled “local?”readonly optional local?: Pose;Native local pose; for supported entities this is relative to frame.
support?
Section titled “support?”readonly optional support?: EntityId | null;frame?
Section titled “frame?”readonly optional frame?: EntityId;Observation frame for a supported entity; local is measured in this frame.
surface?
Section titled “surface?”readonly optional surface?: SupportSurface | null;visual?
Section titled “visual?”readonly optional visual?: string | null;appearance?
Section titled “appearance?”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.
profile
Section titled “profile”readonly profile: string;readonly slots: Readonly<Partial<Record<string, string>>>;palette
Section titled “palette”readonly palette: Readonly<Partial<Record<string, string>>>;severed
Section titled “severed”readonly severed: readonly string[];readonly optional limb?: string;A loose limb: the cut it came off at (drawn from its severed bake).
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).
readonly optional act?: object;A one-shot state the actor is in (the game’s presentation acts).
readonly state: string;readonly since: number;seconds
Section titled “seconds”readonly seconds: number;label?
Section titled “label?”readonly optional label?: string | null;placement?
Section titled “placement?”readonly optional placement?: VisualPlacement;selected?
Section titled “selected?”readonly optional selected?: boolean;hands?
Section titled “hands?”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.
readonly lot: EntityId;readonly kind: string;quantity
Section titled “quantity”readonly quantity: number;container?
Section titled “container?”readonly optional container?: object;container.capacity
Section titled “container.capacity”readonly capacity: number;container.contents
Section titled “container.contents”readonly contents: object;container.contents.items
Section titled “container.contents.items”readonly items: readonly object[];container.contents.overflow?
Section titled “container.contents.overflow?”readonly optional overflow?: boolean;inventory?
Section titled “inventory?”readonly optional inventory?: object;readonly items: readonly object[];overflow?
Section titled “overflow?”readonly optional overflow?: boolean;direct?
Section titled “direct?”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”Properties
Section titled “Properties”readonly kind: "delivery";readonly phase: DeliveryActivityPhase;material
Section titled “material”readonly material: string;target
Section titled “target”readonly target: readonly [number, number];ActivityBindinginterface
Section titled “ActivityBinding”Properties
Section titled “Properties”readonly actor: EntityId;readonly kind: "dig" | "build" | "chop";target
Section titled “target”readonly target: readonly [number, number];progress?
Section titled “progress?”readonly optional progress?: number;AtmosphereSampleinterface
Section titled “AtmosphereSample”Properties
Section titled “Properties”volumeId
Section titled “volumeId”readonly volumeId: string;temperatureC
Section titled “temperatureC”readonly temperatureC: number;smokeKgM3
Section titled “smokeKgM3”readonly smokeKgM3: number;AtmosphereSamplesinterface
Section titled “AtmosphereSamples”Properties
Section titled “Properties”revision
Section titled “revision”readonly revision: number;geometryRevision
Section titled “geometryRevision”readonly geometryRevision: number;samples
Section titled “samples”readonly samples: readonly (AtmosphereSample | null)[];ConstructionReadinessinterface
Section titled “ConstructionReadiness”Properties
Section titled “Properties”readonly site: EntityId;status
Section titled “status”readonly status: ConstructionReadinessStatus;reason?
Section titled “reason?”readonly optional reason?: "missingStructuralSupport";PlacementCandidateinterface
Section titled “PlacementCandidate”Properties
Section titled “Properties”readonly site: EntityId;catalog
Section titled “catalog”readonly catalog: string;target
Section titled “target”readonly target: ConstructionTarget;PlacementDecisioninterface
Section titled “PlacementDecision”Properties
Section titled “Properties”readonly site: EntityId;status
Section titled “status”readonly status: "ready" | "rejected";reason?
Section titled “reason?”readonly optional reason?: string;PlacementDecisionResponseinterface
Section titled “PlacementDecisionResponse”Properties
Section titled “Properties”revision
Section titled “revision”readonly revision: number;placementRevision
Section titled “placementRevision”readonly placementRevision: number;decisions
Section titled “decisions”readonly decisions: readonly PlacementDecision[];ConstructionAccessinterface
Section titled “ConstructionAccess”Properties
Section titled “Properties”readonly site: EntityId;support
Section titled “support”readonly support: ConstructionReadinessStatus;materialsReady
Section titled “materialsReady”readonly materialsReady: boolean;blockedActors
Section titled “blockedActors”readonly blockedActors: readonly EntityId[];contacts
Section titled “contacts”readonly contacts: readonly ConstructionAccessContact[];SurfaceWaterContactinterface
Section titled “SurfaceWaterContact”Properties
Section titled “Properties”readonly cell: readonly [number, number, number];groundwaterHead
Section titled “groundwaterHead”readonly groundwaterHead: number;TerrainPresentationDefinitioninterface
Section titled “TerrainPresentationDefinition”Properties
Section titled “Properties”materials
Section titled “materials”readonly materials: readonly object[];Content-owned art family for each physical material slot.
generatedArt?
Section titled “generatedArt?”readonly optional generatedArt?: (input) => string | null;Content-owned appearance of unchanged generated ground, never physical material.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”string | null
generatedCover?
Section titled “generatedCover?”readonly optional generatedCover?: (input) => | Readonly<{ kind: string; condition: string; height: string;}> | null;Pure fresh-world cover projection. Later physical cover mutations override it.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”| 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.
Properties
Section titled “Properties”version
Section titled “version”readonly version: number;Methods
Section titled “Methods”changed()
Section titled “changed()”changed<T>(spec, since): readonly EntityId[];Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
QuerySpec<T> |
since |
number |
Returns
Section titled “Returns”readonly EntityId[]
removed()
Section titled “removed()”removed<T>(component, since): readonly EntityId[];Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
ComponentDefinition<T> |
since |
number |
Returns
Section titled “Returns”readonly EntityId[]
release()
Section titled “release()”release(through): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
through |
number |
Returns
Section titled “Returns”void
KernelPortinterface
Section titled “KernelPort”Properties
Section titled “Properties”componentReads
Section titled “componentReads”readonly componentReads: ComponentReadChanges;partyJoinIdentity
Section titled “partyJoinIdentity”readonly partyJoinIdentity: (bindingId) => PartyJoinIdentity;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bindingId |
string |
Returns
Section titled “Returns”floorOperations
Section titled “floorOperations”readonly floorOperations: (requests) => readonly FloorOperation[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly FloorOperationRequest[] |
Returns
Section titled “Returns”readonly FloorOperation[]
transferContacts
Section titled “transferContacts”readonly transferContacts: (request) => | { kind: "ready"; targets: readonly MoveDestination[];} | { kind: "blocked"; reason: "sealed" | "unavailable-frame" | "no-contact";};Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
{ worker: EntityId; container: EntityId; } |
request.worker |
EntityId |
request.container |
EntityId |
Returns
Section titled “Returns”| { kind: "ready"; targets: readonly
MoveDestination[]; } | { kind: "blocked"; reason:
"sealed" | "unavailable-frame" | "no-contact"; }
physicalContacts
Section titled “physicalContacts”readonly physicalContacts: (cells) => readonly PhysicalContact[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly PhysicalContact[]
routeCosts
Section titled “routeCosts”readonly routeCosts: (requests) => readonly RouteCostResult[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly RouteCostRequest[] |
Returns
Section titled “Returns”readonly RouteCostResult[]
routeToAny
Section titled “routeToAny”readonly routeToAny: (request) => RouteToAnyResult;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
RouteToAnyRequest |
Returns
Section titled “Returns”dispose
Section titled “dispose”readonly dispose: () => void;Returns
Section titled “Returns”void
readonly load: (definition) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
Uint8Array |
Returns
Section titled “Returns”void
loadEnvironment
Section titled “loadEnvironment”readonly loadEnvironment: (definition) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
Uint8Array |
Returns
Section titled “Returns”void
environmentFacts
Section titled “environmentFacts”readonly environmentFacts: () => object;Returns
Section titled “Returns”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[] |
- |
atmosphereSamples
Section titled “atmosphereSamples”readonly atmosphereSamples: (cells) => AtmosphereSamples;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”constructionReadiness
Section titled “constructionReadiness”readonly constructionReadiness: (sites) => readonly ConstructionReadiness[];Read-only support projection for pending construction, resolved in one native batch.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly ConstructionReadiness[]
placementDecisions
Section titled “placementDecisions”readonly placementDecisions: (party, candidates) => PlacementDecisionResponse;Advisory native geometry decision; command admission always rechecks.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
party |
EntityId |
candidates |
readonly PlacementCandidate[] |
Returns
Section titled “Returns”constructionAccess
Section titled “constructionAccess”readonly constructionAccess: (sites) => readonly ConstructionAccess[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly ConstructionAccess[]
deconstructionAccess
Section titled “deconstructionAccess”readonly deconstructionAccess: (sites) => readonly DeconstructionAccess[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sites |
readonly EntityId[] |
Returns
Section titled “Returns”readonly DeconstructionAccess[]
terrainMaterials
Section titled “terrainMaterials”readonly terrainMaterials: (cells) => readonly number[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly number[]
terrainSurfaces
Section titled “terrainSurfaces”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)[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly ( | Readonly<{ cell: readonly [number, number, number];
material: number; generatedTop: number; art?: string; cover?:
Readonly<{ kind: string; condition: string; height: string;
}>; }> | null)[]
surfaceWaterTable
Section titled “surfaceWaterTable”readonly surfaceWaterTable: (columns) => readonly (SurfaceWaterContact | null)[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly (SurfaceWaterContact | null)[]
waterContacts
Section titled “waterContacts”readonly waterContacts: (centers) => readonly object[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
centers |
readonly [number, number, number][] |
Returns
Section titled “Returns”readonly object[]
terrainChanges
Section titled “terrainChanges”readonly terrainChanges: (sinceRevision) => TerrainChangeSet;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sinceRevision |
number |
Returns
Section titled “Returns”structureSurfaces
Section titled “structureSurfaces”readonly structureSurfaces: (columns) => readonly readonly StructureSurface[][];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
columns |
readonly [number, number][] |
Returns
Section titled “Returns”readonly readonly StructureSurface[][]
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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
QuerySpec<T> |
Returns
Section titled “Returns”QueryView<T>
workMaterialFacts
Section titled “workMaterialFacts”readonly workMaterialFacts: () => WorkMaterialFacts;Compact native owner projection for shared work/material planning.
Returns
Section titled “Returns”workAttempts
Section titled “workAttempts”readonly workAttempts: (taskIds) => readonly WorkAttempt[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
taskIds |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttemptForWorker
Section titled “workAttemptForWorker”readonly workAttemptForWorker: (worker) => WorkAttempt | null;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worker |
EntityId |
Returns
Section titled “Returns”WorkAttempt | null
processRequirements
Section titled “processRequirements”readonly processRequirements: (definition, station) => ProcessRequirements;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
string |
station |
EntityId |
Returns
Section titled “Returns”entityMembership
Section titled “entityMembership”readonly entityMembership: (ids) => readonly boolean[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ids |
readonly EntityId[] |
Returns
Section titled “Returns”readonly boolean[]
advanceCandidate
Section titled “advanceCandidate”readonly advanceCandidate: (delta, writes, actions, options?) => AdvanceResult;Region-owned disposable attempt only: an error requires discarding the candidate.
Parameters
Section titled “Parameters”| 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[] |
Returns
Section titled “Returns”advance
Section titled “advance”readonly advance: (delta, writes, actions, options?) => AdvanceResult;Parameters
Section titled “Parameters”| 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[] |
Returns
Section titled “Returns”snapshot
Section titled “snapshot”readonly snapshot: () => KernelRecordSnapshot;Returns
Section titled “Returns”KernelRecordSnapshot
capture
Section titled “capture”readonly capture: () => KernelRecordCaptureResult;Resident-only capture; do not mutate or expose its borrowed record bytes.
Returns
Section titled “Returns”KernelRecordCaptureResult
acceptCapture
Section titled “acceptCapture”readonly acceptCapture: () => void;Called only after the Region transaction accepted the captured state.
Returns
Section titled “Returns”void
restore
Section titled “restore”readonly restore: (snapshot) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
snapshot |
KernelRecordSnapshot |
Returns
Section titled “Returns”void
renderFacts
Section titled “renderFacts”readonly renderFacts: (limit?) => readonly RenderFact[];Retained immutable native records. Observation copies the selected public frame; consumers must replace records rather than mutate their fields.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
limit? |
number |
Returns
Section titled “Returns”readonly RenderFact[]
worldPoses
Section titled “worldPoses”readonly worldPoses: (entities) => readonly WorldPose[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entities |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorldPose[]
InterestVisualGroupinterface
Section titled “InterestVisualGroup”Fixed visual groups are observed only when their complete footprint is in range.
Properties
Section titled “Properties”readonly minX: number;readonly maxX: number;readonly minZ: number;readonly maxZ: number;visuals
Section titled “visuals”readonly visuals: readonly string[];ready?
Section titled “ready?”readonly optional ready?: boolean;Withhold every piece until the generated building is complete.
GamePackinterface
Section titled “GamePack”Properties
Section titled “Properties”readonly id: string;version
Section titled “version”readonly version: number;localScope?
Section titled “localScope?”readonly optional localScope?: CommandScope;localPartyBinding?
Section titled “localPartyBinding?”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.
interest?
Section titled “interest?”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.
radius
Section titled “radius”readonly radius: number;groups?
Section titled “groups?”readonly optional groups?: readonly InterestVisualGroup[];dynamicGroups?
Section titled “dynamicGroups?”readonly optional dynamicGroups?: (context) => readonly InterestVisualGroup[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”readonly InterestVisualGroup[]
definition
Section titled “definition”readonly definition: Uint8Array;environmentDefinition?
Section titled “environmentDefinition?”readonly optional environmentDefinition?: Uint8Array<ArrayBufferLike>;presentationWindow?
Section titled “presentationWindow?”readonly optional presentationWindow?: object;readonly minX: number;readonly maxX: number;readonly minZ: number;readonly maxZ: number;terrainPresentation?
Section titled “terrainPresentation?”readonly optional terrainPresentation?: TerrainPresentationDefinition;Game-authored terrain vocabulary. The engine owns no grass or biome IDs.
components
Section titled “components”readonly components: readonly ComponentDefinition<any>[];visualVariants?
Section titled “visualVariants?”readonly optional visualVariants?: readonly VisualVariantRule[];Resolved into render facts; never written to the kernel or its digest.
actors?
Section titled “actors?”readonly optional actors?: readonly ActorDefinition[];Prepared content templates; native lifecycle owns their instantiation.
systems
Section titled “systems”readonly systems: readonly SystemDefinition[];horde?
Section titled “horde?”readonly optional horde?: HordeSimulation;presentation?
Section titled “presentation?”readonly optional presentation?: GamePresentation;bootstrapActions?
Section titled “bootstrapActions?”readonly optional bootstrapActions?: readonly ActionRequest[];Fresh-world setup that must commit before the first player command.
opening?
Section titled “opening?”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).
actions
Section titled “actions”readonly actions: readonly ActionRequest[];commands
Section titled “commands”readonly commands: readonly object[];initialActions?
Section titled “initialActions?”readonly optional initialActions?: readonly ActionRequest[];scenarios?
Section titled “scenarios?”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.
partyJoin?
Section titled “partyJoin?”readonly optional partyJoin?: Readonly<{ footprint: readonly readonly [number, number][]; prepare: (spawn) => ActorInstantiationPlan;}>;commands?
Section titled “commands?”readonly optional commands?: Readonly<Record<string, GameCommandDefinition>>;Heterogeneous command inputs are erased at the pack registry boundary.
persistentCharacters?
Section titled “persistentCharacters?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”number
GameScenariointerface
Section titled “GameScenario”A named dev/test setup for a fresh world (see GamePack.scenarios).
Properties
Section titled “Properties”actions
Section titled “actions”readonly actions: readonly ActionRequest[];commands
Section titled “commands”readonly commands: readonly object[];GameCommandResultinterface
Section titled “GameCommandResult”Properties
Section titled “Properties”actions
Section titled “actions”readonly actions: readonly ActionRequest[];writes
Section titled “writes”readonly writes: readonly WriteIntent[];creates?
Section titled “creates?”readonly optional creates?: readonly EntityRecord[];removes?
Section titled “removes?”readonly optional removes?: readonly EntityId[];GameCommandDefinitioninterface
Section titled “GameCommandDefinition”Properties
Section titled “Properties”readonly input: ZodType;The sole parser for input entering this command.
readonly title: string;Semantic metadata shared by human and agent projections.
category
Section titled “category”readonly category: string;description
Section titled “description”readonly description: string;localPresentation?
Section titled “localPresentation?”readonly optional localPresentation?: object;Client-local acquisition metadata for the existing Vishnu gestures.
bindings
Section titled “bindings”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;}>[];availability?
Section titled “availability?”readonly optional availability?: (context) => GameCommandAvailability;Host-owned discoverability state, evaluated against the committed world.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”subjects?
Section titled “subjects?”readonly optional subjects?: (context) => readonly EntityId[];Stable subjects for contextual UI projection, evaluated from authoritative state.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”readonly EntityId[]
lifecycle?
Section titled “lifecycle?”readonly optional lifecycle?: readonly ComponentDefinition<any>[];Authored record creation/removal only; does not grant progress writes.
reads?
Section titled “reads?”readonly optional reads?: readonly ComponentDefinition<any>[];writes
Section titled “writes”readonly writes: readonly ComponentDefinition<any>[];invoke
Section titled “invoke”readonly invoke: (context, input) => GameCommandResult;Erased invocation closes over the parsed handler input in the authoring factory.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
GameCommandContext |
input |
JsonValue | undefined |
Returns
Section titled “Returns”GamePackTransportinterface
Section titled “GamePackTransport”Properties
Section titled “Properties”readonly id: string;version
Section titled “version”readonly version: number;definition
Section titled “definition”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.
Properties
Section titled “Properties”direction
Section titled “direction”readonly direction: object;readonly x: number;readonly z: number;radius
Section titled “radius”readonly radius: number;readonly angle: number;height
Section titled “height”readonly height: number;readonly ms: number;readonly color: string;SystemOptionsinterface
Section titled “SystemOptions”Properties
Section titled “Properties”id: `${string}.${string}`;version
Section titled “version”version: number;reads?
Section titled “reads?”optional reads?: readonly ComponentDefinition<any>[];writes?
Section titled “writes?”optional writes?: readonly ComponentDefinition<any>[];every?
Section titled “every?”optional every?: number;consumesImpacts?
Section titled “consumesImpacts?”optional consumesImpacts?: boolean;run: (context) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
WriteContext |
Returns
Section titled “Returns”void
ActorCapabilityinterface
Section titled “ActorCapability”Properties
Section titled “Properties”component
Section titled “component”readonly component: ComponentDefinition<any>;initial?
Section titled “initial?”readonly optional initial?: object;ActorDefinitionCapabilityinterface
Section titled “ActorDefinitionCapability”Authoring-only capability compiled by an owning engine module.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Properties
Section titled “Properties”readonly kind: "actor-definition-capability";readonly id: `${string}.${string}`;schema
Section titled “schema”readonly schema: ZodType<T>;The sole parser for this capability’s authored value.
externalCreation?
Section titled “externalCreation?”readonly optional externalCreation?: boolean;Another owner creates this actor; omit it from direct spawn templates.
ActorDefinitionCapabilityValueinterface
Section titled “ActorDefinitionCapabilityValue”Properties
Section titled “Properties”capability
Section titled “capability”readonly capability: ActorDefinitionCapability<any>;readonly value: object;ActorInputinterface
Section titled “ActorInput”Properties
Section titled “Properties”readonly kind: "actor-input";readonly name: string;readonly type: FieldType | "actor-reference";ActorDefinitioninterface
Section titled “ActorDefinition”Extends
Section titled “Extends”Properties
Section titled “Properties”readonly id: string;version
Section titled “version”readonly version: number;capabilities
Section titled “capabilities”readonly capabilities: readonly ActorCapability[];definitionCapabilities
Section titled “definitionCapabilities”readonly definitionCapabilities: readonly ActorDefinitionCapabilityValue[];behaviors
Section titled “behaviors”readonly behaviors: readonly BehaviorDefinition[];Methods
Section titled “Methods”with()
Section titled “with()”Call Signature
Section titled “Call Signature”with<T>(component, initial?): ActorDefinition;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
ComponentDefinition<T> |
initial? |
ActorInitial<T> |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”with<T>(capability, value): ActorDefinition;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
capability |
ActorDefinitionCapability<T> |
value |
T |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”behaves()
Section titled “behaves()”behaves(...behaviors): ActorDefinition;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…behaviors |
readonly BehaviorDefinition[] |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”PredicateDefinitioninterface
Section titled “PredicateDefinition”A named, deterministic question used by an authored behavior branch.
Properties
Section titled “Properties”readonly id: `${string}.${string}`;readonly reads: readonly ComponentDefinition<any>[];readonly facts: readonly NativeFact[];readonly test: (subject, context) => boolean;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
subject |
QueryRow |
context |
ReadContext |
Returns
Section titled “Returns”boolean
BehaviorActionDefinitioninterface
Section titled “BehaviorActionDefinition”A named proposal producer. The existing system/session owners commit its work.
Properties
Section titled “Properties”readonly id: `${string}.${string}`;readonly reads: readonly ComponentDefinition<any>[];writes
Section titled “writes”readonly writes: readonly ComponentDefinition<any>[];readonly facts: readonly NativeFact[];exclusive?
Section titled “exclusive?”readonly optional exclusive?: string;readonly run: (subject, context) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
subject |
QueryRow |
context |
WriteContext |
Returns
Section titled “Returns”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).
Properties
Section titled “Properties”readonly kind: "behavior";readonly id: `${string}.${string}`;version
Section titled “version”readonly version: number;every?
Section titled “every?”readonly optional every?: number;consumesImpacts?
Section titled “consumesImpacts?”readonly optional consumesImpacts?: true;Whether its predicates and actions read the step’s projectile impacts.
subjects
Section titled “subjects”readonly subjects: readonly ComponentDefinition<any>[];Components every attaching actor must carry.
BehaviorSelectioninterface
Section titled “BehaviorSelection”Methods
Section titled “Methods”where()
Section titled “where()”where(...predicates): BehaviorSelection;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…predicates |
readonly PredicateDefinition[] |
Returns
Section titled “Returns”do(action): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
action |
BehaviorActionDefinition |
Returns
Section titled “Returns”void
BehaviorSceneinterface
Section titled “BehaviorScene”Methods
Section titled “Methods”find()
Section titled “find()”find(...subjects): BehaviorSelection;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…subjects |
readonly ComponentDefinition<any>[] |
Returns
Section titled “Returns”BehaviorOptionsinterface
Section titled “BehaviorOptions”Properties
Section titled “Properties”version?
Section titled “version?”readonly optional version?: number;every?
Section titled “every?”readonly optional every?: number;Run every n-th step instead of every step.
consumesImpacts?
Section titled “consumesImpacts?”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”Extended by
Section titled “Extended by”Methods
Section titled “Methods”with()
Section titled “with()”Call Signature
Section titled “Call Signature”with<T>(component, initial?): ActorDefinition;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
ComponentDefinition<T> |
initial? |
ActorInitial<T> |
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”with<T>(capability, value): ActorDefinition;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
capability |
ActorDefinitionCapability<T> |
value |
T |
Returns
Section titled “Returns”behaves()
Section titled “behaves()”behaves(...behaviors): ActorDefinition;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…behaviors |
readonly BehaviorDefinition[] |
Returns
Section titled “Returns”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.
Properties
Section titled “Properties”readonly side: BlueprintSide;readonly at: number;readonly kind: BlueprintOpeningKind;style?
Section titled “style?”readonly optional style?: string;BlueprintModuleinterface
Section titled “BlueprintModule”One room: size is [width along x, depth along z] in cells.
Properties
Section titled “Properties”readonly id: string;readonly size: readonly [number, number];openings
Section titled “openings”readonly openings: readonly BlueprintOpening[];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.
readonly tags: readonly string[];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.
Properties
Section titled “Properties”module
Section titled “module”readonly module: BlueprintModule;readonly at: readonly [number, number];rotate?
Section titled “rotate?”readonly optional rotate?: 0 | 1 | 2 | 3;mirror?
Section titled “mirror?”readonly optional mirror?: boolean;BlueprintRecipeinterface
Section titled “BlueprintRecipe”Properties
Section titled “Properties”modules
Section titled “modules”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).
Properties
Section titled “Properties”readonly kind: "door" | "window" | "wall";readonly cell: readonly [number, number];readonly axis: "x" | "z";style?
Section titled “style?”readonly optional style?: string;BlueprintRoominterface
Section titled “BlueprintRoom”Properties
Section titled “Properties”readonly index: number;Index into the recipe’s modules.
module
Section titled “module”readonly module: string;readonly tags: readonly string[];readonly cells: readonly readonly [number, number][];Its cells in the world, sorted.
BlueprintSlotinterface
Section titled “BlueprintSlot”Properties
Section titled “Properties”readonly room: number;module
Section titled “module”readonly module: string;readonly name: string;readonly at: readonly [number, number];Blueprintinterface
Section titled “Blueprint”An assembled building: its pieces, rooms and slots, in a fixed order.
Properties
Section titled “Properties”pieces
Section titled “pieces”readonly pieces: readonly BlueprintPiece[];readonly rooms: readonly BlueprintRoom[];readonly slots: readonly BlueprintSlot[];BlueprintLevelinterface
Section titled “BlueprintLevel”An authored storey. Room assembly and piece compilation have distinct owners.
Properties
Section titled “Properties”readonly level: 0 | 1 | 2;blueprint
Section titled “blueprint”readonly blueprint: Blueprint;BlueprintStairinterface
Section titled “BlueprintStair”Stair origin on its lower level; the buildable declares its run and rise.
Properties
Section titled “Properties”readonly level: 0 | 1;readonly cell: readonly [number, number];facing
Section titled “facing”readonly facing: BlueprintSide;BlueprintKitinterface
Section titled “BlueprintKit”Properties
Section titled “Properties”construction
Section titled “construction”readonly construction: Pick<Construction, "candidates" | "catalog">;pieces
Section titled “pieces”readonly pieces: Readonly<Record<BlueprintPiece["kind"], string>>;floor?
Section titled “floor?”readonly optional floor?: string;readonly optional roof?: string;stair?
Section titled “stair?”readonly optional stair?: string;stairs?
Section titled “stairs?”readonly optional stairs?: readonly BlueprintStair[];storeyRows?
Section titled “storeyRows?”readonly optional storeyRows?: number;styles?
Section titled “styles?”readonly optional styles?: Readonly<Record<string, Readonly<Partial<Record<"door" | "window" | "wall", string>>>>>;groundAt
Section titled “groundAt”readonly groundAt: (x, z) => number | undefined;Native terrain’s support row at each authored column.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x |
number |
z |
number |
Returns
Section titled “Returns”number | undefined
ConstructionOptionsinterface
Section titled “ConstructionOptions”Properties
Section titled “Properties”buildables
Section titled “buildables”readonly buildables: readonly ActorDefinition[];Buildable actors, in build-bar order.
verticalMetres
Section titled “verticalMetres”readonly verticalMetres: number;Metres per vertical cell of the world these structures stand in.
namespace
Section titled “namespace”readonly namespace: string;Id prefix for construction sites and floor replacements.
readonly party: (context) => EntityId;The party a player’s build command plans for.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<GameCommandContext, "query" | "scope"> |
Returns
Section titled “Returns”restyle?
Section titled “restyle?”readonly optional restyle?: (context) => ReadonlyMap<EntityId, string>;State-dependent art for particular sites (a lit hearth, say).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query" | "environmentFacts"> |
Returns
Section titled “Returns”ReadonlyMap<EntityId, string>
ConstructionVisualinterface
Section titled “ConstructionVisual”One staged construction sprite, ready for the visual projection.
Properties
Section titled “Properties”readonly id: EntityId;cutawayTop
Section titled “cutawayTop”readonly cutawayTop: number;visual
Section titled “visual”readonly visual: string;readonly label: string;pickable
Section titled “pickable”readonly pickable: true;placement?
Section titled “placement?”readonly optional placement?: | { kind: "edge"; edge: { cell: readonly [number, number, number]; axis: "x" | "z"; };}| NonNullable<PlacementDatum | undefined> & { readonly orientation: CardinalOrientation; };readonly pose: object;position
Section titled “position”readonly position: object;position.x
Section titled “position.x”readonly x: number;position.y
Section titled “position.y”readonly y: number;position.z
Section titled “position.z”readonly z: number;facing
Section titled “facing”readonly facing: number;Constructioninterface
Section titled “Construction”Everything the Construction extension derives from its buildables.
Properties
Section titled “Properties”buildables
Section titled “buildables”readonly buildables: readonly ActorDefinition[];catalog
Section titled “catalog”readonly catalog: ReadonlyMap<string, CompiledBuildable>;placement
Section titled “placement”readonly placement: Readonly<Record<string, PlacementPresentation>>;Placement ghost art and facing per catalog id.
candidates
Section titled “candidates”readonly candidates: (input) => readonly PlacementCandidate[];Parameters
Section titled “Parameters”| 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[]; } |
Returns
Section titled “Returns”readonly PlacementCandidate[]
readonly build: GameCommandDefinition;visuals
Section titled “visuals”readonly visuals: (context) => readonly ConstructionVisual[];Staged art from the site’s catalog and phase alone.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”readonly ConstructionVisual[]
presented
Section titled “presented”readonly presented: (context) => readonly ConstructionVisual[];Staged art with the cartridge’s state-dependent restyling applied.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query" | "environmentFacts"> |
Returns
Section titled “Returns”readonly ConstructionVisual[]
environment
Section titled “environment”readonly environment: (base) => EnvironmentDefinition;Add the buildables to a world’s structure catalog.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
base |
EnvironmentDefinition |
Returns
Section titled “Returns”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.
Properties
Section titled “Properties”readonly kind: "static" | "figure" | "doll";worldRole
Section titled “worldRole”readonly worldRole: "actor" | "floor" | "item" | "structure";variants?
Section titled “variants?”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.
readonly optional path?: BankPath;Static: the bank path, per-turn view paths, frames and anchor.
viewPaths?
Section titled “viewPaths?”readonly optional viewPaths?: readonly BankPath[];frames?
Section titled “frames?”readonly optional frames?: boolean;frameMs?
Section titled “frameMs?”readonly optional frameMs?: number;Static frames: milliseconds per frame (default: the shared idle rate).
facing?
Section titled “facing?”readonly optional facing?: boolean;anchor?
Section titled “anchor?”readonly optional anchor?: "pawnAnchor" | "propAnchor" | "vehicleAnchor";drawsUpright?
Section titled “drawsUpright?”readonly optional drawsUpright?: boolean;Order as an upright body rather than by its footprint.
readonly optional key?: string;Figure: the bank figure key.
dollPoses?
Section titled “dollPoses?”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).
motion?
Section titled “motion?”readonly optional motion?: Readonly<{ kind: string; stride: number; localOffset?: Readonly<{ x: number; y: number; z: number; }>;}>;workPoses?
Section titled “workPoses?”readonly optional workPoses?: Readonly<Record<string, string>>;gaitStride?
Section titled “gaitStride?”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.
actPoses?
Section titled “actPoses?”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.
deliveryPoses?
Section titled “deliveryPoses?”readonly optional deliveryPoses?: Readonly<Record<string, string>>;luminous?
Section titled “luminous?”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.
light?
Section titled “light?”readonly optional light?: Readonly<{ radius: number; color: number; flicker: number;}>;A view-only point light centered on this visual; never enters world state.
carryPoses?
Section titled “carryPoses?”readonly optional carryPoses?: Readonly<Record<string, | string | Readonly<{ contentKind: string; empty: string; partial: string; full: string;}>>>;reactions?
Section titled “reactions?”readonly optional reactions?: Readonly<Record<string, Readonly<{ path: BankPath; duration: number;}>>>;edgeWall?
Section titled “edgeWall?”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).
Properties
Section titled “Properties”manifestUrl
Section titled “manifestUrl”readonly manifestUrl: string;partsUrl?
Section titled “partsUrl?”readonly optional partsUrl?: string;Checked render fragments of existing frames; never physical occupants.
pageUrls
Section titled “pageUrls”readonly pageUrls: Readonly<Record<string, string>>;CartridgeShelfinterface
Section titled “CartridgeShelf”How the hub shelf lists a cartridge. Presentation only.
Properties
Section titled “Properties”readonly order: number;Lower numbers appear first. Games own their position, not the engine.
localOnly?
Section titled “localOnly?”readonly optional localOnly?: true;A local scene has no hosted world; keep its shelf launch browser-local.
readonly genre: string;readonly blurb: string;readonly cover: object;readonly src: string;readonly alt: string;SelectionCardinterface
Section titled “SelectionCard”A selected object whose visual starts with visualPrefix gets its own named
card in the selection panel.
Properties
Section titled “Properties”visualPrefix
Section titled “visualPrefix”readonly visualPrefix: string;heading
Section titled “heading”readonly heading: string;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.
Properties
Section titled “Properties”command
Section titled “command”readonly command: string;pointer?
Section titled “pointer?”readonly optional pointer?: boolean;arrows?
Section titled “arrows?”readonly optional arrows?: boolean;repeatSeconds?
Section titled “repeatSeconds?”readonly optional repeatSeconds?: number;readonly optional hold?: boolean;CartridgePageinterface
Section titled “CartridgePage”What the player shell shows around the world. Read-only presentation.
Properties
Section titled “Properties”subtitle
Section titled “subtitle”readonly subtitle: string;savedWorldNotice?
Section titled “savedWorldNotice?”readonly optional savedWorldNotice?: string;Player-facing copy when an earlier saved world starts fresh.
camera
Section titled “camera”readonly camera: CartridgeCameraPolicy;directControl?
Section titled “directControl?”readonly optional directControl?: CartridgeDirectControl;readonly optional aim?: CartridgeAim;theme?
Section titled “theme?”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.
controlHelp?
Section titled “controlHelp?”readonly optional controlHelp?: string;dockKeys?
Section titled “dockKeys?”readonly optional dockKeys?: boolean;Show the persistent dock keys. Palettes and keyboard commands remain available.
audioBank?
Section titled “audioBank?”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.
lighting?
Section titled “lighting?”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.
developerControls?
Section titled “developerControls?”readonly optional developerControls?: boolean;Show the engine’s pixel-quality, voxel-layer and cutaway tools (default true). A finished game turns them off.
emptyDrag?
Section titled “emptyDrag?”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.
orderCommand?
Section titled “orderCommand?”readonly optional orderCommand?: string;The command a drafted selection’s secondary click issues.
selectionShortcuts?
Section titled “selectionShortcuts?”readonly optional selectionShortcuts?: readonly object[];windows
Section titled “windows”readonly windows: readonly CartridgeWindow[];Declared game windows, opened by ui:<id> commands.
source?
Section titled “source?”readonly optional source?: string;Where the page links “View TypeScript source”.
visuals?
Section titled “visuals?”readonly optional visuals?: Readonly<Record<string, VisualBinding>>;The art for this cartridge’s sprite ids, merged over the engine’s.
artPacks?
Section titled “artPacks?”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.
groundArt?
Section titled “groundArt?”readonly optional groundArt?: object;Checked static top frames projected onto native smooth ground, not actors.
readonly pack: CartridgeArtPackFiles;families
Section titled “families”readonly families: Readonly<Record<string, readonly (string | number)[]>>;Each named family supplies two one-metre top frames through the prop camera.
icons?
Section titled “icons?”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.
effectArt?
Section titled “effectArt?”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.
readonly pack: CartridgeArtPackFiles;anchorsUrl?
Section titled “anchorsUrl?”readonly optional anchorsUrl?: string;dolls?
Section titled “dolls?”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.
spectator3d?
Section titled “spectator3d?”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.
Returns
Section titled “Returns”Promise<{ cast: Cast; heads: Readonly<Record<string,
HeadBuilder>>; propScene?: (visual) => Scene<Object3DEventMap> |
null; }>
shelf?
Section titled “shelf?”readonly optional shelf?: CartridgeShelf;selectionCards?
Section titled “selectionCards?”readonly optional selectionCards?: readonly SelectionCard[];gainFeedbackFactPrefixes?
Section titled “gainFeedbackFactPrefixes?”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.
sharedWorlds?
Section titled “sharedWorlds?”readonly optional sharedWorlds?: boolean;The hosted engine serves invitation-shared worlds for this cartridge.
clock?
Section titled “clock?”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.
sharedClock?
Section titled “sharedClock?”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.
interest?
Section titled “interest?”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.
radius
Section titled “radius”readonly radius: number;groups?
Section titled “groups?”readonly optional groups?: readonly InterestVisualGroup[];dynamicGroups?
Section titled “dynamicGroups?”readonly optional dynamicGroups?: (context) => readonly InterestVisualGroup[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”readonly InterestVisualGroup[]
spectators?
Section titled “spectators?”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.
placementVisuals?
Section titled “placementVisuals?”readonly optional placementVisuals?: Readonly<Record<string, PlacementPresentation>>;Placement ghosts and candidates for build gestures, derived from the cartridge’s construction extension.
placementCandidates?
Section titled “placementCandidates?”readonly optional placementCandidates?: (input) => readonly PlacementCandidate[];Parameters
Section titled “Parameters”| 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[]; } |
Returns
Section titled “Returns”readonly PlacementCandidate[]
readonly look: Look;The checked look: full colour, or a palette the view constrains to.
terrainLandform?
Section titled “terrainLandform?”readonly optional terrainLandform?: EnvironmentPlateau;Authored floating plateau shape for the smooth terrain view.
terrainSea?
Section titled “terrainSea?”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”Properties
Section titled “Properties”readonly id: string;Kebab-case identity; also the namespace for saves and URLs.
readonly title: string;version
Section titled “version”readonly version: number;Bump when saved worlds can no longer restore with this content.
actors?
Section titled “actors?”readonly optional actors?: readonly ActorDefinition[];Spawnable templates. Their .behaves() attachments are installed once.
components?
Section titled “components?”readonly optional components?: readonly ComponentDefinition<any>[];Components used by commands, rules or the world. Authored components on the actors are collected automatically.
readonly world: object;materials
Section titled “materials”readonly materials: readonly object[];stockpileProfiles?
Section titled “stockpileProfiles?”readonly optional stockpileProfiles?: readonly object[];terrain?
Section titled “terrain?”readonly optional terrain?: TerrainChoice;presentationWindow?
Section titled “presentationWindow?”readonly optional presentationWindow?: object;presentationWindow.minX
Section titled “presentationWindow.minX”readonly minX: number;presentationWindow.maxX
Section titled “presentationWindow.maxX”readonly maxX: number;presentationWindow.minZ
Section titled “presentationWindow.minZ”readonly minZ: number;presentationWindow.maxZ
Section titled “presentationWindow.maxZ”readonly maxZ: number;characters?
Section titled “characters?”readonly optional characters?: Characters;Rigged characters: appearance, wardrobe commands, dismemberment.
horde?
Section titled “horde?”readonly optional horde?: HordeSimulation;Batched autonomous movement, independent of player action admission.
construction?
Section titled “construction?”readonly optional construction?: Construction;Buildables: adds their structures, the build command and placement.
scene?
Section titled “scene?”readonly optional scene?: readonly Placement[];The fresh world: actors placed on the ground. Placed actors are also spawnable templates.
rules?
Section titled “rules?”readonly optional rules?: readonly SystemDefinition[];World-level systems. Actor behavior belongs on .behaves().
commands?
Section titled “commands?”readonly optional commands?: Readonly<Record<string, GameCommandDefinition>>;seats?
Section titled “seats?”readonly optional seats?: SeatDefinition;Goals, command grants and world view available to any authorized seat.
presentation?
Section titled “presentation?”readonly optional presentation?: GamePresentation;persistentCharacters?
Section titled “persistentCharacters?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”number
initialActions?
Section titled “initialActions?”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.
scenarios?
Section titled “scenarios?”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.
players?
Section titled “players?”readonly optional players?: object;readonly join: PartyJoinCapability;shared?
Section titled “shared?”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).
shared.initialActions?
Section titled “shared.initialActions?”readonly optional initialActions?: readonly ActionRequest[];shared.features?
Section titled “shared.features?”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.
readonly local: object;Browser-local play: the local player’s scope and fresh-world setup.
local.scope
Section titled “local.scope”readonly scope: CommandScope;local.bootstrap
Section titled “local.bootstrap”readonly bootstrap: readonly ActionRequest[];local.opening?
Section titled “local.opening?”readonly optional opening?: object;A fresh player world’s story start: host actions (spawned scenery), then commands the player “has already given”.
local.opening.actions?
Section titled “local.opening.actions?”readonly optional actions?: readonly ActionRequest[];local.opening.commands?
Section titled “local.opening.commands?”readonly optional commands?: readonly object[];readonly page: Omit<CartridgePage, "placementVisuals" | "placementCandidates" | "windows" | "look">;readonly optional ui?: object;Small game windows (Maosaico frames styled by Caps), each with a Whistle command.
windows?
Section titled “windows?”readonly optional windows?: readonly CartridgeWindow[];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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
WindowWorld |
Returns
Section titled “Returns”"day" | "dusk" | "night"
readonly optional look?: LookSpec;An optional palette constraint and mood. Omit it for full colour.
Cartridgeinterface
Section titled “Cartridge”The checked, compiled cartridge. The only thing the Worker, page and host accept.
Properties
Section titled “Properties”readonly id: string;readonly title: string;version
Section titled “version”readonly version: number;readonly pack: GamePack;Browser-local pack: the local player joins at world start.
hostPack
Section titled “hostPack”readonly hostPack: GamePack;Shared-world pack for the hosted engine: players join by command.
readonly page: CartridgePage;seats?
Section titled “seats?”readonly optional seats?: SeatDefinition;sharedFeatures?
Section titled “sharedFeatures?”readonly optional sharedFeatures?: Readonly<Partial<Record<"minded-seats", readonly ActionRequest[]>>>;A shared world’s feature-gated setups (players.shared.features).
dismemberment?
Section titled “dismemberment?”readonly optional dismemberment?: object;Which cuts can come off and how the stump looks, when characters are on.
severable
Section titled “severable”severable: string[];gore: "moss" | "classic" | "off";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.
SceneEntityinterface
Section titled “SceneEntity”Properties
Section titled “Properties”readonly id: EntityId;components
Section titled “components”readonly components: Readonly<Record<string, ComponentFields>>;CompiledBuildableinterface
Section titled “CompiledBuildable”Properties
Section titled “Properties”definition
Section titled “definition”readonly definition: EnvironmentStructureDefinition;placement
Section titled “placement”readonly placement: object;alignment
Section titled “alignment”alignment: "fixed" | "stroke";facing?
Section titled “facing?”optional facing?: object;facing.north
Section titled “facing.north”north: number;facing.east
Section titled “facing.east”east: number;facing.south
Section titled “facing.south”south: number;facing.west
Section titled “facing.west”west: number;readonly name: string;sprites
Section titled “sprites”readonly sprites: string;readonly optional key?: string;palette?
Section titled “palette?”readonly optional palette?: false;Set when players may not plan it (the definition’s palette).
ConstructionPlanOptionsinterface
Section titled “ConstructionPlanOptions”Properties
Section titled “Properties”readonly party: EntityId;definition
Section titled “definition”readonly definition: EnvironmentStructureDefinition;candidates
Section titled “candidates”readonly candidates: readonly PlacementCandidate[];existingSites
Section titled “existingSites”readonly existingSites: readonly EntityId[];floorOperations
Section titled “floorOperations”readonly floorOperations: (requests) => readonly FloorOperation[];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requests |
readonly object[] |
Returns
Section titled “Returns”readonly FloorOperation[]
replacementGenerations
Section titled “replacementGenerations”readonly replacementGenerations: ReadonlyMap<EntityId, number>;replacementId
Section titled “replacementId”readonly replacementId: (floor, generation) => EntityId;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
floor |
EntityId |
generation |
number |
Returns
Section titled “Returns”ConstructionSiteStateinterface
Section titled “ConstructionSiteState”Properties
Section titled “Properties”catalog
Section titled “catalog”catalog: string;targetKind
Section titled “targetKind”targetKind: "edge" | "cell";targetX
Section titled “targetX”targetX: number;targetY
Section titled “targetY”targetY: number;targetZ
Section titled “targetZ”targetZ: number;targetDirection
Section titled “targetDirection”targetDirection: "x" | "z" | CardinalOrientation;seconds
Section titled “seconds”seconds: number;phase: "working" | "planned" | "finished";Diagnosticinterface
Section titled “Diagnostic”Properties
Section titled “Properties”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";message
Section titled “message”readonly message: string;One sentence naming the author’s ids, never engine internals.
readonly hint: string;The fix, as an instruction.
readonly path: readonly (string | number)[];Where in the cartridge spec, when known: ["scene", 3].
Effectinterface
Section titled “Effect”Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Properties
Section titled “Properties”component
Section titled “component”readonly component: ComponentDefinition<T & object>;The record component (add it to the producing behavior’s writes).
Methods
Section titled “Methods”emit()
Section titled “emit()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "createAuthoredEntity"> |
key |
string |
value |
T |
at |
number |
Returns
Section titled “Returns”void
all(context): T & object[];Every live record, oldest first.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
Returns
Section titled “Returns”T & object[]
since()
Section titled “since()”since(context, seen): T & object[];Records newer than seen (a consumer’s marker), oldest first.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> |
seen |
number |
Returns
Section titled “Returns”T & object[]
sweep()
Section titled “sweep()”sweep( context, now, keep): void;Remove records older than keep seconds (the producer only).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "query"> & Pick<WriteContext, "removeAuthoredEntity"> |
now |
number |
keep |
number |
Returns
Section titled “Returns”void
FeedbackStrengthinterface
Section titled “FeedbackStrength”A bounded response to contact strength; no simulation clock or RNG.
Properties
Section titled “Properties”readonly base: number;perDamage?
Section titled “perDamage?”readonly optional perDamage?: number;damageDivisor?
Section titled “damageDivisor?”readonly optional damageDivisor?: number;killBonus?
Section titled “killBonus?”readonly optional killBonus?: number;readonly min: number;readonly max: number;AnchoredFeedbackinterface
Section titled “AnchoredFeedback”Extended by
Section titled “Extended by”Properties
Section titled “Properties”height
Section titled “height”readonly height: number;readonly cue: AuthoredFeedbackCue;ShotFeedbackinterface
Section titled “ShotFeedback”Extends
Section titled “Extends”Properties
Section titled “Properties”height
Section titled “height”readonly height: number;Inherited from
Section titled “Inherited from”readonly cue: AuthoredFeedbackCue;Inherited from
Section titled “Inherited from”forward
Section titled “forward”readonly forward: number;recoil
Section titled “recoil”readonly recoil: number;muzzleArt?
Section titled “muzzleArt?”readonly optional muzzleArt?: readonly FeedbackArtPath[];SwingFeedbackinterface
Section titled “SwingFeedback”Properties
Section titled “Properties”readonly cue: AuthoredFeedbackCue;radius
Section titled “radius”readonly radius: number;readonly angle: number;height
Section titled “height”readonly height: number;readonly ms: number;readonly color: string;ContactFeedbackinterface
Section titled “ContactFeedback”Properties
Section titled “Properties”height
Section titled “height”readonly height: number;heavyDamage
Section titled “heavyDamage”readonly heavyDamage: number;ranged
Section titled “ranged”readonly ranged: AuthoredFeedbackCue;readonly melee: AuthoredFeedbackCue;readonly heavy: AuthoredFeedbackCue;readonly kill: AuthoredFeedbackCue;headKill
Section titled “headKill”readonly headKill: AuthoredFeedbackCue;hitstop
Section titled “hitstop”readonly hitstop: FeedbackStrength;readonly shake: FeedbackStrength;slowMotion
Section titled “slowMotion”readonly slowMotion: object;readonly scale: number;killMs
Section titled “killMs”readonly killMs: number;headMs
Section titled “headMs”readonly headMs: number;readonly bits: object;regular
Section titled “regular”readonly regular: FeedbackBitsKind;readonly gore: FeedbackBitsKind;readonly optional art?: readonly FeedbackArtPath[];readonly count: FeedbackStrength;spread
Section titled “spread”readonly spread: FeedbackStrength;rumble
Section titled “rumble”readonly rumble: object;strong
Section titled “strong”readonly strong: FeedbackStrength;readonly weak: number;readonly hitMs: number;killMs
Section titled “killMs”readonly killMs: number;SplatFeedbackinterface
Section titled “SplatFeedback”Properties
Section titled “Properties”readonly cue: AuthoredFeedbackCue;readonly size: FeedbackStrength;minSize
Section titled “minSize”readonly minSize: number;maxSize
Section titled “maxSize”readonly maxSize: number;readonly art: readonly object[];Ordered size bands, each with shape variants and their quarter turns.
readonly seed: object;readonly x: number;readonly z: number;FeedbackProfileinterface
Section titled “FeedbackProfile”Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Weapon extends string |
string |
Simple extends string |
string |
Swing extends string |
string |
Properties
Section titled “Properties”contact?
Section titled “contact?”readonly optional contact?: ContactFeedback;shots?
Section titled “shots?”readonly optional shots?: Readonly<Record<Weapon, ShotFeedback>>;swings?
Section titled “swings?”readonly optional swings?: Readonly<Record<Swing, SwingFeedback>>;splat?
Section titled “splat?”readonly optional splat?: SplatFeedback;wound?
Section titled “wound?”readonly optional wound?: object;height
Section titled “height”readonly height: number;readonly bites: readonly AuthoredFeedbackCue[];readonly claw: AuthoredFeedbackCue;simple?
Section titled “simple?”readonly optional simple?: Readonly<Record<Simple, AnchoredFeedback>>;FlowBarrierinterface
Section titled “FlowBarrier”A structure standing across a face, and how much it would take.
Properties
Section titled “Properties”readonly site: string;readonly cost: number;FlowGeometryinterface
Section titled “FlowGeometry”Navigation facts: blocked cells and weighted breakable edges are game data.
Properties
Section titled “Properties”profile
Section titled “profile”readonly profile: string;radius
Section titled “radius”readonly radius: number;center
Section titled “center”readonly center: FlowCell;terrainRevision
Section titled “terrainRevision”readonly terrainRevision: number;Change when terrain heights/passability change. Static worlds use zero.
blocked
Section titled “blocked”readonly blocked: ReadonlySet<string>;occupied
Section titled “occupied”readonly occupied: ReadonlySet<string>;readonly edges: ReadonlyMap<string, FlowBarrier>;FlowNavigationinterface
Section titled “FlowNavigation”Methods
Section titled “Methods”height()
Section titled “height()”height(cell): number | undefined;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cell |
FlowCell |
Returns
Section titled “Returns”number | undefined
crossing()
Section titled “crossing()”crossing(from, to): FlowBarrier | "corner" | null;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
from |
FlowCell |
to |
FlowCell |
Returns
Section titled “Returns”FlowBarrier | "corner" | null
next()
Section titled “next()”next(goal, from): | { to: FlowCell; barrier: FlowBarrier | null;} | null;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
goal |
FlowCell |
from |
FlowCell |
Returns
Section titled “Returns”| { to: FlowCell; barrier: FlowBarrier |
null; } | null
HordeSlotinterface
Section titled “HordeSlot”Properties
Section titled “Properties”readonly id: string;readonly x: number;readonly z: number;readonly reach: number;HordeSlotBodyinterface
Section titled “HordeSlotBody”Properties
Section titled “Properties”readonly id: EntityId;readonly x: number;readonly z: number;eligible
Section titled “eligible”readonly eligible: readonly string[];HordeSlotAssignmentinterface
Section titled “HordeSlotAssignment”Properties
Section titled “Properties”readonly slot: HordeSlot;arrived
Section titled “arrived”readonly arrived: boolean;LookSpecinterface
Section titled “LookSpec”How a cartridge looks. Everything is optional: a cartridge without a palette renders in full colour, exactly as the engine always has.
look: { palette: "glomzy-07" } // a built-in palettelook: { palette: { id: "two-tone", name: "Two Tone", colors: ["#0f380f", "#cadc9f"] } }look: { palette: parseLospecPalette("sweetie-16", hexFileText), mood: "dusk" }Properties
Section titled “Properties”palette?
Section titled “palette?”readonly optional palette?: string | Palette;A built-in palette id, or a palette (see parseLospecPalette in
@fungi.computer/vishnu-pixel for Lospec exports).
dither?
Section titled “dither?”readonly optional dither?: Partial<PaletteDither>;Ordered dithering between palette neighbours; omit for the default.
readonly optional mood?: "day" | "dusk" | "night";The mood a fresh world is shown in (default day).
moods?
Section titled “moods?”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" }]
ambientLight?
Section titled “ambientLight?”readonly optional ambientLight?: Readonly<Record<"day" | "dusk" | "night", number>>;View-only brightness levels keyed by the world’s chosen mood.
ambientTint?
Section titled “ambientTint?”readonly optional ambientTint?: Readonly<Record<"day" | "dusk" | "night", readonly [number, number, number]>>;View-only RGB light multipliers (0..1), independent of palette mapping.
terrain?
Section titled “terrain?”readonly optional terrain?: "voxel" | "smooth";Render voxel cells as authored faces or a sculpted surface net.
backdrop?
Section titled “backdrop?”readonly optional backdrop?: "ocean";Presentation-only horizon behind a bounded sea world.
MoodStopinterface
Section titled “MoodStop”From at simulation seconds on, the view shows mood.
Properties
Section titled “Properties”readonly at: number;readonly mood: "day" | "dusk" | "night";PhaseClockinterface
Section titled “PhaseClock”Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Phase extends string |
Properties
Section titled “Properties”readonly phase: Phase;readonly cycle: number;phaseAt
Section titled “phaseAt”readonly phaseAt: number;PhaseAdvanceinterface
Section titled “PhaseAdvance”Extends
Section titled “Extends”PhaseClock<Phase>
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Phase extends string |
Properties
Section titled “Properties”readonly phase: Phase;Inherited from
Section titled “Inherited from”readonly cycle: number;Inherited from
Section titled “Inherited from”phaseAt
Section titled “phaseAt”readonly phaseAt: number;Inherited from
Section titled “Inherited from”completed
Section titled “completed”readonly completed: ReadonlyMap<Phase, number>;Completed phases since the supplied clock, including skipped cycles.
Placementinterface
Section titled “Placement”One actor in the fresh world. Compiled by defineCartridge, never spawned.
Properties
Section titled “Properties”readonly actor: ActorDefinition;readonly id: EntityId;readonly at: Cell2;params
Section titled “params”readonly params: ActorParams;surface?
Section titled “surface?”readonly optional surface?: "sea";CompiledSceneinterface
Section titled “CompiledScene”The fresh world compiled from a scene.
Properties
Section titled “Properties”initial
Section titled “initial”readonly initial: readonly SceneEntity[];placements
Section titled “placements”readonly placements: readonly InitialSurfacePlacement[];EntityClassinterface
Section titled “EntityClass”Properties
Section titled “Properties”relation
Section titled “relation”readonly relation: EntityRelation;readonly kind: string;readonly glyph: string;state?
Section titled “state?”readonly optional state?: string;designated?
Section titled “designated?”readonly optional designated?: boolean;readonly optional job?: EntityId;SeatViewinterface
Section titled “SeatView”The same named world view is available to every authorized seat.
Properties
Section titled “Properties”sightRadius
Section titled “sightRadius”readonly sightRadius: number;verticalMetres
Section titled “verticalMetres”readonly verticalMetres: number;environment?
Section titled “environment?”readonly optional environment?: Pick<EnvironmentDefinition, "processes" | "resourceSites">;Methods
Section titled “Methods”ownActors()?
Section titled “ownActors()?”optional ownActors(reads, scope): ReadonlyMap<EntityId, Omit<EntityClass, "relation">>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reads |
SeatReads |
scope |
CommandScope | undefined |
Returns
Section titled “Returns”ReadonlyMap<EntityId, Omit<EntityClass,
"relation">>
terrainClass()
Section titled “terrainClass()”terrainClass(surface): TerrainClass;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
surface |
TerrainSurface |
Returns
Section titled “Returns”TerrainClass
classify()
Section titled “classify()”classify(reads): ReadonlyMap<EntityId, EntityClass>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reads |
SeatReads |
Returns
Section titled “Returns”ReadonlyMap<EntityId, EntityClass>
buildableTitle()
Section titled “buildableTitle()”buildableTitle(catalog): string;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
catalog |
string |
Returns
Section titled “Returns”string
SeatGoalinterface
Section titled “SeatGoal”A cartridge-authored challenge and its committed-state scoring rule.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
F extends SeatFacts |
SeatFacts |
Properties
Section titled “Properties”readonly id: string;readonly title: string;cartridge
Section titled “cartridge”readonly cartridge: string;setting
Section titled “setting”readonly setting: string;readonly seeds: readonly number[];turnBudget
Section titled “turnBudget”readonly turnBudget: number;spendCapUsd
Section titled “spendCapUsd”readonly spendCapUsd: number;maxSimSeconds
Section titled “maxSimSeconds”readonly maxSimSeconds: number;readonly goal: string;Methods
Section titled “Methods”facts()
Section titled “facts()”facts(reads): F;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reads |
SeatReads |
Returns
Section titled “Returns”F
outcome()
Section titled “outcome()”outcome(start, end): SeatOutcome<F>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
start |
F |
end |
F |
Returns
Section titled “Returns”SeatOutcome<F>
SeatDefinitioninterface
Section titled “SeatDefinition”Properties
Section titled “Properties”readonly view: SeatView;grants
Section titled “grants”readonly grants: Readonly<Record<string, readonly string[]>>;readonly goals: readonly SeatGoal<Readonly<Record<string, number>>>[];VoxelTerrainChoiceinterface
Section titled “VoxelTerrainChoice”Properties
Section titled “Properties”readonly kind: "voxel";environment
Section titled “environment”readonly environment: EnvironmentDefinition;readonly art: TerrainPresentationDefinition;SeaTerrainChoiceinterface
Section titled “SeaTerrainChoice”Properties
Section titled “Properties”readonly kind: "sea";environment
Section titled “environment”readonly environment: EnvironmentDefinition;readonly art: TerrainPresentationDefinition;CartridgeWindowinterface
Section titled “CartridgeWindow”Extends
Section titled “Extends”WindowDeclaration
Properties
Section titled “Properties”readonly kind: "window";readonly body: WindowBody;id: string;Inherited from
Section titled “Inherited from”WindowDeclaration.id;title: string;Inherited from
Section titled “Inherited from”WindowDeclaration.title;theme?
Section titled “theme?”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";Inherited from
Section titled “Inherited from”WindowDeclaration.theme;role: | "end" | "goal" | "minimap" | "letter" | "context" | "panel" | "hud" | "actions";Inherited from
Section titled “Inherited from”WindowDeclaration.role;optional end?: object;pause: "local" | "none";illustration?
Section titled “illustration?”optional illustration?: "dawn" | "recording";closeLabel
Section titled “closeLabel”closeLabel: string;restartLabel
Section titled “restartLabel”restartLabel: string;Inherited from
Section titled “Inherited from”WindowDeclaration.end;optional key?: string;Inherited from
Section titled “Inherited from”WindowDeclaration.key;opens: | { on: "start";} | { on: "command";} | { on: "content"; repeat?: boolean;} | { on: "presented-content"; repeat?: boolean;} | { on: "time"; seconds: number;};Inherited from
Section titled “Inherited from”WindowDeclaration.opens;size: object;width: number;height
Section titled “height”height: number;Inherited from
Section titled “Inherited from”WindowDeclaration.size;GenerationFingerprintinterface
Section titled “GenerationFingerprint”Properties
Section titled “Properties”readonly key: object;identity
Section titled “identity”identity: object = generationIdentitySchema;identity.seed
Section titled “identity.seed”seed: string;identity.version
Section titled “identity.version”version: "worldgen-v1";identity.kitHash
Section titled “identity.kitHash”kitHash: string;layer: string;id: string;digest
Section titled “digest”readonly digest: string;WorldSpecinterface
Section titled “WorldSpec”What a cartridge’s world needs; meadow() fills it in.
Properties
Section titled “Properties”materials
Section titled “materials”readonly materials: readonly object[];terrain
Section titled “terrain”readonly terrain: TerrainChoice;EntityIdtype alias
Section titled “EntityId”type EntityId = string & object;Public boundary between authored TypeScript and the authoritative kernel.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
__entityId |
unique symbol |
ComponentIdtype alias
Section titled “ComponentId”type ComponentId = `${string}.${string}`;GameIdtype alias
Section titled “GameId”type GameId = string;RouteCostResulttype alias
Section titled “RouteCostResult”type RouteCostResult = | { actor: EntityId; status: "reachable"; cost: number; } | { actor: EntityId; status: "unavailable"; reason: string; };RouteToAnyResulttype alias
Section titled “RouteToAnyResult”type RouteToAnyResult = | { actor: EntityId; status: "reachable"; targetIndex: number; cost: number; } | { actor: EntityId; status: "unavailable"; reason: string; };FieldTypetype alias
Section titled “FieldType”type FieldType = | "number" | "boolean" | "string" | "nullable-string" | "entity" | "nullable-entity";RelationRemovalPolicytype alias
Section titled “RelationRemovalPolicy”type RelationRemovalPolicy = "detach" | "restrict";ComponentValuetype alias
Section titled “ComponentValue”type ComponentValue<T> = object;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Properties
Section titled “Properties”readonly id: EntityId;readonly value: T;WriteIntenttype alias
Section titled “WriteIntent”type WriteIntent = object;Properties
Section titled “Properties”component
Section titled “component”readonly component: ComponentId;entity
Section titled “entity”readonly entity: EntityId;readonly value: JsonValue;JobEntityBindingtype alias
Section titled “JobEntityBinding”type JobEntityBinding = | { kind: "exact"; value: EntityId; } | { kind: "result"; value: { step: string; slot: string; }; };JobOperationtype alias
Section titled “JobOperation”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”type JobContinuation = | "any-eligible" | "prefer-starter" | "bind-on-first-progress" | { assigned-actor: EntityId;};CardinalOrientationtype alias
Section titled “CardinalOrientation”type CardinalOrientation = "north" | "east" | "south" | "west";EdgeTargettype alias
Section titled “EdgeTarget”type EdgeTarget = object;Properties
Section titled “Properties”readonly cell: readonly [number, number, number];readonly axis: "x" | "z";ConstructionTargettype alias
Section titled “ConstructionTarget”type ConstructionTarget = | { kind: "cell"; cell: Vec3; orientation: CardinalOrientation; } | { kind: "edge"; edge: { cell: Vec3; axis: "x" | "z"; }; };ActionRequesttype alias
Section titled “ActionRequest”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; };Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "wake-chunks";}Type Literal
Section titled “Type Literal”{ kind: "instantiate-actors"; bindingId: string; expectedSequence: number; plan: ActorInstantiationPlan;}Type Literal
Section titled “Type Literal”{ 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. |
Type Literal
Section titled “Type Literal”{ kind: "set-relation"; relation: ComponentId; source: EntityId; target: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "clear-relation"; relation: ComponentId; source: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "begin-work-attempt"; task: EntityId; worker: EntityId; operation: WorkActivityRef;}Type Literal
Section titled “Type Literal”{ kind: "retarget-work-attempt"; task: EntityId; generation: number; sequence: number; destination: MoveDestination;}Type Literal
Section titled “Type Literal”{ kind: "interrupt-work-attempt"; task: EntityId; generation: number; sequence: number; cause: WorkInterruptCause;}Type Literal
Section titled “Type Literal”{ kind: "acknowledge-work-attempt"; task: EntityId; generation: number; sequence: number;}Type Literal
Section titled “Type Literal”{ kind: "continue-work-attempt"; task: EntityId; generation: number; sequence: number; nextActivity: WorkActivityRef;}Type Literal
Section titled “Type Literal”{ kind: "create-job"; id: EntityId; pool: EntityId; plan: JobPlan;}Type Literal
Section titled “Type Literal”{ kind: "resume-job"; id: EntityId; pool: EntityId; plan: JobPlan;}Type Literal
Section titled “Type Literal”{ kind: "cancel-job"; id: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "establish-resource-site"; operation: string; worker: EntityId; site: EntityId; definition: string; x: number; y: number; z: number;}Type Literal
Section titled “Type Literal”{ kind: "tend-resource-site"; operation: string; worker: EntityId; site: EntityId; vessel: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "designate-resource"; order: EntityId; party: EntityId; definition: string; x: number; y: number; z: number;}Type Literal
Section titled “Type Literal”{ kind: "request-field-water"; party: EntityId; material: string; portions: number;}Type Literal
Section titled “Type Literal”{ kind: "request-process"; definition: string; station: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "admit-process"; process: EntityId; definition: string; station: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "designate-stockpile"; party: EntityId; zone: EntityId; cells: readonly object[];}Type Literal
Section titled “Type Literal”{ kind: "update-stockpile"; party: EntityId; zone: EntityId; filterProfile: string; priority: number;}Type Literal
Section titled “Type Literal”{ kind: "clear-stockpile"; party: EntityId; zone: EntityId; cells: readonly object[];}Type Literal
Section titled “Type Literal”{ kind: "set-structure-open"; worker: EntityId; site: EntityId; open: boolean;}Type Literal
Section titled “Type Literal”{ kind: "deconstruct"; worker: EntityId; site: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "break-structure"; site: EntityId;}| Name | Type | Description |
|---|---|---|
kind |
"break-structure" |
Tear down a finished structure with no worker: it was broken. |
site |
EntityId |
- |
Type Literal
Section titled “Type Literal”{ kind: "plan-deconstruction"; site: EntityId; party: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "plan-constructions"; party: EntityId; plans: readonly PlacementCandidate[];}Type Literal
Section titled “Type Literal”{ 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[] |
- |
Type Literal
Section titled “Type Literal”{ kind: "plan-excavation"; party: EntityId; prefix: string; start: readonly[(number, number, number)]; end: readonly[(number, number, number)];}Type Literal
Section titled “Type Literal”{ kind: "cancel-excavation"; party: EntityId; area: | { start: readonly [number, number, number]; end: readonly [number, number, number]; } | null; workers: readonly EntityId[];}Type Literal
Section titled “Type Literal”{ kind: "replace-floor"; orderId: EntityId; existingFloorId: EntityId; desiredCatalog: string;}Type Literal
Section titled “Type Literal”{ kind: "bind-construction-stage"; site: EntityId; contact: Vec3 & object;}Type Literal
Section titled “Type Literal”{ kind: "cancel-work"; entity: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "begin-direct"; entity: EntityId; stream: string;}Type Literal
Section titled “Type Literal”{ kind: "begin-emission"; worker: EntityId; station: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "exchange-field-water"; operation: string; worker: EntityId; vessel: EntityId; x: number; y: number; z: number; direction: "withdraw" | "deposit"; portions: number;}Type Literal
Section titled “Type Literal”{ kind: "direct-input"; entity: EntityId; stream: string; inputs: readonly object[];}Type Literal
Section titled “Type Literal”{ kind: "launch"; launcher: EntityId; ammunition: EntityId; velocity: Vec3;}Type Literal
Section titled “Type Literal”{ kind: "displace"; entity: EntityId; delta: Vec3;}Type Literal
Section titled “Type Literal”{ kind: "move"; entity: EntityId; destination: MoveDestination; facing?: number; speed?: number;}Type Literal
Section titled “Type Literal”{ kind: "drop-lot"; entity: EntityId; lot: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "transfer"; lot: EntityId; from: EntityId; to: EntityId; quantity: number;}Type Literal
Section titled “Type Literal”{ kind: "request-delivery"; source: EntityId; destination: EntityId; material: string; quantity: number; party: EntityId;}Type Literal
Section titled “Type Literal”{ kind: "consume"; entity: EntityId; lot: EntityId; quantity: number;}Type Literal
Section titled “Type Literal”{ kind: "extract-resource"; operation: string; worker: EntityId; source: EntityId;}WorkActivityReftype alias
Section titled “WorkActivityRef”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”type WorkInterruptCause = "drafted" | "cancelled" | "workerUnavailable" | "accessLost";WorkBlockReasontype alias
Section titled “WorkBlockReason”type WorkBlockReason = | "accessLost" | "missingInputs" | "capacityUnavailable" | "unsupportedStructure" | "workerUnavailable";WorkOutcometype alias
Section titled “WorkOutcome”type WorkOutcome = | { kind: "completed"; } | { kind: "blocked"; reason: WorkBlockReason; } | { kind: "interrupted"; cause: WorkInterruptCause; };WorkAttemptPhasetype alias
Section titled “WorkAttemptPhase”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”type ProcessInputPolicy = "portion" | "whole-lot";ProcessInputDispositiontype alias
Section titled “ProcessInputDisposition”type ProcessInputDisposition = "consume" | "retain" | "emission-source";NativeFacttype alias
Section titled “NativeFact”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”type CommandScope = | { kind: "host"; } | { kind: "player"; player: string; };PartyJoinIdentitytype alias
Section titled “PartyJoinIdentity”type PartyJoinIdentity = Readonly<{ status: "existing" | "available"; sequence: number; player: string; party: EntityId; people: readonly EntityId[];}>;SpawnArgumenttype alias
Section titled “SpawnArgument”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”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”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”type PartyJoinCapability = Readonly<{ footprint: readonly (readonly [number, number][]); prepare: (spawn) => ActorInstantiationPlan;}>;ActionScopetype alias
Section titled “ActionScope”type ActionScope = | { kind: "host"; } | { kind: "player"; player: string; };GameCommandContexttype alias
Section titled “GameCommandContext”type GameCommandContext = Pick< ReadContext, | "query" | "physicalContacts" | "terrainMaterials" | "terrainSurfaces" | "structureSurfaces" | "transferContacts"> & object;Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
scope |
CommandScope |
workAttempts() |
(taskIds) => readonly WorkAttempt[] |
workAttemptForWorker() |
(worker) => WorkAttempt | null |
floorOperations() |
(requests) => readonly FloorOperation[] |
VisualPlacementtype alias
Section titled “VisualPlacement”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”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”type ActivityKind = "dig" | "build" | "chop" | "delivery";KernelSnapshottype alias
Section titled “KernelSnapshot”type KernelSnapshot = KernelRecordSnapshot;ConstructionReadinessStatustype alias
Section titled “ConstructionReadinessStatus”type ConstructionReadinessStatus = "ready" | "waitingForSupport" | "unknown";ConstructionAccessContacttype alias
Section titled “ConstructionAccessContact”type ConstructionAccessContact = Vec3 & object;Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
frame |
null |
kind |
"origin" | "landing" |
DeconstructionAccesstype alias
Section titled “DeconstructionAccess”type DeconstructionAccess = object;Properties
Section titled “Properties”readonly site: EntityId;status
Section titled “status”readonly status: "ready" | "occupiedPort" | "structuralDependency" | "invalidGeometry";contacts
Section titled “contacts”readonly contacts: readonly ConstructionAccessContact[];salvageQuantity
Section titled “salvageQuantity”readonly salvageQuantity: number;workSeconds
Section titled “workSeconds”readonly workSeconds: number;PhysicalContacttype alias
Section titled “PhysicalContact”type PhysicalContact = object;Properties
Section titled “Properties”readonly solid: boolean;sealedTop
Section titled “sealedTop”readonly sealedTop: boolean;outside
Section titled “outside”readonly outside: boolean;TerrainSurfacetype alias
Section titled “TerrainSurface”type TerrainSurface = z.infer<typeof terrainSurfaceSchema>;TerrainSurfaceCovertype alias
Section titled “TerrainSurfaceCover”type TerrainSurfaceCover = NonNullable<TerrainSurface["cover"]>;StructureSurfacetype alias
Section titled “StructureSurface”type StructureSurface = object;Properties
Section titled “Properties”readonly cell: readonly [number, number, number];FloorOperationtype alias
Section titled “FloorOperation”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”type FloorOperationRequest = object;Properties
Section titled “Properties”readonly cell: readonly [number, number, number];desiredCatalog
Section titled “desiredCatalog”readonly desiredCatalog: string;TerrainChangeSettype alias
Section titled “TerrainChangeSet”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”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”type JsonValue = | null | boolean | number | string | readonly JsonValue[] | { [key: string]: JsonValue; };ComponentValuestype alias
Section titled “ComponentValues”type ComponentValues = Readonly<Record<string, JsonValue>>;GameCommandAvailabilitytype alias
Section titled “GameCommandAvailability”type GameCommandAvailability = | { status: "available"; } | { status: "unavailable"; reason: string; };EnvironmentFactstype alias
Section titled “EnvironmentFacts”type EnvironmentFacts = z.infer<typeof environmentFactsSchema>;AuthoredFeedbackCuetype alias
Section titled “AuthoredFeedbackCue”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”type CartridgeAudio = z.infer<typeof cartridgeAudioSchema>;CapabilityReferencetype alias
Section titled “CapabilityReference”type CapabilityReference = ComponentDefinition<any> | ComponentId;ActorInitialtype alias
Section titled “ActorInitial”type ActorInitial<T> = { readonly [K in keyof T]: T[K] | ActorInput };Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
BlueprintSidetype alias
Section titled “BlueprintSide”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”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”type CameraFollowPolicy = z.infer<typeof cameraFollowSchema>;CartridgeCameraPolicytype alias
Section titled “CartridgeCameraPolicy”type CartridgeCameraPolicy = z.infer<typeof cartridgeCameraSchema>;BankPathtype alias
Section titled “BankPath”type BankPath = readonly (string | number)[];PailPosestype alias
Section titled “PailPoses”type PailPoses = Readonly<{ contentKind: string; empty: string; partial: string; full: string;}>;VisualBindingstype alias
Section titled “VisualBindings”type VisualBindings = Readonly<Record<string, VisualBinding>>;StaticVisualBindingtype alias
Section titled “StaticVisualBinding”type StaticVisualBinding = VisualBinding & object;A static frame by its path in the art (the bank’s, or a cartridge pack’s under its root).
Type Declaration
Section titled “Type Declaration”| 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”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.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ entity: string;}One fixed actor, the same for every viewer.
Type Literal
Section titled “Type Literal”{ 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”type HostFeature = (typeof HOST_FEATURES)[number];ComponentFieldstype alias
Section titled “ComponentFields”type ComponentFields = Readonly<Record<string, JsonValue>>;One component’s field values as they cross into the kernel.
BuildableDefinitiontype alias
Section titled “BuildableDefinition”type BuildableDefinition = z.infer<typeof buildableDefinitionSchema>;ConstructionProposalInputtype alias
Section titled “ConstructionProposalInput”type ConstructionProposalInput = z.infer<typeof constructionProposalInput>;DiagnosticCodetype alias
Section titled “DiagnosticCode”type DiagnosticCode = keyof typeof DIAGNOSTICS;EffectFieldstype alias
Section titled “EffectFields”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
FlowCelltype alias
Section titled “FlowCell”type FlowCell = readonly [number, number];PresentationLighttype alias
Section titled “PresentationLight”type PresentationLight = z.infer<typeof presentationLightSchema>;CartridgeLightingtype alias
Section titled “CartridgeLighting”type CartridgeLighting = z.infer<typeof cartridgeLightingSchema>;Moodtype alias
Section titled “Mood”type Mood = (typeof MOODS)[number];TerrainLooktype alias
Section titled “TerrainLook”type TerrainLook = z.infer<typeof terrainLookSchema>;Looktype alias
Section titled “Look”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.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ 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" |
- |
Type Literal
Section titled “Type Literal”{ 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" |
- |
Cell2type alias
Section titled “Cell2”type Cell2 = readonly [number, number];A ground cell: [x, z]. The actor settles onto the surface there.
ActorParamstype alias
Section titled “ActorParams”type ActorParams = Readonly<Record<string, string | number | boolean | null>>;Values for an actor’s declared inputs, by input name.
SeatFactstype alias
Section titled “SeatFacts”type SeatFacts = Readonly<Record<string, number>>;TerrainChoicetype alias
Section titled “TerrainChoice”type TerrainChoice = VoxelTerrainChoice | SeaTerrainChoice;WindowWorldtype alias
Section titled “WindowWorld”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”type RunCommand = (command, input?) => void;The single command door: "garden:plantSeeds" or "ui:garden.goals".
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
command |
string |
input? |
JsonValue |
Returns
Section titled “Returns”void
WindowBodytype alias
Section titled “WindowBody”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
WindowWorld |
Returns
Section titled “Returns”readonly WindowBlock[]
WorldgenAssemblytype alias
Section titled “WorldgenAssembly”type WorldgenAssembly = z.infer<typeof worldgenAssemblySchema>;RoomDefinitiontype alias
Section titled “RoomDefinition”type RoomDefinition = z.infer<typeof roomDefinitionSchema>;BuildingDefinitiontype alias
Section titled “BuildingDefinition”type BuildingDefinition = z.infer<typeof buildingDefinitionSchema>;WorldgenChecktype alias
Section titled “WorldgenCheck”type WorldgenCheck = Extract< z.infer<typeof worldgenCheckSchema>, { status: "valid"; }>;BuildingLayouttype alias
Section titled “BuildingLayout”type BuildingLayout = z.infer<typeof buildingLayoutSchema>;BuildingGraphtype alias
Section titled “BuildingGraph”type BuildingGraph = z.infer<typeof buildingGraphSchema>;CompileRequesttype alias
Section titled “CompileRequest”type CompileRequest = z.infer<typeof compileRequestSchema>;CompiledBuildingtype alias
Section titled “CompiledBuilding”type CompiledBuilding = z.infer<typeof compiledBuilding>;GenerationIdentitytype alias
Section titled “GenerationIdentity”type GenerationIdentity = z.infer<typeof generationIdentitySchema>;PopulationPolicytype alias
Section titled “PopulationPolicy”type PopulationPolicy = z.infer<typeof populationPolicySchema>;ChunkPolicytype alias
Section titled “ChunkPolicy”type ChunkPolicy = z.infer<typeof chunkPolicySchema>;ChunkWindowtype alias
Section titled “ChunkWindow”type ChunkWindow = z.infer<typeof chunkWindowSchema>;ChunkFactstype alias
Section titled “ChunkFacts”type ChunkFacts = z.infer<typeof chunkFactsSchema>;GenerationKeytype alias
Section titled “GenerationKey”type GenerationKey = z.infer<typeof generationKeySchema>;ChunkPlantype alias
Section titled “ChunkPlan”type ChunkPlan = z.infer<typeof chunkPlanSchema>;WindowBlocktype alias
Section titled “WindowBlock”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”type WindowRole = z.infer<typeof windowRoleSchema>;Where the shell shows a window.
WindowOpeningtype alias
Section titled “WindowOpening”type WindowOpening = z.infer<typeof windowOpeningSchema>;When a window first opens on its own.
RESERVED_COMPONENTSconstant
Section titled “RESERVED_COMPONENTS”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”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”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”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”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”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”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”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”const HOST_FEATURES: readonly ["minded-seats"];Engine features a host switches on for the shared worlds it opens.
Colliderconstant
Section titled “Collider”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”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”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”const Body: ComponentDefinition<{ speed: number;}>;Native movement capability; game systems may query it but cannot write it.
Emitterconstant
Section titled “Emitter”const Emitter: ComponentDefinition<{ catalog: string;}>;Native finite-emission capability; catalog admission remains native-owned.
Containerconstant
Section titled “Container”const Container: ComponentDefinition<{ capacity: number;}>;Native carrying capacity; authored systems may query but cannot write it.
Traversalconstant
Section titled “Traversal”const Traversal: ComponentDefinition<{ clearanceCells: number; maxStepCells: number;}>;Authored walking geometry; native routing owns its interpretation and state.
Positionconstant
Section titled “Position”const Position: ComponentDefinition<{ x: number; y: number; z: number; facing: number;}>;Visualconstant
Section titled “Visual”const Visual: ComponentDefinition<{ sprite: string; label: string;}>;Native authored sprite identity. Presentation projections must not replace it.
Supportconstant
Section titled “Support”const Support: ComponentDefinition<{ entity: EntityId;}>;Surfaceconstant
Section titled “Surface”const Surface: ComponentDefinition<{ minX: number; maxX: number; minZ: number; maxZ: number; height: number;}>;MaterialLotconstant
Section titled “MaterialLot”const MaterialLot: ComponentDefinition<{ quantity: number; kind: string; container: EntityId;}>;Handsconstant
Section titled “Hands”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”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”const LotWater: ComponentDefinition<{ waterKg: number;}>;SupplyAllocationconstant
Section titled “SupplyAllocation”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”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”const FiniteResource: ComponentDefinition<{ kind: string; quantity: number;}>;JobTaskWorkconstant
Section titled “JobTaskWork”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”const ResourceSite: ComponentDefinition<{ definition: string; stage: number; nextDue: number;}>;Destinationconstant
Section titled “Destination”const Destination: ComponentDefinition<{ x: number; y: number; z: number; facing: number; frame: EntityId | null;}>;placedAtconstant
Section titled “placedAt”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”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”const ExcavationOrder: ComponentDefinition<{ cellX: number; cellY: number; cellZ: number; expected: number; status: "queued" | "blocked" | "cancelling"; reason: string;}>;Buildableconstant
Section titled “Buildable”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”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”const SealedContainer: ComponentDefinition<Record<string, never>>;Native custody is observable; authored writes cannot lock or unlock goods.
ConstructionSiteconstant
Section titled “ConstructionSite”const ConstructionSite: ComponentDefinition<ConstructionSiteState>;The site owns earned effort; active worker ownership lives in WorkAttempt.
FloorReplacementconstant
Section titled “FloorReplacement”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”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”const DIAGNOSTICS: object;The stable catalog. A code never changes meaning once published.
Type Declaration
Section titled “Type Declaration”FLOW_NEIGHBOURSconstant
Section titled “FLOW_NEIGHBOURS”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”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”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”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”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”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”const terrainLookSchema: ZodEnum<{ voxel: "voxel"; smooth: "smooth";}>;FULL_COLOURconstant
Section titled “FULL_COLOUR”const FULL_COLOUR: Look;Full colour: no palette constraint.
Partyconstant
Section titled “Party”const Party: ComponentDefinition<Record<string, never>>;Gameplay group identity. Membership and ownership are separate facts.
OwnedByconstant
Section titled “OwnedBy”const OwnedBy: ComponentDefinition<{ player: string;}>;Stable player property. Access rules decide which operations it permits.
PartyMemberconstant
Section titled “PartyMember”const PartyMember: ComponentDefinition<{ party: EntityId;}>;A person belongs to this party without duplicating their physical identity.
OwnedByPartyconstant
Section titled “OwnedByParty”const OwnedByParty: ComponentDefinition<{ party: EntityId;}>;Party ownership for property and stationary stores.
StagedProcessconstant
Section titled “StagedProcess”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”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”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”const Spawned: ComponentDefinition<{ cause: string; digest: string;}>;Where the kernel keeps a spawned entity’s cause and request digest.
terrainChoiceSchemaconstant
Section titled “terrainChoiceSchema”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”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”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”const WorkParticipation: ComponentDefinition<{ automatic: boolean;}>;Player participation policy for the shared automatic work owner.
WorkPolicyconstant
Section titled “WorkPolicy”const WorkPolicy: ComponentDefinition<{ pool: string; priority: number; enabled: boolean;}>;WorkExecutionconstant
Section titled “WorkExecution”const WorkExecution: ComponentDefinition<{ pool: string; initiatingPlayer: string | null; policyId: string;}>;WorkScheduleconstant
Section titled “WorkSchedule”const WorkSchedule: ComponentDefinition<{ nextReviewTick: number; lastConsidered: number;}>;worldgenAssemblySchemaconstant
Section titled “worldgenAssemblySchema”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”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”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”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”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”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”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”const generationIdentitySchema: ZodObject< { seed: ZodString; version: ZodLiteral<"worldgen-v1">; kitHash: ZodString; }, $strict>;populationPolicySchemaconstant
Section titled “populationPolicySchema”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”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”const chunkWindowSchema: ZodObject< { minX: ZodInt; maxX: ZodInt; minZ: ZodInt; maxZ: ZodInt; }, $strict>;chunkFactsSchemaconstant
Section titled “chunkFactsSchema”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”const generationKeySchema: ZodObject< { identity: ZodObject< { seed: ZodString; version: ZodLiteral<"worldgen-v1">; kitHash: ZodString; }, $strict >; layer: ZodString; id: ZodString; }, $strict>;generationKeyResultSchemaconstant
Section titled “generationKeyResultSchema”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”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”const MEADOW_VERTICAL_METRES: 0.54 = 0.54;Metres per vertical terrain cell in the library worlds.
isReservedComponent()function
Section titled “isReservedComponent()”function isReservedComponent(id): boolean;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”boolean
isNativeComponentSchema()function
Section titled “isNativeComponentSchema()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”boolean
component()function
Section titled “component()”function component<T>(id, options): ComponentDefinition<T>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”relation()function
Section titled “relation()”function relation<T>(id, options): ComponentDefinition<T>;Register a one-target relation through the same component definition path.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”setRelation()function
Section titled “setRelation()”function setRelation<T>(definition, source, target): ActionRequest;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
ComponentDefinition<T> |
source |
EntityId |
target |
EntityId |
Returns
Section titled “Returns”clearRelation()function
Section titled “clearRelation()”function clearRelation<T>(definition, source): ActionRequest;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
ComponentDefinition<T> |
source |
EntityId |
Returns
Section titled “Returns”query()function
Section titled “query()”function query<T>(...components): QuerySpec<T>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…components |
readonly ComponentDefinition<any>[] |
Returns
Section titled “Returns”QuerySpec<T>
system()function
Section titled “system()”function system(options): SystemDefinition;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
SystemOptions |
Returns
Section titled “Returns”command()function
Section titled “command()”function command<TInput>(options): GameCommandDefinition;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TInput |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
Omit<GameCommandDefinition, | "input" | "title" | "description" | "subjects" | "invoke" | "category" | "availability"> & object |
Returns
Section titled “Returns”entity()function
Section titled “entity()”function entity(id): EntityId;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
Returns
Section titled “Returns”definitionCapability()function
Section titled “definitionCapability()”function definitionCapability<T>(id, options): ActorDefinitionCapability<T>;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
`${string}.${string}` |
options |
{ schema: ZodType<T>; externalCreation?: boolean; } |
options.schema |
ZodType<T> |
options.externalCreation? |
boolean |
Returns
Section titled “Returns”predicate()function
Section titled “predicate()”function predicate(id, options): PredicateDefinition;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”action()function
Section titled “action()”function action(id, options): BehaviorActionDefinition;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”behavior()function
Section titled “behavior()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
`${string}.${string}` |
define |
(scene) => void |
options |
BehaviorOptions |
Returns
Section titled “Returns”installActorBehaviors()function
Section titled “installActorBehaviors()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
actors |
readonly ActorDefinition[] |
Returns
Section titled “Returns”readonly SystemDefinition[]
actor()function
Section titled “actor()”function actor(id, options?): ActorDefinition;Compose an immutable actor definition; spawning remains an admitted world operation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
options |
{ version?: number; } |
options.version? |
number |
Returns
Section titled “Returns”blueprintModule()function
Section titled “blueprintModule()”function blueprintModule(id, spec): BlueprintModule;Declare one room. Openings and slots are checked against its size.
Parameters
Section titled “Parameters”| 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>>> |
Returns
Section titled “Returns”assembleBlueprint()function
Section titled “assembleBlueprint()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
recipe |
BlueprintRecipe |
Returns
Section titled “Returns”compileBlueprint()function
Section titled “compileBlueprint()”function compileBlueprint(blueprint, kit): object;Compile a ground-level blueprint through the same native owner as storeys.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
blueprint |
Blueprint |
kit |
BlueprintKit |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
plans |
readonly PlacementCandidate[] |
unplaced |
readonly object[] |
compileBlueprintLevels()function
Section titled “compileBlueprintLevels()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
levels |
readonly BlueprintLevel[] |
kit |
BlueprintKit |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
plans |
readonly PlacementCandidate[] |
unplaced |
readonly object[] |
prebuildBatches()function
Section titled “prebuildBatches()”function prebuildBatches(party, plans): readonly ActionRequest[];Plans split into prebuild actions of at most 256 structures each.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
party |
EntityId |
plans |
readonly PlacementCandidate[] |
Returns
Section titled “Returns”readonly ActionRequest[]
buildable()function
Section titled “buildable()”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.
Parameters
Section titled “Parameters”| 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. |
Returns
Section titled “Returns”buildBindingDetail()function
Section titled “buildBindingDetail()”function buildBindingDetail(compiled, orientation?): string;Compact build-bar copy: cost, size, gesture and facing.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
compiled |
CompiledBuildable |
orientation? |
string |
Returns
Section titled “Returns”string
construction()function
Section titled “construction()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
ConstructionOptions |
Returns
Section titled “Returns”defineCartridge()function
Section titled “defineCartridge()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
CartridgeSpec |
Returns
Section titled “Returns”launch()function
Section titled “launch()”function launch(launcher, ammunition, velocity): ActionRequest;Velocity is in world axes, relative to the launcher’s motion.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
launcher |
EntityId |
ammunition |
EntityId |
velocity |
Vec3 |
Returns
Section titled “Returns”displace()function
Section titled “displace()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
EntityId |
delta |
Vec3 |
Returns
Section titled “Returns”beginEmission()function
Section titled “beginEmission()”function beginEmission(worker, station): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worker |
EntityId |
station |
EntityId |
Returns
Section titled “Returns”exchangeFieldWater()function
Section titled “exchangeFieldWater()”function exchangeFieldWater( operation, worker, vessel, cell, portions?,): ActionRequest;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”move()function
Section titled “move()”function move(entity, destination, facing?, speed?): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
entity |
EntityId |
undefined |
destination |
MoveDestination |
undefined |
facing |
number |
0 |
speed? |
number |
undefined |
Returns
Section titled “Returns”dropLot()function
Section titled “dropLot()”function dropLot(entity, lot): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
EntityId |
lot |
EntityId |
Returns
Section titled “Returns”transfer()function
Section titled “transfer()”function transfer(lot, from, to, quantity): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
lot |
EntityId |
from |
EntityId |
to |
EntityId |
quantity |
number |
Returns
Section titled “Returns”requestDelivery()function
Section titled “requestDelivery()”function requestDelivery(request): ActionRequest;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”consume()function
Section titled “consume()”function consume(entity, lot, quantity): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
EntityId |
lot |
EntityId |
quantity |
number |
Returns
Section titled “Returns”extractResource()function
Section titled “extractResource()”function extractResource(operation, worker, source): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operation |
string |
worker |
EntityId |
source |
EntityId |
Returns
Section titled “Returns”establishResourceSite()function
Section titled “establishResourceSite()”function establishResourceSite( operation, worker, site, definition, cell,): ActionRequest;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”tendResourceSite()function
Section titled “tendResourceSite()”function tendResourceSite(operation, worker, site, vessel): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
operation |
string |
worker |
EntityId |
site |
EntityId |
vessel |
EntityId |
Returns
Section titled “Returns”encodeDefinition()function
Section titled “encodeDefinition()”function encodeDefinition( game, components, initial?, materialCatalog, stockpileProfiles?, actors?,): Uint8Array<ArrayBuffer>;Parameters
Section titled “Parameters”| 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[] |
[] |
Returns
Section titled “Returns”Uint8Array<ArrayBuffer>
cancelWork()function
Section titled “cancelWork()”function cancelWork(entity): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
EntityId |
Returns
Section titled “Returns”compileBuildable()function
Section titled “compileBuildable()”function compileBuildable(actor): CompiledBuildable | null;Compile one actor capability set into the existing native structure owner.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
actor |
ActorDefinition |
Returns
Section titled “Returns”CompiledBuildable | null
compileBuildableEnvironment()function
Section titled “compileBuildableEnvironment()”function compileBuildableEnvironment( environment, actors,): EnvironmentDefinition;Add actor-authored structures to one environment and run its full validator.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
environment |
EnvironmentDefinition |
actors |
readonly ActorDefinition[] |
Returns
Section titled “Returns”EnvironmentDefinition
constructionCandidates()function
Section titled “constructionCandidates()”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.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”readonly PlacementCandidate[]
constructionPlanActions()function
Section titled “constructionPlanActions()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
ConstructionPlanOptions |
Returns
Section titled “Returns”readonly ActionRequest[]
constructionTarget()function
Section titled “constructionTarget()”function constructionTarget(site): ConstructionTarget;Decode the native flat component wire into its exhaustive physical target.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
site |
ConstructionSiteState |
Returns
Section titled “Returns”constructionCell()function
Section titled “constructionCell()”function constructionCell(site): Vec3;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
site |
ConstructionSiteState |
Returns
Section titled “Returns”replaceFloor()function
Section titled “replaceFloor()”function replaceFloor(orderId, existingFloorId, desiredCatalog): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
orderId |
EntityId |
existingFloorId |
EntityId |
desiredCatalog |
string |
Returns
Section titled “Returns”planConstructions()function
Section titled “planConstructions()”function planConstructions(party, plans): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
party |
EntityId |
plans |
readonly PlacementCandidate[] |
Returns
Section titled “Returns”prebuildStructures()function
Section titled “prebuildStructures()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
party |
EntityId |
plans |
readonly PlacementCandidate[] |
Returns
Section titled “Returns”bindConstructionStage()function
Section titled “bindConstructionStage()”function bindConstructionStage(site, contact): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
site |
EntityId |
contact |
Vec3 |
Returns
Section titled “Returns”setStructureOpen()function
Section titled “setStructureOpen()”function setStructureOpen(worker, site, open): ActionRequest;Request a desired aperture state; native contact and physical admission decide.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worker |
EntityId |
site |
EntityId |
open |
boolean |
Returns
Section titled “Returns”breakStructure()function
Section titled “breakStructure()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
site |
EntityId |
Returns
Section titled “Returns”deconstruct()function
Section titled “deconstruct()”function deconstruct(worker, site): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
worker |
EntityId |
site |
EntityId |
Returns
Section titled “Returns”formatDiagnostic()function
Section titled “formatDiagnostic()”function formatDiagnostic(diagnostic): string;VD013 <message>\n hint: <hint> — the terminal and overlay rendering.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
diagnostic |
Diagnostic |
Returns
Section titled “Returns”string
fail()function
Section titled “fail()”function fail(code, message, hint, path?): never;Throw one diagnostic.
Parameters
Section titled “Parameters”| 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)[] |
[] |
Returns
Section titled “Returns”never
effect()function
Section titled “effect()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id |
`${string}.${string}` |
- |
fields |
EffectFields<T> |
Every field, at and seq included: { ..., at: "number", seq: "number" }. |
Returns
Section titled “Returns”Effect<T>
createFeedback()function
Section titled “createFeedback()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Weapon extends string |
Simple extends string |
Swing extends string |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
profile |
FeedbackProfile<Weapon, Simple, Swing> |
Returns
Section titled “Returns”Readonly<{ swing: AuthoredFeedbackCue; hit:
AuthoredFeedbackCue; shot:
AuthoredFeedbackCue; splatSize: number; splat:
AuthoredFeedbackCue; wound:
AuthoredFeedbackCue; cue:
AuthoredFeedbackCue; }>
felt()function
Section titled “felt()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cue |
AuthoredFeedbackCue |
by |
string |
Returns
Section titled “Returns”readonly AuthoredFeedbackCue[]
hordeMovement()function
Section titled “hordeMovement()”function hordeMovement(options?): HordeSimulation;Geometry is projected once per phase; all bodies share fields and neighbour lookup.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”HordeSimulation
perceptionFrame()function
Section titled “perceptionFrame()”function perceptionFrame(input, geometry?): object;Immutable, step-local sensor frame. Games supply emitters, targets and geometry.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
targets |
readonly object[] |
observe() |
(input) => object |
assignHordeSlots()function
Section titled “assignHordeSlots()”function assignHordeSlots(input): ReadonlyMap<EntityId, HordeSlotAssignment>;Nearest eligible bodies fill interchangeable slots; one body and one occupant per slot.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ slots: readonly HordeSlot[]; bodies: readonly HordeSlotBody[]; } |
input.slots |
readonly HordeSlot[] |
input.bodies |
readonly HordeSlotBody[] |
Returns
Section titled “Returns”ReadonlyMap<EntityId,
HordeSlotAssignment>
localSteering()function
Section titled “localSteering()”function localSteering(input): object;Stateless local steering. Native collision remains the final movement authority.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
advance() |
(input) => object |
resolveLook()function
Section titled “resolveLook()”function resolveLook(spec): Look;Check a cartridge’s look. Throws a coded VD diagnostic on a bad look.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
spec |
LookSpec | undefined |
Returns
Section titled “Returns”ambientLightForMood()function
Section titled “ambientLightForMood()”function ambientLightForMood(look, mood): number;Brightness follows the one mood chosen by the cartridge’s presentation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
look |
Look |
mood |
"day" | "dusk" | "night" |
Returns
Section titled “Returns”number
moodAt()function
Section titled “moodAt()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
look |
Look |
seconds |
number |
Returns
Section titled “Returns”"day" | "dusk" | "night"
instantiateActors()function
Section titled “instantiateActors()”function instantiateActors(bindingId, expectedSequence, plan): ActionRequest;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bindingId |
string |
expectedSequence |
number |
plan |
ActorInstantiationPlan |
Returns
Section titled “Returns”partyMemberIds()function
Section titled “partyMemberIds()”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).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
read |
<T>(spec) => QueryView<T> |
viewer |
CommandScope |
Returns
Section titled “Returns”ReadonlySet<EntityId>
ownedActorIds()function
Section titled “ownedActorIds()”function ownedActorIds(read, viewer): ReadonlySet<EntityId>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
read |
<T>(spec) => QueryView<T> |
viewer |
CommandScope |
Returns
Section titled “Returns”ReadonlySet<EntityId>
definePhaseCycle()function
Section titled “definePhaseCycle()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Phase extends string |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definitions |
readonly object[] |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
seconds |
number |
duration() |
(id) => number |
advance() |
(clock, now) => PhaseAdvance<Phase> |
requestProcess()function
Section titled “requestProcess()”function requestProcess(definition, station): object;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
string |
station |
EntityId |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
kind |
"request-process" |
definition |
string |
station |
EntityId |
admitProcess()function
Section titled “admitProcess()”function admitProcess(process, definition, station): object;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
process |
EntityId |
definition |
string |
station |
EntityId |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
kind |
"admit-process" |
process |
EntityId |
definition |
string |
station |
EntityId |
place()function
Section titled “place()”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.
Parameters
Section titled “Parameters”| 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" |
Returns
Section titled “Returns”compileScene()function
Section titled “compileScene()”function compileScene(scene): CompiledScene;Compile placements into the fresh world’s records and surface settling.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
scene |
readonly Placement[] |
Returns
Section titled “Returns”spawn()function
Section titled “spawn()”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.
Parameters
Section titled “Parameters”| 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>> |
Returns
Section titled “Returns”defineSeatGoal()function
Section titled “defineSeatGoal()”function defineSeatGoal<F>(goal): SeatGoal;Erase the goal’s fact shape after binding its scorer to that same shape.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
F extends Readonly<Record<string, number>> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
goal |
SeatGoal<F> |
Returns
Section titled “Returns”voxel()function
Section titled “voxel()”function voxel(input): VoxelTerrainChoice;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ environment: EnvironmentDefinition; art: TerrainPresentationDefinition; } |
input.environment |
EnvironmentDefinition |
input.art |
TerrainPresentationDefinition |
Returns
Section titled “Returns”seaTerrain()function
Section titled “seaTerrain()”function seaTerrain(input): SeaTerrainChoice;A voxel environment whose wet columns are presented at the sea line.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ environment: EnvironmentDefinition; art: TerrainPresentationDefinition; } |
input.environment |
EnvironmentDefinition |
input.art |
TerrainPresentationDefinition |
Returns
Section titled “Returns”actorTarget()function
Section titled “actorTarget()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends object |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
component |
ComponentDefinition<T> |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
input |
ZodObject<{ entity: ZodString; }> |
subjects() |
(context) => readonly EntityId[] |
binding |
Pick<GameLocalBinding, "target" | "component"> |
gameWindow()function
Section titled “gameWindow()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
string |
spec |
object & object |
Returns
Section titled “Returns”checkWindows()function
Section titled “checkWindows()”function checkWindows(windows): readonly CartridgeWindow[];Cartridge-wide checks: unique ids and non-conflicting keys.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
windows |
readonly CartridgeWindow[] |
Returns
Section titled “Returns”readonly CartridgeWindow[]
checkKeys()function
Section titled “checkKeys()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
windows |
readonly CartridgeWindow[] |
controls |
readonly object[] |
Returns
Section titled “Returns”void
windowContents()function
Section titled “windowContents()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
windows |
readonly CartridgeWindow[] |
Returns
Section titled “Returns”(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()”function workAttemptsFor(context, tasks): readonly WorkAttempt[];Query native attempt ownership without leaking the port’s non-empty batch contract.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "workAttempts"> |
tasks |
readonly EntityId[] |
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttempt()function
Section titled “workAttempt()”function workAttempt(context, task): WorkAttempt | null;Read the one native attempt projection for a task.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<ReadContext, "workAttempts"> |
task |
EntityId |
Returns
Section titled “Returns”WorkAttempt | null
beginRouteWorkAttempt()function
Section titled “beginRouteWorkAttempt()”function beginRouteWorkAttempt(context, task, worker, destination): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> |
task |
EntityId |
worker |
EntityId |
destination |
MoveDestination |
Returns
Section titled “Returns”void
interruptWorkAttempt()function
Section titled “interruptWorkAttempt()”function interruptWorkAttempt(context, attempt, operationSequence, cause): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
cause |
WorkInterruptCause |
Returns
Section titled “Returns”void
retargetRouteWorkAttempt()function
Section titled “retargetRouteWorkAttempt()”function retargetRouteWorkAttempt( context, attempt, operationSequence, destination,): void;Replace only the current route operation, preserving its attempt generation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
destination |
MoveDestination |
Returns
Section titled “Returns”void
continueRouteWorkAttempt()function
Section titled “continueRouteWorkAttempt()”function continueRouteWorkAttempt( context, attempt, operationSequence, destination,): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
destination |
MoveDestination |
Returns
Section titled “Returns”void
acknowledgeWorkAttempt()function
Section titled “acknowledgeWorkAttempt()”function acknowledgeWorkAttempt(context, attempt, operationSequence): void;Acknowledge only the currently projected terminal operation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
Returns
Section titled “Returns”void
continueDeconstructionWorkAttempt()function
Section titled “continueDeconstructionWorkAttempt()”function continueDeconstructionWorkAttempt( context, attempt, operationSequence, site, contact,): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
site |
EntityId |
contact |
ConstructionAccessContact |
Returns
Section titled “Returns”void
continueResourceEstablishWorkAttempt()function
Section titled “continueResourceEstablishWorkAttempt()”function continueResourceEstablishWorkAttempt( context, attempt, operationSequence, site, definition, cell,): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
site |
EntityId |
definition |
string |
cell |
readonly [number, number, number] |
Returns
Section titled “Returns”void
continueResourceTendWorkAttempt()function
Section titled “continueResourceTendWorkAttempt()”function continueResourceTendWorkAttempt( context, attempt, operationSequence, site, vessel,): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
site |
EntityId |
vessel |
EntityId |
Returns
Section titled “Returns”void
continueResourceExtractWorkAttempt()function
Section titled “continueResourceExtractWorkAttempt()”function continueResourceExtractWorkAttempt( context, attempt, operationSequence, source,): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
source |
EntityId |
Returns
Section titled “Returns”void
continueFieldWaterWorkAttempt()function
Section titled “continueFieldWaterWorkAttempt()”function continueFieldWaterWorkAttempt( context, attempt, operationSequence, vessel, cell, direction, portions,): void;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”void
continueMaterialTransferAttempt()function
Section titled “continueMaterialTransferAttempt()”function continueMaterialTransferAttempt( context, attempt, operationSequence, lot, from, to, quantity,): void;Continue one admitted attempt through the native material transfer owner.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
lot |
EntityId |
from |
EntityId |
to |
EntityId |
quantity |
number |
Returns
Section titled “Returns”void
continueMaterialDropAttempt()function
Section titled “continueMaterialDropAttempt()”function continueMaterialDropAttempt( context, attempt, operationSequence, lot,): void;Continue an admitted attempt through the native ground-custody owner.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context |
Pick<WriteContext, "action"> & Pick<ReadContext, "workAttempts"> |
attempt |
WorkAttemptKey |
operationSequence |
number |
lot |
EntityId |
Returns
Section titled “Returns”void
checkRoom()function
Section titled “checkRoom()”function checkRoom(json, context): object;JSON syntax and authored geometry are decoded together at the native boundary.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
json |
string |
context |
string |
Returns
Section titled “Returns”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()”function checkBuilding(json, context): object;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
json |
string |
context |
string |
Returns
Section titled “Returns”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()”function compileBuilding(request): object;Rust compiles all geometry and bounded host actions; the action owner decodes them.
Parameters
Section titled “Parameters”| 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; }> |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
batches |
object[] |
slots |
object[] |
parseGenerationKey()function
Section titled “parseGenerationKey()”function parseGenerationKey(json): GenerationFingerprint;serde parses authoring JSON; Zod parses the kernel’s typed wire result.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
json |
string |
Returns
Section titled “Returns”planChunk()function
Section titled “planChunk()”function planChunk(policy, key): object;Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”object
| Name | Type | Default value |
|---|---|---|
key |
object |
chunkKeySchema |
key.x |
number |
- |
key.z |
number |
- |
roads |
object[] |
- |
lots |
object[] |
- |
chunkGroundAt()function
Section titled “chunkGroundAt()”function chunkGroundAt(policy): (x, z) => "grass" | "gravel";Bounded presentation cache; generation and road geometry stay native.
Parameters
Section titled “Parameters”| 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; }> |
Returns
Section titled “Returns”(x, z) => "grass" | "gravel"
compileChunkLot()function
Section titled “compileChunkLot()”function compileChunkLot(policy, key, support): object;Uses the same native layout/rotation/compiler as first-wake construction.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”object
| Name | Type |
|---|---|
batches |
object[] |
slots |
object[] |
meadow()function
Section titled “meadow()”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.
Parameters
Section titled “Parameters”| 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; }> |
Returns
Section titled “Returns”sea()function
Section titled “sea()”function sea(options): WorldSpec;A chart sea with a rectangular sand shore in native terrain.
Parameters
Section titled “Parameters”| 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 |