Adds a read-ONLY credential and a server-side unread feed so the desk phone can read out the latest notifications without any write access. * READONLY_API_KEY (comma-separated): a caller presenting a matching X-API-Key may hit safe methods (GET/HEAD/OPTIONS) only — every mutating method is 403, even from an otherwise-trusted source IP. Checked before the trusted-IP path, so the phone (which reaches us over the trusted host loopback) is downgraded to read-only and can never spawn a session or PUT into .claude/. * GET /api/notifications/unread — the last unread notifications, newest first, flattened server-side exactly like the frontend's buildFeed+mergeLog (same stable ids). Pure read: it NEVER marks anything read (listening on the phone isn't opening a notification). * Server-side read ledger (notif_read.py / /data/notif-read.json): the "new" state used to live only in the browser. POST /api/notifications/seen|seed mark ids read; the PWA now mirrors its dismiss/seed into it so the phone's unread view agrees with what's been opened in the app. Regenerated openapi.json + frontend types; mock handlers + tsc updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3.9 KiB
3.9 KiB