import { type RunVerdict, type SignalEnvelope } from '@opensip-cli/contracts'; import { type ResolvedReportFailure, type SignalDeliveryResult, type ToolCliContext } from '@opensip-cli/core'; import { type EgressPlane } from '../../bootstrap/io-plane.js'; export interface StepEnvelopeStats { readonly verdict: RunVerdict; readonly findings: number; } export interface StepCapture { /** * The step's captured exit code — a SINGLE last-write-wins slot that mirrors the * host's one exit holder (`bootstrap/output-plane.ts`: `let exitCode; * setExitCode overwrites`), NOT an append-only log reduced by `Math.max`. The * former array+max model diverged from the host holder in two ways (a * `--report-to` failure exit 4 was never captured; an advisory lower-to-SUCCESS * could not undo an earlier raise) — both are one defect: append+max ≠ * last-write-wins. `undefined` when the step neither called `setExitCode` nor * delivered a failing / report-failed envelope (the orchestrator then defaults * to `EXIT_CODES.SUCCESS`). */ readonly getExitCode: () => number | undefined; /** * Last emitted envelope stats for the step. `undefined` means the step did not * emit an envelope, which is distinct from an envelope with zero findings. */ readonly getEnvelopeStats: () => StepEnvelopeStats | undefined; /** * Last emitted full envelope for host-owned aggregate projections. The public * suite step summary stays count-only; the orchestrator consumes this internal * value before returning the final command result. */ readonly getEnvelope: () => SignalEnvelope | undefined; /** Capture a handler/worker completion before output routing suppresses it. */ readonly captureCompletion: (value: unknown) => void; readonly getReportedFailure: () => ResolvedReportFailure | undefined; readonly signalDeliveries: readonly SignalDeliveryResult[]; readonly context: ToolCliContext; } export declare function createCapturingContext(base: ToolCliContext, deps?: { readonly egress?: (setExitCode: (code: number) => void) => EgressPlane; }): StepCapture; //# sourceMappingURL=capturing-context.d.ts.map