Use when adding or changing ClawHub Convex tables, TTL fields, cleanup crons, retention policy, auth/session cleanup, metric dedupe cleanup, or deprecated table
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-convex-retention-ee45543a6a6b ,按照其中的说明把「convex-retention」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
ClawHub retention is code-owned. Every current Convex table must be classified in
convex/lib/retentionPolicy.ts, and ephemeral tables need an indexed, bounded cleanup path unless
their lifecycle is handled by usage-time validation or a documented component.
clawhub-convex and read convex/_generated/ai/guidelines.md first.RETENTION_POLICIES; the Record<TableNames, RetentionPolicy> type
is the enforcement gate..withIndex()
and .take(...).expirationTime to match Convex Auth. Keep existing expiresAt,
dayStart, and processedAt fields unless that table already needs a real migration.RETENTION_STANDARD_BATCH_SIZE for ordinary retention jobs. Keep incident-tested special cases,
such as skillStatEvents, on their documented caps.convex-migration-helper.authSessions and authRefreshTokens are pruned by
convex/retention.ts.bunx convex codegen after schema/API changes.bunx convex dev --once --typecheck=disable.