/**
 * Mission Reminder Service
 *
 * Scans active Missions and sends proactive Slack reminders to KR owners
 * if their metrics are 'off_track' or 'at_risk'.
 *
 * Features:
 * - Periodic sweep of all active missions
 * - KR-level status evaluation via KRTrackingService
 * - Intelligent owner resolution (Mission owner -> Team Lead)
 * - Proactive Slack delivery via SlackOrchestratorBridge
 * - Rate limiting to prevent reminder fatigue (lastReminderAt tracking)
 *
 * @module services/v3/mission-reminder.service
 */
import type { ReviewReason } from '../../types/review-reason.types.js';
export type { ReviewReason };
/**
 * Service for sending proactive reminders for off-track OKRs.
 */
export declare class MissionReminderService {
    private static instance;
    private readonly logger;
    private readonly storageService;
    private readonly krTrackingService;
    /**
     * Cached TaskPoolService singleton (Arch NTH-4 on PR #354).
     * Resolved lazily on first access via {@link getTaskPool} and reused
     * across every sweep × mission call site for the lifetime of this
     * MissionReminderService instance. Tests that need to swap the
     * underlying TaskPool must call {@link resetInstance} to also discard
     * this cached reference.
     */
    private taskPool;
    /**
     * Counter of cron-parse failures observed across all sweeps (Arch NTH-3
     * on PR #354). Bumped each time {@link CronExpressionParser.parse}
     * throws on a mission's `reviewSchedule`. Exposed via
     * {@link cronParseFailureCount} for tests + (future) Prom metric.
     */
    private cronParseFailures;
    private constructor();
    /**
     * Total number of cron-parse failures observed since this service
     * instance was constructed. Read by tests (asserting the warn-log path
     * also bumps the counter) and intended as the source for a future
     * Prometheus gauge (sister F4 follow-up filed on the OKR Mission
     * Reminder spec).
     */
    get cronParseFailureCount(): number;
    /**
     * Cached TaskPoolService accessor. Resolves the singleton on first call
     * and reuses it thereafter. Allows test harnesses to reset the cache
     * via {@link resetInstance}, which clears both the
     * MissionReminderService singleton and any private references it holds.
     */
    private getTaskPool;
    static getInstance(): MissionReminderService;
    static resetInstance(): void;
    /**
     * Run a full sweep of all active missions, sending Slack OKR reminders
     * AND (per REVIEW-1, Phase E pre-beta) creating cadence-driven review
     * WorkItems that wake the Team Lead.
     *
     * The two outputs are intentionally additive — the Slack DM keeps the
     * legacy 24h-cooldown path, and the review WorkItem is created when
     * the mission's `policy.executionCadence.reviewSchedule` cron has
     * fired since the last `lastReviewAt`. The DM and the WI may both
     * fire on the same sweep tick — one is a notification, the other is
     * a queue item the TL can act on. Idempotency is guaranteed by the
     * deterministic WorkItem id (`<missionId>:review:<cycleId>`) which
     * the existing `addToPool` dedup-by-id catches; reentrancy is
     * guaranteed by `mission.pendingReviewWorkItemId` (Arch Veto V8).
     *
     * @param force - If true, ignores the REMINDER_COOLDOWN_MS for the
     *   Slack DM path (does NOT bypass the review-WI cadence/lock — that
     *   would defeat the deterministic-id contract).
     * @returns Summary of actions taken
     */
    runSweep(force?: boolean): Promise<{
        checked: number;
        sent: number;
        skipped: number;
        reviewsCreated: number;
        reviewsSkipped: number;
    }>;
    /**
     * Result of {@link maybeCreateReviewWorkItem} — `'created'` when a new
     * review WorkItem was added to the pool, `'skipped'` when the
     * reentrancy lock or cadence boundary blocked creation, `'noop'` when
     * the mission has no executionCadence configured (legacy missions).
     */
    private maybeCreateReviewWorkItem;
    /**
     * Pick the {@link ReviewReason} for this sweep tick.
     *
     * Precedence (most-actionable-first):
     *   1. `off_track_kr`     — at least one KR is reported off-track.
     *   2. `no_active_work`   — the mission has no active project tasks.
     *   3. `phase_complete`   — the mission has advanced phases since
     *                            the last review (heuristic — uses
     *                            `currentPhase` if both this sweep's
     *                            inferred phase and the previous one are
     *                            recorded; otherwise skipped).
     *   4. `scheduled_review` — default; cadence boundary fired.
     *
     * Conservative on `phase_complete`: we only emit it when the
     * previous review (`lastReviewSummary`) and the current `currentPhase`
     * actually disagree — REVIEW-1 doesn't reach into the phase machine
     * to invent state.
     */
    private inferReviewReason;
    /**
     * Resolve the session name to wake when a review WorkItem fires.
     *
     * Order:
     *   1. The mission's explicit owner (`mission.ownerId`)
     *   2. The team lead resolved via the canonical {@link pickTeamLead}
     *      cascade (same path as Slack reminder owner resolution)
     *   3. The orchestrator session as last-resort wake target so a
     *      review never gets dropped on the floor.
     *
     * @param mission - The mission whose review WI is being created
     * @returns Session name string
     */
    private resolveTeamLeadSession;
    /**
     * Send a Slack reminder for a specific mission.
     */
    private sendReminder;
    /**
     * Format the reminder message text.
     */
    private formatReminderMessage;
    /**
     * Resolve a human-readable name for the mission owner.
     */
    private resolveOwnerName;
    /**
     * Load all missions with 'active' status.
     */
    private loadAllActiveMissions;
    /**
     * Save a mission back to disk.
     */
    private saveMission;
}
//# sourceMappingURL=mission-reminder.service.d.ts.map