export interface ViewerThresholds {
    /** Char count above which we consider the message "long". */
    chars: number;
    /** Line count above which we consider the message "long". */
    lines: number;
    /** Max single-code-block lines above which we route to web. */
    codeLines: number;
}
export declare const DEFAULT_THRESHOLDS: ViewerThresholds;
export type RenderMode = 'inline' | 'truncate-link' | 'summary-link';
export interface RenderDecision {
    mode: RenderMode;
    /** mode === 'inline' — final text to send to IM (after light md degradation). */
    inlineText?: string;
    /** mode === 'truncate-link' | 'summary-link' — the short bit shown in IM. */
    summary?: string;
    /** mode === 'truncate-link' | 'summary-link' — the markdown to persist for /v/:id. */
    fullMd?: string;
}
export interface DecideOpts {
    thresholds?: ViewerThresholds;
    /** Whether viewer is configured & enabled. If false we always inline. */
    viewerEnabled: boolean;
}
export declare function decideRender(text: string, opts: DecideOpts): RenderDecision;
export declare function exceedsThreshold(text: string, t: ViewerThresholds): boolean;
/**
 * Take the first non-empty paragraph (up to N chars), suitable as a one-glance
 * "what's this about" tease before the user clicks through to the full page.
 */
export declare function firstNonEmpty(text: string, maxChars: number): string;
/**
 * Light markdown → IM-friendly degradation for inline mode. We DON'T strip
 * inline emphasis (most IMs render * and _ acceptably). We DO drop the very
 * heavy structures (tables, deep headings) since they look terrible on WeChat
 * etc. Code fences are kept (Telegram renders them; WeChat shows the backticks
 * as plain text which is fine).
 */
export declare function degradeMarkdown(text: string): string;
/**
 * Build the system-style hint prepended to user prompts when viewer is
 * enabled. Tells the agent to wrap long answers in <im-summary>/<full-md>.
 * Returns empty string when viewer is disabled so the prompt is unchanged.
 */
export declare function buildViewerHintSnippet(opts: {
    viewerEnabled: boolean;
    thresholds?: ViewerThresholds;
}): string;
//# sourceMappingURL=render-router.d.ts.map