Versions in this module Expand all Collapse all v0 v0.0.4 Mar 16, 2026 Changes in this version + type ActionIntent struct + Action string + ActorID string + InternalReasoningSummary string + ProposedEffects map[string]interface{} + Speech string + TargetAgent string + TargetEntity string + TargetLocation string + type Clock struct + LastAdvance int64 + SimTimeUnix int64 + Tick int64 + TickDuration int64 + type Engine struct + func NewEngine() *Engine + func (e *Engine) AppendRecentEvent(state *WorldState, evt WorldEvent, maxRecent int) + func (e *Engine) ApplyIntent(state *WorldState, npc *NPCState, intent ActionIntent) WorldDelta + func (e *Engine) BuildUserEvent(state *WorldState, input, locationID, actorID string) WorldEvent + func (e *Engine) EnsureNPCState(blueprint NPCBlueprint, state NPCState) NPCState + func (e *Engine) EnsureWorld(state *WorldState) + func (e *Engine) NextTick(state *WorldState) int64 + func (e *Engine) Snapshot(state WorldState, npcStates map[string]NPCState, recentEvents []WorldEvent, ...) SnapshotSummary + func (e *Engine) VisibleEventsForNPC(state WorldState, npc NPCState, events []WorldEvent, scope int) []WorldEvent + type Entity struct + ID string + LocationID string + Name string + Placement *EntityPlacement + State map[string]interface{} + Type string + type EntityPlacement struct + Model string + Offset [3]float64 + Rotation [3]float64 + Scale [3]float64 + type GoalSet struct + LongTerm []string + ShortTerm []string + type Location struct + Description string + ID string + Model string + Name string + Neighbors []string + type NPCBlueprint struct + DefaultGoals []string + DisplayName string + Faction string + HomeLocation string + Kind string + MemoryNamespace string + NPCID string + PerceptionScope int + Persona string + PromptFile string + Role string + ScheduleHint string + Traits []string + WorldTags []string + type NPCState struct + Assets map[string]interface{} + Beliefs map[string]string + CurrentLocation string + CurrentRoomID string + Goals GoalSet + Inventory map[string]int + LastActiveTick int64 + Mood string + NPCID string + PrivateMemorySummary string + ProfileRef string + Relationships map[string]string + Status string + type PlayerState struct + CurrentLocation string + DisplayName string + LastActionTick int64 + PlayerID string + Status string + type QuestState struct + ID string + OwnerNPCID string + Participants []string + Status string + Summary string + Title string + type RenderedResult struct + Intents []ActionIntent + RecentEvents []WorldEvent + Text string + Tick int64 + type RoomState struct + AssignedNPCIDs []string + CreatedTick int64 + ID string + Kind string + LinkedQuestID string + LocationID string + Model string + Name string + ReleaseOnFinish bool + Status string + TaskSummary string + UpdatedTick int64 + type SnapshotSummary struct + ActiveNPCs []string + Entities map[string]Entity + EntityOccupancy map[string][]string + Locations map[string]Location + NPCCount int + NPCStates map[string]NPCState + Occupancy map[string][]string + PendingIntentCount int + Player PlayerState + Quests []QuestState + RecentEvents []WorldEvent + RoomOccupancy map[string][]string + Rooms []RoomState + SimTimeUnix int64 + Tick int64 + WorldID string + type Store struct + func NewStore(workspace string) *Store + func (s *Store) AppendWorldEvent(evt WorldEvent) error + func (s *Store) Events(limit int) ([]WorldEvent, error) + func (s *Store) LoadNPCStates() (map[string]NPCState, error) + func (s *Store) LoadWorldState() (WorldState, error) + func (s *Store) SaveNPCState(id string, state NPCState) error + func (s *Store) SaveNPCStates(items map[string]NPCState) error + func (s *Store) SaveWorldState(state WorldState) error + type WorldDelta struct + Applied bool + Event *WorldEvent + Intent ActionIntent + NPCStateChanged bool + Reason string + type WorldEvent struct + ActorID string + Content string + CreatedAt int64 + ID string + LocationID string + Payload map[string]interface{} + Source string + Tick int64 + Type string + VisibleTo []string + type WorldState struct + ActiveQuests map[string]QuestState + Clock Clock + Entities map[string]Entity + GlobalFacts map[string]interface{} + Locations map[string]Location + Player PlayerState + RecentEvents []WorldEvent + Rooms map[string]RoomState + WorldID string + func DefaultWorldState() WorldState + type WorldTickRequest struct + ActorID string + CatchUpTicks int + ForceStep bool + LocationID string + MaxNPCPerTick int + Source string + UserInput string + VisibleEvents []WorldEvent