/**
 * Group Session Auto-Split — detects idle group sessions and creates successor sessions.
 *
 * When a group chat message arrives and the last session activity was > N hours ago,
 * the old session is sealed and a new session is created with:
 *   - previousSessionId linking to the predecessor
 *   - carryoverSummary (from predecessor's taskSummary or last messages)
 *   - Same groupKey, groupName, groupPlatform, projectId
 *
 * This prevents unbounded context growth in long-lived group chats.
 */
import { type SessionMetadata } from "./session-persistence.js";
export interface GroupSplitResult {
    /** Whether a split occurred */
    split: boolean;
    /** The session ID to use for the current turn (new or existing) */
    activeSessionId: string;
    /** If split, the sealed predecessor session ID */
    sealedSessionId?: string;
}
/**
 * Check whether a group session should be auto-split due to idle timeout.
 * If yes, seal the old session and create a new successor.
 *
 * @param currentSession - The existing group session metadata
 * @param projectRoot - The project workspace directory
 * @returns Split result with the session ID to use
 */
export declare function maybeAutoSplitGroupSession(currentSession: SessionMetadata, projectRoot: string): Promise<GroupSplitResult>;
/**
 * Check whether a group session has exceeded MAX_TURNS hard limit.
 * Called AFTER turn.end — soft-splits without interrupting the current turn.
 *
 * @param currentSession - The session that just finished a turn
 * @param projectRoot - The project workspace directory
 * @returns Split result (new session ready for next message, or no-op)
 */
export declare function maybeHardLimitSplit(currentSession: SessionMetadata, projectRoot: string): Promise<GroupSplitResult>;
