/**
 * LlmIntentClassifier — the JUDGMENT-BAND intent classifier (Slack permission gate,
 * Pillar 2, §6.5–6.6 / §6.6 "Layer 1 INTENT + SENSITIVITY").
 *
 * It implements the SAME `IntentClassifier` interface as `HeuristicIntentClassifier`
 * and is interchangeable with it at the gate's `classifier` slot. The difference is
 * the judgment band ABOVE the floor: an LLM call refines the sensitivity tier,
 * directedness, and a non-floor action label more accurately than keyword matching.
 *
 * ── Two invariants this class is built around ──────────────────────────────────
 *
 * 1. THE FLOOR STAYS DETERMINISTIC. This class NEVER lets the LLM decide that a
 *    floor action ISN'T one, and it never lets the LLM downgrade a heuristic-detected
 *    floor candidate. It runs the deterministic `HeuristicIntentClassifier` FIRST;
 *    when the heuristic flags a real floor action (a `floorAction`) OR the
 *    ambiguous-deploy low-confidence case (action 'ambiguous', tier 4, low
 *    confidence → the gate routes to CLARIFY), that verdict is returned AS-IS and the
 *    LLM is never consulted. The LLM can only refine the NON-floor judgment band.
 *    (Floor enumeration + role authority remain in RolePolicy / SlackPermissionGate;
 *    this class only feeds them an intent and must not be the thing that misses a
 *    floor action.)
 *
 * 2. NO SILENT DEGRADATION TO A BRITTLE — OR WIDER — FALLBACK
 *    (docs/specs/no-silent-degradation-to-brittle-fallback.md,
 *     docs/signal-vs-authority.md). On ANY LLM failure (no provider, throw, timeout,
 *    empty/unparseable response, or a response that would WIDEN access beyond the
 *    deterministic floor read) we fall back to the `HeuristicIntentClassifier`
 *    result — which itself routes ambiguity to a tier-4 low-confidence 'ambiguous'
 *    (→ the gate CLARIFIES, a safe non-allow). A classification failure must NEVER
 *    return a confident low-tier "allow"-shaped intent on what might be sensitive.
 *    The fallback is therefore at-least-as-conservative as the deterministic floor.
 *
 * The LLM is reached through instar's internal `IntelligenceProvider` (the same
 * injected-provider pattern as `TopicIntentExtractor` / `MessagingToneGate`), NOT a
 * raw API call. A `fast` model tier is used, and the call is marked `gating: true`
 * so the IntelligenceRouter will provider-swap on failure before the error
 * propagates (and we then fail closed to the heuristic).
 *
 * Design: docs/specs/SLACK-ORG-INTEGRATION-SPEC.md §6.5–6.6.
 */
import type { IntelligenceProvider } from '../core/types.js';
import type { RequestIntent } from './types.js';
import { type IntentClassifier } from './IntentClassifier.js';
/** Observability hook reasons for why a classification fell back to the heuristic. */
export type LlmIntentDegradeReason = 'no-intelligence' | 'error' | 'unparseable' | 'floor-deterministic';
export interface LlmIntentClassifierDeps {
    /**
     * The internal LLM provider (injected — never a direct framework import). When
     * absent, every classification degrades to the heuristic (fail-closed).
     */
    intelligence?: IntelligenceProvider;
    /**
     * The deterministic floor + fallback classifier. Defaults to a fresh
     * `HeuristicIntentClassifier`. Injectable for tests.
     */
    heuristic?: IntentClassifier;
    /** Per-call timeout for the LLM (ms). Default 8000. */
    timeoutMs?: number;
    /**
     * Optional observability hook — fires on every degrade-to-heuristic path with the
     * reason. Best-effort: it never affects the returned verdict (which is always the
     * safe heuristic result on degrade).
     */
    onDegrade?: (reason: LlmIntentDegradeReason) => void;
}
export declare class LlmIntentClassifier implements IntentClassifier {
    private readonly intelligence?;
    private readonly heuristic;
    private readonly timeoutMs;
    private readonly onDegrade?;
    constructor(deps?: LlmIntentClassifierDeps);
    classify(text: string, ctx: {
        directed: boolean;
    }): Promise<RequestIntent>;
    private report;
}
//# sourceMappingURL=LlmIntentClassifier.d.ts.map