/** * output-plane — the host's machine-output + exit-code plane * (host-owned-run-timing Phase 6 §6.1). * * Owns: * - the single `process.exitCode` write path (`setExitCode`) and the captured * in-memory mirror (`getExitCode`), so the run's exit code has exactly one * author; * - the four `--json`-path emit seams (`emitJson`, `emitEnvelope`, `emitError`, * `emitRaw`), each wrapping the tool's pure-domain payload in a * `CommandOutcome` through the single {@link renderOutcome} serialization seam * (launch §5.5) — except `emitRaw`, which deliberately writes the unwrapped * payload via {@link renderRaw}. * * Extracted verbatim from `buildToolCliContext`: the behaviour (outcome * builders, render-failure fallbacks, exit-code threading) is unchanged — this * module just gives the concern its own home and a narrow, testable surface. */ import { type CommandResult } from '@opensip-cli/contracts'; import { type Logger, type ToolCliContext } from '@opensip-cli/core'; /** Stable dependencies the output plane captures. */ export interface OutputPlaneDeps { /** The human renderer (Ink/text) the emit seams pass through on the non-JSON path. */ readonly render: (result: CommandResult) => Promise; readonly logger?: Logger; } /** The output plane's public surface. */ export interface OutputPlane { /** The single `process.exitCode` write path (mirrors into the captured value). */ readonly setExitCode: (code: number) => void; /** The captured exit code, or `undefined` if never set this run. */ readonly getExitCode: () => number | undefined; /** The four `ToolCliContext` machine-output seams, ready to spread into the context. */ readonly emits: Pick; } export declare function createOutputPlane(deps: OutputPlaneDeps): OutputPlane; //# sourceMappingURL=output-plane.d.ts.map