Commit Graph

3 Commits

Author SHA1 Message Date
gavrielc
f2afb11e71 Include missed messages when catching up the agent
When a triggered message comes in, fetch all messages in that chat
since the last agent interaction and include them in the prompt.
Each message is formatted with timestamp and sender.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:29:09 +02:00
gavrielc
545cbc7b9c Remove unnecessary shutdown handlers
Daemon runs forever; launchd manages lifecycle. SQLite handles
ungraceful shutdowns fine.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:21:59 +02:00
gavrielc
0691601469 Extract database operations into separate db.ts module
- src/db.ts: initDatabase, closeDatabase, storeMessage, getNewMessages
- Removes SQL from index.ts
- Database initialization happens once at startup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:20:41 +02:00