/** * Source resolution for the docx-to-pdf tool (2026-09). * * The chain, the wizard and AGENTS all reach this tool with different shapes: * - chain: `fileBase64` (preferred — bytes the hub read server-side, no * identity needed at all) or `fileUrl` (storage value) + `documentId`, * - wizard: `fileUrl` = uploaded Cloudinary URL, * - agents: often guess param names (`inputDocxUrl`, `url`, ...) - one run * passed `inputDocxUrl` and the tool replied "No file provided. Upload a * .docx file via the file picker", which the agent read as "URLs are not * accepted". `materializeUrlParams` had ALREADY downloaded that URL into * an `inputDocx` Buffer - the tool just never looked at it. * * Pure module (no IO) so it is unit-testable from `tests/`. */ /** Param keys that may carry the source URL (agents guess names). */ export declare const DOCX_URL_ALIASES: readonly ["fileUrl", "inputDocxUrl", "docxUrl", "sourceUrl", "documentUrl", "url", "file", "inputDocx"]; /** Param keys that may carry a binary materialized from `Url`. */ export declare const DOCX_BUFFER_ALIASES: readonly ["file", "inputDocx", "docx", "document", "buffer"]; export type DocxSource = { kind: 'buffer'; buffer: Buffer; } | { kind: 'url'; url: string; documentId?: string; } | { kind: 'document'; documentId: string; }; /** * Resolve whatever the caller provided into an actionable source. * Order: inline base64 bytes (identity-free) → materialized Buffer → * any absolute HTTP URL alias → any bare UUID (document id) → non-http * storage value (`docs/`) via `documentId` → bare `documentId`. * Returns null when nothing usable was supplied. */ export declare function resolveDocxSource(params: Record): DocxSource | null;