const statuses = new Map();
const listeners = new Set();
export function updateAgentWatchdogStatus(agentId, partial) {
    const current = statuses.get(agentId) ?? { running: false };
    const next = { ...current, ...partial };
    statuses.set(agentId, next);
    for (const listener of listeners) {
        try {
            listener(agentId, next);
        }
        catch {
            // Listeners must never break the watchdog path.
        }
    }
}
export function getAgentWatchdogStatus(agentId) {
    return statuses.get(agentId);
}
export function subscribeAgentWatchdogStatus(listener) {
    listeners.add(listener);
    return () => {
        listeners.delete(listener);
    };
}
//# sourceMappingURL=agentWatchdogStatusRegistry.js.map