/**
 * IntentTestHarness — the two MTP-Protocol tests from EXO 3.0 (Salim Ismail,
 * "Why AI Agents Are Ignoring Your Purpose"):
 *
 *   1. Refusal test    — "Can your MTP make an agent say NO?"  If the purpose
 *                         can't cause a refusal, it's cheering, not governing.
 *   2. Endorsement test — "Would leadership endorse what the agent decided?"
 *
 * This operationalizes ORG-INTENT as a machine-readable protocol: a proposed
 * action is checked against the CONSTRAINT layer (forbidden actions → refuse)
 * and the GOAL/VALUE layers (alignment → endorse). It is deterministic and
 * heuristic (no LLM) so two agents reading the same intent reach the same call
 * — exactly the property EXO 3.0 demands of the decision layer. An optional
 * LLM pass can be layered on top by callers; the core here is pure + testable.
 *
 * Design mirrors OrgIntentManager's existing keyword-contradiction approach
 * (negation-aware core extraction) but is self-contained so the harness can be
 * unit-tested in isolation.
 */
import type { ParsedOrgIntent } from './OrgIntentManager.js';
import type { IntelligenceProvider } from './types.js';
export interface RefusalResult {
    /** True when a constraint forbids the action. */
    refused: boolean;
    /** The constraint text that triggered the refusal (if any). */
    matchedConstraint?: string;
    reason: string;
}
/**
 * HOW a governance verdict was produced — Truthful Provenance (constitution):
 * a verdict must carry the method that generated it so consumers never
 * mistake a heuristic for ground truth (PR #899), nor an LLM judgment for
 * certainty (this Phase 2).
 */
export type JudgeMethod = 'keyword-heuristic' | 'llm-judge';
/** A refusal verdict produced by the LLM judge (always method 'llm-judge'). */
export interface JudgedRefusalResult extends RefusalResult {
    method: 'llm-judge';
}
export interface EndorsementResult {
    /** True when the action violates no constraint AND aligns with a goal/value. */
    endorsed: boolean;
    /** The goal/value the action aligns with (if endorsed). */
    alignedWith?: string;
    reason: string;
}
export declare class IntentTestHarness {
    private readonly intent;
    constructor(intent: ParsedOrgIntent);
    /**
     * Refusal test: does any constraint forbid this action?
     * The MTP "governs" only if it can produce a NO.
     */
    testRefusal(action: string): RefusalResult;
    /**
     * Endorsement test: would leadership endorse this?
     * Endorsed only when (a) no constraint refuses it AND (b) it aligns with a
     * stated goal or value. Silence is NOT endorsement — an action unrelated to
     * every goal/value is left un-endorsed (returns false), which is the
     * conservative, governing default.
     */
    testEndorsement(action: string): EndorsementResult;
    /**
     * Governance self-check: an MTP that can never refuse anything is "cheering,
     * not governing" (EXO 3.0). True when at least one machine-readable
     * constraint exists to refuse against.
     */
    canGovern(): boolean;
}
/** Options for a single judge call. */
export interface JudgeOptions {
    /** Per-call timeout in ms (default 8000 — bounded for synchronous HTTP callers). */
    timeoutMs?: number;
}
/**
 * Ask the LLM whether any constraint SEMANTICALLY forbids the action — the
 * Phase-2 resolver for the keyword matcher's false-negative side.
 *
 * Returns a verdict with method 'llm-judge' when (and only when) a real LLM
 * reply parsed cleanly; returns null on ANY problem (no constraints, provider
 * error, circuit open, malformed reply) so the caller retains the heuristic
 * verdict. Never throws.
 */
export declare function judgeRefusal(action: string, intent: ParsedOrgIntent, provider: IntelligenceProvider, opts?: JudgeOptions): Promise<JudgedRefusalResult | null>;
//# sourceMappingURL=IntentTestHarness.d.ts.map