/** * Auto-Mention Logic - Pure String Processing Functions * * Purpose: Handle @mention processing for agent responses * Features: * - Detect mentions at paragraph beginnings * - Add/remove mentions with loop prevention * - Support world tags: STOP|DONE|PASS|TO:a,b * - Case-insensitive mention matching * * These are pure functions with no dependencies on World/Agent objects */ /** * Check if response has any mention at paragraph beginning (prevents auto-mention loops) */ export declare function hasAnyMentionAtBeginning(response: string): boolean; /** * Remove all mentions from paragraph beginnings (including commas and spaces) */ export declare function removeMentionsFromParagraphBeginnings(text: string, specificMention?: string): string; /** * Add auto-mention at beginning if no existing mentions (prevents loops) * Supports world tags: STOP|DONE|PASS and TO: a,b,c */ export declare function addAutoMention(response: string, sender: string): string; /** * Get valid mentions excluding self-mentions (case-insensitive) */ export declare function getValidMentions(response: string, agentId: string): string[]; /** * Determine if agent should auto-mention sender (no valid mentions in response) * Auto-mention is used to target responses and prevent unintended broadcasting */ export declare function shouldAutoMention(response: string, sender: string, agentId: string): boolean; /** * Remove consecutive self-mentions from response beginning (case-insensitive) */ export declare function removeSelfMentions(response: string, agentId: string): string;