/** * Stack-frame source map resolution. * * Browser SDKs send minified frames like * { file: "https://app.com/dist/main.abc123.js", line: 1, col: 48201, fn: "" } * * Source maps emitted by bundlers (Vite, Webpack, Rollup, esbuild) translate * those `(line, col)` coordinates back to the original source `(file, line, col, name)`. * * We resolve **client-side** in the runner: we walk the user's project * directory looking for `.map` files whose name matches the minified * filename in the stack frame. If found, we use `@jridgewell/trace-mapping` * to look up each frame's original position. * * Limitations (deliberately documented): * - Requires the maps to exist locally (project's `dist/`, `build/`, etc.). * For deployed apps where the dev's machine has no build, server-side * symbolication via uploaded maps is needed — that's a separate slice. * - Walks up to 4 levels deep into common build dirs to keep cost bounded. */ export interface StackFrame { file: string; line: number; col: number; fn: string; in_app: boolean; } export declare class SourceMapResolver { private readonly projectDir; private readonly cache; constructor(projectDir: string); /** * Resolve a minified stack into the original source. Frames that can't * be resolved are returned unchanged so the caller still sees something. */ resolveStack(stack: StackFrame[]): StackFrame[]; resolveFrame(frame: StackFrame): StackFrame; private findMap; private searchForMap; } /** * Best-effort wrapper that swallows all errors. The runner calls this on * every error fetch — if anything goes wrong, we don't want to break the * whole TUI. */ export declare function tryResolveStack(stack: StackFrame[], projectDir: string): StackFrame[]; //# sourceMappingURL=source-maps.d.ts.map