/** * Deterministic CV parser - the regex/heuristic fallback for * `POST /tools/cv/parse` (2026-09). * * PURE: no I/O, no network, no clock, no randomness - the same text always * yields the same result. This matters for two reasons: * 1. it runs on EVERY request where the LLM path fails (401 / no key / bad * shape), so the endpoint keeps returning structured fields instead of * `CV_PARSE_FAILED`; * 2. the bridge keeps a byte-for-byte MIRROR of this file * (`teamshare-bridge/src/lib/tools/cv-parse-deterministic.ts`) and both * copies are pinned to the same fixture file * (`__fixtures__/cv-fixtures.json` / `tests/fixtures/cv-fixtures.json`), * so cross-repo drift fails a test on either side. * * Confidence gate: returns `null` unless there is an email, OR a name plus at * least one experience/education entry - otherwise the caller answers * `CV_PARSE_FAILED` (never a 500). */ /** Structured CV fields (mirrors `CvParseResultSchema` shape exactly). */ export interface CvParseFields { fullName: string; email: string; phone: string; location: string; summary: string; experience: Array<{ title: string; company: string; startDate: string; endDate: string; achievements: string[]; }>; education: Array<{ degree: string; institution: string; year: string; }>; skills: string[]; certifications: Array<{ name: string; issuer: string; year: string; }>; languages: string[]; projects: Array<{ name: string; description: string; link: string; }>; } /** * Parse CV text into structured fields without any model call. * Returns `null` when the confidence gate fails (nothing worth prefiling). */ export declare function parseCvDeterministic(text: string): CvParseFields | null;