NPC (Entity)
Managing NPC state and protocol execution with store + thunks
The current SDK runtime models NPCs as store entities plus protocol thunks.
Core State Model
npcSlice stores:
idpersonastate(Record<string, unknown>)historylastAction- block metadata (
isBlocked,blockReason)
Register an NPC
Process Input (Multi-Round Protocol)
processNPC requires:
- a resolved
npcId - persona (argument or active NPC)
- a local
cortex - memory engine only when API instructions require memory recall/store
