/**
 * Model Workstation (`/models`) — Phase B frontend.
 *
 * Read-only 3-layer workbench consuming the Phase A ModelTruthAggregator.
 * This module DOES NOT compute availability itself; it only renders and
 * dispatches to the aggregator / mutator contracts.
 */
import * as readline from 'node:readline';
import { showPicker } from './tui/index.js';
import { ModelTruthAggregator, type ModelStatus, type ModelTruthSnapshot, type ModelAvailability } from '../model-truth.js';
import type { AdminHandoffContext } from '../admin-delivery.js';
export declare function getModelTruthAggregator(): ModelTruthAggregator;
/** Test hook — reset the singleton. */
export declare function __resetAggregatorForTests(): void;
export type WidthTier = 'narrow' | 'mid' | 'wide';
export declare function widthTier(columns: number): WidthTier;
export declare function availabilityIcon(a: ModelAvailability): string;
export declare function availabilityPhrase(a: ModelAvailability): string;
/** Fix hints — read-only in Phase B, shown as next-step text. */
export declare function availabilityFixHints(a: ModelAvailability): string[];
export declare function browserRouteForStatus(status: ModelStatus): AdminHandoffContext['route'];
export declare function workbenchHandoffContext(mode?: 'default' | 'issues' | 'overview', status?: ModelStatus): AdminHandoffContext;
export declare function renderBrowserHandoffHint(context: AdminHandoffContext): string;
export declare function sortedStatuses(statuses: ModelStatus[]): ModelStatus[];
export interface OverviewCounts {
    total: number;
    available: number;
    blocked: number;
    orphan: number;
    local: number;
    cloud: number;
}
export declare function overviewCounts(statuses: ModelStatus[]): OverviewCounts;
export declare function renderOverview(snapshot: ModelTruthSnapshot, tier: WidthTier): string[];
/**
 * Render a single model row for the picker label.
 * Must fit on ONE terminal line: picker concatenates label + description and
 * does NOT wrap — oversize labels corrupt redraw.
 *
 * Budget per tier (label visible chars, before picker's own prefix/desc):
 *   narrow: ≤ 34   mid: ≤ 40   wide: ≤ 52
 */
export declare function renderModelRowLabel(s: ModelStatus, tier: WidthTier, _columns: number): string;
/**
 * Short per-row tag shown by picker right of the label.
 * Picker truncates description to 40 visible chars — keep it under that.
 */
export declare function renderModelRowDescription(s: ModelStatus, tier: WidthTier): string;
export declare function renderDetails(s: ModelStatus): string[];
export declare function renderIssuesDump(snapshot: ModelTruthSnapshot, tier: WidthTier): string[];
export interface RunWorkbenchOptions {
    mode?: 'default' | 'issues' | 'overview';
    refresh?: boolean;
    rl?: readline.Interface;
    stream?: NodeJS.WriteStream;
    getColumns?: () => number;
    aggregator?: ModelTruthAggregator;
    picker?: typeof showPicker;
    onBrowserHandoff?: (request: BrowserHandoffRequest) => Promise<void> | void;
}
export interface BrowserHandoffRequest {
    context: AdminHandoffContext;
    explicitOpen?: boolean;
}
export declare function runModelsWorkbench(opts?: RunWorkbenchOptions): Promise<void>;
/** Compact preview (≤5 lines) — for picker preview pane. */
export declare function renderCompactDetails(s: ModelStatus): string[];
/** Compact overview (≤5 lines) for preview pane. */
export declare function renderCompactOverview(snapshot: ModelTruthSnapshot): string[];
/** Compact issues preview (≤5 lines). */
export declare function renderCompactIssues(snapshot: ModelTruthSnapshot): string[];
