import { MissionState } from './MissionState';
export interface ServiceEvent {
    type: 'mission_attached' | 'governance_blocked' | 'service_degraded' | 'service_recovered' | 'service_paused' | 'service_resumed' | 'budget_hard_stop' | 'task_promoted';
    workspaceId?: string;
    serviceId: string;
    taskId: string;
    summary: string;
    at: string;
}
export interface ServiceState {
    workspaceId?: string;
    serviceId: string;
    objective: string;
    status: 'active' | 'paused' | 'degraded' | 'archived';
    riskProfile: 'low' | 'medium' | 'high';
    slo: {
        latencyP95Ms?: number;
        successRateMin?: number;
        safetyIncidentMax?: number;
    };
    kpis: {
        completionRate?: number;
        avgCycleTimeMs?: number;
        governanceBlockRate?: number;
        fallbackRate?: number;
    };
    budget: {
        monthlyLimitCents?: number;
        spentCents?: number;
        hardStop: boolean;
    };
    missionIds: string[];
    latestThoughtTracePath?: string;
    createdAt: string;
    updatedAt: string;
}
export declare class ServiceStateStore {
    private workspaceId;
    private baseDir;
    private eventsDir;
    private missionsDir;
    constructor(workspaceId?: string);
    list(limit?: number): ServiceState[];
    upsertFromMission(state: MissionState): string | null;
    private buildEvent;
    getById(serviceId: string): ServiceState | null;
    setStatus(serviceId: string, status: 'active' | 'paused' | 'degraded' | 'archived', reason: string, taskId?: string): ServiceState | null;
    listEvents(serviceId: string, limit?: number): ServiceEvent[];
    /**
     * Promote a task into a service.
     *
     * v1.3 (Story 2.4) — explicit-only contract:
     *   - `actor` is REQUIRED and must not be 'system', 'auto', or ''.
     *     Refuses silent promotion by background processes.
     *   - `consentScope` is REQUIRED and must equal 'task_promotion'.
     *     This pairs with GovernanceConsentStore so promotions can be
     *     gated by a per-user consent record in the future (the consent
     *     itself is the caller's responsibility — this method only
     *     refuses obvious bypasses).
     *   - Emits `task_promoted` event with actor + consentScope context.
     *
     * Returns the new ServiceState on success; throws on policy violation.
     */
    promoteTaskToService(state: MissionState, serviceId: string, objective?: string, opts?: {
        actor?: string;
        consentScope?: string;
        reason?: string;
    }): ServiceState;
    private appendEvent;
    private load;
    private estimateCompletedCount;
    private estimateBlockedCount;
}
