Skip to content

@modoki/engine / index / ApplyResult

Interface: ApplyResult

Scene & Prefabs

changed

changed: number

Number of ops that produced a change.


errors

errors: string[]

Hard errors (entity not found, malformed op). Non-empty means some ops were skipped — the caller decides whether to still write.


scene

scene: MutableScene


unresolved

unresolved: MutateEntityRef[]

Entity refs that matched NOTHING in this scene FILE. (C7)

This module is a pure function over the file — it cannot know whether such a ref exists in the LIVE world. That distinction is exactly what an agent needs ("does not exist" vs "exists live, not saved yet"), so report the refs and let a caller that CAN reach the renderer explain them. (The C7 save-state audit in docs/connect-claude-code.md assumed this resolver knew both; it does not, and cannot.)


warnings

warnings: string[]

Soft warnings — the op applied but produced a suspect result (a now-dangling entity ref after a remove, an addEntity under a non-existent parent). The agent reads these to self-correct; they do NOT block the write.

Built with Modoki.