Files
Carlos Azaustre ab2d4cb306 feat: initial public release 🚀
- OpenClaw Mission Control dashboard
- Auth with rate limiting and secure cookie handling
- API routes protected by middleware authentication
- Terminal with safe command allowlist
- File browser, cron manager, activity feed
- Office 3D view with agent avatars
- Cost tracking and analytics
- Configurable branding via env vars
2026-02-21 12:34:54 +00:00

16 lines
583 B
JavaScript

const CACHE = "mc-v1";
self.addEventListener("install", e => { self.skipWaiting(); });
self.addEventListener("activate", e => { e.waitUntil(clients.claim()); });
self.addEventListener("fetch", e => {
const url = new URL(e.request.url);
if (url.pathname.startsWith("/api/")) {
e.respondWith(fetch(e.request).catch(() => caches.match(e.request)));
} else {
e.respondWith(caches.match(e.request).then(r => r || fetch(e.request).then(res => {
const clone = res.clone();
caches.open(CACHE).then(c => c.put(e.request, clone));
return res;
})));
}
});