import 'dart:io'; import 'package:cutdex_agent/cutdex_agent.dart'; import 'package:cutdex_agent/io.dart'; import 'package:path/path.dart' as p; import 'package:path_provider/path_provider.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; part 'agent_session_store.g.dart'; /// Owns the durable Agent checkpoint journal for the lifetime of the app. @Riverpod(keepAlive: true) FutureOr agentSessionStore(Ref ref) async { final support = await getApplicationSupportDirectory(); return FileSessionStore( Directory(p.join(support.path, 'Cutdex', 'Agent', 'Sessions')), ); }