/** * Title Scheduler Module * * Purpose: * - Encapsulate all chat-title auto-generation logic (Layer 4). * - Previously embedded in subscribers.ts (Layer 6); extracted so persistence.ts (Layer 4) can * call title-scheduling directly without a cross-layer import violation. * * Key Features: * - Idle-triggered title generation on world activity events. * - In-flight deduplication and compare-and-set storage commit. * - World teardown cleanup helper that preserves the listener contract. * * Implementation Notes: * - All state (in-flight set, storage cache) is module-level to preserve * singleton semantics previously in subscribers.ts. * * Recent Changes: * - 2026-03-10: Removed the human-message debounce trigger so idle activity is the sole * automatic chat-title generation entry point. * - 2026-03-03: Extracted from subscribers.ts to eliminate duplicate world-level EventEmitter * listeners (persistence + activity + title-scheduler each had their own handler per channel). */ import type { World } from '../types.js'; export declare function isHumanSender(sender?: string): boolean; export declare function runIdleTitleUpdate(world: World, event: any): Promise; export declare function clearWorldTitleTimers(worldId: string): void;