/*
 * Priority Forge — sync emitter singleton
 *
 * The TeamPulseSyncEmitter must be a process-wide singleton so that all
 * mutation paths (MCP tools in handler.ts, REST routes in src/routes/*)
 * fan out into the same `'sync_event'` channel that downstream consumers
 * (memory-hub subscriber, future webhook adapters)
 * subscribe to.
 *
 * Promoting the singleton out of handler.ts is what closes the gap where
 * REST-fallback writes (e.g. when MCP sessions expire) silently bypassed
 * sync. handler.ts and the route modules now both import from here.
 */

import { loadTeamPulseConfig } from './config';
import { TeamPulseSyncEmitter } from './event-emitter';

export const syncEmitter = new TeamPulseSyncEmitter(loadTeamPulseConfig(), 'default');
