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

+8 -1
View File
@@ -3,11 +3,18 @@ import { classifyConversationOutcome } from '../src/services/conversation-outcom
describe('conversation outcome classification', () => {
it.each([
['That sounds fun, tell me more', 'engaged'],
['That sounds fun, tell me more', 'unknown'],
['No thanks, not interested', 'declined'],
['Check my OnlyFans link in bio', 'upsell'],
['Stop messaging me', 'boundary'],
] as const)('classifies %s as %s', (reply, expected) => {
expect(classifyConversationOutcome(reply)).toBe(expected);
});
it('classifies a reciprocal multi-message conversation as engaged', () => {
expect(classifyConversationOutcome('That sounds fun, tell me more', {
messageCount: 4,
reciprocal: true,
})).toBe('engaged');
});
});