/// A PAI project the user can launch a session in, as sent by the hub's /// `projects` control response. class Project { /// Display name shown in the picker (e.g. "AIBroker"). final String name; /// Canonical name the hub uses to launch the project (create {project}). final String launch; final String slug; final String path; final int sessions; final String lastActive; // ISO8601 (sorts lexicographically) const Project({ required this.name, required this.launch, this.slug = '', this.path = '', this.sessions = 0, this.lastActive = '', }); factory Project.fromJson(Map json) { final display = json['name'] as String? ?? 'Project'; return Project( name: display, launch: json['launch'] as String? ?? display, slug: json['slug'] as String? ?? '', path: json['path'] as String? ?? '', sessions: json['sessions'] as int? ?? 0, lastActive: json['lastActive'] as String? ?? '', ); } }