/** * Outcome contract for the builder (`vana app`) command group. * * Every app command ends by emitting exactly one outcome through * {@link emitAppOutcome}: a single JSON line in `--json` mode, readable * lines otherwise. The exit code always comes from the protocol `code` * through the binary-wide table in `src/core/exit-codes.ts`. */ import { z } from "zod"; import { type CliExitCode } from "../../core/exit-codes.js"; import type { VanaNetworkName } from "../../core/network.js"; export declare const APP_OUTCOME_STATUSES: readonly ["done", "failed"]; export type AppOutcomeStatus = (typeof APP_OUTCOME_STATUSES)[number]; export interface AppOutcomeInput { status: AppOutcomeStatus; /** Stable protocol code; drives the exit code. `ok` for success. */ code: string; message: string; remedy?: string; network?: VanaNetworkName; data?: Record; } export declare const appOutcomeSchema: z.ZodObject<{ type: z.ZodLiteral<"outcome">; status: z.ZodEnum<{ failed: "failed"; done: "done"; }>; code: z.ZodString; exitCode: z.ZodNumber; message: z.ZodString; remedy: z.ZodOptional; network: z.ZodOptional; data: z.ZodOptional>; }, z.core.$catchall>; export interface AppCommandOptions { json?: boolean; noInput?: boolean; quiet?: boolean; yes?: boolean; network?: VanaNetworkName; } /** Emit the terminal outcome and return the exit code for the command. */ export declare function emitAppOutcome(options: AppCommandOptions, outcome: AppOutcomeInput): CliExitCode; /** * One `data` field for human mode. `String()` on an object prints * "[object Object]", so structure is spelled out instead: a list of values on * one line, a flat record as "key value" pairs, and anything deeper as an * indented block. JSON mode is untouched; it prints `data` as it is. */ export declare function renderField(key: string, value: unknown, indent: string): string; //# sourceMappingURL=outcome.d.ts.map