mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
812dedaea2
Add SessionManager interface to allow pluggable session storage backends. This enables users to implement custom session managers for databases, cloud storage, or other persistence mechanisms instead of the default JSONL file-based TreeManager. Changes: - Add SessionManager interface with methods for message storage, tree navigation, compaction, and extension data - Add treeManagerAdapter to wrap existing TreeManager for backward compatibility - Update Kit struct to use SessionManager interface instead of concrete type - Add SessionManager option to Options struct - Update all session-related methods to use interface - Add documentation for custom SessionManager usage The default behavior is preserved - when no SessionManager is provided, Kit automatically uses the TreeManager via the adapter.