#[non_exhaustive]pub enum Op {
SpawnEntity {
id: EntityId,
owner: Principal,
},
DespawnEntity {
id: EntityId,
},
SetComponent {
entity: EntityId,
type_code: TypeCode,
bytes: Bytes,
size: u64,
},
RemoveComponent {
entity: EntityId,
type_code: TypeCode,
size: u64,
},
EmitEvent {
actor: Option<EntityId>,
event_type_code: TypeCode,
event_bytes: Bytes,
},
ScheduleAction {
at: Tick,
actor: Option<EntityId>,
action_type_code: TypeCode,
action_bytes: Bytes,
},
SendSignal {
target: InstanceId,
route: RouteId,
payload: Bytes,
},
}Expand description
Kernel-level effect intent. Each variant is “what to do”; the
kernel wraps it in Effect for
authorization, then dispatches into the per-step StepStage.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SpawnEntity
Register a new entity with the given id and owner.
Fields
DespawnEntity
Remove an entity from the instance.
SetComponent
Attach (or replace) a component on entity under type_code.
Fields
RemoveComponent
Detach a component from entity.
Fields
EmitEvent
Emit a domain event. Surfaces as KernelEvent::DomainEventEmitted
to observers post-commit.
Fields
ScheduleAction
Enqueue another action for a future tick. The scheduled action
inherits the scheduling action’s principal (captured at dispatch)
and a caps_ceiling equal to the parent’s effective capabilities —
privilege can only narrow across a schedule, never widen, so a domain
action cannot mint a more-privileged future action (no time-shifted
escalation). Kernel-internal System-origin scheduling goes through a
kernel API, not this domain Op.
Fields
SendSignal
Cross-instance signal. Routed by the kernel to the target instance’s IPC queue post-commit.