Classify inbound mail as archive / cold_storage / other. Cold storage
requests look up the video and its file size, and check whether it is
still live on YouTube. Live videos get a link plus a "why do you need
it" email; the reply queues the request for approval. Dead videos go
straight to a new admin queue. Approving starts the Glacier restore and
emails the requester that an automated email follows within 48 hours.
Ingested mail is moved to an "ingested" IMAP folder. A one-time
catch-up scan of the whole inbox picks up old cold storage mails as
pending requests, and reruns on next start if any classification failed.
Extract startRestore from the admin restore route and mark the restore
row failed when initiating Glacier restore throws.
Requires a new cold_requests table (no migrations in repo).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Poll the admin inbox over IMAP, extract YouTube IDs from any URL form
(plus verified bare IDs), classify with an LLM (Vercel ai, opencode
glm-5.3-flash) and queue archive requests in the admin dashboard with an
AI summary and collapsible full email.
Approve whitelists and archives with retries, then the LLM drafts the
reply (AI notice appended) and the request is marked solved. Reject asks
the requester for more context and merges their answer back. Auto-approve
senders are managed from the dashboard.
Remove the MCP server, router and SDK dependency.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Admin-only page to move videos from AWS Glacier cold storage back to
hot storage. Kicks off a scoped S3 restore, polls until ready, then
reuploads via the existing hot-storage path and emails the requester.
Poller is gated by IS_PRIMARY so multi-server deployments don't race.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>