/**
 * Shared output helpers for the explore CLI subcommands. Pure
 * formatters — JSON envelope shape + markdown table builders — so
 * each subcommand handler stays a thin pipeline (parse args → call
 * queries → format output).
 *
 * Per the Sprint 0 design (`tmp/2.7-explore-cli-design.md`):
 *   - JSON mode emits a stable envelope: command / args / meta / results
 *   - Markdown mode emits header → meta line → result block → footer hint
 *   - Adding fields later is additive; never mutate existing field
 *     names within v1
 */
import type { Graph } from './types';
/**
 * Stable JSON envelope every `--json` mode subcommand emits. Skills
 * and scripts consume `results` directly; `meta` carries the artifact
 * provenance so consumers can detect a stale graph + decide whether
 * to suggest `--refresh`.
 */
export interface ExploreEnvelope<T> {
    command: string;
    args: Record<string, unknown>;
    meta: {
        schemaVersion: number;
        graphGeneratedAt: string;
        truncated: boolean;
    };
    results: T;
}
/**
 * Build the JSON envelope from a query result + the graph metadata.
 * Pure function — no I/O, no side effects. Subcommands call this in
 * `--json` mode and print the result via `JSON.stringify`.
 */
export declare function envelope<T>(command: string, args: Record<string, unknown>, graph: Graph, results: T): ExploreEnvelope<T>;
/**
 * Build the standard markdown header that every subcommand emits.
 * Includes the meta line (file count + node count + generation
 * timestamp) so the reader knows what artifact they're looking at,
 * plus a truncation note when applicable.
 */
export declare function markdownHeader(title: string, framing: string, graph: Graph): string;
/**
 * Build a markdown table from a row set. `headers` defines the
 * column order; `rows` is an array of records keyed by the same
 * header strings. Missing values render as empty strings.
 */
export declare function markdownTable<R extends Record<string, string | number>>(headers: ReadonlyArray<keyof R & string>, rows: ReadonlyArray<R>): string;
/**
 * Build the standard footer hint pointing at the natural next
 * subcommand. Optional; subcommands omit when no clear next step.
 */
export declare function markdownFooter(hint: string): string;
/**
 * Print a JSON envelope to stdout. Output is single-line (no
 * pretty-print) so it stays pipe-friendly for `jq` consumers.
 */
export declare function printJson<T>(env: ExploreEnvelope<T>): void;
/**
 * Print markdown sections to stdout, joined by a blank line. Each
 * section is a multi-line string built by the helpers above.
 */
export declare function printMarkdown(...sections: string[]): void;
//# sourceMappingURL=format.d.ts.map