/** * Firecrawl Provider Adapter (firecrawl tech-plan §1, D3–D6). * * Implements the Firecrawl Provider Descriptor with Search, Reader, Map, * async Crawl, Quota, and Diagnostics capabilities on top of the * direct-HTTP transport (`./client.ts`). The Adapter owns credentials, * transport lifecycle, Provider field mapping, and failure normalization; * shared execution owns cache and retry policy. * * Boundary rules (ARCHITECTURE.md §2): * - May import capability types, normalized errors, Provider identity * types, and the Adapter-local credential and transport Modules. * - Must NOT import command presentation, output mode, or another * Provider's Adapter. * * Field mapping (tech-plan D4/D5/D6; investigation §3.1–§3.4): * Search data[].title -> title * Search data[].url -> url * Search data[].markdown -> summary (high content-size; else description) * Search data[].description -> summary (medium content-size fallback) * * Scrape data.markdown|text -> content * Scrape data.metadata.sourceURL -> finalUrl * Scrape data.metadata.title -> title (better than Tavily's null) * * Map links[] -> urls */ import type { ProviderDescriptor } from "../types.js"; import { type AsyncJobStateFile } from "../../lib/async-job-state.js"; import { type FirecrawlTransportDeps } from "./client.js"; /** * Dependencies the Firecrawl Adapter accepts. The unified `transport` * seam carries `fetch` and timer injection; `crawlStateFile` is the * async-job-state port the async Crawl Capability uses for * resume-on-restart (tech-plan D2). Production defaults to the on-disk * implementation under `~/.scoutline/crawl/`; tests inject in-memory * doubles to exercise the lifecycle deterministically. */ export interface FirecrawlAdapterDependencies { readonly transport?: FirecrawlTransportDeps; readonly crawlStateFile?: AsyncJobStateFile; /** Disk dir for the crawl create-lock; defaults to asyncJobStateDir("crawl"). */ readonly crawlStateDir?: string; } /** * Build the Firecrawl Provider Descriptor. Advertises the full Firecrawl * capability set. `create()` wires all six capabilities — Search, Reader, * Map, async Crawl (create→poll→resume + reclaim-on-miss), Quota * (`unit:"credits"`), and Diagnostics (single-scrape probe). Construction * is side-effect-free; the transport is invoked per Capability call. */ export declare function createFirecrawlDescriptor(dependencies?: FirecrawlAdapterDependencies): ProviderDescriptor; //# sourceMappingURL=adapter.d.ts.map