/**
 * Agent Suspend Service
 *
 * Central coordinator for the agent suspend/rehydrate lifecycle.
 * Suspends idle agents to free resources (RAM/disk) and transparently
 * rehydrates them when the orchestrator sends a message, using
 * Claude Code's `--resume` flag to restore conversation context.
 *
 * @module agent-suspend-service
 */
import type { AgentRegistrationService } from './agent-registration.service.js';
/**
 * Information stored for each suspended agent.
 */
export interface SuspendedAgentInfo {
    /** PTY session name */
    sessionName: string;
    /** Team ID the agent belongs to */
    teamId: string;
    /** Member ID within the team */
    memberId: string;
    /** Agent role (developer, qa, etc.) */
    role: string;
    /** Claude conversation session ID for --resume */
    claudeSessionId?: string;
    /** ISO timestamp when the agent was suspended */
    suspendedAt: string;
}
/**
 * Manages suspension and rehydration of idle agents.
 *
 * Lifecycle:
 * - `active → suspended`: Idle timeout triggers suspendAgent()
 * - `suspended → starting → active`: Message triggers rehydrateAgent()
 * - `suspended → inactive`: Manual stop by user
 */
export declare class AgentSuspendService {
    private static instance;
    private logger;
    /** Map of sessionName → suspended agent metadata */
    private suspendedAgents;
    /** Set of sessionNames currently being rehydrated (dedup guard) */
    private rehydratingSet;
    /** Injected AgentRegistrationService (set via setDependencies) */
    private agentRegistrationService;
    private constructor();
    /**
     * Get the singleton instance.
     *
     * @returns The AgentSuspendService singleton
     */
    static getInstance(): AgentSuspendService;
    /**
     * Reset the singleton (for testing).
     */
    static resetInstance(): void;
    /**
     * Inject the AgentRegistrationService dependency.
     * Must be called during server startup before rehydration can work.
     *
     * @param registrationService - The AgentRegistrationService instance
     */
    setDependencies(registrationService: AgentRegistrationService): void;
    /**
     * Suspend an active agent, killing its process but preserving
     * the Claude session ID so it can be rehydrated later.
     *
     * @param sessionName - PTY session name
     * @param teamId - Team ID
     * @param memberId - Member ID within the team
     * @param role - Agent role
     * @returns True if suspension was successful
     */
    suspendAgent(sessionName: string, teamId: string, memberId: string, role: string): Promise<boolean>;
    /**
     * Rehydrate a suspended agent by recreating its session.
     * Uses the saved Claude session ID for `--resume` to restore context.
     *
     * @param sessionName - PTY session name of the suspended agent
     * @returns True if rehydration was initiated (not necessarily complete)
     */
    rehydrateAgent(sessionName: string): Promise<boolean>;
    /**
     * Check if a session is currently suspended.
     *
     * @param sessionName - PTY session name
     * @returns True if the agent is suspended
     */
    isSuspended(sessionName: string): boolean;
    /**
     * Check if a session is currently being rehydrated.
     *
     * @param sessionName - PTY session name
     * @returns True if rehydration is in progress
     */
    isRehydrating(sessionName: string): boolean;
    /**
     * Get suspend information for a session.
     *
     * @param sessionName - PTY session name
     * @returns Suspend info or null if not suspended
     */
    getSuspendInfo(sessionName: string): SuspendedAgentInfo | null;
    /**
     * Remove an agent from the suspended map without rehydrating.
     * Used when a suspended agent is manually stopped by the user.
     *
     * @param sessionName - PTY session name
     */
    removeSuspended(sessionName: string): void;
    /**
     * Get the count of currently suspended agents.
     *
     * @returns Number of suspended agents
     */
    getSuspendedCount(): number;
}
//# sourceMappingURL=agent-suspend.service.d.ts.map