- EPIC-202: Build Claw-Architecture Agent - TICKET-203: ToolPermissionContext - TICKET-204: ExecutionRegistry - TICKET-205: Session Persistence Replaces idle Allegro-Primus with real work capability.
864 B
864 B
TICKET-205: Build Session Persistence
Epic: EPIC-202
Priority: P0
Status: Ready
Assignee: Allegro
Estimate: 4 hours
Description
Build JSON-based session persistence layer, more portable than SQLite.
Acceptance Criteria
RuntimeSessiondataclassSessionStoreclasssave(session)writes JSONload(session_id)reads JSONHistoryLogfor turn tracking- Sessions survive agent restart
- Tests pass
Implementation Notes
Pattern from Claw src/session_store.py:
@dataclass
class RuntimeSession:
session_id: str
prompt: str
context: dict
history: HistoryLog
persisted_path: Path
def save(self):
self.persisted_path.write_text(json.dumps(asdict(self)))
References
- Claw:
src/session_store.py - Claw:
src/history.py