feat: add agent API and operational analytics

This commit is contained in:
jjbrunton committed 2026-08-08 22:08:14 +01:00
1 parent 720ea0652a
commit e8b730b592
65 files changed
+2650 -1214

No files matched your search

@@ -85,13 +85,9 @@ describe('ChatService progressive full backfill', () => {
expect(repos.messagesRepo.getResponseRateTrend()).toEqual([
expect.objectContaining({ totalSent: 1, totalResponses: 1, responseRate: 100 }),
]);
expect(repos.successfulMessagesRepo.getRecent()).toEqual([
expect.objectContaining({
originalMessage: 'Hello Alice',
postTitle: 'Source post',
subreddit: 'example',
}),
]);
// A single reply counts toward response performance, but the
// reciprocal-engagement policy excludes it from learning examples.
expect(repos.successfulMessagesRepo.getRecent()).toEqual([]);
} finally {
db.close();
await fs.rm(tmpDir, { recursive: true, force: true });