type Command
import bendvy-ecs-core@0.1.0.3/deferred_command.bend as DeferredCommandimport Base
import bendvy-ecs-core@0.1.0.3/trace_facts.bend as Facts
4# Each staged command owns its payload once. Trusted raw callbacks stay opaque.
5type Command<W:Type> is Type:
6 Raw{apply:W -> W}
7 Observed{apply:Facts.State -> W -> W & Facts.State}