SPB Git

spb/rareindex

Public
843 B · 15 lines markdown
1# Pending schema changes — agent F2 (ai / scanner / research)23New file `packages/database/src/schema/ai.ts`, exported from `schema/index.ts`. Applied locally with4`drizzle-kit push` on `rareindex_ai`; **no migration generated** (to be folded into the next5`pnpm db:generate` at integration).67| Table | Purpose |8|---|---|9| `scanner_sessions` | Scanner submissions (photo/url/text), model guess + confidence, candidates shown, user pick (feedback loop), thumbnails, cost |10| `research_sessions` | AI Research threads keyed by anonymous cookie (`anon_id`) or `user_id` |11| `research_messages` | Messages with transparent tool-call trace, usage and cost |12| `ai_quotas` | Per-day counters for anonymous AI features (key = ip hash or user id) |1314No changes to existing tables. AI spend is written to the existing `costs` table (`kind='ai'`).15
Files · main
Menu

Theme