Expand sentiment to 10 categories, add DB maintenance job, update README

- Expand LLM sentiment classification from 3 to 10 categories: positive,
  negative, neutral, excited, sarcastic, frustrated, curious, grateful,
  humorous, supportive — with emoji reactions for each
- Add daily DB maintenance job at 03:00 UTC to purge stale caches,
  expired rate limits, old logs, and run SQLite optimize
- Add migrate.sql for upgrading existing databases
- Update README: add !sentiment command, maintenance job, rate limit
  config, in-memory message buffer docs, SDK migration history,
  remove references to previous private repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-08 20:46:18 -07:00
parent 2c7c15b282
commit 298c7bb8f1
6 changed files with 182 additions and 40 deletions

15
migrate.sql Normal file
View File

@@ -0,0 +1,15 @@
-- Add expanded sentiment columns to sentiment_stats
ALTER TABLE sentiment_stats ADD COLUMN excited INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN sarcastic INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN frustrated INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN curious INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN grateful INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN humorous INTEGER DEFAULT 0;
ALTER TABLE sentiment_stats ADD COLUMN supportive INTEGER DEFAULT 0;
-- Create generic API cache table
CREATE TABLE IF NOT EXISTS api_cache (
cache_key TEXT PRIMARY KEY,
data TEXT NOT NULL,
cached_at INTEGER DEFAULT (unixepoch())
);