/**
 * CI/CD Monitor Service
 *
 * High-level orchestration service that coordinates the workflow monitor,
 * state manager, and notifier for end-to-end failure detection and notification.
 */
import { MonitorConfig } from './workflow-monitor.js';
import { NotifierConfig } from './notifier.js';
import { FailureRecord } from './types.js';
/**
 * Service configuration
 */
export interface MonitorServiceConfig {
    /** Monitor configuration */
    monitor: MonitorConfig;
    /** Notifier configuration */
    notifier: NotifierConfig;
    /** State manager root directory (optional) */
    rootDir?: string;
    /** Auto-notify on failure detection */
    autoNotify?: boolean;
    /** Push strategy from unified config (v1.0.231+) */
    pushStrategy?: 'direct' | 'pr-based';
    /** Git branching configuration for pr-based push strategy (v1.0.437+) */
    git?: {
        branchPrefix?: string;
        targetBranch?: string;
        deleteOnMerge?: boolean;
    };
    /** Auto-fix configuration from unified config (v1.0.231+) */
    autoFix?: {
        enabled: boolean;
        maxRetries: number;
        allowedBranches: string[];
    };
    /** Release strategy and environment promotion config (v1.0.437+, enterprise) */
    release?: {
        strategy?: 'trunk' | 'env-promotion';
        environments?: Array<{
            name: string;
            branch: string;
            requiresApproval?: boolean;
        }>;
    };
}
/**
 * Service status
 */
export interface ServiceStatus {
    /** Is service running */
    running: boolean;
    /** Monitor uptime (milliseconds) */
    uptime: number;
    /** Total failures detected */
    totalFailures: number;
    /** Unprocessed failures */
    unprocessedFailures: number;
    /** Last poll timestamp */
    lastPoll: string | null;
}
/**
 * MonitorService - Orchestrates CI/CD monitoring components
 *
 * Coordinates WorkflowMonitor, StateManager, and Notifier for
 * automatic failure detection and notification.
 */
export declare class MonitorService {
    private readonly config;
    private readonly monitor;
    private readonly stateManager;
    private readonly notifier;
    private startTime;
    /**
     * Create monitor service
     */
    constructor(config: MonitorServiceConfig);
    /**
     * Start service
     */
    start(): Promise<void>;
    /**
     * Stop service
     */
    stop(): Promise<void>;
    /**
     * Get service status
     */
    getStatus(): Promise<ServiceStatus>;
    /**
     * Check for new failures and send notifications
     */
    private checkForNewFailures;
    /**
     * Manually trigger notification for a failure
     *
     * @param runId - Workflow run ID
     */
    notifyFailure(runId: number): Promise<void>;
    /**
     * Get all unprocessed failures
     */
    getUnprocessedFailures(): Promise<FailureRecord[]>;
    /**
     * Mark failure as processed
     */
    markProcessed(runId: number): Promise<void>;
}
//# sourceMappingURL=monitor-service.d.ts.map