Imported from Ankit-Silwal/ICARUS (
apps/admin/AGENTS.md). Install upstream withnpx skills add Ankit-Silwal/ICARUS --skill admin. Copyright stays with the author.
Administrator Integrity Retention Rules
- The integrity retention route is
/integrityand callsDELETE /api/v1/integrity/retention/expiredonly after an explicit administrator confirmation. - An empty cutoff delegates to the server's
INTEGRITY_RETENTION_DAYSdefault. Convert a supplied local date/time to an ISO timestamp and never permit a future cutoff. - Clearly state that matching raw events and now-empty sessions/reports are permanently deleted, and show the returned cutoff and deletion counts after success.
- Do not expose or accept internal service tokens in the browser.
- Validate changes with
npm run lint --workspace adminandnpm run build --workspace admin, then exercise/integritywith a local administrator session.
This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.