/**
 * Shell render-error reporting.
 *
 * Components that catch rendering exceptions call `reportShellRenderError`
 * to log a warning and, in non-production builds, notify an optional
 * observer (used by tests to assert on render failures).
 */
import { log } from '../shared/logging/agent-log.js';
let renderErrorObserver;
export function setShellRenderErrorObserver(observer) {
    renderErrorObserver = observer;
}
export function reportShellRenderError(scope, error) {
    log.warn('shell-render', `Renderer failed in ${scope}; using fallback`, error);
    if (process.env.NODE_ENV !== 'production') {
        renderErrorObserver?.({ scope, error });
    }
}
//# sourceMappingURL=render-errors.js.map