Add engagement-only conversation mode

This commit is contained in:
jjbrunton committed 2026-08-14 15:07:54 +01:00
1 parent b7fcc7db05
commit 7af7b211fa
24 files changed
+204 -23

No files matched your search

+3 -2
View File
@@ -27,14 +27,15 @@ export const ConversationTriageStatusSchema = z.enum(['open', 'snoozed', 'done']
*/
export const ConversationAutomationStatusSchema = z.enum([
'active',
'engaged',
'image-received',
'human-required',
'boundary',
'user-overridden',
'killed',
]);
/** The policy snapshotted when the conversation started. `manual` never auto-replies. */
export const ConversationPolicyModeSchema = z.enum(['legacy', 'r4r', 'r4r-media', 'manual']);
/** The policy snapshotted when the conversation started. `engagement` and `manual` never auto-reply. */
export const ConversationPolicyModeSchema = z.enum(['legacy', 'engagement', 'r4r', 'r4r-media', 'manual']);
export const ActiveChatSchema = z.strictObject({
username: z.string(),
+7 -1
View File
@@ -37,7 +37,13 @@ export const RuntimeConfigSchema = z.strictObject({
reddit: RuntimeRedditConfigSchema,
});
export const ConversationBehaviourSchema = z.strictObject({
mode: z.union([z.literal('legacy'), z.literal('r4r'), z.literal('r4r-media'), z.literal('manual')]).default('legacy'),
mode: z.union([
z.literal('legacy'),
z.literal('engagement'),
z.literal('r4r'),
z.literal('r4r-media'),
z.literal('manual'),
]).default('legacy'),
maxAutomatedTurns: z.number().int().min(1).max(MAX_CONFIGURED_AUTOMATED_CONVERSATION_TURNS).default(3),
rapportTurnsBeforeMediaAsk: z.number().int().min(1).max(MAX_CONFIGURED_AUTOMATED_CONVERSATION_TURNS - 1).default(3),
}).superRefine((behaviour, context) => {
+1 -1
View File
@@ -12,7 +12,7 @@ export const LearningStatusSchema = z.enum(['provisional', 'eligible', 'excluded
export const LearningTrajectorySchema = z.strictObject({
id: z.string(), accountId: z.string(), conversationId: z.string(), sentMessageId: z.number().int().nullable(),
subreddit: z.string().nullable(), sourceType: z.enum(['image', 'chat']).nullable(),
policyMode: z.enum(['legacy', 'r4r', 'r4r-media', 'manual']).nullable(), firstHumanEventId: z.string().nullable(),
policyMode: z.enum(['legacy', 'engagement', 'r4r', 'r4r-media', 'manual']).nullable(), firstHumanEventId: z.string().nullable(),
outcomeEventId: z.string(), outcomeType: z.enum(['image-received', 'reciprocal-engagement']),
creditClass: LearningCreditClassSchema, attributionConfidence: z.enum(['exact', 'fingerprint', 'inferred']),
status: LearningStatusSchema, maturityAt: z.number(), invalidatedAt: z.number().nullable(),