export type SymbolKind = "function" | "method" | "class" | "interface" | "type" | "variable" | "constant" | "field" | "enum" | "namespace" | "module" | "section" | "metadata" | "test_suite" | "test_case" | "test_hook" | "component" | "hook" | "table" | "view" | "index" | "trigger" | "procedure" | "default_export" | "conversation_turn" | "conversation_summary" | "unknown";
export interface FileLocation {
    file: string;
    start_line: number;
    end_line: number;
    start_col?: number;
    end_col?: number;
    start_byte?: number;
    end_byte?: number;
}
export interface CodeSymbol extends FileLocation {
    id: string;
    repo: string;
    name: string;
    kind: SymbolKind;
    signature?: string;
    docstring?: string;
    source?: string;
    parent?: string;
    tokens?: string[];
    decorators?: string[];
    extends?: string[];
    implements?: string[];
    is_async?: boolean;
    is_exported?: boolean;
    meta?: Record<string, unknown>;
}
export interface FileEntry {
    path: string;
    language: string;
    symbol_count: number;
    last_modified: number;
    mtime_ms?: number;
    stale?: boolean;
}
export interface CodeIndex {
    repo: string;
    root: string;
    symbols: CodeSymbol[];
    files: FileEntry[];
    created_at: number;
    updated_at: number;
    symbol_count: number;
    file_count: number;
    /** Snapshot of EXTRACTOR_VERSIONS at index creation time — used to detect
     *  schema changes and trigger full reindex when any language version bumps. */
    extractor_version?: Record<string, string>;
    /** Present iff a JS/TS monorepo was detected at index time. Populated by
     *  the workspace resolver in `src/storage/workspace-resolver.ts`. */
    workspaces?: Workspace[];
}
export interface WorkspaceTsconfigPath {
    /** Pattern as written in tsconfig `paths`, e.g. "@org/*" or "@/*". */
    from_pattern: string;
    /** Resolved targets relative to the workspace root, e.g. ["packages/*"]. */
    to_paths: string[];
}
export interface WorkspaceDependencies {
    /** Names of internal workspace packages this workspace depends on. */
    workspace: string[];
    /** Names of npm-registry deps (versions live in the workspace package.json). */
    external: string[];
}
export interface Workspace {
    /** Stable id: package name when present, otherwise relative path. */
    id: string;
    /** package.json#name; null when the package has no name field. */
    name: string | null;
    /** Absolute path to the workspace root. */
    root: string;
    package_manager_role: "root" | "package";
    /** Build-orchestrator / package-manager signal. */
    manifest_tool: "turbo" | "pnpm" | "yarn" | "npm" | "bun" | "nx" | "lerna";
    dependencies: WorkspaceDependencies;
    tsconfig_paths: WorkspaceTsconfigPath[];
    /** e.g. ["nextjs", "hono"]; populated from the workspace package.json deps. */
    detected_frameworks: string[];
    file_count?: number;
    symbol_count?: number;
}
/** Boundary rule consumed by the new `workspace_boundaries` tool.
 *  Existing path-based `BoundaryRule` (used by `check_boundaries`) is unchanged. */
export interface WorkspaceBoundaryRule {
    /** Workspace name OR glob (e.g. "apps/*"). */
    from_workspace: string;
    /** Names, globs, or negation entries (e.g. ["packages/*", "!packages/shared"]). */
    cannot_import_workspaces: string[];
}
export interface AffectedWorkspaceEntry {
    workspace_id: string;
    workspace_name: string | null;
    reason: "direct" | "transitive";
    changed_files: string[];
    /** Chain of workspace ids for transitive entries; populated from BFS path. */
    via?: string[];
}
export interface AffectedResult {
    since_ref: string;
    changed_files: string[];
    affected: AffectedWorkspaceEntry[];
    /** Lockfile changes are surfaced separately and never fan out (per spec D5). */
    excluded_lockfile_changes: string[];
    /** Files changed at or above the workspace boundary that don't belong to any
     *  workspace (root configs like turbo.json, tsconfig.base.json, root
     *  package.json, CI workflows). Callers should treat this as "everything
     *  potentially affected" and fan out to all workspaces or trigger a full
     *  rebuild. Empty when only workspace-scoped files changed. */
    root_changed_files: string[];
    /** Diagnostic field surfaced when called outside a git work tree, etc. */
    error?: "not_a_git_repository" | "bad_ref";
}
export interface RepoMeta {
    name: string;
    root: string;
    index_path: string;
    symbol_count: number;
    file_count: number;
    updated_at: number;
    last_git_commit?: string;
}
export interface Registry {
    repos: Record<string, RepoMeta>;
    updated_at: number;
}
export interface SearchResult {
    symbol: CodeSymbol;
    score: number;
    matches?: string[];
}
export interface Reference {
    file: string;
    line: number;
    col?: number;
    context: string;
}
export interface ContainingSymbol {
    name: string;
    kind: SymbolKind;
    start_line: number;
    end_line: number;
    in_degree: number;
}
export interface TextMatch {
    file: string;
    line: number;
    content: string;
    context_before?: string[];
    context_after?: string[];
    containing_symbol?: ContainingSymbol;
    /** Set when the search aborted on a wall-clock cap. The single returned match
     * carries the hint so agents see actionable guidance instead of a hang. */
    truncated?: boolean;
    hint?: string;
}
export interface TextMatchGroup {
    file: string;
    count: number;
    lines: number[];
    first_match: string;
}
export type Direction = "callers" | "callees";
export type RouteFramework = "nestjs" | "nextjs" | "express" | "hono" | "yii2" | "laravel" | "ktor" | "spring-kotlin" | "astro" | "flask" | "fastapi" | "django" | "unknown";
export interface CallNode {
    symbol: CodeSymbol;
    children: CallNode[];
}
export interface AffectedTest {
    test_file: string;
    reason: string;
}
export interface RiskScore {
    file: string;
    risk: "low" | "medium" | "high" | "critical";
    score: number;
    callers: number;
    test_coverage: number;
    symbols_changed: number;
}
export interface ImpactResult {
    changed_files: string[];
    affected_symbols: CodeSymbol[];
    affected_tests: AffectedTest[];
    risk_scores: RiskScore[];
    dependency_graph: Record<string, string[]>;
}
export interface EmbeddingMeta {
    model: string;
    provider: "voyage" | "openai" | "ollama" | "local";
    dimensions: number;
    symbol_count: number;
    updated_at: number;
}
export interface CodeChunk {
    id: string;
    file: string;
    startLine: number;
    endLine: number;
    text: string;
    tokenCount: number;
}
//# sourceMappingURL=types.d.ts.map