/** * Crawl command — thin handler over the Crawl Capability * (tech-plan §2a, §8). * * The handler applies parse-level validation (URL scheme), delegates to * `capability.fetch(request)` through the generic shared execution * wrapper (`executeCachedOperation`), then projects the normalized * `CrawlResult` into the public envelope. The Adapter owns URL * validation, credentials, transport, raw response parsing, cache * identity, and error normalization; the handler owns projection * (`--max-chars` whole-envelope Output Budget at the dispatcher * seam) and output-mode presentation. * * Provider selection, capability support, configuration, Adapter * construction, and adapter.crawl agreement live in `src/index.ts`. * * Cache stores full content; `truncated` and `originalContentLength` * are handler projections (mirrors reader). */ import type { CommandContext, CommandResult } from "../command-invocation.js"; import type { CrawlCapability } from "../capabilities/crawl.js"; import type { ExecutionDependencies } from "../lib/execution.js"; import { type LadderRule } from "../lib/output-budget.js"; export interface CrawlOptions { readonly depth?: number; readonly breadth?: number; readonly limit?: number; readonly selectPaths?: string; readonly excludePaths?: string; readonly instructions?: string; readonly format?: "markdown" | "text"; readonly contentSize?: "medium" | "high"; readonly timeout?: number; readonly noCache?: boolean; } /** * Dependencies injected by `src/index.ts` after Provider selection, * capability support check, configuration check, Adapter construction, * and adapter.crawl agreement. */ export interface CrawlHandlerDependencies { readonly capability: CrawlCapability; readonly execution: ExecutionDependencies; } /** The crawl Output Budget ladder (ordered; see ADR-0007 T4). */ export declare const CRAWL_LADDER: readonly [LadderRule, LadderRule]; /** * Output Budget T4: rebuild every text presentation from a budgeted * projection so -O compact/markdown/refs/tty reflect the shrunken * pages. Thin passthrough over `buildCrawlPresentations` — no separate * render logic to drift. Exported for the handler seam (index.ts). */ export declare function rebuildBudgetedCrawlPresentations(pages: readonly { url: string; content: string; }[]): Readonly>>; export declare function crawl(url: string, options: CrawlOptions | undefined, deps: CrawlHandlerDependencies, _context?: CommandContext): Promise; export declare const CRAWL_HELP: string; //# sourceMappingURL=crawl.d.ts.map