Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(conversation-parser): Host, Guest and Facilitator stay speaker labels

time-attack271b555f29ac
diff --git a/src/core/conversation-parser/builtins.ts b/src/core/conversation-parser/builtins.ts
index 3f902a3608..4eb46bf96f 100644
--- a/src/core/conversation-parser/builtins.ts
+++ b/src/core/conversation-parser/builtins.ts
@@ -72,13 +72,14 @@ const speakerObjectRegex = new RegExp(
/**
* Bold labels that open meeting-note metadata lines (`**Date:** …`), never a
* speaker turn. bold-name-no-time rejects a label that is exactly one of
- * these (case-insensitive).
+ * these (case-insensitive). Labels that double as speaker roles in interview
+ * and panel transcripts (Host, Guest, Facilitator) are deliberately absent.
*/
export const METADATA_LABELS: readonly string[] = [
- 'attendees?', 'participants?', 'present', 'absent', 'invitees?', 'guests?',
+ 'attendees?', 'participants?', 'present', 'absent', 'invitees?',
'date', 'time', 'when', 'where', 'location', 'venue', 'duration',
'summary', 'agenda', 'notes?', 'subject', 'title', 'topics?', 'purpose',
- 'organi[sz]er', 'host', 'facilitator', 'recording', 'transcript', 'meeting',
+ 'organi[sz]er', 'recording', 'transcript', 'meeting',
'action items?', 'next steps?', 'decisions?', 'key points?', 'takeaways?', 'outcomes?',
'status', 'owner', 'tags?', 'links?', 'source', 'type', 'context', 'background',
];
diff --git a/test/conversation-facts-email-meeting.test.ts b/test/conversation-facts-email-meeting.test.ts
index 02eed33633..539b06bd4c 100644
--- a/test/conversation-facts-email-meeting.test.ts
+++ b/test/conversation-facts-email-meeting.test.ts
@@ -84,6 +84,17 @@ describe('parser', () => {
expect(r.messages.map((m) => m.speaker)).toEqual(['Alice Example', 'Bob Example', 'Alice Example']);
});
+ test('speaker-role labels (Host, Guest, Facilitator) stay speakers', () => {
+ const interview = [
+ '**Host:** Welcome to the show.', '**Guest:** Thanks for having me.',
+ '**Host:** What are you building?', '**Guest:** A planning tool for small teams.',
+ '**Facilitator:** One last question.', '**Guest:** Happy to answer.',
+ ].join('\n');
+ const r = parseConversation(interview, { fallbackDate: '2026-09-01' });
+ expect(r.messages.map((m) => m.speaker)).toEqual(['Host', 'Guest', 'Host', 'Guest', 'Facilitator', 'Guest']);
+ expect(looksLikeMeetingNotes(interview)).toBe(false);
+ });
+
test('looksLikeMeetingNotes recognizes metadata labels and attendee sections only', () => {
expect(looksLikeMeetingNotes(PROSE_MEETING)).toBe(true);
expect(looksLikeMeetingNotes('# Event\n\n## Attendees\n\n- [email protected]')).toBe(true);