import type { AgentSlotId } from '../../core/types/thread-types.js'; import type { CoderReviewVariant } from './arm-schema.js'; /** The pipeline thread's committed terminal state. */ export type ProposalTerminalState = 'completed' | 'failed' | 'cancelled' | 'timeout'; /** Why the step loop ended. The first four are the transition engine's own typed reasons; the * last two are the orchestrator's, for a loop the engine never got to judge. */ export type ProposalStopReason = 'converged' | 'max_iterations' | 'cost_limit' | 'no_matching_transition' | 'admission_limit' | 'unavailable'; /** The last step actually executed. Null when the thread executed none. */ export interface ProposalFinalStep { agentSlotId: AgentSlotId; stage: string | null; index: number; } /** Closed: five members and nothing else. The verdict text is the final step's last assistant * message from the journal stream — never the artifact file, which accumulates every earlier * step's text, and never the thread summary, which one backend never populates at all. */ export interface ProposalDecisionInput { variant: CoderReviewVariant; terminalState: ProposalTerminalState; finalStep: ProposalFinalStep | null; /** Null, not '', when the final step emitted no assistant message at all. */ finalAssistantText: string | null; stopReason: ProposalStopReason; } export type ProposalBlockReason = 'thread_not_completed' | 'wrong_terminal_slot' | 'verdict_text_unavailable' | 'verdict_marker_absent' | 'iterations_exhausted'; export type ProposalIntent = { kind: 'complete'; } | { kind: 'block'; reason: ProposalBlockReason; }; /** Which slot speaks each variant's verdict, and in which literal. The markers differ so that one * variant's approval can never satisfy the other's contract, nor be matched by the other's * convergence rule. */ export declare const VERDICT_BY_VARIANT: Readonly>>; /** * What the pipeline concluded — and only that. Pure, total and synchronous: no clock, no store, no * filesystem, no broker call and no bus event. `block` is the default arm and `complete` the * guarded one, so an input this function does not recognise degrades to a block rather than to a * false approval. */ export declare function variantProposal(input: ProposalDecisionInput): ProposalIntent;