/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ import type { SymbolInfo } from '../intelligence/tree-sitter/queries.js'; /** One chunk of source: either a top-level tree-sitter symbol or a fixed-size line window. */ export interface CodeChunk { readonly chunkId: string; readonly path: string; readonly lang: string; readonly symbol: string; readonly kind: string; readonly startLine: number; readonly endLine: number; readonly contentHash: string; readonly mtimeMs: number; readonly fileHash: string; } /** How a file's chunks were produced. 'window' means "never silently dropped" fell back to fixed-size windows. */ export type CodeChunkMode = 'symbols' | 'window' | 'empty' | 'unchanged'; /** A chunk plus the exact text its embedding is computed from. */ export interface DraftChunk { readonly chunk: CodeChunk; readonly embedText: string; } /** The minimal tree-sitter surface chunking needs (structural, so tests can fake it). */ export interface ChunkingIntelligence { detectLanguage(filePath: string): string | null; getSymbols(filePath: string, content: string): Promise; } export declare const DEFAULT_WINDOW_LINES = 60; export declare const DEFAULT_WINDOW_OVERLAP_LINES = 10; export declare function sha256(text: string): string; export interface ChunkFileInput { readonly intelligence: ChunkingIntelligence; readonly absPath: string; readonly relPath: string; readonly content: string; readonly fileHash: string; readonly mtimeMs: number; readonly windowLines?: number | undefined; readonly windowOverlapLines?: number | undefined; } /** * Chunk one file's content. The caller is responsible for having initialized * the intelligence facade (tree-sitter grammars) before calling. */ export declare function chunkFileContent(input: ChunkFileInput): Promise<{ drafts: DraftChunk[]; mode: CodeChunkMode; }>; //# sourceMappingURL=code-index-chunking.d.ts.map