import type { ProjectType } from "./config.js";
import { type ContextIndexState } from "./context-index.js";
import type { WriteResult } from "../utils/fs.js";
export interface RepoContextTreeNode {
    name: string;
    path: string;
    kind: "directory" | "file";
    children: RepoContextTreeNode[];
}
export interface RepoContextTreeModuleGroup {
    id: string;
    fileCount: number;
    files: string[];
    imports: string[];
    importedBy: string[];
    entryPoints: string[];
}
export interface RepoContextTreeState {
    artifactType: "kiwi-control/context-tree";
    version: 1;
    timestamp: string;
    targetRoot: string;
    projectType: ProjectType | string;
    languages: string[];
    entryPoints: string[];
    keyModules: string[];
    topReverseDependencyHubs: Array<{
        file: string;
        moduleGroup: string;
        importedByCount: number;
    }>;
    dependencyClusters: RepoContextTreeModuleGroup[];
    tree: RepoContextTreeNode[];
    traversal: {
        maxDepth: number;
        selectionDepth: number;
        explainDepth: number;
    };
    filesDiscovered: number;
    importableFiles: number;
}
export interface RepoContextOperatorView {
    artifactType: "kiwi-control/context-tree-view";
    version: 1;
    timestamp: string;
    summary: string;
    languages: string[];
    entryPoints: string[];
    keyModules: Array<{
        id: string;
        fileCount: number;
        entryPoints: string[];
    }>;
    topReverseDependencyHubs: RepoContextTreeState["topReverseDependencyHubs"];
    tree: RepoContextTreeNode[];
}
export interface RepoContextSeedOptions {
    projectName: string;
    projectType: ProjectType | string;
    profile: string;
    authoritySource: string;
    activeRole: string;
    recommendedMcpPack: string;
    nextRecommendedSpecialist: string;
    nextSuggestedCommand: string;
}
export interface RepoContextSeedArtifacts {
    repoFacts: Record<string, unknown>;
    currentFocus: Record<string, unknown>;
    openRisks: Record<string, unknown>;
}
export interface RepoContextAuthorityState {
    artifactType: "kiwi-control/context-authority";
    version: 1;
    updatedAt: string;
    projectType: ProjectType | string;
    languages: string[];
    criticalFiles: string[];
    moduleRelationships: Array<{
        module: string;
        imports: string[];
        importedBy: string[];
        entryPoints: string[];
    }>;
}
export declare function buildRepoContextTree(targetRoot: string, projectType: ProjectType | string): Promise<{
    state: RepoContextTreeState;
    view: RepoContextOperatorView;
    index: ContextIndexState;
}>;
export declare function persistRepoContextTreeArtifacts(targetRoot: string, tree: RepoContextTreeState, view: RepoContextOperatorView): Promise<WriteResult[]>;
export declare function buildRepoContextAuthority(tree: RepoContextTreeState): RepoContextAuthorityState;
export declare function buildRepoContextSeedArtifacts(tree: RepoContextTreeState, options: RepoContextSeedOptions): RepoContextSeedArtifacts;
export declare function persistRepoContextSeedArtifacts(targetRoot: string, artifacts: RepoContextSeedArtifacts): Promise<WriteResult[]>;
//# sourceMappingURL=context-tree.d.ts.map