spb/prisme Public MIT
Navigateur iOS intelligent — chaque page comprise localement avant d'être affichée. SwiftUI · WebKit · Foundation Models, 100% on-device.
Swift 96.7%
JavaScript 3.3%
1//2// PageVisit.swift3// Prisme4//5// Author: Simon-Pierre Boucher <contact@spboucher.ai>6//78import Foundation9import SwiftData1011/// One remembered page. The semantic history (CLAUDE.md §5, P0) is where12/// the free local model beats any cloud solution: the volume would be13/// unpayable through an API, and sending browsing history off-device is14/// unacceptable anyway. Visits from sensitive containers are never15/// recorded — not stored-and-filtered, simply never written.16@Model17final class PageVisit {18 @Attribute(.unique) var urlString: String19 var host: String20 var title: String21 /// Deterministic one-sentence essence (first sentence of the first22 /// paragraph) — searchable text, tier `none`.23 var gist: String24 var containerID: UUID25 var visitedAt: Date26 var visitCount: Int27 /// Hash of the extracted content at last visit — feeds the future28 /// temporal diff (P2).29 var contentHash: String30 /// BCP-47 code of the page's dominant language, so query vectors are31 /// only compared with vectors from the same embedding space.32 var languageCode: String?33 /// On-device sentence embedding of title + gist.34 var embedding: [Float]?3536 init(37 urlString: String,38 host: String,39 title: String,40 gist: String,41 containerID: UUID,42 visitedAt: Date,43 contentHash: String,44 languageCode: String?,45 embedding: [Float]?46 ) {47 self.urlString = urlString48 self.host = host49 self.title = title50 self.gist = gist51 self.containerID = containerID52 self.visitedAt = visitedAt53 self.visitCount = 154 self.contentHash = contentHash55 self.languageCode = languageCode56 self.embedding = embedding57 }58}59