export { deviceActionAstBudgetError } from './deviceActionValidation'; export declare const DEVICE_FILENAME = "device.json"; /** * The closed interaction verb vocabulary the web host enforces. * * Mirrors the `verb` enum on `DeviceInteraction` in the first-party Device * schema (`helixgame.com/lib/devices/validate.ts`). The host REJECTS anything * else when the package loads, so validating it only in the host let a package * pass `helix device validate` offline and then fail in the client — * `continuum-soju` shipped `"verb": "drink"` that way. The list is duplicated * deliberately; add verbs to both. */ export declare const DEVICE_INTERACTION_VERBS: readonly ["use", "open", "close", "toggle", "play", "sit", "custom"]; /** The same vocabulary rendered as one readable list for error messages. */ export declare const DEVICE_INTERACTION_VERB_LIST: string; /** * The closed capability vocabulary a package may declare. * * Mirrors `DEVICE_CAPABILITIES` in `helixgame.com/lib/devices/types.ts`. A * capability the client accepts and this list omits is a FALSE REJECTION — * `physics.solid` was exactly that, and it made the shipped * `continuum-garage-door` example (which needs it for its `collision` block) * fail `helix device validate` while the client loaded it happily. Add * capabilities to both lists, never to one. */ export declare const DEVICE_CAPABILITIES: readonly ["model.glb", "presentation.nodeMotion", "clock.serverTime", "clock.deadline", "state.typed", "state.durable", "room.authority", "audio.playback", "presentation.light", "presentation.vfx", "character.posture", "character.animate", "character.hand", "signals.local", "screen.render", "screen.input", "app.web.local", "app.web.remote", "app.web.panel", "app.image.remote", "app.image.owner", "app.canvas", "device.ports", "physics.solid"]; /** * The closed component vocabulary. * * Mirrors the discriminated union on `components` in the client schema * (`validate.ts:423-527`). Branching on an unknown `type` used to fall through * with no check at all, so a component kind this list does not name is rejected * here rather than validated as an empty object. */ export declare const DEVICE_COMPONENT_TYPES: readonly ["slider", "clockHands", "pointLight", "audioReactiveLight", "characterSpot", "screen"]; /** * The closed behavior-graph step vocabulary. * * Mirrors the `step` union in the client schema (`validate.ts:133-222`). Every * kind is validated to the client's depth, including the ones the shipped * examples never use (`moveNode`, `setVfx`, `emitSignal`, `sequence`, `delay`, * `repeat`, `stopAudio`) — their absence from the examples is why the gap went * unnoticed for so long. */ export declare const DEVICE_GRAPH_STEP_KINDS: readonly ["setState", "toggleState", "moveNode", "rotateNode", "playAudio", "stopAudio", "setVfx", "attachCharacter", "playCharacterAnimation", "releaseCharacter", "enterCharacterSpot", "relocateCharacter", "requestTravel", "reachCharacterHand", "releaseCharacterHand", "attachItem", "releaseItem", "emitSignal", "branch", "sequence", "delay", "repeat"]; /** * The closed CHARACTER socket set an `attachItem` step may target. * * These are sockets on the acting character, never the Device's own `sockets`: * the two namespaces are unrelated, and a Device that mounts on a wall has no * hand to put anything in. Mirrors `DEVICE_HAND_SOCKETS` in the first-party * host (`helixgame.com/lib/devices/types.ts`) and in the portable engine. The * CLI validates offline, so the list is duplicated deliberately; add sockets * to both. */ export declare const DEVICE_HAND_SOCKETS: readonly ["hand_r.grip", "hand_l.grip"]; /** The same vocabulary rendered as one readable list for error messages. */ export declare const DEVICE_HAND_SOCKET_LIST: string; /** * The closed trigger vocabulary (`validate.ts:224-243`), plus `deadline`: an * epoch-ms instant held in numeric state that fires once when the clock reaches * it. Its `do` is the server-evaluable subset (see `validateDeadlineTrigger`). */ export declare const DEVICE_TRIGGER_KINDS: readonly ["init", "interact", "stateChanged", "signal", "playerNear", "deadline"]; /** The closed host vocabulary for `compatibility.hosts` (`validate.ts:555-560`). */ export declare const DEVICE_HOSTS: readonly ["home", "world"]; /** The same vocabulary rendered as one readable list for error messages. */ export declare const DEVICE_HOSTS_LIST: string; /** The closed `thumbnail.policy` vocabulary (`validate.ts:563-567`). */ export declare const DEVICE_THUMBNAIL_POLICIES: readonly ["catalog", "discreteState", "never"]; /** The host's `inputMode` vocabulary for a text control (`validate.ts:414-419`). */ export declare const DEVICE_TEXT_INPUT_MODES: readonly ["text", "tel", "url", "email", "numeric", "decimal", "search"]; type Scalar = number | string | boolean; type JsonObject = Record; export interface DeviceValidationReport { ok: boolean; directory: string; definitionPath: string; modelPath: string | null; nodeNames: string[]; errors: string[]; warnings: string[]; definition?: JsonObject; } export interface DeviceTestReport { ok: boolean; mode: 'single' | 'multiplayer'; clients: number; actionsExercised: string[]; finalState: Record; persistentState: Record; errors: string[]; } export declare function readDeviceGlbNodeNames(file: string): string[]; export interface DeviceValidateOptions { /** * Also apply the room (server) authority rule: refuse state writes reachable * from an `interact` trigger through `emitSignal` handlers, `delay`, or * `branch`. The backend applies the same rule when sealing a new publish. */ room?: boolean; } export declare function validateDeviceProject(input: string, options?: DeviceValidateOptions): DeviceValidationReport; export declare function testDeviceProject(input: string, mode: 'single' | 'multiplayer'): DeviceTestReport; export declare function createDeviceProject(input: { directory: string; id: string; title: string; modelPath: string; template: 'clock' | 'standing-desk' | 'television'; }): { directory: string; definitionPath: string; modelPath: string; nodeNames: string[]; };