/**
 * Feature List Command
 *
 * Lists features in a hierarchical tree view: repo → feature → child → child…
 * Repos and features are ordered by creation date descending.
 *
 * Usage: shep feat ls [options]
 *
 * @example
 * $ shep feat ls
 * $ shep feat ls --repo /path/to/project
 */
import { Command } from 'commander';
import type { Feature, AgentRun, PhaseTiming, Repository } from '../../../../../packages/core/src/domain/generated/output.js';
/** Convert a date value (any type from domain) to a timestamp for sorting. */
export declare function toTimestamp(val: unknown): number;
interface Entry {
    feature: Feature;
    run: AgentRun | null;
    phases: PhaseTiming[];
}
interface TreeNode {
    entry: Entry;
    children: TreeNode[];
}
interface RepoGroup {
    repoPath: string;
    repoName: string;
    repoCreatedAt: number;
    roots: TreeNode[];
}
interface FlatRow {
    entry: Entry;
    parentIsLast: boolean[];
    isLast: boolean;
}
/**
 * Build a recursive feature tree within a single repo group.
 * Features with a parentId that matches another feature in the group become children.
 * All levels are sorted by createdAt descending.
 */
export declare function buildTree(entries: Entry[]): TreeNode[];
/**
 * Group entries by repositoryPath and sort repos by createdAt desc.
 * Uses the Repository entity's createdAt if available; falls back to the
 * newest feature's createdAt in that repo group.
 */
export declare function groupByRepo(entries: Entry[], repos: Repository[]): RepoGroup[];
/** Flatten a tree into rows with prefix context for rendering. */
export declare function flattenTree(nodes: TreeNode[], parentIsLast: boolean[]): FlatRow[];
/** Build the tree-drawing prefix string for a given depth context. */
export declare function buildTreePrefix(parentIsLast: boolean[], isLast: boolean): string;
/** Render a single feature row as a formatted string. */
export declare function renderFeatureRow(entry: Entry, treePrefix: string): string;
export declare function createLsCommand(): Command;
export {};
//# sourceMappingURL=ls.command.d.ts.map