class HierarchicalSessionStore(DefaultSessionStore):
def create_session(
self,
title: Optional[str] = None,
parent_id: Optional[str] = None
) -> str:
"""Create a new session, optionally as child of another."""
def fork_session(
self,
session_id: str,
from_message_index: Optional[int] = None,
title: Optional[str] = None
) -> str:
"""Fork a session from a specific message point."""
def create_snapshot(
self,
session_id: str,
label: Optional[str] = None
) -> str:
"""Create a labeled snapshot of the current session state."""
def revert_to_snapshot(
self,
session_id: str,
snapshot_id: str
) -> bool:
"""Revert session to a previous snapshot."""
def get_snapshots(self, session_id: str) -> List[SessionSnapshot]:
"""Get all snapshots for a session."""
def export_session(self, session_id: str) -> Dict[str, Any]:
"""Export session data for transfer."""
def import_session(self, data: Dict[str, Any]) -> str:
"""Import a session from exported data."""