API reference
See the generated API reference for the SDK exported from
@fungi.computer/vishnu.
Classes
Section titled “Classes”CartridgeError
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”diagnostics
Section titled “diagnostics”readonly Diagnostic[]
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”diagnostics
Section titled “diagnostics”
readonlydiagnostics: readonlyDiagnostic[]
Interfaces
Section titled “Interfaces”Extended by
Section titled “Extended by”Properties
Section titled “Properties”
readonlyx:number
readonlyy:number
readonlyz:number
MoveDestination
Section titled “MoveDestination”Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyx:number
Inherited from
Section titled “Inherited from”
readonlyy:number
Inherited from
Section titled “Inherited from”
readonlyz:number
Inherited from
Section titled “Inherited from”
readonlyframe:EntityId|null
RouteCostRequest
Section titled “RouteCostRequest”Properties
Section titled “Properties”
readonlyactor:EntityId
target
Section titled “target”
readonlytarget:MoveDestination
excavationTarget?
Section titled “excavationTarget?”
readonlyoptionalexcavationTarget?: readonly [number,number,number]
Native excavation contact must be possible from the proposed approach.
RouteToAnyRequest
Section titled “RouteToAnyRequest”Properties
Section titled “Properties”
readonlyactor:EntityId
targets
Section titled “targets”
readonlytargets: readonlyMoveDestination[]
excavationTarget?
Section titled “excavationTarget?”
readonlyoptionalexcavationTarget?: readonly [number,number,number]
Native excavation contact must be possible from the selected approach.
WorkMaterialFacts
Section titled “WorkMaterialFacts”Properties
Section titled “Properties”version
Section titled “version”
readonlyversion:1
containers
Section titled “containers”
readonlycontainers: readonlyobject[]
readonlylots: readonlyobject[]
Properties
Section titled “Properties”position
Section titled “position”
readonlyposition:Vec3
facing
Section titled “facing”
readonlyfacing:number
WorldPosition
Section titled “WorldPosition”Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyx:number
Inherited from
Section titled “Inherited from”
readonlyy:number
Inherited from
Section titled “Inherited from”
readonlyz:number
Inherited from
Section titled “Inherited from”facing
Section titled “facing”
readonlyfacing:number
SupportSurface
Section titled “SupportSurface”Properties
Section titled “Properties”
readonlyminX:number
readonlymaxX:number
readonlyminZ:number
readonlymaxZ:number
height
Section titled “height”
readonlyheight:number
WorldPose
Section titled “WorldPose”Properties
Section titled “Properties”
readonlyid:EntityId
readonlylocal:WorldPosition
readonlyworld:WorldPosition
support
Section titled “support”
readonlysupport:EntityId|null
surface
Section titled “surface”
readonlysurface:SupportSurface|null
ComponentDefinition
Section titled “ComponentDefinition”Type Parameters
Section titled “Type Parameters”T extends object
Properties
Section titled “Properties”
readonlyid:`${string}.${string}`
version
Section titled “version”
readonlyversion:number
fields
Section titled “fields”
readonlyfields:Readonly<Record<keyofT&string,FieldType>>>>
targetField?
Section titled “targetField?”
readonlyoptionaltargetField?: keyofT&string
The single entity field targeted by this registered relation, when present.
sourceRequires?
Section titled “sourceRequires?”
readonlyoptionalsourceRequires?: readonly`${string}.${string}`[]
Capability IDs required on the source and target relation endpoints.
targetRequires?
Section titled “targetRequires?”
readonlyoptionaltargetRequires?: readonly`${string}.${string}`[]
onTargetRemoved?
Section titled “onTargetRemoved?”
readonlyoptionalonTargetRemoved?:RelationRemovalPolicy
allowSelf?
Section titled “allowSelf?”
readonlyoptionalallowSelf?:boolean
validate
Section titled “validate”
readonlyvalidate: (value) =>value is T
Parameters
Section titled “Parameters”T | JsonValue
Returns
Section titled “Returns”value is T
VisualVariantRule
Section titled “VisualVariantRule”View-only selection of an art binding from one committed authored field.
Properties
Section titled “Properties”visual
Section titled “visual”
readonlyvisual:string
component
Section titled “component”
readonlycomponent:ComponentDefinition<any>>
readonlyfield:string
readonlycases:Readonly<Record<string,string>>>>
EntityRecord
Section titled “EntityRecord”Properties
Section titled “Properties”
readonlyid:EntityId
components
Section titled “components”
readonlycomponents:Readonly<Record<ComponentId,ComponentValues>>>>
QuerySpec
Section titled “QuerySpec”Type Parameters
Section titled “Type Parameters”T extends object = object
Properties
Section titled “Properties”components
Section titled “components”
readonlycomponents: readonlyComponentDefinition<any>>[]
__value?
Section titled “__value?”
readonlyoptional__value?:T
QueryRow
Section titled “QueryRow”Type Parameters
Section titled “Type Parameters”_T extends object = object
Properties
Section titled “Properties”
readonlyid:EntityId
readonlyget: <V>>(definition) =>V
Type Parameters
Section titled “Type Parameters”V extends object
Parameters
Section titled “Parameters”definition
Section titled “definition”Returns
Section titled “Returns”V
JobStep
Section titled “JobStep”Properties
Section titled “Properties”
readonlykey:string
readonlyafter:string|null
operation
Section titled “operation”
readonlyoperation:JobOperation
continuation?
Section titled “continuation?”
readonlyoptionalcontinuation?:JobContinuation
JobPlan
Section titled “JobPlan”Properties
Section titled “Properties”definition
Section titled “definition”
readonlydefinition:string
definitionVersion
Section titled “definitionVersion”
readonlydefinitionVersion:number
readonlysteps: readonlyJobStep[]
ActionResult
Section titled “ActionResult”Properties
Section titled “Properties”accepted
Section titled “accepted”
readonlyaccepted:boolean
reason?
Section titled “reason?”
readonlyoptionalreason?:string|null
projectileId?
Section titled “projectileId?”
readonlyoptionalprojectileId?:EntityId
launchPoint?
Section titled “launchPoint?”
readonlyoptionallaunchPoint?:Vec3
entityId?
Section titled “entityId?”
readonlyoptionalentityId?:EntityId
revision
Section titled “revision”
readonlyrevision:number
attempt?
Section titled “attempt?”
readonlyoptionalattempt?:WorkAttemptKey
Impact
Section titled “Impact”Properties
Section titled “Properties”
readonlyid:string
sequence
Section titled “sequence”
readonlysequence:number
projectileId?
Section titled “projectileId?”
readonlyoptionalprojectileId?:EntityId
sourceId
Section titled “sourceId”
readonlysourceId:EntityId
targetId
Section titled “targetId”
readonlytargetId:EntityId
readonlytime:number
readonlypoint:Vec3
normal
Section titled “normal”
readonlynormal:Vec3
velocity
Section titled “velocity”
readonlyvelocity:Vec3
AdvanceResult
Section titled “AdvanceResult”Properties
Section titled “Properties”revision
Section titled “revision”
readonlyrevision:number
results
Section titled “results”
readonlyresults: readonlyActionResult[]
impacts
Section titled “impacts”
readonlyimpacts: readonlyImpact[]
ActionOutcome
Section titled “ActionOutcome”Properties
Section titled “Properties”action
Section titled “action”
readonlyaction:ActionRequest
result
Section titled “result”
readonlyresult:ActionResult
WorkAttemptKey
Section titled “WorkAttemptKey”Properties
Section titled “Properties”
readonlytask:EntityId
generation
Section titled “generation”
readonlygeneration:number
WorkAttempt
Section titled “WorkAttempt”Properties
Section titled “Properties”continuationOwner
Section titled “continuationOwner”
readonlycontinuationOwner:"external"|"native"
readonlykey:WorkAttemptKey
worker
Section titled “worker”
readonlyworker:EntityId
execution
Section titled “execution”
readonlyexecution:WorkExecution
readonlyphase:WorkAttemptPhase
SimulationClock
Section titled “SimulationClock”Properties
Section titled “Properties”
readonlynow:number
readonlydelta:number
readonlytick:number
ProcessRequirements
Section titled “ProcessRequirements”Properties
Section titled “Properties”definition
Section titled “definition”
readonlydefinition:string
version
Section titled “version”
readonlyversion:number
stationCatalog
Section titled “stationCatalog”
readonlystationCatalog:string
inputs
Section titled “inputs”
readonlyinputs: readonlyobject[]
stages
Section titled “stages”
readonlystages: readonlyobject[]
readonlyphase:"blocked"|"complete"|"working"|"waiting"
RandomSource
Section titled “RandomSource”Methods
Section titled “Methods”next()
Section titled “next()”next():
number
Returns
Section titled “Returns”number
ReadContext
Section titled “ReadContext”Extended by
Section titled “Extended by”Properties
Section titled “Properties”
readonlyclock:SimulationClock
outcomes
Section titled “outcomes”
readonlyoutcomes: readonlyActionOutcome[]
random
Section titled “random”
readonlyrandom:RandomSource
impacts
Section titled “impacts”
readonlyimpacts: readonlyImpact[]
workAttempts?
Section titled “workAttempts?”
readonlyoptionalworkAttempts?: (taskIds) => readonlyWorkAttempt[]
Parameters
Section titled “Parameters”taskIds
Section titled “taskIds”readonly EntityId[]
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttemptForWorker
Section titled “workAttemptForWorker”
readonlyworkAttemptForWorker: (worker) =>WorkAttempt|null
Parameters
Section titled “Parameters”worker
Section titled “worker”Returns
Section titled “Returns”WorkAttempt | null
processRequirements
Section titled “processRequirements”
readonlyprocessRequirements: (definition,station) =>ProcessRequirements
Parameters
Section titled “Parameters”definition
Section titled “definition”string
station
Section titled “station”Returns
Section titled “Returns”floorOperations
Section titled “floorOperations”
readonlyfloorOperations: (requests) => readonlyFloorOperation[]
Parameters
Section titled “Parameters”requests
Section titled “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”geometry
Section titled “geometry”Returns
Section titled “Returns”query()
Section titled “query()”query<
T>>(spec): readonlyQueryRow<T>>[]
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”QuerySpec<T>
Returns
Section titled “Returns”readonly QueryRow<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): readonlyWorldPose[]
Parameters
Section titled “Parameters”entities
Section titled “entities”readonly EntityId[]
Returns
Section titled “Returns”readonly WorldPose[]
routeCosts()
Section titled “routeCosts()”routeCosts(
requests): readonlyRouteCostResult[]
Parameters
Section titled “Parameters”requests
Section titled “requests”readonly RouteCostRequest[]
Returns
Section titled “Returns”readonly RouteCostResult[]
routeToAny()
Section titled “routeToAny()”routeToAny(
request):RouteToAnyResult
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”transferContacts()
Section titled “transferContacts()”transferContacts(
request): {kind:"ready";targets: readonlyMoveDestination[]; } | {kind:"blocked";reason:"sealed"|"unavailable-frame"|"no-contact"; }
Parameters
Section titled “Parameters”request
Section titled “request”worker
Section titled “worker”container
Section titled “container”Returns
Section titled “Returns”{ kind: "ready"; targets: readonly
MoveDestination[]; } | { kind: "blocked"; reason:
"sealed" | "unavailable-frame" | "no-contact"; }
physicalContacts()
Section titled “physicalContacts()”physicalContacts(
cells): readonlyPhysicalContact[]
Parameters
Section titled “Parameters”readonly [number, number, number][]
Returns
Section titled “Returns”readonly PhysicalContact[]
environmentFacts()
Section titled “environmentFacts()”environmentFacts():
object
Returns
Section titled “Returns”object
terrainRevision
Section titled “terrainRevision”terrainRevision:
number
placementRevision
Section titled “placementRevision”placementRevision:
number
totalKg
Section titled “totalKg”totalKg:
number
residualKg
Section titled “residualKg”residualKg:
number
initialTotalKg
Section titled “initialTotalKg”initialTotalKg:
number
boundaryKg
Section titled “boundaryKg”boundaryKg:
number
cells:
object[]
emissions
Section titled “emissions”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”readonly [number, number, number][]
Returns
Section titled “Returns”constructionReadiness()
Section titled “constructionReadiness()”constructionReadiness(
sites): readonlyConstructionReadiness[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly ConstructionReadiness[]
constructionAccess()
Section titled “constructionAccess()”constructionAccess(
sites): readonlyConstructionAccess[]
Ordered structural, material, and work-contact facts for construction allocation.
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly ConstructionAccess[]
deconstructionAccess()
Section titled “deconstructionAccess()”deconstructionAccess(
sites): readonlyDeconstructionAccess[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly DeconstructionAccess[]
terrainMaterials()
Section titled “terrainMaterials()”terrainMaterials(
cells): readonlynumber[]
Parameters
Section titled “Parameters”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;cover?:Readonly<{kind:string;condition:string;height:string; }>; }> |null)[]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly (Readonly<{ cell: readonly [number, number, number];
material: number; generatedTop: number; cover?: Readonly<{ kind:
string; condition: string; height: string; }>; }> | null)[]
structureSurfaces()
Section titled “structureSurfaces()”structureSurfaces(
columns): readonly readonlyStructureSurface[][]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly readonly StructureSurface[][]
waterContacts()
Section titled “waterContacts()”waterContacts(
centers): readonlyobject[]
Parameters
Section titled “Parameters”centers
Section titled “centers”readonly [number, number, number][]
Returns
Section titled “Returns”readonly object[]
ScopedAction
Section titled “ScopedAction”Properties
Section titled “Properties”
readonlyscope:ActionScope
request
Section titled “request”
readonlyrequest:ActionRequest
ScopedCreate
Section titled “ScopedCreate”Properties
Section titled “Properties”
readonlyscope:ActionScope
record
Section titled “record”
readonlyrecord:EntityRecord
ScopedRemove
Section titled “ScopedRemove”Properties
Section titled “Properties”
readonlyscope:ActionScope
entity
Section titled “entity”
readonlyentity:EntityId
CrowdMotion
Section titled “CrowdMotion”Ground-plane crowd destination, advanced by the native simulation phase.
Properties
Section titled “Properties”entity
Section titled “entity”
readonlyentity:EntityId
readonlyx:number
readonlyz:number
readonlyspeed:number
WriteContext
Section titled “WriteContext”Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyclock:SimulationClock
Inherited from
Section titled “Inherited from”outcomes
Section titled “outcomes”
readonlyoutcomes: readonlyActionOutcome[]
Inherited from
Section titled “Inherited from”random
Section titled “random”
readonlyrandom:RandomSource
Inherited from
Section titled “Inherited from”impacts
Section titled “impacts”
readonlyimpacts: readonlyImpact[]
Inherited from
Section titled “Inherited from”workAttempts?
Section titled “workAttempts?”
readonlyoptionalworkAttempts?: (taskIds) => readonlyWorkAttempt[]
Parameters
Section titled “Parameters”taskIds
Section titled “taskIds”readonly EntityId[]
Returns
Section titled “Returns”readonly WorkAttempt[]
Inherited from
Section titled “Inherited from”workAttemptForWorker
Section titled “workAttemptForWorker”
readonlyworkAttemptForWorker: (worker) =>WorkAttempt|null
Parameters
Section titled “Parameters”worker
Section titled “worker”Returns
Section titled “Returns”WorkAttempt | null
Inherited from
Section titled “Inherited from”ReadContext.workAttemptForWorker
processRequirements
Section titled “processRequirements”
readonlyprocessRequirements: (definition,station) =>ProcessRequirements
Parameters
Section titled “Parameters”definition
Section titled “definition”string
station
Section titled “station”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ReadContext.processRequirements
floorOperations
Section titled “floorOperations”
readonlyfloorOperations: (requests) => readonlyFloorOperation[]
Parameters
Section titled “Parameters”requests
Section titled “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”geometry
Section titled “geometry”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”query()
Section titled “query()”query<
T>>(spec): readonlyQueryRow<T>>[]
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”QuerySpec<T>
Returns
Section titled “Returns”readonly QueryRow<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): readonlyWorldPose[]
Parameters
Section titled “Parameters”entities
Section titled “entities”readonly EntityId[]
Returns
Section titled “Returns”readonly WorldPose[]
Inherited from
Section titled “Inherited from”routeCosts()
Section titled “routeCosts()”routeCosts(
requests): readonlyRouteCostResult[]
Parameters
Section titled “Parameters”requests
Section titled “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”request
Section titled “request”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”transferContacts()
Section titled “transferContacts()”transferContacts(
request): {kind:"ready";targets: readonlyMoveDestination[]; } | {kind:"blocked";reason:"sealed"|"unavailable-frame"|"no-contact"; }
Parameters
Section titled “Parameters”request
Section titled “request”worker
Section titled “worker”container
Section titled “container”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): readonlyPhysicalContact[]
Parameters
Section titled “Parameters”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
terrainRevision
Section titled “terrainRevision”terrainRevision:
number
placementRevision
Section titled “placementRevision”placementRevision:
number
totalKg
Section titled “totalKg”totalKg:
number
residualKg
Section titled “residualKg”residualKg:
number
initialTotalKg
Section titled “initialTotalKg”initialTotalKg:
number
boundaryKg
Section titled “boundaryKg”boundaryKg:
number
cells:
object[]
emissions
Section titled “emissions”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”readonly [number, number, number][]
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”constructionReadiness()
Section titled “constructionReadiness()”constructionReadiness(
sites): readonlyConstructionReadiness[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly ConstructionReadiness[]
Inherited from
Section titled “Inherited from”ReadContext.constructionReadiness
constructionAccess()
Section titled “constructionAccess()”constructionAccess(
sites): readonlyConstructionAccess[]
Ordered structural, material, and work-contact facts for construction allocation.
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly ConstructionAccess[]
Inherited from
Section titled “Inherited from”ReadContext.constructionAccess
deconstructionAccess()
Section titled “deconstructionAccess()”deconstructionAccess(
sites): readonlyDeconstructionAccess[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly DeconstructionAccess[]
Inherited from
Section titled “Inherited from”ReadContext.deconstructionAccess
terrainMaterials()
Section titled “terrainMaterials()”terrainMaterials(
cells): readonlynumber[]
Parameters
Section titled “Parameters”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;cover?:Readonly<{kind:string;condition:string;height:string; }>; }> |null)[]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly (Readonly<{ cell: readonly [number, number, number];
material: number; generatedTop: number; cover?: Readonly<{ kind:
string; condition: string; height: string; }>; }> | null)[]
Inherited from
Section titled “Inherited from”structureSurfaces()
Section titled “structureSurfaces()”structureSurfaces(
columns): readonly readonlyStructureSurface[][]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly readonly StructureSurface[][]
Inherited from
Section titled “Inherited from”waterContacts()
Section titled “waterContacts()”waterContacts(
centers): readonlyobject[]
Parameters
Section titled “Parameters”centers
Section titled “centers”readonly [number, number, number][]
Returns
Section titled “Returns”readonly object[]
Inherited from
Section titled “Inherited from”checkpoint()
Section titled “checkpoint()”checkpoint(
name):void
Ask the host to retain this committed simulation state for retry.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
write()
Section titled “write()”write<
T>>(definition,entity,value):void
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”definition
Section titled “definition”entity
Section titled “entity”T
Returns
Section titled “Returns”void
action()
Section titled “action()”action(
request,scope?):void
Parameters
Section titled “Parameters”request
Section titled “request”scope?
Section titled “scope?”Returns
Section titled “Returns”void
createAuthoredEntity()
Section titled “createAuthoredEntity()”createAuthoredEntity(
record,scope?):void
Parameters
Section titled “Parameters”record
Section titled “record”scope?
Section titled “scope?”Returns
Section titled “Returns”void
removeAuthoredEntity()
Section titled “removeAuthoredEntity()”removeAuthoredEntity(
id):void
Parameters
Section titled “Parameters”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”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”Returns
Section titled “Returns”void
SystemDefinition
Section titled “SystemDefinition”Properties
Section titled “Properties”
readonlyid:`${string}.${string}`
version
Section titled “version”
readonlyversion:number
readonlyreads: readonlyComponentDefinition<any>>[]
writes
Section titled “writes”
readonlywrites: readonlyComponentDefinition<any>>[]
every?
Section titled “every?”
readonlyoptionalevery?:number
consumesImpacts?
Section titled “consumesImpacts?”
readonlyoptionalconsumesImpacts?:boolean
readonlyrun: (context) =>void
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”void
ProjectileAim
Section titled “ProjectileAim”Properties
Section titled “Properties”origin
Section titled “origin”
readonlyorigin:Vec3
muzzle
Section titled “muzzle”
readonlymuzzle:Vec3
inheritedVelocity
Section titled “inheritedVelocity”
readonlyinheritedVelocity:Vec3
radius
Section titled “radius”
readonlyradius:number
gravity
Section titled “gravity”
readonlygravity:number
penetration
Section titled “penetration”
readonlypenetration:number
maxRange
Section titled “maxRange”
readonlymaxRange:number
maxLifetime
Section titled “maxLifetime”
readonlymaxLifetime:number
readonlyspeed:number
CollisionFact
Section titled “CollisionFact”Properties
Section titled “Properties”
readonlyid:EntityId
origin
Section titled “origin”
readonlyorigin:Vec3
velocity
Section titled “velocity”
readonlyvelocity:Vec3
geometry
Section titled “geometry”
readonlygeometry:"ball"|"cuboid"
radius
Section titled “radius”
readonlyradius:number
readonlyhalfX:number
readonlyhalfY:number
readonlyhalfZ:number
readonlyyaw:number
offsetX
Section titled “offsetX”
readonlyoffsetX:number
offsetY
Section titled “offsetY”
readonlyoffsetY:number
offsetZ
Section titled “offsetZ”
readonlyoffsetZ:number
material
Section titled “material”
readonlymaterial:object
response
Section titled “response”
readonlyresponse:"stop"|"pierce"|"ground"
resistance
Section titled “resistance”
readonlyresistance:number
restitution
Section titled “restitution”
readonlyrestitution:number
friction
Section titled “friction”
readonlyfriction:number
embedSpeed
Section titled “embedSpeed”
readonlyembedSpeed:number
RenderFact
Section titled “RenderFact”Properties
Section titled “Properties”activity?
Section titled “activity?”
readonlyoptionalactivity?: {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?”
readonlyoptionalmovement?: {baseSpeed:number;effectiveSpeed:number;routed:boolean; } |null
Native movement speed selected for the current route; base speed survives the order.
readonlyoptionalview?:object
pickable?
Section titled “pickable?”
readonlyoptionalpickable?:boolean
cutawayTop?
Section titled “cutawayTop?”
readonlyoptionalcutawayTop?:number
readonlyoptionalaim?:ProjectileAim|null
collision?
Section titled “collision?”
readonlyoptionalcollision?:CollisionFact|null
projectile?
Section titled “projectile?”
readonlyoptionalprojectile?: {velocity:Vec3;gravity:number;state:"flying"|"rolling"|"resting"|"embedded";embedDepth:number;rollNormal:Vec3;penetration:number; } |null
readonlyid:EntityId
readonlyoptionalpose?:Pose
Resolved world pose, including any moving or rotated support.
local?
Section titled “local?”
readonlyoptionallocal?:Pose
Native local pose; for supported entities this is relative to frame.
support?
Section titled “support?”
readonlyoptionalsupport?:EntityId|null
frame?
Section titled “frame?”
readonlyoptionalframe?:EntityId
Observation frame for a supported entity; local is measured in this frame.
surface?
Section titled “surface?”
readonlyoptionalsurface?:SupportSurface|null
visual?
Section titled “visual?”
readonlyoptionalvisual?:string|null
appearance?
Section titled “appearance?”
readonlyoptionalappearance?: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”
readonlyprofile:string
readonlyslots:Readonly<Partial<Record<string,string>>>>>>
palette
Section titled “palette”
readonlypalette:Readonly<Partial<Record<string,string>>>>>>
severed
Section titled “severed”
readonlysevered: readonlystring[]
readonlyoptionallimb?:string
A loose limb: the cut it came off at (drawn from its severed bake).
readonlyoptionalgaze?: 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).
readonlyoptionalact?:object
A one-shot state the actor is in (the game’s presentation acts).
readonlystate:string
readonlysince:number
seconds
Section titled “seconds”
readonlyseconds:number
label?
Section titled “label?”
readonlyoptionallabel?:string|null
placement?
Section titled “placement?”
readonlyoptionalplacement?:VisualPlacement
selected?
Section titled “selected?”
readonlyoptionalselected?:boolean
hands?
Section titled “hands?”
readonlyoptionalhands?: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.
readonlylot:EntityId
readonlykind:string
quantity
Section titled “quantity”
readonlyquantity:number
container?
Section titled “container?”
readonlyoptionalcontainer?:object
container.capacity
Section titled “container.capacity”
readonlycapacity:number
container.contents
Section titled “container.contents”
readonlycontents:object
container.contents.items
Section titled “container.contents.items”
readonlyitems: readonlyobject[]
container.contents.overflow?
Section titled “container.contents.overflow?”
readonlyoptionaloverflow?:boolean
inventory?
Section titled “inventory?”
readonlyoptionalinventory?:object
readonlyitems: readonlyobject[]
overflow?
Section titled “overflow?”
readonlyoptionaloverflow?:boolean
direct?
Section titled “direct?”
readonlyoptionaldirect?: {stream:string;lastQueued:number;lastProcessed:number;speed:number;blocked: readonly [number,number,number][];closedFaces: readonlyobject[];bounds: {min_x:number;max_x:number;min_z:number;max_z:number; } |null; } |null
DeliveryActivity
Section titled “DeliveryActivity”Properties
Section titled “Properties”
readonlykind:"delivery"
readonlyphase:DeliveryActivityPhase
material
Section titled “material”
readonlymaterial:string
target
Section titled “target”
readonlytarget: readonly [number,number]
ActivityBinding
Section titled “ActivityBinding”Properties
Section titled “Properties”
readonlyactor:EntityId
readonlykind:"dig"|"build"|"chop"
target
Section titled “target”
readonlytarget: readonly [number,number]
progress?
Section titled “progress?”
readonlyoptionalprogress?:number
AtmosphereSample
Section titled “AtmosphereSample”Properties
Section titled “Properties”volumeId
Section titled “volumeId”
readonlyvolumeId:string
temperatureC
Section titled “temperatureC”
readonlytemperatureC:number
smokeKgM3
Section titled “smokeKgM3”
readonlysmokeKgM3:number
AtmosphereSamples
Section titled “AtmosphereSamples”Properties
Section titled “Properties”revision
Section titled “revision”
readonlyrevision:number
geometryRevision
Section titled “geometryRevision”
readonlygeometryRevision:number
samples
Section titled “samples”
readonlysamples: readonly (AtmosphereSample|null)[]
ConstructionReadiness
Section titled “ConstructionReadiness”Properties
Section titled “Properties”
readonlysite:EntityId
status
Section titled “status”
readonlystatus:ConstructionReadinessStatus
reason?
Section titled “reason?”
readonlyoptionalreason?:"missingStructuralSupport"
PlacementCandidate
Section titled “PlacementCandidate”Properties
Section titled “Properties”
readonlysite:EntityId
catalog
Section titled “catalog”
readonlycatalog:string
target
Section titled “target”
readonlytarget:ConstructionTarget
PlacementDecision
Section titled “PlacementDecision”Properties
Section titled “Properties”
readonlysite:EntityId
status
Section titled “status”
readonlystatus:"ready"|"rejected"
reason?
Section titled “reason?”
readonlyoptionalreason?:string
PlacementDecisionResponse
Section titled “PlacementDecisionResponse”Properties
Section titled “Properties”revision
Section titled “revision”
readonlyrevision:number
placementRevision
Section titled “placementRevision”
readonlyplacementRevision:number
decisions
Section titled “decisions”
readonlydecisions: readonlyPlacementDecision[]
ConstructionAccess
Section titled “ConstructionAccess”Properties
Section titled “Properties”
readonlysite:EntityId
support
Section titled “support”
readonlysupport:ConstructionReadinessStatus
materialsReady
Section titled “materialsReady”
readonlymaterialsReady:boolean
blockedActors
Section titled “blockedActors”
readonlyblockedActors: readonlyEntityId[]
contacts
Section titled “contacts”
readonlycontacts: readonlyConstructionAccessContact[]
SurfaceWaterContact
Section titled “SurfaceWaterContact”Properties
Section titled “Properties”
readonlycell: readonly [number,number,number]
groundwaterHead
Section titled “groundwaterHead”
readonlygroundwaterHead:number
TerrainPresentationDefinition
Section titled “TerrainPresentationDefinition”Properties
Section titled “Properties”materials
Section titled “materials”
readonlymaterials: readonlyobject[]
Content-owned art family for each physical material slot.
generatedCover?
Section titled “generatedCover?”
readonlyoptionalgeneratedCover?: (input) =>Readonly<{kind:string;condition:string;height:string; }> |null
Pure fresh-world cover projection. Later physical cover mutations override it.
Parameters
Section titled “Parameters”readonly [number, number, number]
material
Section titled “material”number
generatedTop
Section titled “generatedTop”number
worldSeed
Section titled “worldSeed”string
worldIdentity
Section titled “worldIdentity”string
Returns
Section titled “Returns”Readonly<{ kind: string; condition: string; height: string; }>
| null
KernelPort
Section titled “KernelPort”Properties
Section titled “Properties”partyJoinIdentity
Section titled “partyJoinIdentity”
readonlypartyJoinIdentity: (bindingId) =>PartyJoinIdentity
Parameters
Section titled “Parameters”bindingId
Section titled “bindingId”string
Returns
Section titled “Returns”floorOperations
Section titled “floorOperations”
readonlyfloorOperations: (requests) => readonlyFloorOperation[]
Parameters
Section titled “Parameters”requests
Section titled “requests”readonly FloorOperationRequest[]
Returns
Section titled “Returns”readonly FloorOperation[]
transferContacts
Section titled “transferContacts”
readonlytransferContacts: (request) => {kind:"ready";targets: readonlyMoveDestination[]; } | {kind:"blocked";reason:"sealed"|"unavailable-frame"|"no-contact"; }
Parameters
Section titled “Parameters”request
Section titled “request”worker
Section titled “worker”container
Section titled “container”Returns
Section titled “Returns”{ kind: "ready"; targets: readonly
MoveDestination[]; } | { kind: "blocked"; reason:
"sealed" | "unavailable-frame" | "no-contact"; }
physicalContacts
Section titled “physicalContacts”
readonlyphysicalContacts: (cells) => readonlyPhysicalContact[]
Parameters
Section titled “Parameters”readonly [number, number, number][]
Returns
Section titled “Returns”readonly PhysicalContact[]
routeCosts
Section titled “routeCosts”
readonlyrouteCosts: (requests) => readonlyRouteCostResult[]
Parameters
Section titled “Parameters”requests
Section titled “requests”readonly RouteCostRequest[]
Returns
Section titled “Returns”readonly RouteCostResult[]
routeToAny
Section titled “routeToAny”
readonlyrouteToAny: (request) =>RouteToAnyResult
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”dispose
Section titled “dispose”
readonlydispose: () =>void
Returns
Section titled “Returns”void
readonlyload: (definition) =>void
Parameters
Section titled “Parameters”definition
Section titled “definition”Uint8Array
Returns
Section titled “Returns”void
loadEnvironment
Section titled “loadEnvironment”
readonlyloadEnvironment: (definition) =>void
Parameters
Section titled “Parameters”definition
Section titled “definition”Uint8Array
Returns
Section titled “Returns”void
environmentFacts
Section titled “environmentFacts”
readonlyenvironmentFacts: () =>object
Returns
Section titled “Returns”object
terrainRevision
Section titled “terrainRevision”terrainRevision:
number
placementRevision
Section titled “placementRevision”placementRevision:
number
totalKg
Section titled “totalKg”totalKg:
number
residualKg
Section titled “residualKg”residualKg:
number
initialTotalKg
Section titled “initialTotalKg”initialTotalKg:
number
boundaryKg
Section titled “boundaryKg”boundaryKg:
number
cells:
object[]
emissions
Section titled “emissions”emissions:
object[]
atmosphereSamples
Section titled “atmosphereSamples”
readonlyatmosphereSamples: (cells) =>AtmosphereSamples
Parameters
Section titled “Parameters”readonly [number, number, number][]
Returns
Section titled “Returns”constructionReadiness
Section titled “constructionReadiness”
readonlyconstructionReadiness: (sites) => readonlyConstructionReadiness[]
Read-only support projection for pending construction, resolved in one native batch.
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly ConstructionReadiness[]
placementDecisions
Section titled “placementDecisions”
readonlyplacementDecisions: (party,candidates) =>PlacementDecisionResponse
Advisory native geometry decision; command admission always rechecks.
Parameters
Section titled “Parameters”candidates
Section titled “candidates”readonly PlacementCandidate[]
Returns
Section titled “Returns”constructionAccess
Section titled “constructionAccess”
readonlyconstructionAccess: (sites) => readonlyConstructionAccess[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly ConstructionAccess[]
deconstructionAccess
Section titled “deconstructionAccess”
readonlydeconstructionAccess: (sites) => readonlyDeconstructionAccess[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly DeconstructionAccess[]
terrainMaterials
Section titled “terrainMaterials”
readonlyterrainMaterials: (cells) => readonlynumber[]
Parameters
Section titled “Parameters”readonly [number, number, number][]
Returns
Section titled “Returns”readonly number[]
terrainSurfaces
Section titled “terrainSurfaces”
readonlyterrainSurfaces: (columns) => readonly (Readonly<{cell: readonly [number,number,number];material:number;generatedTop:number;cover?:Readonly<{kind:string;condition:string;height:string; }>; }> |null)[]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly (Readonly<{ cell: readonly [number, number, number];
material: number; generatedTop: number; cover?: Readonly<{ kind:
string; condition: string; height: string; }>; }> | null)[]
surfaceWaterTable
Section titled “surfaceWaterTable”
readonlysurfaceWaterTable: (columns) => readonly (SurfaceWaterContact|null)[]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly (SurfaceWaterContact | null)[]
waterContacts
Section titled “waterContacts”
readonlywaterContacts: (centers) => readonlyobject[]
Parameters
Section titled “Parameters”centers
Section titled “centers”readonly [number, number, number][]
Returns
Section titled “Returns”readonly object[]
terrainChanges
Section titled “terrainChanges”
readonlyterrainChanges: (sinceRevision) =>TerrainChangeSet
Parameters
Section titled “Parameters”sinceRevision
Section titled “sinceRevision”number
Returns
Section titled “Returns”structureSurfaces
Section titled “structureSurfaces”
readonlystructureSurfaces: (columns) => readonly readonlyStructureSurface[][]
Parameters
Section titled “Parameters”columns
Section titled “columns”readonly [number, number][]
Returns
Section titled “Returns”readonly readonly StructureSurface[][]
readonlyquery: <T>>(spec) => readonlyQueryRow<T>>[]
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”QuerySpec<T>
Returns
Section titled “Returns”readonly QueryRow<T>[]
workMaterialFacts
Section titled “workMaterialFacts”
readonlyworkMaterialFacts: () =>WorkMaterialFacts
Compact native owner projection for shared work/material planning.
Returns
Section titled “Returns”workAttempts
Section titled “workAttempts”
readonlyworkAttempts: (taskIds) => readonlyWorkAttempt[]
Parameters
Section titled “Parameters”taskIds
Section titled “taskIds”readonly EntityId[]
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttemptForWorker
Section titled “workAttemptForWorker”
readonlyworkAttemptForWorker: (worker) =>WorkAttempt|null
Parameters
Section titled “Parameters”worker
Section titled “worker”Returns
Section titled “Returns”WorkAttempt | null
processRequirements
Section titled “processRequirements”
readonlyprocessRequirements: (definition,station) =>ProcessRequirements
Parameters
Section titled “Parameters”definition
Section titled “definition”string
station
Section titled “station”Returns
Section titled “Returns”entityMembership
Section titled “entityMembership”
readonlyentityMembership: (ids) => readonlyboolean[]
Parameters
Section titled “Parameters”readonly EntityId[]
Returns
Section titled “Returns”readonly boolean[]
advanceCandidate
Section titled “advanceCandidate”
readonlyadvanceCandidate: (delta,writes,actions,options?) =>AdvanceResult
Region-owned disposable attempt only: an error requires discarding the candidate.
Parameters
Section titled “Parameters”number
writes
Section titled “writes”readonly WriteIntent[]
actions
Section titled “actions”readonly ScopedAction[]
options?
Section titled “options?”creates?
Section titled “creates?”readonly ScopedCreate[]
removes?
Section titled “removes?”readonly ScopedRemove[]
retires?
Section titled “retires?”readonly EntityId[]
crowd?
Section titled “crowd?”readonly CrowdMotion[]
Returns
Section titled “Returns”advance
Section titled “advance”
readonlyadvance: (delta,writes,actions,options?) =>AdvanceResult
Parameters
Section titled “Parameters”number
writes
Section titled “writes”readonly WriteIntent[]
actions
Section titled “actions”readonly ScopedAction[]
options?
Section titled “options?”creates?
Section titled “creates?”readonly ScopedCreate[]
removes?
Section titled “removes?”readonly ScopedRemove[]
retires?
Section titled “retires?”readonly EntityId[]
crowd?
Section titled “crowd?”readonly CrowdMotion[]
Returns
Section titled “Returns”snapshot
Section titled “snapshot”
readonlysnapshot: () =>KernelRecordSnapshot
Returns
Section titled “Returns”KernelRecordSnapshot
capture
Section titled “capture”
readonlycapture: () =>KernelRecordCaptureResult
Resident-only capture; do not mutate or expose its borrowed record bytes.
Returns
Section titled “Returns”KernelRecordCaptureResult
acceptCapture
Section titled “acceptCapture”
readonlyacceptCapture: () =>void
Called only after the Region transaction accepted the captured state.
Returns
Section titled “Returns”void
restore
Section titled “restore”
readonlyrestore: (snapshot) =>void
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”KernelRecordSnapshot
Returns
Section titled “Returns”void
renderFacts
Section titled “renderFacts”
readonlyrenderFacts: (limit?) => readonlyRenderFact[]
Parameters
Section titled “Parameters”limit?
Section titled “limit?”number
Returns
Section titled “Returns”readonly RenderFact[]
worldPoses
Section titled “worldPoses”
readonlyworldPoses: (entities) => readonlyWorldPose[]
Parameters
Section titled “Parameters”entities
Section titled “entities”readonly EntityId[]
Returns
Section titled “Returns”readonly WorldPose[]
GamePack
Section titled “GamePack”Properties
Section titled “Properties”
readonlyid:string
version
Section titled “version”
readonlyversion:number
localScope?
Section titled “localScope?”
readonlyoptionallocalScope?:CommandScope
localPartyBinding?
Section titled “localPartyBinding?”
readonlyoptionallocalPartyBinding?: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?”
readonlyoptionalinterest?: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”
readonlyradius:number
definition
Section titled “definition”
readonlydefinition:Uint8Array
environmentDefinition?
Section titled “environmentDefinition?”
readonlyoptionalenvironmentDefinition?:Uint8Array<ArrayBufferLike>>
presentationWindow?
Section titled “presentationWindow?”
readonlyoptionalpresentationWindow?:object
readonlyminX:number
readonlymaxX:number
readonlyminZ:number
readonlymaxZ:number
terrainPresentation?
Section titled “terrainPresentation?”
readonlyoptionalterrainPresentation?:TerrainPresentationDefinition
Game-authored terrain vocabulary. The engine owns no grass or biome IDs.
components
Section titled “components”
readonlycomponents: readonlyComponentDefinition<any>>[]
visualVariants?
Section titled “visualVariants?”
readonlyoptionalvisualVariants?: readonlyVisualVariantRule[]
Resolved into render facts; never written to the kernel or its digest.
actors?
Section titled “actors?”
readonlyoptionalactors?: readonlyActorDefinition[]
Prepared content templates; native lifecycle owns their instantiation.
systems
Section titled “systems”
readonlysystems: readonlySystemDefinition[]
horde?
Section titled “horde?”
readonlyoptionalhorde?:HordeSimulation
presentation?
Section titled “presentation?”
readonlyoptionalpresentation?:GamePresentation
bootstrapActions?
Section titled “bootstrapActions?”
readonlyoptionalbootstrapActions?: readonlyActionRequest[]
Fresh-world setup that must commit before the first player command.
opening?
Section titled “opening?”
readonlyoptionalopening?: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”
readonlyactions: readonlyActionRequest[]
commands
Section titled “commands”
readonlycommands: readonlyobject[]
initialActions?
Section titled “initialActions?”
readonlyoptionalinitialActions?: readonlyActionRequest[]
scenarios?
Section titled “scenarios?”
readonlyoptionalscenarios?: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?”
readonlyoptionalpartyJoin?:Readonly<{footprint: readonly readonly [number,number][];prepare: (spawn) =>ActorInstantiationPlan; }>
commands?
Section titled “commands?”
readonlyoptionalcommands?:Readonly<Record<string,GameCommandDefinition>>>>
Heterogeneous command inputs are erased at the pack registry boundary.
persistentCharacters?
Section titled “persistentCharacters?”
readonlyoptionalpersistentCharacters?: (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”context
Section titled “context”Pick<ReadContext, "query">
Returns
Section titled “Returns”number
GameScenario
Section titled “GameScenario”A named dev/test setup for a fresh world (see GamePack.scenarios).
Properties
Section titled “Properties”actions
Section titled “actions”
readonlyactions: readonlyActionRequest[]
commands
Section titled “commands”
readonlycommands: readonlyobject[]
GameCommandResult
Section titled “GameCommandResult”Properties
Section titled “Properties”actions
Section titled “actions”
readonlyactions: readonlyActionRequest[]
writes
Section titled “writes”
readonlywrites: readonlyWriteIntent[]
creates?
Section titled “creates?”
readonlyoptionalcreates?: readonlyEntityRecord[]
removes?
Section titled “removes?”
readonlyoptionalremoves?: readonlyEntityId[]
GameCommandDefinition
Section titled “GameCommandDefinition”Properties
Section titled “Properties”
readonlyinput:ZodType
The sole parser for input entering this command.
readonlytitle:string
Semantic metadata shared by human and agent projections.
category
Section titled “category”
readonlycategory:string
description
Section titled “description”
readonlydescription:string
localPresentation?
Section titled “localPresentation?”
readonlyoptionallocalPresentation?:object
Client-local acquisition metadata for the existing Vishnu gestures.
bindings
Section titled “bindings”
readonlybindings: readonlyReadonly<{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?”
readonlyoptionalavailability?: (context) =>GameCommandAvailability
Host-owned discoverability state, evaluated against the committed world.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "query">
Returns
Section titled “Returns”subjects?
Section titled “subjects?”
readonlyoptionalsubjects?: (context) => readonlyEntityId[]
Stable subjects for contextual UI projection, evaluated from authoritative state.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "query">
Returns
Section titled “Returns”readonly EntityId[]
lifecycle?
Section titled “lifecycle?”
readonlyoptionallifecycle?: readonlyComponentDefinition<any>>[]
Authored record creation/removal only; does not grant progress writes.
reads?
Section titled “reads?”
readonlyoptionalreads?: readonlyComponentDefinition<any>>[]
writes
Section titled “writes”
readonlywrites: readonlyComponentDefinition<any>>[]
invoke
Section titled “invoke”
readonlyinvoke: (context,input) =>GameCommandResult
Erased invocation closes over the parsed handler input in the authoring factory.
Parameters
Section titled “Parameters”context
Section titled “context”JsonValue | undefined
Returns
Section titled “Returns”GamePackTransport
Section titled “GamePackTransport”Properties
Section titled “Properties”
readonlyid:string
version
Section titled “version”
readonlyversion:number
definition
Section titled “definition”
readonlydefinition:Uint8Array
FeedbackSwing
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”
readonlydirection:object
readonlyx:number
readonlyz:number
radius
Section titled “radius”
readonlyradius:number
readonlyangle:number
height
Section titled “height”
readonlyheight:number
readonlyms:number
readonlycolor:string
SystemOptions
Section titled “SystemOptions”Properties
Section titled “Properties”id:
`${string}.${string}`
version
Section titled “version”version:
number
reads?
Section titled “reads?”
optionalreads?: readonlyComponentDefinition<any>>[]
writes?
Section titled “writes?”
optionalwrites?: readonlyComponentDefinition<any>>[]
every?
Section titled “every?”
optionalevery?:number
consumesImpacts?
Section titled “consumesImpacts?”
optionalconsumesImpacts?:boolean
run: (
context) =>void
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”void
ActorCapability
Section titled “ActorCapability”Properties
Section titled “Properties”component
Section titled “component”
readonlycomponent:ComponentDefinition<any>>
initial?
Section titled “initial?”
readonlyoptionalinitial?:object
ActorDefinitionCapability
Section titled “ActorDefinitionCapability”Authoring-only capability compiled by an owning engine module.
Type Parameters
Section titled “Type Parameters”T extends object
Properties
Section titled “Properties”
readonlykind:"actor-definition-capability"
readonlyid:`${string}.${string}`
schema
Section titled “schema”
readonlyschema:ZodType<T>>
The sole parser for this capability’s authored value.
externalCreation?
Section titled “externalCreation?”
readonlyoptionalexternalCreation?:boolean
Another owner creates this actor; omit it from direct spawn templates.
ActorDefinitionCapabilityValue
Section titled “ActorDefinitionCapabilityValue”Properties
Section titled “Properties”capability
Section titled “capability”
readonlycapability:ActorDefinitionCapability<any>>
readonlyvalue:object
ActorInput
Section titled “ActorInput”Properties
Section titled “Properties”
readonlykind:"actor-input"
readonlyname:string
readonlytype:FieldType|"actor-reference"
ActorDefinition
Section titled “ActorDefinition”Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyid:string
version
Section titled “version”
readonlyversion:number
capabilities
Section titled “capabilities”
readonlycapabilities: readonlyActorCapability[]
definitionCapabilities
Section titled “definitionCapabilities”
readonlydefinitionCapabilities: readonlyActorDefinitionCapabilityValue[]
behaviors
Section titled “behaviors”
readonlybehaviors: readonlyBehaviorDefinition[]
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”T extends object
Parameters
Section titled “Parameters”component
Section titled “component”initial?
Section titled “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”T extends object
Parameters
Section titled “Parameters”capability
Section titled “capability”T
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”behaves()
Section titled “behaves()”behaves(…
behaviors):ActorDefinition
Parameters
Section titled “Parameters”behaviors
Section titled “behaviors”…readonly BehaviorDefinition[]
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”PredicateDefinition
Section titled “PredicateDefinition”A named, deterministic question used by an authored behavior branch.
Properties
Section titled “Properties”
readonlyid:`${string}.${string}`
readonlyreads: readonlyComponentDefinition<any>>[]
readonlyfacts: readonlyNativeFact[]
readonlytest: (subject,context) =>boolean
Parameters
Section titled “Parameters”subject
Section titled “subject”context
Section titled “context”Returns
Section titled “Returns”boolean
BehaviorActionDefinition
Section titled “BehaviorActionDefinition”A named proposal producer. The existing system/session owners commit its work.
Properties
Section titled “Properties”
readonlyid:`${string}.${string}`
readonlyreads: readonlyComponentDefinition<any>>[]
writes
Section titled “writes”
readonlywrites: readonlyComponentDefinition<any>>[]
readonlyfacts: readonlyNativeFact[]
exclusive?
Section titled “exclusive?”
readonlyoptionalexclusive?:string
readonlyrun: (subject,context) =>void
Parameters
Section titled “Parameters”subject
Section titled “subject”context
Section titled “context”Returns
Section titled “Returns”void
BehaviorDefinition
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”
readonlykind:"behavior"
readonlyid:`${string}.${string}`
version
Section titled “version”
readonlyversion:number
every?
Section titled “every?”
readonlyoptionalevery?:number
consumesImpacts?
Section titled “consumesImpacts?”
readonlyoptionalconsumesImpacts?:true
Whether its predicates and actions read the step’s projectile impacts.
subjects
Section titled “subjects”
readonlysubjects: readonlyComponentDefinition<any>>[]
Components every attaching actor must carry.
BehaviorSelection
Section titled “BehaviorSelection”Methods
Section titled “Methods”where()
Section titled “where()”where(…
predicates):BehaviorSelection
Parameters
Section titled “Parameters”predicates
Section titled “predicates”…readonly PredicateDefinition[]
Returns
Section titled “Returns”do(
action):void
Parameters
Section titled “Parameters”action
Section titled “action”Returns
Section titled “Returns”void
BehaviorScene
Section titled “BehaviorScene”Methods
Section titled “Methods”find()
Section titled “find()”find(…
subjects):BehaviorSelection
Parameters
Section titled “Parameters”subjects
Section titled “subjects”…readonly ComponentDefinition<any>[]
Returns
Section titled “Returns”BehaviorOptions
Section titled “BehaviorOptions”Properties
Section titled “Properties”version?
Section titled “version?”
readonlyoptionalversion?:number
every?
Section titled “every?”
readonlyoptionalevery?:number
Run every n-th step instead of every step.
consumesImpacts?
Section titled “consumesImpacts?”
readonlyoptionalconsumesImpacts?: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.
ActorBuilder
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”T extends object
Parameters
Section titled “Parameters”component
Section titled “component”initial?
Section titled “initial?”ActorInitial<T>
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”with<
T>>(capability,value):ActorDefinition
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”capability
Section titled “capability”T
Returns
Section titled “Returns”behaves()
Section titled “behaves()”behaves(…
behaviors):ActorDefinition
Parameters
Section titled “Parameters”behaviors
Section titled “behaviors”…readonly BehaviorDefinition[]
Returns
Section titled “Returns”BlueprintOpening
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”
readonlyside:BlueprintSide
readonlyat:number
readonlykind:BlueprintOpeningKind
style?
Section titled “style?”
readonlyoptionalstyle?:string
BlueprintModule
Section titled “BlueprintModule”One room: size is [width along x, depth along z] in cells.
Properties
Section titled “Properties”
readonlyid:string
readonlysize: readonly [number,number]
openings
Section titled “openings”
readonlyopenings: readonlyBlueprintOpening[]
readonlyslots: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.
readonlytags: readonlystring[]
readonlysides: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).
BlueprintPlacement
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”
readonlymodule:BlueprintModule
readonlyat: readonly [number,number]
rotate?
Section titled “rotate?”
readonlyoptionalrotate?:0|1|2|3
mirror?
Section titled “mirror?”
readonlyoptionalmirror?:boolean
BlueprintRecipe
Section titled “BlueprintRecipe”Properties
Section titled “Properties”modules
Section titled “modules”
readonlymodules: readonlyBlueprintPlacement[]
BlueprintPiece
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”
readonlykind:"wall"|"window"|"door"
readonlycell: readonly [number,number]
readonlyaxis:"x"|"z"
style?
Section titled “style?”
readonlyoptionalstyle?:string
BlueprintFloor
Section titled “BlueprintFloor”One room cell covered by the kit’s floor buildable.
Properties
Section titled “Properties”
readonlykind:"floor"
readonlycell: readonly [number,number]
BlueprintRoom
Section titled “BlueprintRoom”Properties
Section titled “Properties”
readonlyindex:number
Index into the recipe’s modules.
module
Section titled “module”
readonlymodule:string
readonlytags: readonlystring[]
readonlycells: readonly readonly [number,number][]
Its cells in the world, sorted.
BlueprintSlot
Section titled “BlueprintSlot”Properties
Section titled “Properties”
readonlyroom:number
module
Section titled “module”
readonlymodule:string
readonlyname:string
readonlyat: readonly [number,number]
Blueprint
Section titled “Blueprint”An assembled building: its pieces, rooms and slots, in a fixed order.
Properties
Section titled “Properties”pieces
Section titled “pieces”
readonlypieces: readonlyBlueprintPiece[]
readonlyrooms: readonlyBlueprintRoom[]
readonlyslots: readonlyBlueprintSlot[]
ConstructionOptions
Section titled “ConstructionOptions”Properties
Section titled “Properties”buildables
Section titled “buildables”
readonlybuildables: readonlyActorDefinition[]
Buildable actors, in build-bar order.
verticalMetres
Section titled “verticalMetres”
readonlyverticalMetres:number
Metres per vertical cell of the world these structures stand in.
namespace
Section titled “namespace”
readonlynamespace:string
Id prefix for construction sites and floor replacements.
readonlyparty: (context) =>EntityId
The party a player’s build command plans for.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<GameCommandContext, "query" | "scope">
Returns
Section titled “Returns”restyle?
Section titled “restyle?”
readonlyoptionalrestyle?: (context) =>ReadonlyMap<EntityId,string>>
State-dependent art for particular sites (a lit hearth, say).
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "query" | "environmentFacts">
Returns
Section titled “Returns”ReadonlyMap<EntityId, string>
ConstructionVisual
Section titled “ConstructionVisual”One staged construction sprite, ready for the visual projection.
Properties
Section titled “Properties”
readonlyid:EntityId
cutawayTop
Section titled “cutawayTop”
readonlycutawayTop:number
visual
Section titled “visual”
readonlyvisual:string
readonlylabel:string
pickable
Section titled “pickable”
readonlypickable:true
placement?
Section titled “placement?”
readonlyoptionalplacement?: {kind:"edge";edge: {cell: readonly [number,number,number];axis:"x"|"z"; }; } | NonNullable<PlacementDatum | undefined> & { readonly orientation: CardinalOrientation; }
readonlypose:object
position
Section titled “position”
readonlyposition:object
position.x
Section titled “position.x”
readonlyx:number
position.y
Section titled “position.y”
readonlyy:number
position.z
Section titled “position.z”
readonlyz:number
facing
Section titled “facing”
readonlyfacing:number
Construction
Section titled “Construction”Everything the Construction extension derives from its buildables.
Properties
Section titled “Properties”buildables
Section titled “buildables”
readonlybuildables: readonlyActorDefinition[]
catalog
Section titled “catalog”
readonlycatalog:ReadonlyMap<string,CompiledBuildable>>
placement
Section titled “placement”
readonlyplacement:Readonly<Record<string,PlacementPresentation>>>>
Placement ghost art and facing per catalog id.
candidates
Section titled “candidates”
readonlycandidates: (input) => readonlyPlacementCandidate[]
Parameters
Section titled “Parameters”catalog
Section titled “catalog”string = ...
orientation?
Section titled “orientation?”"north" | "east" | "south" | "west" = ...
target
Section titled “target”{ cell: [number, number, number]; } | { area: { start:
[number, number, number]; end: [number, number, number]; };
} | { edges: object[]; } = ...
Returns
Section titled “Returns”readonly PlacementCandidate[]
readonlybuild:GameCommandDefinition
visuals
Section titled “visuals”
readonlyvisuals: (context) => readonlyConstructionVisual[]
Staged art from the site’s catalog and phase alone.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "query">
Returns
Section titled “Returns”readonly ConstructionVisual[]
presented
Section titled “presented”
readonlypresented: (context) => readonlyConstructionVisual[]
Staged art with the cartridge’s state-dependent restyling applied.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "query" | "environmentFacts">
Returns
Section titled “Returns”readonly ConstructionVisual[]
environment
Section titled “environment”
readonlyenvironment: (base) =>EnvironmentDefinition
Add the buildables to a world’s structure catalog.
Parameters
Section titled “Parameters”EnvironmentDefinition
Returns
Section titled “Returns”EnvironmentDefinition
VisualBinding
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”
readonlykind:"static"|"figure"|"doll"
worldRole
Section titled “worldRole”
readonlyworldRole:"actor"|"floor"|"item"|"structure"
variants?
Section titled “variants?”
readonlyoptionalvariants?: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.
readonlyoptionalpath?:BankPath
Static: the bank path, per-turn view paths, frames and anchor.
viewPaths?
Section titled “viewPaths?”
readonlyoptionalviewPaths?: readonlyBankPath[]
frames?
Section titled “frames?”
readonlyoptionalframes?:boolean
frameMs?
Section titled “frameMs?”
readonlyoptionalframeMs?:number
Static frames: milliseconds per frame (default: the shared idle rate).
facing?
Section titled “facing?”
readonlyoptionalfacing?:boolean
anchor?
Section titled “anchor?”
readonlyoptionalanchor?:"pawnAnchor"|"propAnchor"|"vehicleAnchor"
drawsUpright?
Section titled “drawsUpright?”
readonlyoptionaldrawsUpright?:boolean
Order as an upright body rather than by its footprint.
readonlyoptionalkey?:string
Figure: the bank figure key.
dollPoses?
Section titled “dollPoses?”
readonlyoptionaldollPoses?: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?”
readonlyoptionalmotion?:Readonly<{kind:string;stride:number;localOffset?:Readonly<{x:number;y:number;z:number; }>; }>
workPoses?
Section titled “workPoses?”
readonlyoptionalworkPoses?:Readonly<Record<string,string>>>>
gaitStride?
Section titled “gaitStride?”
readonlyoptionalgaitStride?: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?”
readonlyoptionalactPoses?: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?”
readonlyoptionaldeliveryPoses?:Readonly<Record<string,string>>>>
luminous?
Section titled “luminous?”
readonlyoptionalluminous?: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?”
readonlyoptionallight?:Readonly<{radius:number;color:number;flicker:number; }>
A view-only point light centered on this visual; never enters world state.
carryPoses?
Section titled “carryPoses?”
readonlyoptionalcarryPoses?:Readonly<Record<string,string|Readonly<{contentKind:string;empty:string;partial:string;full:string; }>>>
reactions?
Section titled “reactions?”
readonlyoptionalreactions?:Readonly<Record<string,Readonly<{path:BankPath;duration:number; }>>>
edgeWall?
Section titled “edgeWall?”
readonlyoptionaledgeWall?:Readonly<{kind:"segment";stage:string;axis:"x"|"z";junction:string; }>
A wall-like edge segment and the junction art its corners use.
CartridgeArtPackFiles
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”
readonlymanifestUrl:string
pageUrls
Section titled “pageUrls”
readonlypageUrls:Readonly<Record<string,string>>>>
CartridgeShelf
Section titled “CartridgeShelf”How the hub shelf lists a cartridge. Presentation only.
Properties
Section titled “Properties”
readonlyorder:number
Lower numbers appear first. Games own their position, not the engine.
readonlygenre:string
readonlyblurb:string
readonlycover:object
readonlysrc:string
readonlyalt:string
SelectionCard
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”
readonlyvisualPrefix:string
heading
Section titled “heading”
readonlyheading:string
readonlyoptionalnote?:string
CartridgeAim
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”
readonlycommand:string
pointer?
Section titled “pointer?”
readonlyoptionalpointer?:boolean
arrows?
Section titled “arrows?”
readonlyoptionalarrows?:boolean
repeatSeconds?
Section titled “repeatSeconds?”
readonlyoptionalrepeatSeconds?:number
readonlyoptionalhold?:boolean
CartridgePage
Section titled “CartridgePage”What the player shell shows around the world. Read-only presentation.
Properties
Section titled “Properties”subtitle
Section titled “subtitle”
readonlysubtitle:string
camera
Section titled “camera”
readonlycamera:CartridgeCameraPolicy
directControl?
Section titled “directControl?”
readonlyoptionaldirectControl?:CartridgeDirectControl
readonlyoptionalaim?:CartridgeAim
accent?
Section titled “accent?”
readonlyoptionalaccent?:"moss"|"ember"|"tide"
The game’s accent over the shared game theme (default “moss”).
controlHelp?
Section titled “controlHelp?”
readonlyoptionalcontrolHelp?:string
dockKeys?
Section titled “dockKeys?”
readonlyoptionaldockKeys?:boolean
Show the persistent dock keys. Palettes and keyboard commands remain available.
audioBank?
Section titled “audioBank?”
readonlyoptionalaudioBank?:Readonly<{samples:Readonly<Record<string,Readonly<{urls: readonlystring[];gain:number;priority:number; }>>>;maxVoices?:number; }>
Sampled sounds under the shared audio owner, selected by feedback name.
lighting?
Section titled “lighting?”
readonlyoptionallighting?:Readonly<{sources?: readonlyReadonly<{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?: readonlyReadonly<{visual:string;height:number; }>[];pulses?: readonlyReadonly<{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?”
readonlyoptionaldeveloperControls?:boolean
Show the engine’s pixel-quality, voxel-layer and cutaway tools (default true). A finished game turns them off.
emptyDrag?
Section titled “emptyDrag?”
readonlyoptionalemptyDrag?:"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?”
readonlyoptionalorderCommand?:string
The command a drafted selection’s secondary click issues.
selectionShortcuts?
Section titled “selectionShortcuts?”
readonlyoptionalselectionShortcuts?: readonlyobject[]
windows
Section titled “windows”
readonlywindows: readonlyCartridgeWindow[]
Declared game windows, opened by ui:<id> commands.
source?
Section titled “source?”
readonlyoptionalsource?:string
Where the page links “View TypeScript source”.
visuals?
Section titled “visuals?”
readonlyoptionalvisuals?:Readonly<Record<string,VisualBinding>>>>
The art for this cartridge’s sprite ids, merged over the engine’s.
artPacks?
Section titled “artPacks?”
readonlyoptionalartPacks?: readonlyCartridgeArtPackFiles[]
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.
icons?
Section titled “icons?”
readonlyoptionalicons?: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?”
readonlyoptionaleffectArt?: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.
readonlypack:CartridgeArtPackFiles
anchorsUrl?
Section titled “anchorsUrl?”
readonlyoptionalanchorsUrl?:string
dolls?
Section titled “dolls?”
readonlyoptionaldolls?: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?”
readonlyoptionalspectator3d?: () =>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?”
readonlyoptionalshelf?:CartridgeShelf
selectionCards?
Section titled “selectionCards?”
readonlyoptionalselectionCards?: readonlySelectionCard[]
gainFeedbackFactPrefixes?
Section titled “gainFeedbackFactPrefixes?”
readonlyoptionalgainFeedbackFactPrefixes?: readonlystring[]
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?”
readonlyoptionalsharedWorlds?:boolean
The hosted engine serves invitation-shared worlds for this cartridge.
clock?
Section titled “clock?”
readonlyoptionalclock?:"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?”
readonlyoptionalsharedClock?:"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?”
readonlyoptionalinterest?: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”
readonlyradius:number
spectators?
Section titled “spectators?”
readonlyoptionalspectators?: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?”
readonlyoptionalplacementVisuals?:Readonly<Record<string,PlacementPresentation>>>>
Placement ghosts and candidates for build gestures, derived from the cartridge’s construction extension.
placementCandidates?
Section titled “placementCandidates?”
readonlyoptionalplacementCandidates?: (input) => readonlyPlacementCandidate[]
Parameters
Section titled “Parameters”catalog
Section titled “catalog”string = ...
orientation?
Section titled “orientation?”"north" | "east" | "south" | "west" = ...
target
Section titled “target”{ cell: [number, number, number]; } | { area: { start:
[number, number, number]; end: [number, number, number]; };
} | { edges: object[]; } = ...
Returns
Section titled “Returns”readonly PlacementCandidate[]
readonlylook:Look
The checked look: full colour, or a palette the view constrains to.
terrainLandform?
Section titled “terrainLandform?”
readonlyoptionalterrainLandform?:EnvironmentPlateau
Authored floating plateau shape for the smooth terrain view.
terrainSea?
Section titled “terrainSea?”
readonlyoptionalterrainSea?:Readonly<{bounds:EnvironmentBounds;seaLevel:number;shore:EnvironmentPlateau; }>
Admitted sea extent and shore for the terrain’s visual water surface.
CartridgeSpec
Section titled “CartridgeSpec”Properties
Section titled “Properties”
readonlyid:string
Kebab-case identity; also the namespace for saves and URLs.
readonlytitle:string
version
Section titled “version”
readonlyversion:number
Bump when saved worlds can no longer restore with this content.
actors?
Section titled “actors?”
readonlyoptionalactors?: readonlyActorDefinition[]
Spawnable templates. Their .behaves() attachments are installed once.
components?
Section titled “components?”
readonlyoptionalcomponents?: readonlyComponentDefinition<any>>[]
Components used by commands, rules or the world. Authored components on the actors are collected automatically.
readonlyworld:object
materials
Section titled “materials”
readonlymaterials: readonlyobject[]
stockpileProfiles?
Section titled “stockpileProfiles?”
readonlyoptionalstockpileProfiles?: readonlyobject[]
terrain?
Section titled “terrain?”
readonlyoptionalterrain?:TerrainChoice
presentationWindow?
Section titled “presentationWindow?”
readonlyoptionalpresentationWindow?:object
presentationWindow.minX
Section titled “presentationWindow.minX”
readonlyminX:number
presentationWindow.maxX
Section titled “presentationWindow.maxX”
readonlymaxX:number
presentationWindow.minZ
Section titled “presentationWindow.minZ”
readonlyminZ:number
presentationWindow.maxZ
Section titled “presentationWindow.maxZ”
readonlymaxZ:number
characters?
Section titled “characters?”
readonlyoptionalcharacters?:Characters
Rigged characters: appearance, wardrobe commands, dismemberment.
horde?
Section titled “horde?”
readonlyoptionalhorde?:HordeSimulation
Batched autonomous movement, independent of player action admission.
construction?
Section titled “construction?”
readonlyoptionalconstruction?:Construction
Buildables: adds their structures, the build command and placement.
scene?
Section titled “scene?”
readonlyoptionalscene?: readonlyPlacement[]
The fresh world: actors placed on the ground. Placed actors are also spawnable templates.
rules?
Section titled “rules?”
readonlyoptionalrules?: readonlySystemDefinition[]
World-level systems. Actor behavior belongs on .behaves().
commands?
Section titled “commands?”
readonlyoptionalcommands?:Readonly<Record<string,GameCommandDefinition>>>>
seats?
Section titled “seats?”
readonlyoptionalseats?:SeatDefinition
Goals, command grants and world view available to any authorized seat.
presentation?
Section titled “presentation?”
readonlyoptionalpresentation?:GamePresentation
persistentCharacters?
Section titled “persistentCharacters?”
readonlyoptionalpersistentCharacters?: (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”context
Section titled “context”Pick<ReadContext, "query">
Returns
Section titled “Returns”number
initialActions?
Section titled “initialActions?”
readonlyoptionalinitialActions?: readonlyActionRequest[]
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?”
readonlyoptionalscenarios?:Readonly<Record<string, {actions?: readonlyActionRequest[];commands?: readonlyobject[]; }>>
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?”
readonlyoptionalplayers?:object
readonlyjoin:PartyJoinCapability
shared?
Section titled “shared?”
readonlyoptionalshared?: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?”
readonlyoptionalinitialActions?: readonlyActionRequest[]
shared.features?
Section titled “shared.features?”
readonlyoptionalfeatures?:Readonly<Partial<Record<"minded-seats", readonlyActionRequest[]>>>
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.
readonlylocal:object
Browser-local play: the local player’s scope and fresh-world setup.
local.scope
Section titled “local.scope”
readonlyscope:CommandScope
local.bootstrap
Section titled “local.bootstrap”
readonlybootstrap: readonlyActionRequest[]
local.opening?
Section titled “local.opening?”
readonlyoptionalopening?: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?”
readonlyoptionalactions?: readonlyActionRequest[]
local.opening.commands?
Section titled “local.opening.commands?”
readonlyoptionalcommands?: readonlyobject[]
readonlypage:Omit<CartridgePage,"placementVisuals"|"placementCandidates"|"windows"|"look">>
readonlyoptionalui?:object
Small game windows (Mosaico frames styled by Caps), each with a Whistle command.
windows?
Section titled “windows?”
readonlyoptionalwindows?: readonlyCartridgeWindow[]
readonlyoptionalmood?: (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”Returns
Section titled “Returns”"day" | "dusk" | "night"
readonlyoptionallook?:LookSpec
An optional palette constraint and mood. Omit it for full colour.
Cartridge
Section titled “Cartridge”The checked, compiled cartridge. The only thing the Worker, page and host accept.
Properties
Section titled “Properties”
readonlyid:string
readonlytitle:string
version
Section titled “version”
readonlyversion:number
readonlypack:GamePack
Browser-local pack: the local player joins at world start.
hostPack
Section titled “hostPack”
readonlyhostPack:GamePack
Shared-world pack for the hosted engine: players join by command.
readonlypage:CartridgePage
seats?
Section titled “seats?”
readonlyoptionalseats?:SeatDefinition
sharedFeatures?
Section titled “sharedFeatures?”
readonlyoptionalsharedFeatures?:Readonly<Partial<Record<"minded-seats", readonlyActionRequest[]>>>
A shared world’s feature-gated setups (players.shared.features).
dismemberment?
Section titled “dismemberment?”
readonlyoptionaldismemberment?: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"
readonlyoptionalcast?: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.
SceneEntity
Section titled “SceneEntity”Properties
Section titled “Properties”
readonlyid:EntityId
components
Section titled “components”
readonlycomponents:Readonly<Record<string,ComponentFields>>>>
CompiledBuildable
Section titled “CompiledBuildable”Properties
Section titled “Properties”definition
Section titled “definition”
readonlydefinition:EnvironmentStructureDefinition
placement
Section titled “placement”
readonlyplacement:object
alignment
Section titled “alignment”alignment:
"fixed"|"stroke"
facing?
Section titled “facing?”
optionalfacing?: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
readonlyname:string
sprites
Section titled “sprites”
readonlysprites:string
readonlyoptionalkey?:string
palette?
Section titled “palette?”
readonlyoptionalpalette?:false
Set when players may not plan it (the definition’s palette).
ConstructionPlanOptions
Section titled “ConstructionPlanOptions”Properties
Section titled “Properties”
readonlyparty:EntityId
definition
Section titled “definition”
readonlydefinition:EnvironmentStructureDefinition
candidates
Section titled “candidates”
readonlycandidates: readonlyPlacementCandidate[]
existingSites
Section titled “existingSites”
readonlyexistingSites: readonlyEntityId[]
floorOperations
Section titled “floorOperations”
readonlyfloorOperations: (requests) => readonlyFloorOperation[]
Parameters
Section titled “Parameters”requests
Section titled “requests”readonly object[]
Returns
Section titled “Returns”readonly FloorOperation[]
replacementGenerations
Section titled “replacementGenerations”
readonlyreplacementGenerations:ReadonlyMap<EntityId,number>>
replacementId
Section titled “replacementId”
readonlyreplacementId: (floor,generation) =>EntityId
Parameters
Section titled “Parameters”generation
Section titled “generation”number
Returns
Section titled “Returns”ConstructionSiteState
Section titled “ConstructionSiteState”Properties
Section titled “Properties”catalog
Section titled “catalog”catalog:
string
targetKind
Section titled “targetKind”targetKind:
"cell"|"edge"
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"
Diagnostic
Section titled “Diagnostic”Properties
Section titled “Properties”
readonlycode:"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"|"VD081"
message
Section titled “message”
readonlymessage:string
One sentence naming the author’s ids, never engine internals.
readonlyhint:string
The fix, as an instruction.
readonlypath: readonly (string|number)[]
Where in the cartridge spec, when known: ["scene", 3].
Effect
Section titled “Effect”Type Parameters
Section titled “Type Parameters”T extends object
Properties
Section titled “Properties”component
Section titled “component”
readonlycomponent: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”context
Section titled “context”Pick<WriteContext, "createAuthoredEntity">
string
T
number
Returns
Section titled “Returns”void
all(
context):T&object[]
Every live record, oldest first.
Parameters
Section titled “Parameters”context
Section titled “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”context
Section titled “context”Pick<ReadContext, "query">
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”context
Section titled “context”Pick<ReadContext, "query"> &
Pick<WriteContext, "removeAuthoredEntity">
number
number
Returns
Section titled “Returns”void
FeedbackStrength
Section titled “FeedbackStrength”A bounded response to contact strength; no simulation clock or RNG.
Properties
Section titled “Properties”
readonlybase:number
perDamage?
Section titled “perDamage?”
readonlyoptionalperDamage?:number
damageDivisor?
Section titled “damageDivisor?”
readonlyoptionaldamageDivisor?:number
killBonus?
Section titled “killBonus?”
readonlyoptionalkillBonus?:number
readonlymin:number
readonlymax:number
AnchoredFeedback
Section titled “AnchoredFeedback”Extended by
Section titled “Extended by”Properties
Section titled “Properties”height
Section titled “height”
readonlyheight:number
readonlycue:AuthoredFeedbackCue
ShotFeedback
Section titled “ShotFeedback”Extends
Section titled “Extends”Properties
Section titled “Properties”height
Section titled “height”
readonlyheight:number
Inherited from
Section titled “Inherited from”
readonlycue:AuthoredFeedbackCue
Inherited from
Section titled “Inherited from”forward
Section titled “forward”
readonlyforward:number
recoil
Section titled “recoil”
readonlyrecoil:number
muzzleArt?
Section titled “muzzleArt?”
readonlyoptionalmuzzleArt?: readonlyFeedbackArtPath[]
SwingFeedback
Section titled “SwingFeedback”Properties
Section titled “Properties”
readonlycue:AuthoredFeedbackCue
radius
Section titled “radius”
readonlyradius:number
readonlyangle:number
height
Section titled “height”
readonlyheight:number
readonlyms:number
readonlycolor:string
ContactFeedback
Section titled “ContactFeedback”Properties
Section titled “Properties”height
Section titled “height”
readonlyheight:number
heavyDamage
Section titled “heavyDamage”
readonlyheavyDamage:number
ranged
Section titled “ranged”
readonlyranged:AuthoredFeedbackCue
readonlymelee:AuthoredFeedbackCue
readonlyheavy:AuthoredFeedbackCue
readonlykill:AuthoredFeedbackCue
headKill
Section titled “headKill”
readonlyheadKill:AuthoredFeedbackCue
hitstop
Section titled “hitstop”
readonlyhitstop:FeedbackStrength
readonlyshake:FeedbackStrength
slowMotion
Section titled “slowMotion”
readonlyslowMotion:object
readonlyscale:number
killMs
Section titled “killMs”
readonlykillMs:number
headMs
Section titled “headMs”
readonlyheadMs:number
readonlybits:object
regular
Section titled “regular”
readonlyregular:FeedbackBitsKind
readonlygore:FeedbackBitsKind
readonlyoptionalart?: readonlyFeedbackArtPath[]
readonlycount:FeedbackStrength
spread
Section titled “spread”
readonlyspread:FeedbackStrength
rumble
Section titled “rumble”
readonlyrumble:object
strong
Section titled “strong”
readonlystrong:FeedbackStrength
readonlyweak:number
readonlyhitMs:number
killMs
Section titled “killMs”
readonlykillMs:number
SplatFeedback
Section titled “SplatFeedback”Properties
Section titled “Properties”
readonlycue:AuthoredFeedbackCue
readonlysize:FeedbackStrength
minSize
Section titled “minSize”
readonlyminSize:number
maxSize
Section titled “maxSize”
readonlymaxSize:number
readonlyart: readonlyobject[]
Ordered size bands, each with shape variants and their quarter turns.
readonlyseed:object
readonlyx:number
readonlyz:number
FeedbackProfile
Section titled “FeedbackProfile”Type Parameters
Section titled “Type Parameters”Weapon
Section titled “Weapon”Weapon extends string = string
Simple
Section titled “Simple”Simple extends string = string
Swing extends string = string
Properties
Section titled “Properties”contact?
Section titled “contact?”
readonlyoptionalcontact?:ContactFeedback
shots?
Section titled “shots?”
readonlyoptionalshots?:Readonly<Record<Weapon,ShotFeedback>>>>
swings?
Section titled “swings?”
readonlyoptionalswings?:Readonly<Record<Swing,SwingFeedback>>>>
splat?
Section titled “splat?”
readonlyoptionalsplat?:SplatFeedback
wound?
Section titled “wound?”
readonlyoptionalwound?:object
height
Section titled “height”
readonlyheight:number
readonlybites: readonlyAuthoredFeedbackCue[]
readonlyclaw:AuthoredFeedbackCue
simple?
Section titled “simple?”
readonlyoptionalsimple?:Readonly<Record<Simple,AnchoredFeedback>>>>
FlowBarrier
Section titled “FlowBarrier”A structure standing across a face, and how much it would take.
Properties
Section titled “Properties”
readonlysite:string
readonlycost:number
FlowGeometry
Section titled “FlowGeometry”Navigation facts: blocked cells and weighted breakable edges are game data.
Properties
Section titled “Properties”profile
Section titled “profile”
readonlyprofile:string
radius
Section titled “radius”
readonlyradius:number
terrainRevision
Section titled “terrainRevision”
readonlyterrainRevision:number
Change when terrain heights/passability change. Static worlds use zero.
blocked
Section titled “blocked”
readonlyblocked:ReadonlySet<string>>
occupied
Section titled “occupied”
readonlyoccupied:ReadonlySet<string>>
readonlyedges:ReadonlyMap<string,FlowBarrier>>
FlowNavigation
Section titled “FlowNavigation”Methods
Section titled “Methods”height()
Section titled “height()”height(
cell):number|undefined
Parameters
Section titled “Parameters”Returns
Section titled “Returns”number | undefined
crossing()
Section titled “crossing()”crossing(
from,to):FlowBarrier|"corner"|null
Parameters
Section titled “Parameters”Returns
Section titled “Returns”FlowBarrier | "corner" | null
next()
Section titled “next()”next(
goal,from): {to:FlowCell;barrier:FlowBarrier|null; } |null
Parameters
Section titled “Parameters”Returns
Section titled “Returns”{ to: FlowCell; barrier: FlowBarrier |
null; } | null
HordeSlot
Section titled “HordeSlot”Properties
Section titled “Properties”
readonlyid:string
readonlyx:number
readonlyz:number
readonlyreach:number
HordeSlotBody
Section titled “HordeSlotBody”Properties
Section titled “Properties”
readonlyid:EntityId
readonlyx:number
readonlyz:number
eligible
Section titled “eligible”
readonlyeligible: readonlystring[]
HordeSlotAssignment
Section titled “HordeSlotAssignment”Properties
Section titled “Properties”
readonlyslot:HordeSlot
arrived
Section titled “arrived”
readonlyarrived:boolean
LookSpec
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?”
readonlyoptionalpalette?:string|Palette
A built-in palette id, or a palette (see parseLospecPalette in
@fungi.computer/vishnu-pixel for Lospec exports).
dither?
Section titled “dither?”
readonlyoptionaldither?:Partial<PaletteDither>>
Ordered dithering between palette neighbours; omit for the default.
readonlyoptionalmood?:"day"|"dusk"|"night"
The mood a fresh world is shown in (default day).
moods?
Section titled “moods?”
readonlyoptionalmoods?: readonlyMoodStop[]
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?”
readonlyoptionalambientLight?:Readonly<Record<"day"|"dusk"|"night",number>>>>
View-only brightness levels keyed by the world’s chosen mood.
ambientTint?
Section titled “ambientTint?”
readonlyoptionalambientTint?:Readonly<Record<"day"|"dusk"|"night", readonly [number,number,number]>>
View-only RGB light multipliers (0..1), independent of palette mapping.
terrain?
Section titled “terrain?”
readonlyoptionalterrain?:"voxel"|"smooth"
Render voxel cells as authored faces or a sculpted surface net.
backdrop?
Section titled “backdrop?”
readonlyoptionalbackdrop?:"ocean"
Presentation-only horizon behind a bounded sea world.
MoodStop
Section titled “MoodStop”From at simulation seconds on, the view shows mood.
Properties
Section titled “Properties”
readonlyat:number
readonlymood:"day"|"dusk"|"night"
PhaseClock
Section titled “PhaseClock”Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”Phase extends string
Properties
Section titled “Properties”
readonlyphase:Phase
readonlycycle:number
phaseAt
Section titled “phaseAt”
readonlyphaseAt:number
PhaseAdvance
Section titled “PhaseAdvance”Extends
Section titled “Extends”PhaseClock<Phase>
Type Parameters
Section titled “Type Parameters”Phase extends string
Properties
Section titled “Properties”
readonlyphase:Phase
Inherited from
Section titled “Inherited from”
readonlycycle:number
Inherited from
Section titled “Inherited from”phaseAt
Section titled “phaseAt”
readonlyphaseAt:number
Inherited from
Section titled “Inherited from”completed
Section titled “completed”
readonlycompleted:ReadonlyMap<Phase,number>>
Completed phases since the supplied clock, including skipped cycles.
Placement
Section titled “Placement”One actor in the fresh world. Compiled by defineCartridge, never spawned.
Properties
Section titled “Properties”
readonlyactor:ActorDefinition
readonlyid:EntityId
readonlyat:Cell2
params
Section titled “params”
readonlyparams:ActorParams
surface?
Section titled “surface?”
readonlyoptionalsurface?:"sea"
CompiledScene
Section titled “CompiledScene”The fresh world compiled from a scene.
Properties
Section titled “Properties”initial
Section titled “initial”
readonlyinitial: readonlySceneEntity[]
placements
Section titled “placements”
readonlyplacements: readonlyInitialSurfacePlacement[]
EntityClass
Section titled “EntityClass”Properties
Section titled “Properties”relation
Section titled “relation”
readonlyrelation:EntityRelation
readonlykind:string
readonlyglyph:string
state?
Section titled “state?”
readonlyoptionalstate?:string
designated?
Section titled “designated?”
readonlyoptionaldesignated?:boolean
readonlyoptionaljob?:EntityId
SeatView
Section titled “SeatView”The same named world view is available to every authorized seat.
Properties
Section titled “Properties”sightRadius
Section titled “sightRadius”
readonlysightRadius:number
verticalMetres
Section titled “verticalMetres”
readonlyverticalMetres:number
environment?
Section titled “environment?”
readonlyoptionalenvironment?:Pick<EnvironmentDefinition,"processes"|"resourceSites">>
Methods
Section titled “Methods”ownActors()?
Section titled “ownActors()?”
optionalownActors(reads,scope):ReadonlyMap<EntityId,Omit<EntityClass,"relation">>>>
Parameters
Section titled “Parameters”SeatReads
CommandScope | undefined
Returns
Section titled “Returns”ReadonlyMap<EntityId, Omit<EntityClass,
"relation">>
terrainClass()
Section titled “terrainClass()”terrainClass(
surface):TerrainClass
Parameters
Section titled “Parameters”surface
Section titled “surface”Returns
Section titled “Returns”TerrainClass
classify()
Section titled “classify()”classify(
reads):ReadonlyMap<EntityId,EntityClass>>
Parameters
Section titled “Parameters”SeatReads
Returns
Section titled “Returns”ReadonlyMap<EntityId, EntityClass>
buildableTitle()
Section titled “buildableTitle()”buildableTitle(
catalog):string
Parameters
Section titled “Parameters”catalog
Section titled “catalog”string
Returns
Section titled “Returns”string
SeatGoal
Section titled “SeatGoal”A cartridge-authored challenge and its committed-state scoring rule.
Type Parameters
Section titled “Type Parameters”F extends SeatFacts = SeatFacts
Properties
Section titled “Properties”
readonlyid:string
readonlytitle:string
cartridge
Section titled “cartridge”
readonlycartridge:string
setting
Section titled “setting”
readonlysetting:string
readonlyseeds: readonlynumber[]
turnBudget
Section titled “turnBudget”
readonlyturnBudget:number
spendCapUsd
Section titled “spendCapUsd”
readonlyspendCapUsd:number
maxSimSeconds
Section titled “maxSimSeconds”
readonlymaxSimSeconds:number
readonlygoal:string
Methods
Section titled “Methods”facts()
Section titled “facts()”facts(
reads):F
Parameters
Section titled “Parameters”SeatReads
Returns
Section titled “Returns”F
outcome()
Section titled “outcome()”outcome(
start,end):SeatOutcome<F>>
Parameters
Section titled “Parameters”F
F
Returns
Section titled “Returns”SeatOutcome<F>
SeatDefinition
Section titled “SeatDefinition”Properties
Section titled “Properties”
readonlyview:SeatView
grants
Section titled “grants”
readonlygrants:Readonly<Record<string, readonlystring[]>>
readonlygoals: readonlySeatGoal<Readonly<Record<string,number>>>>>>[]
VoxelTerrainChoice
Section titled “VoxelTerrainChoice”Properties
Section titled “Properties”
readonlykind:"voxel"
environment
Section titled “environment”
readonlyenvironment:EnvironmentDefinition
readonlyart:TerrainPresentationDefinition
SeaTerrainChoice
Section titled “SeaTerrainChoice”Properties
Section titled “Properties”
readonlykind:"sea"
environment
Section titled “environment”
readonlyenvironment:EnvironmentDefinition
readonlyart:TerrainPresentationDefinition
CartridgeWindow
Section titled “CartridgeWindow”Extends
Section titled “Extends”WindowDeclaration
Properties
Section titled “Properties”
readonlykind:"window"
readonlybody:WindowBody
id:
string
Inherited from
Section titled “Inherited from”WindowDeclaration.id
title:
string
Inherited from
Section titled “Inherited from”WindowDeclaration.title
surface
Section titled “surface”surface:
"paper"|"chrome"
Inherited from
Section titled “Inherited from”WindowDeclaration.surface
role:
"end"|"goal"|"minimap"|"letter"|"context"|"panel"|"hud"|"actions"
Inherited from
Section titled “Inherited from”WindowDeclaration.role
optionalend?:object
pause:
"local"|"none"
treatment
Section titled “treatment”treatment:
"plain"|"tape"
closeLabel
Section titled “closeLabel”closeLabel:
string
restartLabel
Section titled “restartLabel”restartLabel:
string
Inherited from
Section titled “Inherited from”WindowDeclaration.end
optionalkey?:string
Inherited from
Section titled “Inherited from”WindowDeclaration.key
opens: {
on:"start"; } | {on:"command"; } | {on:"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
WorldSpec
Section titled “WorldSpec”What a cartridge’s world needs; meadow() fills it in.
Properties
Section titled “Properties”materials
Section titled “materials”
readonlymaterials: readonlyobject[]
terrain
Section titled “terrain”
readonlyterrain:TerrainChoice
Type Aliases
Section titled “Type Aliases”EntityId
Section titled “EntityId”EntityId =
string&object
Public boundary between authored TypeScript and the authoritative kernel.
Type Declaration
Section titled “Type Declaration”__entityId
Section titled “__entityId”
readonly__entityId: uniquesymbol
ComponentId
Section titled “ComponentId”ComponentId =
`${string}.${string}`
GameId
Section titled “GameId”GameId =
string
RouteCostResult
Section titled “RouteCostResult”RouteCostResult = {
actor:EntityId;status:"reachable";cost:number; } | {actor:EntityId;status:"unavailable";reason:string; }
RouteToAnyResult
Section titled “RouteToAnyResult”RouteToAnyResult = {
actor:EntityId;status:"reachable";targetIndex:number;cost:number; } | {actor:EntityId;status:"unavailable";reason:string; }
FieldType
Section titled “FieldType”FieldType =
"number"|"boolean"|"string"|"nullable-string"|"entity"|"nullable-entity"
RelationRemovalPolicy
Section titled “RelationRemovalPolicy”RelationRemovalPolicy =
"detach"|"restrict"
ComponentValue
Section titled “ComponentValue”ComponentValue<
T> > =object
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”
readonlyid:EntityId
readonlyvalue:T
WriteIntent
Section titled “WriteIntent”WriteIntent =
object
Properties
Section titled “Properties”component
Section titled “component”
readonlycomponent:ComponentId
entity
Section titled “entity”
readonlyentity:EntityId
readonlyvalue:JsonValue
JobEntityBinding
Section titled “JobEntityBinding”JobEntityBinding = {
kind:"exact";value:EntityId; } | {kind:"result";value: {step:string;slot:string; }; }
JobOperation
Section titled “JobOperation”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; }
JobContinuation
Section titled “JobContinuation”JobContinuation =
"any-eligible"|"prefer-starter"|"bind-on-first-progress"| {assigned-actor:EntityId; }
CardinalOrientation
Section titled “CardinalOrientation”CardinalOrientation =
"north"|"east"|"south"|"west"
EdgeTarget
Section titled “EdgeTarget”EdgeTarget =
object
Properties
Section titled “Properties”
readonlycell: readonly [number,number,number]
readonlyaxis:"x"|"z"
ConstructionTarget
Section titled “ConstructionTarget”ConstructionTarget = {
kind:"cell";cell:Vec3;orientation:CardinalOrientation; } | {kind:"edge";edge: {cell:Vec3;axis:"x"|"z"; }; }
ActionRequest
Section titled “ActionRequest”ActionRequest = {
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]; } | {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: readonlyobject[]; } | {kind:"update-stockpile";party:EntityId;zone:EntityId;filterProfile:string;priority:number; } | {kind:"clear-stockpile";party:EntityId;zone:EntityId;cells: readonlyobject[]; } | {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: readonlyPlacementCandidate[]; } | {kind:"prebuild-structures";party:EntityId;plans: readonlyPlacementCandidate[]; } | {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: readonlyEntityId[]; } | {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: readonlyobject[]; } | {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: "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]; }
readonlykind:"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
Section titled “receipt”
readonlyreceipt:EntityId
definition
Section titled “definition”
readonlydefinition:string
readonlycause:string
arguments
Section titled “arguments”
readonlyarguments:Readonly<Record<string,SpawnArgument>>>>
surfaceColumn?
Section titled “surfaceColumn?”
readonlyoptionalsurfaceColumn?: readonly [number,number]
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; }
readonlykind:"break-structure"
Tear down a finished structure with no worker: it was broken.
readonlysite: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[]; }
readonlykind:"prebuild-structures"
Plan structures and finish them at once: a fresh world’s buildings.
readonlyparty:EntityId
readonlyplans: readonlyPlacementCandidate[]
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; }
WorkActivityRef
Section titled “WorkActivityRef”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; }
WorkInterruptCause
Section titled “WorkInterruptCause”WorkInterruptCause =
"drafted"|"cancelled"|"workerUnavailable"|"accessLost"
WorkBlockReason
Section titled “WorkBlockReason”WorkBlockReason =
"accessLost"|"missingInputs"|"capacityUnavailable"|"unsupportedStructure"|"workerUnavailable"
WorkOutcome
Section titled “WorkOutcome”WorkOutcome = {
kind:"completed"; } | {kind:"blocked";reason:WorkBlockReason; } | {kind:"interrupted";cause:WorkInterruptCause; }
WorkAttemptPhase
Section titled “WorkAttemptPhase”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; }
ProcessInputPolicy
Section titled “ProcessInputPolicy”ProcessInputPolicy =
"portion"|"whole-lot"
ProcessInputDisposition
Section titled “ProcessInputDisposition”ProcessInputDisposition =
"consume"|"retain"|"emission-source"
NativeFact
Section titled “NativeFact”NativeFact =
Exclude<keyofReadContext,"clock"|"outcomes"|"random"|"impacts"|"query">>
Native read doors available to authored decisions beyond ECS/query state.
CommandScope
Section titled “CommandScope”CommandScope = {
kind:"host"; } | {kind:"player";player:string; }
PartyJoinIdentity
Section titled “PartyJoinIdentity”PartyJoinIdentity =
Readonly<{status:"existing"|"available";sequence:number;player:string;party:EntityId;people: readonlyEntityId[]; }>
SpawnArgument
Section titled “SpawnArgument”SpawnArgument =
Extract<ActorArgument, {kind:"value"; } | {kind:"existing"; }>
Spawn arguments bind values or existing entities; slots and joining players belong to party join.
ActorArgument
Section titled “ActorArgument”ActorArgument = {
kind:"value";value:string|number|boolean|null; } | {kind:"spawned";slot:string; } | {kind:"existing";id:EntityId; } | {kind:"joining-player"; }
ActorInstantiationPlan
Section titled “ActorInstantiationPlan”ActorInstantiationPlan =
Readonly<{actors: readonlyReadonly<{slot:string;definition:string;arguments:Readonly<Record<string,ActorArgument>>>>;surfaceColumn?: readonly [number,number]; }>[];initialMaterials: readonlyReadonly<{container:ActorArgument;kind:string;quantity:number;actorDefinition?:string;arguments?:Readonly<Record<string,ActorArgument>>>>; }>[];partySlot:string;peopleSlots: readonlystring[]; }>
PartyJoinCapability
Section titled “PartyJoinCapability”PartyJoinCapability =
Readonly<{footprint: readonly readonly [number,number][];prepare: (spawn) =>ActorInstantiationPlan; }>
ActionScope
Section titled “ActionScope”ActionScope = {
kind:"host"; } | {kind:"player";player:string; }
GameCommandContext
Section titled “GameCommandContext”GameCommandContext =
Pick<ReadContext,"query"|"physicalContacts"|"terrainMaterials"|"terrainSurfaces"|"structureSurfaces"|"transferContacts"> > &object
Type Declaration
Section titled “Type Declaration”
readonlyscope:CommandScope
workAttempts
Section titled “workAttempts”
readonlyworkAttempts: (taskIds) => readonlyWorkAttempt[]
Parameters
Section titled “Parameters”taskIds
Section titled “taskIds”readonly EntityId[]
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttemptForWorker
Section titled “workAttemptForWorker”
readonlyworkAttemptForWorker: (worker) =>WorkAttempt|null
Parameters
Section titled “Parameters”worker
Section titled “worker”Returns
Section titled “Returns”WorkAttempt | null
floorOperations
Section titled “floorOperations”
readonlyfloorOperations: (requests) => readonlyFloorOperation[]
Parameters
Section titled “Parameters”requests
Section titled “requests”readonly FloorOperationRequest[]
Returns
Section titled “Returns”readonly FloorOperation[]
VisualPlacement
Section titled “VisualPlacement”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; }
DeliveryActivityPhase
Section titled “DeliveryActivityPhase”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.
ActivityKind
Section titled “ActivityKind”ActivityKind =
"dig"|"build"|"chop"|"delivery"
KernelSnapshot
Section titled “KernelSnapshot”KernelSnapshot =
KernelRecordSnapshot
ConstructionReadinessStatus
Section titled “ConstructionReadinessStatus”ConstructionReadinessStatus =
"ready"|"waitingForSupport"|"unknown"
ConstructionAccessContact
Section titled “ConstructionAccessContact”ConstructionAccessContact =
Vec3&object
Type Declaration
Section titled “Type Declaration”
readonlyframe:null
readonlykind:"origin"|"landing"
DeconstructionAccess
Section titled “DeconstructionAccess”DeconstructionAccess =
object
Properties
Section titled “Properties”
readonlysite:EntityId
status
Section titled “status”
readonlystatus:"ready"|"occupiedPort"|"structuralDependency"|"invalidGeometry"
contacts
Section titled “contacts”
readonlycontacts: readonlyConstructionAccessContact[]
salvageQuantity
Section titled “salvageQuantity”
readonlysalvageQuantity:number
workSeconds
Section titled “workSeconds”
readonlyworkSeconds:number
PhysicalContact
Section titled “PhysicalContact”PhysicalContact =
object
Properties
Section titled “Properties”
readonlysolid:boolean
sealedTop
Section titled “sealedTop”
readonlysealedTop:boolean
outside
Section titled “outside”
readonlyoutside:boolean
TerrainSurface
Section titled “TerrainSurface”TerrainSurface =
z.infer<typeofterrainSurfaceSchema>>
TerrainSurfaceCover
Section titled “TerrainSurfaceCover”TerrainSurfaceCover =
NonNullable<TerrainSurface["cover"]>
StructureSurface
Section titled “StructureSurface”StructureSurface =
object
Properties
Section titled “Properties”
readonlycell: readonly [number,number,number]
FloorOperation
Section titled “FloorOperation”FloorOperation = {
kind:"build"; } | {kind:"unchanged";floor:EntityId; } | {kind:"replace";floor:EntityId; } | {kind:"conflict";floor:EntityId; } | {kind:"waiting-for-support"; } | {kind:"invalid";reason:string; }
FloorOperationRequest
Section titled “FloorOperationRequest”FloorOperationRequest =
object
Properties
Section titled “Properties”
readonlycell: readonly [number,number,number]
desiredCatalog
Section titled “desiredCatalog”
readonlydesiredCatalog:string
TerrainChangeSet
Section titled “TerrainChangeSet”TerrainChangeSet = {
kind:"changed-columns";revision:number;columns: readonly readonly [number,number][]; } | {kind:"full-reset";revision:number;reason:"history"|"restored"|"stale"; }
GameLocalBinding
Section titled “GameLocalBinding”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; }>
JsonValue
Section titled “JsonValue”JsonValue =
null|boolean|number|string| readonlyJsonValue[] | {[key:string]:JsonValue; }
ComponentValues
Section titled “ComponentValues”ComponentValues =
Readonly<Record<string,JsonValue>>>>
GameCommandAvailability
Section titled “GameCommandAvailability”GameCommandAvailability = {
status:"available"; } | {status:"unavailable";reason:string; }
EnvironmentFacts
Section titled “EnvironmentFacts”EnvironmentFacts =
z.infer<typeofenvironmentFactsSchema>>
AuthoredFeedbackCue
Section titled “AuthoredFeedbackCue”AuthoredFeedbackCue =
Omit<FeedbackPresentationCue,"sequence"|"time"|"kind">>
What WriteContext.cue() accepts: a feedback cue before the session stamps its
sequence and commit time.
CartridgeAudio
Section titled “CartridgeAudio”CartridgeAudio =
z.infer<typeofcartridgeAudioSchema>>
BlueprintSide
Section titled “BlueprintSide”BlueprintSide =
"north"|"south"|"east"|"west"
A side of a module: north is -z, south +z, west -x, east +x.
BlueprintOpeningKind
Section titled “BlueprintOpeningKind”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).
CameraFollowPolicy
Section titled “CameraFollowPolicy”CameraFollowPolicy =
z.infer<typeofcameraFollowSchema>>
CartridgeCameraPolicy
Section titled “CartridgeCameraPolicy”CartridgeCameraPolicy =
z.infer<typeofcartridgeCameraSchema>>
VisualBindings
Section titled “VisualBindings”VisualBindings =
Readonly<Record<string,VisualBinding>>>>
StaticVisualBinding
Section titled “StaticVisualBinding”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”
readonlykind:"static"
worldRole
Section titled “worldRole”
readonlyworldRole:"floor"|"structure"|"item"
readonlypath:BankPath
facing
Section titled “facing”
readonlyfacing:boolean
The path ends in one frame per view turn (0 to 3).
frames?
Section titled “frames?”
readonlyoptionalframes?:true
The path (after its view) ends in an animation’s frames.
anchor
Section titled “anchor”
readonlyanchor:"propAnchor"|"vehicleAnchor"
CartridgeDirectControl
Section titled “CartridgeDirectControl”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.
HostFeature
Section titled “HostFeature”HostFeature = typeof
HOST_FEATURES[number]
ComponentFields
Section titled “ComponentFields”ComponentFields =
Readonly<Record<string,JsonValue>>>>
One component’s field values as they cross into the kernel.
BuildableDefinition
Section titled “BuildableDefinition”BuildableDefinition =
z.infer<typeofbuildableDefinitionSchema>>
ConstructionProposalInput
Section titled “ConstructionProposalInput”ConstructionProposalInput =
z.infer<typeofconstructionProposalInput>>
DiagnosticCode
Section titled “DiagnosticCode”DiagnosticCode = keyof typeof
DIAGNOSTICS
EffectFields
Section titled “EffectFields”EffectFields<
T> > =Readonly<Record<keyofT&string|"at"|"seq","number"|"string"|"boolean">>>>
Fields declared by an effect, including its world time and step order.
Type Parameters
Section titled “Type Parameters”T extends object
FlowCell
Section titled “FlowCell”FlowCell = readonly [
number,number]
PresentationLight
Section titled “PresentationLight”PresentationLight =
z.infer<typeofpresentationLightSchema>>
CartridgeLighting
Section titled “CartridgeLighting”CartridgeLighting =
z.infer<typeofcartridgeLightingSchema>>
Mood = typeof
MOODS[number]
TerrainLook
Section titled “TerrainLook”TerrainLook =
z.infer<typeofterrainLookSchema>>
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?: readonlyMoodStop[];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"; }
palette
Section titled “palette”
readonlypalette:null
ambientLight?
Section titled “ambientLight?”
readonlyoptionalambientLight?:Readonly<Record<Mood,number>>>>
ambientTint?
Section titled “ambientTint?”
readonlyoptionalambientTint?:Readonly<Record<Mood, readonly [number,number,number]>>
View-only RGB light multipliers (0..1), independent of palette mapping.
terrain
Section titled “terrain”
readonlyterrain:TerrainLook
backdrop?
Section titled “backdrop?”
readonlyoptionalbackdrop?:"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"; }
palette
Section titled “palette”
readonlypalette:Palette
dither
Section titled “dither”
readonlydither:PaletteDither
readonlymood:Mood
moods?
Section titled “moods?”
readonlyoptionalmoods?: readonlyMoodStop[]
The checked schedule, when the cartridge gives one.
ambientLight?
Section titled “ambientLight?”
readonlyoptionalambientLight?:Readonly<Record<Mood,number>>>>
ambientTint?
Section titled “ambientTint?”
readonlyoptionalambientTint?:Readonly<Record<Mood, readonly [number,number,number]>>
View-only RGB light multipliers (0..1), independent of palette mapping.
terrain
Section titled “terrain”
readonlyterrain:TerrainLook
backdrop?
Section titled “backdrop?”
readonlyoptionalbackdrop?:"ocean"
Cell2 = readonly [
number,number]
A ground cell: [x, z]. The actor settles onto the surface there.
ActorParams
Section titled “ActorParams”ActorParams =
Readonly<Record<string,string|number|boolean|null>>>>
Values for an actor’s declared inputs, by input name.
SeatFacts
Section titled “SeatFacts”SeatFacts =
Readonly<Record<string,number>>>>
TerrainChoice
Section titled “TerrainChoice”TerrainChoice =
VoxelTerrainChoice|SeaTerrainChoice
WindowSurface
Section titled “WindowSurface”WindowSurface =
"paper"|"chrome"
The two UI languages. paper is a window about the world (field-guide theme:
inspector, letters, goals); chrome is the cartridge shell (plastic theme:
menus, settings). Caps components and themes do all the styling.
WindowWorld
Section titled “WindowWorld”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" }.
RunCommand
Section titled “RunCommand”RunCommand = (
command,input?) =>void
The single command door: "garden:plantSeeds" or "ui:garden.goals".
Parameters
Section titled “Parameters”command
Section titled “command”string
input?
Section titled “input?”Returns
Section titled “Returns”void
WindowBody
Section titled “WindowBody”WindowBody = (
world) => readonlyWindowBlock[]
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”Returns
Section titled “Returns”readonly WindowBlock[]
WindowBlock
Section titled “WindowBlock”WindowBlock =
z.infer<typeofwindowBlockSchema>>
One block of a game window: plain data a person or a model can write.
WindowRole
Section titled “WindowRole”WindowRole =
z.infer<typeofwindowRoleSchema>>
Where the shell shows a window.
WindowOpening
Section titled “WindowOpening”WindowOpening =
z.infer<typeofwindowOpeningSchema>>
When a window first opens on its own.
Variables
Section titled “Variables”RESERVED_COMPONENTS
Section titled “RESERVED_COMPONENTS”
constRESERVED_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"]
sampledSoundSchema
Section titled “sampledSoundSchema”
constsampledSoundSchema: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.
cartridgeAudioSchema
Section titled “cartridgeAudioSchema”
constcartridgeAudioSchema: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.
actorInput
Section titled “actorInput”
constactorInput: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.
actorInputSchema
Section titled “actorInputSchema”
constactorInputSchema: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.
ActorKind
Section titled “ActorKind”
constActorKind: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.
cameraFollowSchema
Section titled “cameraFollowSchema”
constcameraFollowSchema: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.
cartridgeCameraSchema
Section titled “cartridgeCameraSchema”
constcartridgeCameraSchema: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_FEATURES
Section titled “HOST_FEATURES”
constHOST_FEATURES: readonly ["minded-seats"]
Engine features a host switches on for the shared worlds it opens.
Collider
Section titled “Collider”
constCollider: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.
Launcher
Section titled “Launcher”
constLauncher: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; }>
ImpactMaterial
Section titled “ImpactMaterial”
constImpactMaterial:ComponentDefinition<{response:"stop"|"pierce"|"ground";resistance:number;restitution:number;friction:number;embedSpeed:number; }>
Contact policy supplied by a game; collision geometry remains independent.
constBody:ComponentDefinition<{speed:number; }>
Native movement capability; game systems may query it but cannot write it.
Emitter
Section titled “Emitter”
constEmitter:ComponentDefinition<{catalog:string; }>
Native finite-emission capability; catalog admission remains native-owned.
Container
Section titled “Container”
constContainer:ComponentDefinition<{capacity:number; }>
Native carrying capacity; authored systems may query but cannot write it.
Traversal
Section titled “Traversal”
constTraversal:ComponentDefinition<{clearanceCells:number;maxStepCells:number; }>
Authored walking geometry; native routing owns its interpretation and state.
Position
Section titled “Position”
constPosition:ComponentDefinition<{x:number;y:number;z:number;facing:number; }>
Visual
Section titled “Visual”
constVisual:ComponentDefinition<{sprite:string;label:string; }>
Native authored sprite identity. Presentation projections must not replace it.
Support
Section titled “Support”
constSupport:ComponentDefinition<{entity:EntityId; }>
Surface
Section titled “Surface”
constSurface:ComponentDefinition<{minX:number;maxX:number;minZ:number;maxZ:number;height:number; }>
MaterialLot
Section titled “MaterialLot”
constMaterialLot:ComponentDefinition<{quantity:number;kind:string;container:EntityId; }>
constHands: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.
VesselCapability
Section titled “VesselCapability”
constVesselCapability:ComponentDefinition<{acceptsWater:boolean; }>
Native vessel eligibility; physical capability is authored as content and consumed by the native field-water planner.
LotWater
Section titled “LotWater”
constLotWater:ComponentDefinition<{waterKg:number; }>
SupplyAllocation
Section titled “SupplyAllocation”
constSupplyAllocation: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.
DeliveryRequest
Section titled “DeliveryRequest”
constDeliveryRequest: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.
FiniteResource
Section titled “FiniteResource”
constFiniteResource:ComponentDefinition<{kind:string;quantity:number; }>
JobTaskWork
Section titled “JobTaskWork”
constJobTaskWork:ComponentDefinition<{seconds:number; }>
Native durable effort for a generic job task; authored code may query it for progress presentation but cannot write it.
ResourceSite
Section titled “ResourceSite”
constResourceSite:ComponentDefinition<{definition:string;stage:number;nextDue:number; }>
Destination
Section titled “Destination”
constDestination:ComponentDefinition<{x:number;y:number;z:number;facing:number;frame:EntityId|null; }>
placedAt
Section titled “placedAt”
constplacedAt: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.
ExcavationWork
Section titled “ExcavationWork”
constExcavationWork:ComponentDefinition<{x:number;y:number;z:number;expected:number;replacement:number;seconds:number; }>
Native progress is observable but cannot be written by authored systems.
ExcavationOrder
Section titled “ExcavationOrder”
constExcavationOrder:ComponentDefinition<{cellX:number;cellY:number;cellZ:number;expected:number;status:"queued"|"blocked"|"cancelling";reason:string; }>
Buildable
Section titled “Buildable”
constBuildable: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.
constructionProposalInput
Section titled “constructionProposalInput”
constconstructionProposalInput: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.
SealedContainer
Section titled “SealedContainer”
constSealedContainer:ComponentDefinition<Record<string,never>>>>
Native custody is observable; authored writes cannot lock or unlock goods.
ConstructionSite
Section titled “ConstructionSite”
constConstructionSite:ComponentDefinition<ConstructionSiteState>>
The site owns earned effort; active worker ownership lives in WorkAttempt.
FloorReplacement
Section titled “FloorReplacement”
constFloorReplacement:ComponentDefinition<{version:number;targetFloor:EntityId;expectedCatalog:string;desiredCatalog:string;supportX:number;supportY:number;supportZ:number;phase:"cancelled"|"queued"|"working"|"completed"; }>
DeconstructionOrder
Section titled “DeconstructionOrder”
constDeconstructionOrder: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.
DIAGNOSTICS
Section titled “DIAGNOSTICS”
constDIAGNOSTICS:object
The stable catalog. A code never changes meaning once published.
Type Declaration
Section titled “Type Declaration”
readonlyVD001:"cartridge header is invalid"="cartridge header is invalid"
readonlyVD002:"a system is installed twice"="a system is installed twice"
readonlyVD003:"two components share an id"="two components share an id"
readonlyVD004:"a buildable is listed as an ordinary actor"="a buildable is listed as an ordinary actor"
readonlyVD005:"a build command is defined next to construction()"="a build command is defined next to construction()"
readonlyVD006:"buildables have no world to stand in"="buildables have no world to stand in"
readonlyVD007:"buildables need voxel terrain"="buildables need voxel terrain"
readonlyVD008:"terrain kind is unknown"="terrain kind is unknown"
readonlyVD009:"shelf presentation is invalid"="shelf presentation is invalid"
readonlyVD010:"an actor id is invalid"="an actor id is invalid"
readonlyVD011:"an actor has a component twice"="an actor has a component twice"
readonlyVD012:"an actor's initial value does not fit its component"="an actor's initial value does not fit its component"
readonlyVD013:"a behavior needs components its actor lacks"="a behavior needs components its actor lacks"
readonlyVD014:"an actor attaches a behavior twice"="an actor attaches a behavior twice"
readonlyVD015:"two different behaviors share an id"="two different behaviors share an id"
readonlyVD016:"an actor is defined twice in one cartridge"="an actor is defined twice in one cartridge"
readonlyVD017:"membership is set by hand"="membership is set by hand"
readonlyVD020:"a placed actor is missing a param"="a placed actor is missing a param"
readonlyVD021:"a placed actor is given an unknown param"="a placed actor is given an unknown param"
readonlyVD022:"the scene places one id twice"="the scene places one id twice"
readonlyVD023:"a placed actor has a component without values"="a placed actor has a component without values"
readonlyVD024:"a placed actor has no position"="a placed actor has no position"
readonlyVD025:"two placed actors have the same target cell"="two placed actors have the same target cell"
readonlyVD030:"a window id is not namespaced"="a window id is not namespaced"
readonlyVD031:"a window is declared twice"="a window is declared twice"
readonlyVD032:"two windows share a key"="two windows share a key"
readonlyVD033:"a control key is not one lowercase letter or digit"="a control key is not one lowercase letter or digit"
readonlyVD034:"two controls, windows or shell keys share a key"="two controls, windows or shell keys share a key"
readonlyVD040:"an actor given to construction() is not buildable"="an actor given to construction() is not buildable"
readonlyVD041:"a buildable is declared twice"="a buildable is declared twice"
readonlyVD050:"dismemberment settings are invalid"="dismemberment settings are invalid"
readonlyVD051:"a cast has no look of that name"="a cast has no look of that name"
readonlyVD052:"a cast is invalid"="a cast is invalid"
readonlyVD060:"a cartridge's look is invalid"="a cartridge's look is invalid"
readonlyVD061:"a game window's options are invalid"="a game window's options are invalid"
readonlyVD070:"a blueprint module is invalid"="a blueprint module is invalid"
readonlyVD071:"two blueprint rooms overlap"="two blueprint rooms overlap"
readonlyVD072:"a blueprint doorway leads outside"="a blueprint doorway leads outside"
readonlyVD073:"two blueprint rooms disagree about a shared wall"="two blueprint rooms disagree about a shared wall"
readonlyVD074:"a styled blueprint piece has no buildable"="a styled blueprint piece has no buildable"
readonlyVD080:"local play seats more than one party"="local play seats more than one party"
readonlyVD083:"world lighting presentation is invalid"="world lighting presentation is invalid"
readonlyVD082:"camera presentation is invalid"="camera presentation is invalid"
readonlyVD081:"page interest radius is invalid"="page interest radius is invalid"
FLOW_NEIGHBOURS
Section titled “FLOW_NEIGHBOURS”
constFLOW_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]]
HordeTarget
Section titled “HordeTarget”
constHordeTarget:ComponentDefinition<{x:number;z:number;speed:number;active:boolean;profile:string; }>
Saved autonomous intent. An empty profile is a direct local destination.
presentationLightSchema
Section titled “presentationLightSchema”
constpresentationLightSchema: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.
cartridgeLightingSchema
Section titled “cartridgeLightingSchema”
constcartridgeLightingSchema: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.
constMOODS: readonly ["day","dusk","night"]
The light a world is shown in. Every mood’s sky and light come from the declared palette.
moodSchema
Section titled “moodSchema”
constmoodSchema:ZodEnum<{day:"day";dusk:"dusk";night:"night"; }>
Parses a mood from untrusted input (a URL parameter, a tool call).
terrainLookSchema
Section titled “terrainLookSchema”
constterrainLookSchema:ZodEnum<{voxel:"voxel";smooth:"smooth"; }>
FULL_COLOUR
Section titled “FULL_COLOUR”
constFULL_COLOUR:Look
Full colour: no palette constraint.
constParty:ComponentDefinition<Record<string,never>>>>
Gameplay group identity. Membership and ownership are separate facts.
OwnedBy
Section titled “OwnedBy”
constOwnedBy:ComponentDefinition<{player:string; }>
Stable player property. Access rules decide which operations it permits.
PartyMember
Section titled “PartyMember”
constPartyMember:ComponentDefinition<{party:EntityId; }>
A person belongs to this party without duplicating their physical identity.
OwnedByParty
Section titled “OwnedByParty”
constOwnedByParty:ComponentDefinition<{party:EntityId; }>
Party ownership for property and stationary stores.
StagedProcess
Section titled “StagedProcess”
constStagedProcess:ComponentDefinition<{version:number;definition:string;definitionVersion:number;station:EntityId;stageIndex:number;progressSeconds:number;enteredTick:number;phase:"blocked"|"complete"|"working"|"waiting";blockedReason:string; }>
FieldWaterWork
Section titled “FieldWaterWork”
constFieldWaterWork: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.
ResourceOrder
Section titled “ResourceOrder”
constResourceOrder:ComponentDefinition<{definition:string;cellX:number;cellY:number;cellZ:number;status:ResourceOrderStatus;progressSeconds:number;reason:string; }>
Engine-owned durable intent for one tended resource lifecycle.
Spawned
Section titled “Spawned”
constSpawned:ComponentDefinition<{cause:string;digest:string; }>
Where the kernel keeps a spawned entity’s cause and request digest.
terrainChoiceSchema
Section titled “terrainChoiceSchema”
constterrainChoiceSchema: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">>
constblock: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_KEYS
Section titled “SHELL_KEYS”
constSHELL_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.
WorkParticipation
Section titled “WorkParticipation”
constWorkParticipation:ComponentDefinition<{automatic:boolean; }>
Player participation policy for the shared automatic work owner.
WorkPolicy
Section titled “WorkPolicy”
constWorkPolicy:ComponentDefinition<{pool:string;priority:number;enabled:boolean; }>
WorkExecution
Section titled “WorkExecution”
constWorkExecution:ComponentDefinition<{pool:string;initiatingPlayer:string|null;policyId:string; }>
WorkSchedule
Section titled “WorkSchedule”
constWorkSchedule:ComponentDefinition<{nextReviewTick:number;lastConsidered:number; }>
MEADOW_VERTICAL_METRES
Section titled “MEADOW_VERTICAL_METRES”
constMEADOW_VERTICAL_METRES:0.54=0.54
Metres per vertical terrain cell in the library worlds.
Functions
Section titled “Functions”isReservedComponent()
Section titled “isReservedComponent()”isReservedComponent(
id):boolean
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
isNativeComponentSchema()
Section titled “isNativeComponentSchema()”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”string
Returns
Section titled “Returns”boolean
component()
Section titled “component()”component<
T>>(id,options):ComponentDefinition<T>>
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”`${string}.${string}`
options
Section titled “options”version
Section titled “version”number
fields
Section titled “fields”Readonly<Record<keyof T & string, FieldType>>
targetField?
Section titled “targetField?”keyof T & string
sourceRequires?
Section titled “sourceRequires?”readonly `${string}.${string}`[]
targetRequires?
Section titled “targetRequires?”readonly `${string}.${string}`[]
onTargetRemoved?
Section titled “onTargetRemoved?”allowSelf?
Section titled “allowSelf?”boolean
Returns
Section titled “Returns”relation()
Section titled “relation()”relation<
T>>(id,options):ComponentDefinition<T>>
Register a one-target relation through the same component definition path.
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”`${string}.${string}`
options
Section titled “options”version
Section titled “version”number
fields
Section titled “fields”Readonly<Record<keyof T & string, FieldType>>
targetField
Section titled “targetField”keyof T & string
sourceRequires?
Section titled “sourceRequires?”readonly CapabilityReference[]
targetRequires?
Section titled “targetRequires?”readonly CapabilityReference[]
onTargetRemoved?
Section titled “onTargetRemoved?”allowSelf?
Section titled “allowSelf?”boolean
Returns
Section titled “Returns”setRelation()
Section titled “setRelation()”setRelation<
T>>(definition,source,target):ActionRequest
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”definition
Section titled “definition”source
Section titled “source”target
Section titled “target”Returns
Section titled “Returns”clearRelation()
Section titled “clearRelation()”clearRelation<
T>>(definition,source):ActionRequest
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”definition
Section titled “definition”source
Section titled “source”Returns
Section titled “Returns”query()
Section titled “query()”query<
T>>(…components):QuerySpec<T>>
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”components
Section titled “components”…readonly ComponentDefinition<any>[]
Returns
Section titled “Returns”QuerySpec<T>
system()
Section titled “system()”system(
options):SystemDefinition
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”command()
Section titled “command()”command<
TInput>>(options):GameCommandDefinition
Type Parameters
Section titled “Type Parameters”TInput
Section titled “TInput”TInput
Parameters
Section titled “Parameters”options
Section titled “options”Omit<GameCommandDefinition, "input" |
"title" | "description" | "subjects" | "invoke" | "category" |
"availability"> & object
Returns
Section titled “Returns”entity()
Section titled “entity()”entity(
id):EntityId
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”definitionCapability()
Section titled “definitionCapability()”definitionCapability<
T>>(id,options):ActorDefinitionCapability<T>>
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”`${string}.${string}`
options
Section titled “options”schema
Section titled “schema”ZodType<T>
externalCreation?
Section titled “externalCreation?”boolean
Returns
Section titled “Returns”predicate()
Section titled “predicate()”predicate(
id,options):PredicateDefinition
Parameters
Section titled “Parameters”`${string}.${string}`
options
Section titled “options”reads?
Section titled “reads?”readonly ComponentDefinition<any>[]
facts?
Section titled “facts?”readonly NativeFact[]
(subject, context) => boolean
Returns
Section titled “Returns”action()
Section titled “action()”action(
id,options):BehaviorActionDefinition
Parameters
Section titled “Parameters”`${string}.${string}`
options
Section titled “options”reads?
Section titled “reads?”readonly ComponentDefinition<any>[]
writes?
Section titled “writes?”readonly ComponentDefinition<any>[]
facts?
Section titled “facts?”readonly NativeFact[]
exclusive?
Section titled “exclusive?”string
(subject, context) => void
Returns
Section titled “Returns”behavior()
Section titled “behavior()”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”`${string}.${string}`
define
Section titled “define”(scene) => void
options?
Section titled “options?”BehaviorOptions = {}
Returns
Section titled “Returns”installActorBehaviors()
Section titled “installActorBehaviors()”installActorBehaviors(
actors): readonlySystemDefinition[]
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”actors
Section titled “actors”readonly ActorDefinition[]
Returns
Section titled “Returns”readonly SystemDefinition[]
actor()
Section titled “actor()”actor(
id,options?):ActorDefinition
Compose an immutable actor definition; spawning remains an admitted world operation.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”version?
Section titled “version?”number
Returns
Section titled “Returns”blueprintModule()
Section titled “blueprintModule()”blueprintModule(
id,spec):BlueprintModule
Declare one room. Openings and slots are checked against its size.
Parameters
Section titled “Parameters”string
readonly [number, number]
openings?
Section titled “openings?”readonly BlueprintOpening[]
slots?
Section titled “slots?”Readonly<Record<string, readonly [number, number]>>
readonly string[]
sides?
Section titled “sides?”Readonly<Partial<Record<BlueprintSide,
string>>>
Returns
Section titled “Returns”assembleBlueprint()
Section titled “assembleBlueprint()”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”recipe
Section titled “recipe”Returns
Section titled “Returns”compileBlueprint()
Section titled “compileBlueprint()”compileBlueprint(
blueprint,kit):object
A blueprint’s pieces as placement plans for a game’s own buildables. pieces
names the buildable for each kind, and styles for each kind in a style (a
styled piece with no buildable of its own is an error, never the plain one);
groundAt gives the ground height (the support cell’s y) at a column. floor
optionally names a buildable covering every room cell, emitted before the edge
pieces. A piece over a column with no ground is left out and listed in
unplaced.
Parameters
Section titled “Parameters”blueprint
Section titled “blueprint”construction
Section titled “construction”Pick<Construction, "candidates">
pieces
Section titled “pieces”Readonly<Record<BlueprintPiece["kind"],
string>>
floor?
Section titled “floor?”string
styles?
Section titled “styles?”Readonly<Record<string, Readonly<Partial<Record<"wall" |
"window" | "door", string>>>>>
groundAt
Section titled “groundAt”(x, z) => number | undefined
Returns
Section titled “Returns”object
readonlyplans: readonlyPlacementCandidate[]
unplaced
Section titled “unplaced”
readonlyunplaced: readonly (BlueprintPiece|BlueprintFloor)[]
prebuildBatches()
Section titled “prebuildBatches()”prebuildBatches(
party,plans): readonlyActionRequest[]
Plans split into prebuild actions of at most 256 structures each.
Parameters
Section titled “Parameters”readonly PlacementCandidate[]
Returns
Section titled “Returns”readonly ActionRequest[]
buildable()
Section titled “buildable()”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”string
definition
Section titled “definition”string = ...
The player-facing noun: “Build wall”, “stair north”.
sprites
Section titled “sprites”string = ...
Sprite family; stages derive as ${sprites}.stakes|frame|finished (cells) or
${sprites}.segment.${stage}.${axis} (edges).
geometry
Section titled “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; } =
environmentStructureGeometrySchema
materials
Section titled “materials”object[] = ...
workSeconds
Section titled “workSeconds”number = ...
workReachBelowCells
Section titled “workReachBelowCells”number = ...
placement?
Section titled “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.
placement.alignment
Section titled “placement.alignment”"fixed" | "stroke" = ...
placement.facing?
Section titled “placement.facing?”{ north: number; east: number; south: number; west: number; }
= ...
placement.facing.north
Section titled “placement.facing.north”number = ...
placement.facing.east
Section titled “placement.facing.east”number = ...
placement.facing.south
Section titled “placement.facing.south”number = ...
placement.facing.west
Section titled “placement.facing.west”number = ...
ports?
Section titled “ports?”object[] = ...
onRemove?
Section titled “onRemove?”{ salvage?: object[]; emptyPorts?: string[]; } = ...
onRemove.salvage?
Section titled “onRemove.salvage?”object[] = ...
onRemove.emptyPorts?
Section titled “onRemove.emptyPorts?”string[] = ...
palette?
Section titled “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.
string = ...
A key that picks this buildable while the build palette applies.
Returns
Section titled “Returns”buildBindingDetail()
Section titled “buildBindingDetail()”buildBindingDetail(
compiled,orientation?):string
Compact build-bar copy: cost, size, gesture and facing.
Parameters
Section titled “Parameters”compiled
Section titled “compiled”orientation?
Section titled “orientation?”string
Returns
Section titled “Returns”string
construction()
Section titled “construction()”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”options
Section titled “options”Returns
Section titled “Returns”defineCartridge()
Section titled “defineCartridge()”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”Returns
Section titled “Returns”launch()
Section titled “launch()”launch(
launcher,ammunition,velocity):ActionRequest
Velocity is in world axes, relative to the launcher’s motion.
Parameters
Section titled “Parameters”launcher
Section titled “launcher”ammunition
Section titled “ammunition”velocity
Section titled “velocity”Returns
Section titled “Returns”displace()
Section titled “displace()”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”entity
Section titled “entity”Returns
Section titled “Returns”beginEmission()
Section titled “beginEmission()”beginEmission(
worker,station):ActionRequest
Parameters
Section titled “Parameters”worker
Section titled “worker”station
Section titled “station”Returns
Section titled “Returns”exchangeFieldWater()
Section titled “exchangeFieldWater()”exchangeFieldWater(
operation,worker,vessel,cell,portions?):ActionRequest
Parameters
Section titled “Parameters”operation
Section titled “operation”string
worker
Section titled “worker”vessel
Section titled “vessel”number
number
number
portions?
Section titled “portions?”number = 1
Returns
Section titled “Returns”move()
Section titled “move()”move(
entity,destination,facing?,speed?):ActionRequest
Parameters
Section titled “Parameters”entity
Section titled “entity”destination
Section titled “destination”facing?
Section titled “facing?”number = 0
speed?
Section titled “speed?”number
Returns
Section titled “Returns”dropLot()
Section titled “dropLot()”dropLot(
entity,lot):ActionRequest
Parameters
Section titled “Parameters”entity
Section titled “entity”Returns
Section titled “Returns”transfer()
Section titled “transfer()”transfer(
lot,from,to,quantity):ActionRequest
Parameters
Section titled “Parameters”quantity
Section titled “quantity”number
Returns
Section titled “Returns”requestDelivery()
Section titled “requestDelivery()”requestDelivery(
request):ActionRequest
Parameters
Section titled “Parameters”request
Section titled “request”source
Section titled “source”destination
Section titled “destination”material
Section titled “material”string
quantity
Section titled “quantity”number
Returns
Section titled “Returns”consume()
Section titled “consume()”consume(
entity,lot,quantity):ActionRequest
Parameters
Section titled “Parameters”entity
Section titled “entity”quantity
Section titled “quantity”number
Returns
Section titled “Returns”extractResource()
Section titled “extractResource()”extractResource(
operation,worker,source):ActionRequest
Parameters
Section titled “Parameters”operation
Section titled “operation”string
worker
Section titled “worker”source
Section titled “source”Returns
Section titled “Returns”establishResourceSite()
Section titled “establishResourceSite()”establishResourceSite(
operation,worker,site,definition,cell):ActionRequest
Parameters
Section titled “Parameters”operation
Section titled “operation”string
worker
Section titled “worker”definition
Section titled “definition”string
number
number
number
Returns
Section titled “Returns”tendResourceSite()
Section titled “tendResourceSite()”tendResourceSite(
operation,worker,site,vessel):ActionRequest
Parameters
Section titled “Parameters”operation
Section titled “operation”string
worker
Section titled “worker”vessel
Section titled “vessel”Returns
Section titled “Returns”encodeDefinition()
Section titled “encodeDefinition()”encodeDefinition(
game,components,initial?,materialCatalog,stockpileProfiles?,actors?):Uint8Array<ArrayBuffer>>
Parameters
Section titled “Parameters”string
components
Section titled “components”readonly ComponentDefinition<any>[]
initial?
Section titled “initial?”readonly SceneEntity[] = []
materialCatalog
Section titled “materialCatalog”readonly object[]
stockpileProfiles?
Section titled “stockpileProfiles?”readonly object[] = []
actors?
Section titled “actors?”readonly ActorDefinition[] = []
Returns
Section titled “Returns”Uint8Array<ArrayBuffer>
cancelWork()
Section titled “cancelWork()”cancelWork(
entity):ActionRequest
Parameters
Section titled “Parameters”entity
Section titled “entity”Returns
Section titled “Returns”compileBuildable()
Section titled “compileBuildable()”compileBuildable(
actor):CompiledBuildable|null
Compile one actor capability set into the existing native structure owner.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”CompiledBuildable | null
compileBuildableEnvironment()
Section titled “compileBuildableEnvironment()”compileBuildableEnvironment(
environment,actors):EnvironmentDefinition
Add actor-authored structures to one environment and run its full validator.
Parameters
Section titled “Parameters”environment
Section titled “environment”EnvironmentDefinition
actors
Section titled “actors”readonly ActorDefinition[]
Returns
Section titled “Returns”EnvironmentDefinition
constructionCandidates()
Section titled “constructionCandidates()”constructionCandidates(
definition,alignment,raw,namespace): readonlyPlacementCandidate[]
Compile a creator gesture into canonical physical proposals. The definition owns geometry; this layer owns normalization; native placement owns permission.
Parameters
Section titled “Parameters”definition
Section titled “definition”EnvironmentStructureDefinition
alignment
Section titled “alignment”PlacementAlignment
catalog
Section titled “catalog”string = ...
orientation?
Section titled “orientation?”"north" | "east" | "south" | "west" = ...
target
Section titled “target”{ cell: [number, number, number]; } | { area: { start:
[number, number, number]; end: [number, number, number]; };
} | { edges: object[]; } = ...
namespace
Section titled “namespace”string
Returns
Section titled “Returns”readonly PlacementCandidate[]
constructionPlanActions()
Section titled “constructionPlanActions()”constructionPlanActions(
options): readonlyActionRequest[]
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”options
Section titled “options”Returns
Section titled “Returns”readonly ActionRequest[]
constructionTarget()
Section titled “constructionTarget()”constructionTarget(
site):ConstructionTarget
Decode the native flat component wire into its exhaustive physical target.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”constructionCell()
Section titled “constructionCell()”constructionCell(
site):Vec3
Parameters
Section titled “Parameters”Returns
Section titled “Returns”replaceFloor()
Section titled “replaceFloor()”replaceFloor(
orderId,existingFloorId,desiredCatalog):ActionRequest
Parameters
Section titled “Parameters”orderId
Section titled “orderId”existingFloorId
Section titled “existingFloorId”desiredCatalog
Section titled “desiredCatalog”string
Returns
Section titled “Returns”planConstructions()
Section titled “planConstructions()”planConstructions(
party,plans):ActionRequest
Parameters
Section titled “Parameters”readonly PlacementCandidate[]
Returns
Section titled “Returns”prebuildStructures()
Section titled “prebuildStructures()”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”readonly PlacementCandidate[]
Returns
Section titled “Returns”bindConstructionStage()
Section titled “bindConstructionStage()”bindConstructionStage(
site,contact):ActionRequest
Parameters
Section titled “Parameters”contact
Section titled “contact”Returns
Section titled “Returns”setStructureOpen()
Section titled “setStructureOpen()”setStructureOpen(
worker,site,open):ActionRequest
Request a desired aperture state; native contact and physical admission decide.
Parameters
Section titled “Parameters”worker
Section titled “worker”boolean
Returns
Section titled “Returns”breakStructure()
Section titled “breakStructure()”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”Returns
Section titled “Returns”deconstruct()
Section titled “deconstruct()”deconstruct(
worker,site):ActionRequest
Parameters
Section titled “Parameters”worker
Section titled “worker”Returns
Section titled “Returns”formatDiagnostic()
Section titled “formatDiagnostic()”formatDiagnostic(
diagnostic):string
VD013 <message>\n hint: <hint> — the terminal and overlay rendering.
Parameters
Section titled “Parameters”diagnostic
Section titled “diagnostic”Returns
Section titled “Returns”string
fail()
Section titled “fail()”fail(
code,message,hint,path?):never
Throw one diagnostic.
Parameters
Section titled “Parameters”"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" | "VD081"
message
Section titled “message”string
string
readonly (string | number)[] = []
Returns
Section titled “Returns”never
effect()
Section titled “effect()”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”T extends object
Parameters
Section titled “Parameters”`${string}.${string}`
fields
Section titled “fields”EffectFields<T>
Every field, at and seq included: { ..., at: "number", seq: "number" }.
Returns
Section titled “Returns”Effect<T>
createFeedback()
Section titled “createFeedback()”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”Weapon
Section titled “Weapon”Weapon extends string
Simple
Section titled “Simple”Simple extends string
Swing extends string
Parameters
Section titled “Parameters”profile
Section titled “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()
Section titled “felt()”felt(
cue,by): readonlyAuthoredFeedbackCue[]
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”string
Returns
Section titled “Returns”readonly AuthoredFeedbackCue[]
hordeMovement()
Section titled “hordeMovement()”hordeMovement(
options?):HordeSimulation
Geometry is projected once per phase; all bodies share fields and neighbour lookup.
Parameters
Section titled “Parameters”options?
Section titled “options?”geometry?
Section titled “geometry?”{ reads: readonly `${string}.${string}`[]; project: readonly
FlowGeometry[]; }
geometry.reads
Section titled “geometry.reads”readonly `${string}.${string}`[]
geometry.project
Section titled “geometry.project”steering?
Section titled “steering?”{ radius?: number; separation?: number; alignment?: number;
neighbours?: number; candidates?: number; }
steering.radius?
Section titled “steering.radius?”number = ...
steering.separation?
Section titled “steering.separation?”number = ...
steering.alignment?
Section titled “steering.alignment?”number = ...
steering.neighbours?
Section titled “steering.neighbours?”number = ...
steering.candidates?
Section titled “steering.candidates?”number = ...
Returns
Section titled “Returns”HordeSimulation
perceptionFrame()
Section titled “perceptionFrame()”perceptionFrame(
input,geometry?):object
Immutable, step-local sensor frame. Games supply emitters, targets and geometry.
Parameters
Section titled “Parameters”targets
Section titled “targets”object[] = ...
sounds
Section titled “sounds”object[] = ...
number = ...
soundBarrierLoss
Section titled “soundBarrierLoss”number = ...
geometry?
Section titled “geometry?”Returns
Section titled “Returns”object
targets
Section titled “targets”targets: readonly
object[]
observe()
Section titled “observe()”observe(
input):object
Parameters
Section titled “Parameters”number = ...
number = ...
number = ...
heardAfter
Section titled “heardAfter”number = ...
noiseBoost
Section titled “noiseBoost”{ within: number; extra: number; } = ...
noiseBoost.within
Section titled “noiseBoost.within”number = ...
noiseBoost.extra
Section titled “noiseBoost.extra”number = ...
Returns
Section titled “Returns”object
visible
Section titled “visible”visible: {
x:number;z:number;id:string; } |null
heard: {
x:number;z:number;radius:number;at:number; } |null
assignHordeSlots()
Section titled “assignHordeSlots()”assignHordeSlots(
input):ReadonlyMap<EntityId,HordeSlotAssignment>>
Nearest eligible bodies fill interchangeable slots; one body and one occupant per slot.
Parameters
Section titled “Parameters”readonly HordeSlot[]
bodies
Section titled “bodies”readonly HordeSlotBody[]
Returns
Section titled “Returns”ReadonlyMap<EntityId,
HordeSlotAssignment>
localSteering()
Section titled “localSteering()”localSteering(
input):object
Stateless local steering. Native collision remains the final movement authority.
Parameters
Section titled “Parameters”radius?
Section titled “radius?”number = ...
separation?
Section titled “separation?”number = ...
alignment?
Section titled “alignment?”number = ...
neighbours?
Section titled “neighbours?”number = ...
candidates?
Section titled “candidates?”number = ...
Returns
Section titled “Returns”object
advance()
Section titled “advance()”advance(
input):object
Parameters
Section titled “Parameters”readonly SteeringBody[]
Returns
Section titled “Returns”object
motions
Section titled “motions”motions:
CrowdMotion[]
neighbourChecks
Section titled “neighbourChecks”neighbourChecks:
number
resolveLook()
Section titled “resolveLook()”resolveLook(
spec):Look
Check a cartridge’s look. Throws a coded VD diagnostic on a bad look.
Parameters
Section titled “Parameters”LookSpec | undefined
Returns
Section titled “Returns”ambientLightForMood()
Section titled “ambientLightForMood()”ambientLightForMood(
look,mood):number
Brightness follows the one mood chosen by the cartridge’s presentation.
Parameters
Section titled “Parameters”"day" | "dusk" | "night"
Returns
Section titled “Returns”number
moodAt()
Section titled “moodAt()”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”seconds
Section titled “seconds”number
Returns
Section titled “Returns”"day" | "dusk" | "night"
instantiateActors()
Section titled “instantiateActors()”instantiateActors(
bindingId,expectedSequence,plan):ActionRequest
Parameters
Section titled “Parameters”bindingId
Section titled “bindingId”string
expectedSequence
Section titled “expectedSequence”number
Returns
Section titled “Returns”partyMemberIds()
Section titled “partyMemberIds()”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”<T>(spec) => readonly QueryRow<T>[]
viewer
Section titled “viewer”Returns
Section titled “Returns”ReadonlySet<EntityId>
ownedActorIds()
Section titled “ownedActorIds()”ownedActorIds(
read,viewer):ReadonlySet<EntityId>>
Parameters
Section titled “Parameters”<T>(spec) => readonly QueryRow<T>[]
viewer
Section titled “viewer”Returns
Section titled “Returns”ReadonlySet<EntityId>
definePhaseCycle()
Section titled “definePhaseCycle()”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”Phase extends string
Parameters
Section titled “Parameters”definitions
Section titled “definitions”readonly object[]
Returns
Section titled “Returns”object
seconds
Section titled “seconds”seconds:
number
duration
Section titled “duration”duration: (
id) =>number
Parameters
Section titled “Parameters”Phase
Returns
Section titled “Returns”number
advance()
Section titled “advance()”advance(
clock,now):PhaseAdvance<Phase>>
Parameters
Section titled “Parameters”PhaseClock<Phase>
number
Returns
Section titled “Returns”PhaseAdvance<Phase>
requestProcess()
Section titled “requestProcess()”requestProcess(
definition,station):object
Parameters
Section titled “Parameters”definition
Section titled “definition”string
station
Section titled “station”Returns
Section titled “Returns”object
kind:
"request-process"
definition
Section titled “definition”definition:
string
station
Section titled “station”station:
EntityId
admitProcess()
Section titled “admitProcess()”admitProcess(
process,definition,station):object
Parameters
Section titled “Parameters”process
Section titled “process”definition
Section titled “definition”string
station
Section titled “station”Returns
Section titled “Returns”object
kind:
"admit-process"
process
Section titled “process”process:
EntityId
definition
Section titled “definition”definition:
string
station
Section titled “station”station:
EntityId
place()
Section titled “place()”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”options
Section titled “options”string
params?
Section titled “params?”Readonly<Record<string, string | number | boolean | null>>
surface?
Section titled “surface?”"sea"
Returns
Section titled “Returns”compileScene()
Section titled “compileScene()”compileScene(
scene):CompiledScene
Compile placements into the fresh world’s records and surface settling.
Parameters
Section titled “Parameters”readonly Placement[]
Returns
Section titled “Returns”spawn()
Section titled “spawn()”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.
Parameters
Section titled “Parameters”options
Section titled “options”receipt
Section titled “receipt”string
string
params?
Section titled “params?”Readonly<Record<string, string | number | boolean | null>>
Readonly<Record<string, EntityId>>
Returns
Section titled “Returns”defineSeatGoal()
Section titled “defineSeatGoal()”defineSeatGoal<
F>>(goal):SeatGoal
Erase the goal’s fact shape after binding its scorer to that same shape.
Type Parameters
Section titled “Type Parameters”F extends Readonly<Record<string, number>>
Parameters
Section titled “Parameters”SeatGoal<F>
Returns
Section titled “Returns”voxel()
Section titled “voxel()”voxel(
input):VoxelTerrainChoice
Parameters
Section titled “Parameters”environment
Section titled “environment”EnvironmentDefinition
Returns
Section titled “Returns”seaTerrain()
Section titled “seaTerrain()”seaTerrain(
input):SeaTerrainChoice
A voxel environment whose wet columns are presented at the sea line.
Parameters
Section titled “Parameters”environment
Section titled “environment”EnvironmentDefinition
Returns
Section titled “Returns”actorTarget()
Section titled “actorTarget()”actorTarget(
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.
Parameters
Section titled “Parameters”component
Section titled “component”ComponentDefinition<any>
Returns
Section titled “Returns”object
readonlyinput:ZodObject<{entity:ZodString; }>
subjects
Section titled “subjects”
readonlysubjects: (context) => readonlyEntityId[]
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "query">
Returns
Section titled “Returns”readonly EntityId[]
binding
Section titled “binding”
readonlybinding:Pick<GameLocalBinding,"target"|"component">>
gameWindow()
Section titled “gameWindow()”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”string
object & object
Returns
Section titled “Returns”checkWindows()
Section titled “checkWindows()”checkWindows(
windows): readonlyCartridgeWindow[]
Cartridge-wide checks: unique ids and non-conflicting keys.
Parameters
Section titled “Parameters”windows
Section titled “windows”readonly CartridgeWindow[]
Returns
Section titled “Returns”readonly CartridgeWindow[]
checkKeys()
Section titled “checkKeys()”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”windows
Section titled “windows”readonly CartridgeWindow[]
controls
Section titled “controls”readonly object[]
Returns
Section titled “Returns”void
windowContents()
Section titled “windowContents()”windowContents(
windows): (world) => readonlyReadonly<{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”windows
Section titled “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()
Section titled “workAttemptsFor()”workAttemptsFor(
context,tasks): readonlyWorkAttempt[]
Query native attempt ownership without leaking the port’s non-empty batch contract.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "workAttempts">
readonly EntityId[]
Returns
Section titled “Returns”readonly WorkAttempt[]
workAttempt()
Section titled “workAttempt()”workAttempt(
context,task):WorkAttempt|null
Read the one native attempt projection for a task.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<ReadContext, "workAttempts">
Returns
Section titled “Returns”WorkAttempt | null
beginRouteWorkAttempt()
Section titled “beginRouteWorkAttempt()”beginRouteWorkAttempt(
context,task,worker,destination):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action">
worker
Section titled “worker”destination
Section titled “destination”Returns
Section titled “Returns”void
interruptWorkAttempt()
Section titled “interruptWorkAttempt()”interruptWorkAttempt(
context,attempt,operationSequence,cause):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
Returns
Section titled “Returns”void
retargetRouteWorkAttempt()
Section titled “retargetRouteWorkAttempt()”retargetRouteWorkAttempt(
context,attempt,operationSequence,destination):void
Replace only the current route operation, preserving its attempt generation.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
destination
Section titled “destination”Returns
Section titled “Returns”void
continueRouteWorkAttempt()
Section titled “continueRouteWorkAttempt()”continueRouteWorkAttempt(
context,attempt,operationSequence,destination):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
destination
Section titled “destination”Returns
Section titled “Returns”void
acknowledgeWorkAttempt()
Section titled “acknowledgeWorkAttempt()”acknowledgeWorkAttempt(
context,attempt,operationSequence):void
Acknowledge only the currently projected terminal operation.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
Returns
Section titled “Returns”void
continueDeconstructionWorkAttempt()
Section titled “continueDeconstructionWorkAttempt()”continueDeconstructionWorkAttempt(
context,attempt,operationSequence,site,contact):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
contact
Section titled “contact”Returns
Section titled “Returns”void
continueResourceEstablishWorkAttempt()
Section titled “continueResourceEstablishWorkAttempt()”continueResourceEstablishWorkAttempt(
context,attempt,operationSequence,site,definition,cell):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
definition
Section titled “definition”string
readonly [number, number, number]
Returns
Section titled “Returns”void
continueResourceTendWorkAttempt()
Section titled “continueResourceTendWorkAttempt()”continueResourceTendWorkAttempt(
context,attempt,operationSequence,site,vessel):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
vessel
Section titled “vessel”Returns
Section titled “Returns”void
continueResourceExtractWorkAttempt()
Section titled “continueResourceExtractWorkAttempt()”continueResourceExtractWorkAttempt(
context,attempt,operationSequence,source):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
source
Section titled “source”Returns
Section titled “Returns”void
continueFieldWaterWorkAttempt()
Section titled “continueFieldWaterWorkAttempt()”continueFieldWaterWorkAttempt(
context,attempt,operationSequence,vessel,cell,direction,portions):void
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
vessel
Section titled “vessel”readonly [number, number, number]
direction
Section titled “direction”"withdraw" | "deposit"
portions
Section titled “portions”number
Returns
Section titled “Returns”void
continueMaterialTransferAttempt()
Section titled “continueMaterialTransferAttempt()”continueMaterialTransferAttempt(
context,attempt,operationSequence,lot,from,to,quantity):void
Continue one admitted attempt through the native material transfer owner.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
quantity
Section titled “quantity”number
Returns
Section titled “Returns”void
continueMaterialDropAttempt()
Section titled “continueMaterialDropAttempt()”continueMaterialDropAttempt(
context,attempt,operationSequence,lot):void
Continue an admitted attempt through the native ground-custody owner.
Parameters
Section titled “Parameters”context
Section titled “context”Pick<WriteContext, "action"> &
Pick<ReadContext, "workAttempts">
attempt
Section titled “attempt”operationSequence
Section titled “operationSequence”number
Returns
Section titled “Returns”void
meadow()
Section titled “meadow()”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”options?
Section titled “options?”string
radius?
Section titled “radius?”number
Returns
Section titled “Returns”sea(
options):WorldSpec
A chart sea with a rectangular sand shore in native terrain.
Parameters
Section titled “Parameters”options
Section titled “options”string
radius?
Section titled “radius?”number
{ minX: number; maxX: number; minZ: number; maxZ: number; }
shore.minX
Section titled “shore.minX”number
shore.maxX
Section titled “shore.maxX”number
shore.minZ
Section titled “shore.minZ”number
shore.maxZ
Section titled “shore.maxZ”number