/** * tm layer — client result unwrapping + best-effort text extraction. * Split out of the former tools.ts hub; behavior unchanged. */ export type Unwrapped = { ok: true; data: unknown; } | { ok: false; message: string; }; /** * Client result unwrapping — TWO live shapes + the legacy test shape: * - 1.18.x REAL host (tester-probed): `{ data: , request, response }` * with NO `ok` field — file.read data = {type:"text", content}, * find.text data = Match[]. Absent `ok` is NOT a failure; `data` * presence decides success. * - T0.4 legacy: `{ ok: true, data }` (what the fake clients in tests emit). * RequestResult hygiene: ok === true can STILL carry the error envelope * {error: {name, data: {message, ref}}} — self-check `data.error`. A * top-level error / ok===false fails even when a data payload rides along. */ export declare function unwrapClientResult(res: unknown): Unwrapped; /** * One client.find.text match object -> ripgrep-style `path:line: text` lines. * Key table (live-probed shape; tester re-verifies each key against real * host data): * path — file path of the hit (aliases: file, file_path, filePath) * lines — matched lines, string[] (aliases: text, content, match, line_text, * line-as-string) * line — 1-based line number (aliases: line_number, lineNumber; must be * numeric — a textual `line` value falls through to the text keys) * Returns null when neither a path nor any hit text is found. */ export declare function matchObjectText(m: Record): string | null; /** Best-effort text extraction from verified client payloads. */ export declare function extractText(data: unknown): string; //# sourceMappingURL=client-unwrap.d.ts.map