// // IdentityContainer.swift // Prisme // // Author: Simon-Pierre Boucher // import Foundation /// An isolated browsing identity. Cookies, sessions and local storage are /// fully partitioned per container via `WKWebsiteDataStore(forIdentifier:)`. /// A site opened in "Travail" can never link you to "Perso". struct IdentityContainer: Identifiable, Codable, Hashable, Sendable { let id: UUID /// User-facing name (French, per product conventions). var name: String /// SF Symbol name shown in the chrome and tab switcher. var symbol: String var color: ContainerColor /// Sensitive containers are hard-excluded from any cloud escalation /// once the intelligence layer lands (CLAUDE.md §3). var isSensitive: Bool } extension IdentityContainer { /// Default set created on first launch. IDs are generated once and then /// persisted — they must stay stable because they key the data stores. static func makeDefaults() -> [IdentityContainer] { [ IdentityContainer(id: UUID(), name: "Perso", symbol: "person.fill", color: .vert, isSensitive: false), IdentityContainer(id: UUID(), name: "Travail", symbol: "briefcase.fill", color: .bleu, isSensitive: false), IdentityContainer(id: UUID(), name: "Magasinage", symbol: "cart.fill", color: .orange, isSensitive: false), IdentityContainer(id: UUID(), name: "Recherche sensible", symbol: "lock.shield.fill", color: .violet, isSensitive: true), ] } }