import { type BriefSnapshot } from '../jarvis/briefScheduler';
declare const ALL_DAYS: readonly ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
export type TeammateDay = typeof ALL_DAYS[number];
export type TeammateChannel = 'file' | 'telegram' | 'discord' | 'slack';
export interface TeammateSettings {
    enabled: boolean;
    /** Local-time HH:MM 24h (e.g. "08:00"). */
    scheduleTime: string;
    /** Days the brief should fire on. Empty array = never. */
    scheduleDays: TeammateDay[];
    /** Active delivery channels. Empty = silent (snapshot only saved to disk). */
    channels: TeammateChannel[];
    /** ISO timestamp of the most recent successful run. */
    lastRunAt: string;
    /** ISO timestamp of the next scheduled run (UI hint, not authoritative). */
    nextRunAt: string;
}
export declare function defaultTeammateSettings(): TeammateSettings;
export interface TeammateDelivery {
    sendTelegram?: (markdown: string) => Promise<void>;
    sendDiscord?: (markdown: string) => Promise<void>;
    sendSlack?: (markdown: string) => Promise<void>;
}
export interface TeammateSchedulerOptions {
    projectDir: string;
    getSettings(): TeammateSettings;
    updateSettings(next: TeammateSettings): Promise<void> | void;
    /** Brief snapshot producer. Defaults to the jarvis snapshotDailyBrief. */
    snapshot?: (projectDir: string) => Promise<BriefSnapshot>;
    delivery?: TeammateDelivery;
    /** When true, the scheduler skips firing (used by kill switch). */
    isHalted?: () => boolean;
    tickMs?: number;
    /** Optional clock injection for tests. */
    now?: () => Date;
}
export interface TeammateRunResult {
    fired: boolean;
    reason: string;
    channelsDelivered: TeammateChannel[];
    channelsFailed: Array<{
        channel: TeammateChannel;
        error: string;
    }>;
    snapshotPath?: string;
}
export declare class TeammateScheduler {
    private opts;
    private timer;
    private running;
    constructor(opts: TeammateSchedulerOptions);
    start(): void;
    stop(): void;
    /** Returns the next scheduled fire timestamp as ISO, or '' when disabled. */
    computeNextRunAt(now?: Date): string;
    /** Force a brief to run right now, regardless of schedule. */
    runNow(): Promise<TeammateRunResult>;
    tick(): Promise<TeammateRunResult>;
    private runOnce;
}
export declare function isDueNow(now: Date, settings: TeammateSettings): boolean;
export declare function alreadyRanForSlot(now: Date, settings: TeammateSettings): boolean;
export declare function nextOccurrence(now: Date, scheduleTime: string, days: TeammateDay[]): Date | null;
export declare function sanitizeTeammateSettings(value: unknown): TeammateSettings;
export {};
//# sourceMappingURL=teammateScheduler.d.ts.map