/**
 * EvaluateSupervisorDecisionUseCase
 *
 * Single entry point used by the supervisor worker (and any other caller
 * that needs an evaluation) to:
 *
 *   1. Short-circuit when the `collaboration` feature flag is off
 *      (NFR-14 byte-identical default behaviour).
 *   2. Resolve the effective {@link SupervisorPolicy} for the event's
 *      scope via {@link GetSupervisorPolicyUseCase} (feature-then-scope
 *      fallback). When no policy exists the caller is told nothing was
 *      done.
 *   3. Call {@link ISupervisorAgent.evaluate} for the LLM (or stub)
 *      verdict.
 *   4. Persist the immutable {@link SupervisorDecision} via
 *      {@link ISupervisorDecisionRepository}.
 *   5. Mirror the decision into `activity_log` with `actor_id =
 *      supervisor:<supervisorRunId>` for audit reproducibility (research
 *      decision 8).
 *
 * Persistence is centralised here so the LangGraph adapter and the
 * in-memory adapter remain pure evaluators (no side effects).
 */
import type { IActivityLogRepository } from '../../ports/output/repositories/activity-log-repository.interface.js';
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
import type { ISupervisorDecisionRepository } from '../../ports/output/repositories/supervisor-decision-repository.interface.js';
import type { ISupervisorAgent, SupervisorEvent } from '../../ports/output/agents/supervisor-agent.interface.js';
import { type SupervisorDecision } from '../../../domain/generated/output.js';
import { GetSupervisorPolicyUseCase } from './get-supervisor-policy.use-case.js';
import { EscalateToUserUseCase } from './escalate-to-user.use-case.js';
export interface EvaluateSupervisorDecisionInput {
    /** Source event being evaluated. */
    event: SupervisorEvent;
    /**
     * AgentRun id of the supervisor itself (the worker's own run). Stored
     * on the decision row and embedded in the audit `actorId` namespace.
     */
    supervisorRunId: string;
}
export interface EvaluateSupervisorDecisionResult {
    /** True when an evaluation actually ran (flag on + policy found). */
    evaluated: boolean;
    /** The persisted decision — populated only when `evaluated` is true. */
    decision?: SupervisorDecision;
    /**
     * Diagnostic reason returned when `evaluated` is false. Stable string
     * so the caller can branch deterministically.
     */
    skippedReason?: 'flag-off' | 'no-policy' | 'supervisor-failed';
    /**
     * Populated when the underlying evaluator threw or timed out (FR-22). The
     * use case absorbs the error so the caller is never crashed by a
     * supervisor failure; the failure is surfaced via the
     * `SupervisorFailed` notification and an audit-log entry instead.
     */
    failureReason?: string;
}
export declare class EvaluateSupervisorDecisionUseCase {
    private readonly supervisorAgent;
    private readonly decisionRepository;
    private readonly activityLog;
    private readonly settings;
    private readonly getPolicy;
    private readonly escalateToUser;
    constructor(supervisorAgent: ISupervisorAgent, decisionRepository: ISupervisorDecisionRepository, activityLog: IActivityLogRepository, settings: ISettingsRepository, getPolicy: GetSupervisorPolicyUseCase, escalateToUser: EscalateToUserUseCase);
    execute(input: EvaluateSupervisorDecisionInput): Promise<EvaluateSupervisorDecisionResult>;
    private resolveAgentRunId;
    /**
     * Append a single audit row describing the decision. The mirror lives
     * here (rather than in the repository) so the activity-log shape is
     * not coupled to supervisor concerns and so a future audit-target
     * (PmAuditLog, structured logger, etc.) can be swapped in via DI.
     */
    private mirrorToActivityLog;
    private isCollaborationEnabled;
}
//# sourceMappingURL=evaluate-supervisor-decision.use-case.d.ts.map