import type { SeoDataSource, SeoCapability, SearchAnalyticsQuery, SearchAnalyticsRow, UrlInspectionQuery, UrlInspectionRow, SerpQuery, SerpRow, KeywordQuery, KeywordRow, BacklinkQuery, BacklinkRow, AiVisibilityQuery, AiVisibilityRow, LinkGraphQuery, LinkGraphRow } from "../data-source.js"; import type { DataOutcome } from "../types.js"; /** * Pure, total CSV reader. First non-empty line is the header; every * subsequent non-empty line becomes one record keyed by that header. * Handles quoted fields (including embedded commas and escaped `""`), * `\r\n`/`\n` line endings, and a trailing blank line. Header-only input * (or empty input) returns `[]`. NEVER throws (same spirit as * `SeoPlaybookParser.parse`, `../parser.js:151-169`). */ export declare function parseCsv(text: string): Array>; /** * Offline `SeoDataSource` backed by `.bober/seo/imports/` (or any directory * passed to the constructor — tests inject an absolute fixture path). * * `capabilities()` is synchronous but presence detection requires an async * `readdir`, so the present-file map is memoised in `load()` (mirrors * `SeoPlaybookIndex.load()`, `../playbook-index.js:43-67`). Every * capability method also calls `load()` itself if it hasn't run yet, so a * method invoked before an explicit `load()` still resolves correctly. */ export declare class LocalExportSource implements SeoDataSource { private readonly exportDir; private files; constructor(exportDir?: string); /** * Scan `exportDir` once for `.csv`/`.json` files and cache * which capabilities have a present file. Never throws: a missing * directory degrades to an empty capability set rather than rejecting. */ load(): Promise; /** The capabilities this source can currently serve, or `[]` before `load()` has run. */ capabilities(): SeoCapability[]; searchAnalytics(_q: SearchAnalyticsQuery): Promise>; urlInspection(_q: UrlInspectionQuery): Promise>; serp(_q: SerpQuery): Promise>; keywords(_q: KeywordQuery): Promise>; backlinks(_q: BacklinkQuery): Promise>; aiVisibility(_q: AiVisibilityQuery): Promise>; linkGraph(_q: LinkGraphQuery): Promise>; /** * Shared read path for every capability method. * * Order: ensure `load()` has run -> absent file => `disabled` -> read + * parse (CSV or JSON) -> zero rows => `abstain{empty-export}` -> `stat` * for `mtimeMs` -> `data` + `provenance{source:"local-export", * retrievedAt, path, mtimeMs}` (sc-6-4). NEVER throws out of this * method — any fs/parse error maps to `abstain{source-error}`, mirroring * `MedlineSource.fetchPassages` (`../../medical/retrieval/medline-source.js:142-164`). */ private readCapability; } //# sourceMappingURL=local-export.d.ts.map