/**
 * Convert Service — pure document→content converters.
 *
 * These are buffer/text in → content out: deterministic, no LLM, no storage,
 * no graph mutation. They seed the bodies of typed entities at import time
 * (`asset-import-service.ts`, the asset-as-embed flow).
 *
 *   - `convertXlsxToDatasets` (here) — structural xlsx → one CSV per sheet.
 *   - `convertDocxToMarkdown` / `convertPdfToNoteText` — text-extraction
 *     heuristics that live in `./extract/` and are re-exported below.
 *
 * The deferred asset→entry "convert" orchestrator (and its HTTP endpoint +
 * `convert_asset` agent tool) were removed in Phase E: import now creates a
 * typed entity that embeds the asset directly, so there is no post-hoc
 * conversion step.
 */
import { convertDocxToMarkdown, convertPdfToNoteText } from './extract/index.js';
export { convertDocxToMarkdown, convertPdfToNoteText };
/** Above this many sheets, the caller falls a workbook back to a single
 *  `material` rather than fanning it out into that many dataset entities (no
 *  unbounded entity/commit fan-out — Codex). Gated on the RAW tab count so we
 *  never run the per-sheet CSV conversion just to count. */
export declare const XLSX_SHEET_CAP = 20;
/**
 * Upper bound (bytes) on a doc fed to the synchronous, request-thread parsers
 * (mammoth for docx, SheetJS for xlsx). The upload route already caps storage
 * at 100MB, but a 100MB workbook can decompress to billions of cells and stall
 * the event loop / exhaust memory before any sheet cap applies, so import
 * refuses oversized docs up front (degrading them to a download-only material).
 * NOTE: this bounds the INPUT but does not sandbox the parse — moving
 * SheetJS/mammoth to a worker with hard CPU/row limits, and upgrading SheetJS
 * past its npm-pinned 0.18.5 advisories, is the deeper follow-up.
 */
export declare const CONVERT_MAX_BYTES: number;
export interface ConvertedSheet {
    /** Original worksheet name (e.g. "Q1 Budget"). */
    sheetName: string;
    /** Display name for the derived dataset: `<file> — <sheet>`. */
    name: string;
    /** CSV body (header = row 1, computed cell values — v1). */
    csv: string;
}
export interface XlsxConversion {
    sheets: ConvertedSheet[];
    /** Non-empty sheet count (= sheets.length), OR the raw tab count when
     *  `exceededCap` is set (conversion skipped). */
    totalSheets: number;
    /** True when the workbook's RAW tab count exceeded `maxSheets`, so the
     *  per-sheet CSV conversion was skipped entirely (DoS guard). */
    exceededCap?: boolean;
}
/**
 * Excel (.xlsx) → one dataset per NON-EMPTY sheet (D5). v1: header is row 1,
 * cells are their computed values (SheetJS `sheet_to_csv` resolves formulas to
 * their cached results). Empty sheets are skipped. Dataset names are
 * `<baseName> — <sheetName>`.
 *
 * `opts.maxSheets` gates on the RAW tab count BEFORE any per-sheet conversion:
 * a workbook with more tabs than the cap returns `{ exceededCap: true }`
 * without running `sheet_to_csv` N times, so the caller can fall back cheaply.
 */
export declare function convertXlsxToDatasets(buffer: Buffer, baseName: string, opts?: {
    maxSheets?: number;
}): XlsxConversion;
