/** Server-verified authored Universal Vehicle package carried by a World spawn. */ export interface VehiclePackageArtifact { format: 1; revision: number; checksumSha256: string; package: Record; } /** One owned item instance currently standing in the active World. */ export interface WorldSpawn { placementId: string; instanceId: string; itemId: string; worldId: string; ownerUserId: string; ownerUsername: string | null; kind: string; usage: string; name: string; thumbnailUrl: string | null; modelUrl: string | null; vehiclePackage: VehiclePackageArtifact | null; /** Same immutable Device definition used when this owned instance is in a Home. */ deviceDefinition: { id: string; version: string; } | null; transform: Record; state: Record; spawnedAt: string; } export interface ModuleIdentity { /** Required for legacy/static owned-item modules; omitted for trusted live-placement modules. */ itemInstanceId?: string; moduleId: string; bundleChecksumSha256: string; revision: number; } export interface ModuleActionRequest { identity: ModuleIdentity; action: string; args?: Record; engagement?: 'acquire' | 'release'; } /** * One named server-authoritative vehicle component or panel intent. The SDK * derives the live Build/authority/sequence envelope; callers can only name * the signed module identity, authoritative entity, action, and primitive args. * `sendVehicleComponentAction()` returns false without sending or advancing its * replay fence when transport or durable reconnect safety is unavailable. */ export interface VehicleComponentActionRequest { identity: ModuleIdentity; entityId: string; action: string; args?: Record; /** * Optional desired uint16 bits inside the action's trusted server mask. This * makes retries/idempotent set actions deterministic while legacy toggle * requests continue to omit the field. */ targetBits?: number; } export type VehicleRole = 'owner' | 'driver' | 'occupant' | 'nearby'; /** One signed rigid-part spawn recipe admitted by a verified VehiclePackage. */ export interface VehicleDetachActionDescriptor { partId: 'hood'; /** Permanent bit in the root vehicle's server-owned `vDetachBits` uint16. */ stateBit: number; localTransform: { position: [number, number, number]; rotation: [number, number, number, number]; }; collider: { shape: 'box'; halfExtents: [number, number, number]; }; massKg: number; allowedRoles: VehicleRole[]; settleAfterMs: number; despawnAfterMs: number; } /** Exact signed detachable-part protocol carried by the trusted runtime mount. */ export interface VehicleDetachActions { version: 1; actions: Record; } /** * One detachable-part intent. The action id is admitted by the trusted mount; * the SDK derives every authority/build/replay field and never accepts a bit * mutation because detachment creates a separate authoritative entity. */ export interface VehicleDetachActionRequest { identity: ModuleIdentity; entityId: string; actionId: string; } export interface ModuleStateSnapshot { moduleId: string; revision: number; phase: string; serverTick: number; roomVars: Readonly>; } export interface ModuleEffect { moduleId: string; commandId: string; index: number; serverTick: number; event: string; payload: Readonly>; }