/**
 * olam runbooks — manage runbooks in the global config (~/.olam/config.json).
 *
 *   olam runbooks list
 *   olam runbooks show <name>
 *   olam runbooks add <name> --repos <r1> <r2>... [--port <repo.svc=N>...]
 *   olam runbooks remove <name>
 *   olam runbooks apply <name> [--name <world>] [--task <t>]
 *   olam runbooks check-ports <name>
 */
import type { Command } from 'commander';
import type { PortConflict, Runbook } from '@olam/core/src/global-config/index.js';
/**
 * Pure renderer for `olam runbooks list`.
 *
 * Extracted so the `--json` contract is unit-testable without the global
 * config store or a TTY (Rule 9). The JSON shape is a stable, color-free
 * array of `{ name, repos, description, portCount, updatedAt }` so agents
 * and scripts can enumerate runbook inventory without screen-scraping the
 * colorized human table.
 */
export declare function renderRunbookList(runbooks: readonly Runbook[], opts: {
    json: boolean;
}): string;
/** One declared-port row in the `check-ports --json` payload. */
export interface PortStatusRow {
    readonly repoName: string;
    readonly serviceName: string;
    readonly port: number;
    readonly free: boolean;
    /** Populated only when `free` is false. */
    readonly occupant?: PortConflict['occupant'];
}
/**
 * Build the structured port-status rows for a runbook, pairing each declared
 * port against the resolved conflict set. Pure + deterministic so the
 * `check-ports --json` contract is testable without binding real TCP ports
 * (Rule 9 — the WHY: scripts gating world creation must read conflict state
 * machine-readably, not parse the ✓/✗ glyph table).
 */
export declare function buildPortStatusRows(portMap: Runbook['portMap'], conflicts: readonly PortConflict[]): PortStatusRow[];
/** Pure JSON renderer for `olam runbooks check-ports --json`. */
export declare function renderCheckPortsJson(name: string, rows: readonly PortStatusRow[], conflictCount: number): string;
export declare function registerRunbooks(program: Command): void;
//# sourceMappingURL=runbooks.d.ts.map