/** * Child process of the release input-guard check * (specs/2026-10-04-release-input-guard-check.md). * * The running backend pipes the live input views of its agent sessions * (real terminal buffers, faint text already blanked) to this script on * stdin; this script — loaded from the NEW build, in a fresh process so the * new classifier and constants are what run — classifies each one and * prints the verdicts as JSON on stdout. It only calls the classifier. * * @module backend/scripts/input-guard-classify */ import { type TuiInputView } from '../services/session/tui-input-guard.js'; import { type KnownInputScreen } from '../services/session/input-guard-known-screens.js'; /** The message used as the probe: it is never in a box, so only empty / ours-by-marker pass. */ export declare const PROBE_MESSAGE = "__probe__"; /** One agent's live view, as the backend sends it. */ export interface InputGuardViewInput { session: string; runtime: string; /** Null when the backend has no styled capture for the session */ view: TuiInputView | null; /** * The harness's pastes into this session since the last outside input * (input ledger), oldest first: a box holding only those is the * harness's own (crewly#1028). Absent from older backends. */ ownPastes?: string[]; /** Exact markers the box showed for those pastes */ shownMarkers?: Array<{ marker: string; message: string; }>; } /** Verdict for one agent. */ export type InputGuardVerdict = 'ok' | 'warn' | 'fail' | 'skip'; /** The new build's reading of one agent. */ export interface InputGuardClassification { session: string; runtime: string; state: 'empty' | 'ours' | 'foreign' | 'unknown'; layout?: string; /** No spinner / busy bar on screen */ idle: boolean; verdict: InputGuardVerdict; /** Short English reason */ reason: string; /** `fixture` for a known recorded screen (session is `fixture:`); absent for a live agent */ kind?: 'fixture'; } /** * Classify live views with this build's guard. * * @param inputs - One view per agent session * @returns One classification per input, in order */ export declare function classifyViews(inputs: readonly InputGuardViewInput[]): InputGuardClassification[]; /** * Classify the known recorded screens (crewly#1028 and the labelled-rule * frames) with this build's guard. A screen read differently from its * expectation is a `fail`: the build would misread a box it has met in * production. * * @param screens - The screens (default: all known ones) * @returns One row per screen, session `fixture:` */ export declare function checkKnownScreens(screens?: readonly KnownInputScreen[]): InputGuardClassification[]; //# sourceMappingURL=input-guard-classify.d.ts.map