import * as devframe from 'devframe'; import { RuntimeState, RuntimeNode, RuntimeTraceEntry } from '@advjs/types'; interface JsonHighlightToken { content: string; color?: string; } interface DevToolsResource { type: 'chapter' | 'character' | 'scene' | 'bgm' | 'cg'; id: string; name: string; } interface DevToolsDiagnostic { severity: string; code: string; message: string; source?: { file?: string; line?: number; column?: number; }; } interface DevToolsSnapshot { title: string; url: string; state: RuntimeState; current?: RuntimeNode; program?: { id: string; hash: string; chapters: number; nodes: number; }; trace: RuntimeTraceEntry[]; resources: DevToolsResource[]; diagnostics: DevToolsDiagnostic[]; } interface DevToolsSession { id: string; updatedAt: number; snapshot: DevToolsSnapshot; } interface DevToolsReport { project: { root: string; title?: string; }; sessions: DevToolsSession[]; } interface AdvDevToolsOptions { /** Customize the same-origin panel mount. */ base?: string; project?: DevToolsReport['project']; } declare module 'devframe' { interface DevframeRpcServerFunctions { 'advjs-devtools:inspect': () => DevToolsReport; 'advjs-devtools:highlight-json': (code: string) => Promise; } } /** Portable definition: also usable inside a Devframe hub. */ declare function createAdvDevToolsDevframe(getReport?: () => DevToolsReport): devframe.DevframeDefinition; export { createAdvDevToolsDevframe as c }; export type { AdvDevToolsOptions as A, DevToolsReport as D, DevToolsSnapshot as a };