import type { DiagnosticianOutputV1, RecommendationKind } from './diagnostician-output.js'; export type PainProvenance = 'host_context_bound' | 'owner_reported_no_host_trace' | 'automatic_hook'; /** * Codex Governance Closure SPEC rev 2 ยง12: `host_context_bound` + hostKind is * the current provenance value; `openclaw_context_bound` is the legacy spelling * written before Slice B and remains valid on read. Reads of persisted * provenance normalize the legacy value instead of rewriting history. */ export declare function normalizePainProvenance(value: unknown): PainProvenance | undefined; export type AdmissionDecision = 'admitted' | 'needs_evidence' | 'deferred'; export declare const ADMISSION_CONFIDENCE_THRESHOLD = 0.5; export interface AdmissionGateInput { recommendationKind: RecommendationKind; confidence: number; evidenceCount: number; inputEvidenceCount: number; provenance: PainProvenance | undefined; } export interface AdmissionGateResult { decision: AdmissionDecision; reason: string; nextAction: string; evidenceStatus: string; } export declare function evaluateAdmission(input: AdmissionGateInput): AdmissionGateResult; export interface CandidateAdmissionResult { candidateId: string; recommendationKind: RecommendationKind; admission: AdmissionGateResult; } export declare function evaluateCandidateAdmissions(candidates: readonly { candidateId: string; recommendationKind: RecommendationKind; }[], output: DiagnosticianOutputV1, options?: { provenance?: PainProvenance; inputEvidenceCount?: number; }): CandidateAdmissionResult[]; /** * CLI-time admission gate check using only the candidate record's stored fields. * * This is a CONSERVATIVE PARTIAL check that prevents CLI commands (intake / * repair / internalization-backfill) from bypassing the admission gate's * strongest signals. It covers: * - `recommendationKind === 'defer'` โ†’ deferred (definitive) * - `confidence === null` โ†’ needs_evidence (fail loud: rc-3) * - `confidence < threshold` โ†’ needs_evidence (definitive) * * It does NOT re-check evidence-level gates (inputEvidenceCount === 0 or * evidenceCount === 0) because those require the diagnostician output and * pain signal, which are not stored on the candidate record. The production * path (PainSignalBridge.onDiagnosisComplete) already ran those checks when * the candidate was created. * * Runtime Contract: * - rc-3-fail-loud-missing: null confidence fails loud, not silent * - rc-9-no-silent-fallback: refusal includes reason + nextAction * * @param candidate - fields available on CandidateRecord * @returns AdmissionGateResult with decision, reason, nextAction */ export declare function evaluateCandidateAdmissionFromRecord(candidate: { recommendationKind: RecommendationKind; confidence: number | null; }): AdmissionGateResult; //# sourceMappingURL=admission-gate.d.ts.map