SPB Git

spb/tendril Public

Tendril — web ingestion platform (scrape/crawl/map/search) on macOS Apple Silicon: WebKit fidelity, authenticated pages, deterministic testable extraction. A self-hosted Firecrawl alternative.

JavaScript 82.6% TypeScript 11.8% HTML 5.3%
1.2 KB · 55 lines typescript
Raw Blame History
1// author: simon-pierre boucher <contact@spboucher.ai>2export type Tier = "http" | "webkit" | "safari";3export type TierRequest = Tier | "auto";45export type OutputFormat =6  | "markdown"7  | "html"8  | "rawHtml"9  | "links"10  | "screenshot"11  | "structured"12  | "extract";1314export interface RedirectHop {15  readonly from: string;16  readonly to: string;17  readonly status: number;18}1920export interface FetchTimings {21  total: number;22  dns?: number;23  connect?: number;24  ttfb?: number;25  download?: number;26  render?: number;27  extract?: number;28  escalations: EscalationRecord[];29}3031export interface EscalationRecord {32  readonly from: Tier;33  readonly to: Tier;34  readonly reason: string;35}3637/** Raw output of a fetcher tier, before extraction. */38export interface FetchResult {39  readonly tier: Tier;40  readonly status: number;41  readonly finalUrl: string;42  readonly contentType: string;43  readonly body: string;44  readonly bodyBytes: number;45  readonly redirects: readonly RedirectHop[];46  readonly headers: Readonly<Record<string, string>>;47}4849export interface PageLink {50  readonly url: string;51  readonly text: string;52  readonly rel: string | null;53  readonly isInternal: boolean;54}55