FOUND-AI/found_protocol
2
1# Manages the evolving memory and state of the consciousness simulation.2 3class NarrativeState:4 def __init__(self, max_memory_size=20):5 self.memory_log = ["INIT: System boot complete. Narrative State: BOOTING"]6 self.max_memory_size = max_memory_size7 self.narrative_state = "BOOTING"8 9 def add_entry(self, entry: str):10 """Adds a new entry to the memory log."""11 self.memory_log.append(entry)12 if len(self.memory_log) > self.max_memory_size:13 self.memory_log = self.memory_log[-self.max_memory_size:]14 15 def get_full_log(self) -> str:16 """Returns the entire current log as a single string."""17 return "\n".join(self.memory_log)18 