/**
 * Mesh Visualization — Transform RepoMeshStatus into a graph structure
 * for SVG/Canvas rendering without external dependencies.
 */
import type { RepoMeshStatus, RepoMeshNodeStatus, RepoMeshNodeHealth } from '../repo-mesh-types.js';
export type MeshGraphNodeType = 'defaultBranchNode' | 'worktreeNode' | 'orphanNode';
export type MeshGraphEdgeType = 'parentBranch' | 'worktreeLink' | 'sessionLink';
export interface MeshGraphNode {
    id: string;
    type: MeshGraphNodeType;
    label: string;
    workspace: string;
    branch: string | null;
    health: RepoMeshNodeHealth;
    ahead: number;
    behind: number;
    dirty: boolean;
    dirtyFiles: number;
    hasConflicts: boolean;
    activeSessionCount: number;
    activeSessions: string[];
    providers: string[];
    isOrphan: boolean;
    orphanReasons: string[];
    /** Next-step hint from convergence analysis */
    nextStepHint?: string;
    /** Original node status for drill-down */
    source: RepoMeshNodeStatus;
}
export interface MeshGraphEdge {
    id: string;
    source: string;
    target: string;
    type: MeshGraphEdgeType;
    label?: string;
}
export interface MeshGraph {
    meshId: string;
    meshName: string;
    repoIdentity: string;
    refreshedAt: string;
    nodes: MeshGraphNode[];
    edges: MeshGraphEdge[];
    /** Summary statistics */
    stats: {
        totalNodes: number;
        onlineNodes: number;
        dirtyNodes: number;
        orphanNodes: number;
        errorNodes: number;
        offlineNodes: number;
        totalActiveSessions: number;
    };
    /** Global orphan / stale warnings */
    warnings: string[];
}
/**
 * Build a visualization graph from RepoMeshStatus.
 *
 * Nodes:
 *   - defaultBranchNode: the mesh's default branch (aggregated from nodes on that branch)
 *   - worktreeNode: a node on a feature / worktree branch
 *   - orphanNode: a node with orphanReasons (upstream missing, detached HEAD, etc.)
 *
 * Edges:
 *   - parentBranch: default branch → worktree branch (when branch name differs)
 *   - worktreeLink: links nodes that share the same branch (clustering hint)
 *   - sessionLink: node → session (lightweight, optional; not rendered as primary edge)
 */
export declare function buildMeshGraph(status: RepoMeshStatus): MeshGraph;
