Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core/blob/main/crates/spark-cockpit-rs/static/sw.js # aien-sovereign-core Autonomous sovereign intelligence engine and runtime core for NVIDIA DGX Spark Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core / crates / spark-cockpit-rs / static / sw.js` 28 lines ยท 609 bytes Raw Blame History 1 const CACHE_NAME = "aien-cockpit-v1"; 2 const ASSETS = [ 3 "/", 4 "/manifest.json", 5 "/icon-192.png", 6 "/icon-512.png" 7 ]; 8 9 self.addEventListener("install", (e) => { 10 e.waitUntil( 11 caches.open(CACHE_NAME).then((cache) => cache.addAll(ASSETS)) 12 ); 13 self.skipWaiting(); 14 }); 15 16 self.addEventListener("activate", (e) => { 17 e.waitUntil(self.clients.claim()); 18 }); 19 20 self.addEventListener("fetch", (e) => { 21 // Pass dynamic API and stream calls directly through 22 if (e.request.url.includes("/api/")) { 23 return; 24 } 25 e.respondWith( 26 caches.match(e.request).then((res) => res || fetch(e.request)) 27 ); 28 });