/** * Chunk type definitions */ /** * Metadata stored with each chunk in Vectorize */ export interface ChunkMetadata { /** Document title */ title: string; /** URL path (relative) */ path: string; /** Section heading */ section: string; /** Anchor slug for deep linking */ anchor?: string | null; /** Content category */ category: string; /** Keywords from frontmatter */ keywords: string[]; /** Guide name (e.g., "warranty") */ guide: string; /** Content version (e.g., "2026.07.01", "next") */ version: string; /** Whether this is the latest/current version */ isLatest: boolean; /** Site identifier (e.g., "docs", "marketing") */ site: string; /** Site base URL */ siteUrl: string; /** Full URL for cross-site linking */ fullUrl: string; /** * Chunk content for RAG retrieval. * Stored in metadata so it's returned with vector search results. * Note: This duplicates chunk.content during indexing, but is necessary * because Vectorize returns metadata (not the original content) on query. */ content: string; } /** * A content chunk ready for embedding */ export interface Chunk { /** Unique chunk ID (max 64 bytes for Vectorize) */ id: string; /** Text content for embedding */ content: string; /** Metadata for storage and retrieval */ metadata: ChunkMetadata; } /** * A vector ready for Vectorize upload */ export interface Vector { id: string; values: number[]; metadata: ChunkMetadata; } /** * Options for filtering chunks during generation */ export interface ChunkFilterOptions { /** * Section headings to skip (case-insensitive). * Common examples: "See Also", "Related Links", "References" * @default ["See Also", "Related", "Related Links", "References"] */ skipSections?: string[]; /** * Minimum content length after filtering. * Chunks shorter than this are discarded. * @default 100 */ minContentLength?: number; /** * Maximum ratio of link content to total content (0-1). * Chunks with higher link ratio are considered navigation-only and discarded. * @default 0.8 */ maxLinkRatio?: number; /** * Strip leading H1 heading from first chunk content. * The title is already in metadata, so this avoids redundancy. * @default true */ stripLeadingH1?: boolean; } /** * Default chunk filter options */ export declare const DEFAULT_CHUNK_FILTER_OPTIONS: Required; /** * Context for chunking a file */ export interface ChunkContext { /** Path to the file being chunked */ filePath: string; /** Root directory of the content */ contentRoot: string; /** Site identifier */ site: string; /** Site base URL */ siteUrl: string; /** Guide name */ guide: string; /** Content version */ version: string; /** Whether this is the latest/current version */ isLatest: boolean; /** Custom category mappings */ categories: Record; /** Version to treat as latest (omit from URL) */ latestVersion?: string; } //# sourceMappingURL=types.d.ts.map