/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { Config } from '@vybestack/llxprt-code-core';
import type { Todo } from '@vybestack/llxprt-code-core';
/**
 * Configuration for generating continuation prompts
 */
export interface ContinuationPromptConfig {
    readonly taskDescription: string;
    readonly isYoloMode: boolean;
    readonly attemptCount?: number;
    readonly previousFailure?: string;
}
/**
 * Context information for evaluating continuation conditions
 */
export interface ContinuationContext {
    readonly todos: readonly Todo[];
    readonly hadToolCalls: boolean;
    readonly isResponding: boolean;
    readonly config: Config;
    readonly currentState: ContinuationState;
}
/**
 * Result of evaluating continuation conditions
 */
export interface ContinuationEvaluation {
    readonly shouldContinue: boolean;
    readonly reason: string;
    readonly activeTodo?: Todo;
    readonly conditions: ConditionSet;
}
/**
 * State tracking for continuation attempts
 */
export interface ContinuationState {
    isActive: boolean;
    attemptCount: number;
    taskDescription?: string;
    lastPromptTime?: Date;
}
/**
 * Set of conditions evaluated for continuation
 */
export interface ConditionSet {
    readonly hasActiveTodos: boolean;
    readonly noToolCallsMade: boolean;
    readonly continuationEnabled: boolean;
    readonly notCurrentlyContinuing: boolean;
    readonly withinAttemptLimits: boolean;
    readonly withinTimeConstraints: boolean;
}
/**
 * Template structure for continuation prompts
 */
export interface ContinuationPromptTemplates {
    readonly standard: {
        readonly base: string;
        readonly retry: string;
    };
    readonly yolo: {
        readonly base: string;
        readonly retry: string;
        readonly urgent: string;
    };
}
/**
 * Service responsible for generating continuation prompts and managing continuation logic
 */
export declare class TodoContinuationService {
    private static readonly MAX_CONTINUATION_ATTEMPTS;
    private static readonly MIN_CONTINUATION_INTERVAL_MS;
    private static readonly MAX_TASK_DESCRIPTION_LENGTH;
    /**
     * Generates a continuation prompt based on the provided configuration
     * @param config Configuration for prompt generation
     * @returns Formatted continuation prompt string
     */
    generateContinuationPrompt(config: ContinuationPromptConfig): string;
    /**
     * Evaluates whether continuation should occur based on current conditions
     * @param context Current continuation context
     * @returns Evaluation result with decision and reasoning
     */
    checkContinuationConditions(context: ContinuationContext): ContinuationEvaluation;
    /**
     * Formats a todo item's content into a task description
     * @param todo Todo item to format
     * @returns Formatted task description string
     */
    formatTaskDescription(todo: Todo): string;
    /**
     * Checks if continuation should be allowed based on configuration and state
     * @param config Application configuration
     * @param state Current continuation state
     * @returns Whether continuation is allowed
     */
    shouldAllowContinuation(config: Config, state: ContinuationState): boolean;
    /**
     * Creates a new, empty continuation state
     * @returns Initial continuation state
     */
    createContinuationState(): ContinuationState;
    /**
     * Checks whether continuation should occur based on settings, todos, and tool calls
     * @param settings Application settings/config
     * @param hasActiveTodos Whether there are active todos
     * @param hasToolCalls Whether tool calls were made
     * @returns Whether continuation should proceed
     */
    shouldContinue(settings: Config, hasActiveTodos: boolean, hasToolCalls: boolean): boolean;
    /**
     * Formats a prompt for task description and YOLO mode
     * @param taskDescription Description of the task to continue
     * @param isYoloMode Whether YOLO mode is enabled
     * @returns Formatted prompt string
     */
    formatPrompt(taskDescription: string, isYoloMode: boolean): string;
    /**
     * Private method to truncate task descriptions to acceptable length
     * @param description Task description to truncate
     * @returns Truncated description
     */
    private truncateTaskDescription;
    /**
     * Private method to generate standard continuation prompt
     * @param taskDescription Task description
     * @param attemptCount Optional attempt count
     * @returns Standard prompt string
     */
    private generateStandardPrompt;
    /**
     * Private method to generate YOLO mode continuation prompt
     * @param taskDescription Task description
     * @param attemptCount Optional attempt count
     * @returns YOLO mode prompt string
     */
    private generateYoloModePrompt;
    /**
     * Private method to evaluate all continuation conditions
     * @param context Continuation context
     * @returns Evaluated condition set
     */
    private evaluateAllConditions;
    /**
     * Private method to check if there are any active todos
     * @param todos Array of todos to check
     * @returns Whether active todos exist
     */
    private hasAnyActiveTodos;
    /**
     * Private method to find the best active todo to continue
     * @param todos Array of todos to search
     * @returns Best active todo or undefined
     */
    private findBestActiveTodo;
    /**
     * Private method to check time constraints for continuation
     * @param lastPromptTime Time of last continuation prompt
     * @returns Whether time constraints are satisfied
     */
    private checkTimeConstraints;
}
/**
 * Factory function to create a new TodoContinuationService instance
 * @returns New service instance
 */
export declare function createTodoContinuationService(): TodoContinuationService;
