import { type InstanceSummary } from "@tablestore/tablestore-agent-shared"; /** * Format data as compact JSON. * In quiet mode only the `data` field is emitted. */ export declare function formatJson(data: Record, quiet?: boolean): string; /** * Pure helper: build the standard error JSON payload (without writing it * anywhere). Exposed for unit tests so behaviour can be asserted without * touching process.stdout / process.exit. */ export declare function formatErrorPayload(code: string, message: string): { code: string; message: string; }; /** * Pure helper: serialize a result envelope exactly like {@link outputResult} * would emit it in LLM mode. Exposed for tests. */ export declare function formatResultPayload(data: Record, quiet?: boolean): string; /** Write a message to stderr. In human mode the text is colorized via chalk. */ export declare function stderrMsg(message: string, human?: boolean): void; /** * Output a result payload. * * LLM mode – JSON to stdout. * Human mode – colored messages to stderr; no JSON is printed. * * On error / PARTIAL_SUCCESS-with-exit-code paths this function throws a * {@link CliExitError} instead of calling `process.exit()` directly. The * top-level `main.ts` handler is the single place that translates that * throw into an actual process exit, which keeps the helper testable. */ export declare function outputResult(data: Record, quiet?: boolean, human?: boolean): void; /** * Output an error. * * LLM mode – error JSON to stdout. * Human mode – colored error to stderr. * * Always throws {@link CliExitError}; declared as `never` so TypeScript can * narrow control flow in callers (e.g. the `resolveStore` guard in memory.ts * no longer needs a redundant `return` after the call). */ export declare function outputError(code: string, message: string, human?: boolean, requestId?: string): never; /** * Encode a flat record as a single "key=value key2=value2" line for default * CLI output. Values are quoted only when they contain whitespace. */ export declare function formatKv(pairs: Record): string; /** * Write a default-mode status line to stdout (one per call, newline * terminated). Intended for configure add/use/remove/set success output. */ export declare function emitKvLine(pairs: Record): void; /** * Write a human-friendly success message to stderr prefixed with "✔ ". */ export declare function emitHumanSuccess(message: string): void; /** * Write a structured default-mode error line to stderr and throw * {@link CliExitError} to set the exit code. Unlike {@link outputError}, * this does not emit JSON (used by configure sub-commands to keep output * machine-parseable as `error: code; key=value`). */ export declare function emitStructuredError(code: string, details?: Record, human?: boolean): never; /** Mask a value according to the key's sensitivity, returning "" for empty. */ export declare function maskValue(value: string, key: string): string; export interface InstanceTableRow { active: boolean; name: string; otsInstance: string; region: string; isDefaultFallback: boolean; } /** * Render instances for `configure list`. Default form emits one instance per * line, prefixed with `*` for the active one; human form renders a * left-aligned table framed by unicode rules. */ export declare function renderInstanceTable(items: InstanceSummary[] | InstanceTableRow[], human?: boolean): string; //# sourceMappingURL=output.d.ts.map