/** * Error boundary for plugin scenes (dsh-tui-scenes). A scene component is * third-party code rendered inside Chat's tree: without a boundary a render * error propagates to ink's app-level boundary (src/ink/components/App.tsx) * and takes the whole TUI down with it. Catching here collapses the blast * radius to the scene itself — the host reports the error to the transcript * and closes the scene, landing the user back on the conversation. * * Boundaries catch render/lifecycle errors only; errors thrown from async * handlers and effects remain the scene's own responsibility (see the * 场景红线 section in dsh-ecosystem-spec 的插件准入与开发指南). */ import React from 'react'; type PluginSceneBoundaryProps = { /** Scene id, echoed into the error report. */ readonly id: string; /** Called once per caught error; the host reports it and closes the scene. */ readonly onError: (id: string, error: Error) => void; readonly children: React.ReactNode; }; type PluginSceneBoundaryState = { readonly crashed: boolean; }; export declare class PluginSceneBoundary extends React.Component { state: PluginSceneBoundaryState; static getDerivedStateFromError(): PluginSceneBoundaryState; componentDidCatch(error: Error): void; render(): React.ReactNode; } export {}; //# sourceMappingURL=PluginSceneBoundary.d.ts.map