export * from './hooks.js';
export * from './session.js';
export * from './completion.js';
export * from './stm-types.js';
import { HookData, HookResult } from './hooks.js';
import { CompletionValidationResult, ToolFailure } from './completion.js';
export interface BuiltinHookHandler {
    execute(data: HookData, config: Hook): Promise<HookResult>;
}
export interface HookConfig {
    [key: string]: Hook[];
}
export interface Hook {
    type: 'command' | 'git-commit' | 'git-push';
    command?: string;
    timeout?: number;
    blocking?: boolean;
    message?: string;
    noVerify?: boolean;
    remote?: string;
    branch?: string;
}
export interface ExecutionResult {
    success: boolean;
    taskId: string;
    duration: number;
    output?: string;
    error?: string;
    provider?: ProviderName;
    filesChanged?: string[];
    rollbackData?: RollbackData;
    taskTitle?: string;
    filesModified?: string[];
    taskCompletion?: CompletionValidationResult;
    toolFailures?: ToolFailure[];
}
export interface RollbackData {
    gitCommit?: string;
    fileBackups?: Map<string, string>;
    gitPush?: {
        remote: string;
        branch: string;
        commit: string;
    };
}
export interface ProgressCallback {
    (message: string, percentage?: number): void;
}
export interface AgentConfig {
    provider?: ProviderName;
    workspace?: string;
    includeCoAuthoredBy?: boolean;
    autoUpdateContext?: boolean;
    debug?: boolean;
    dryRun?: boolean;
    signal?: AbortSignal;
    onProgress?: ProgressCallback;
    enableRollback?: boolean;
    reflection?: ReflectionConfig;
    additionalDirectories?: string[];
    noVerify?: boolean;
    strictCompletion?: boolean;
    completionConfidence?: number;
    ignoreToolFailures?: boolean;
    maxRetryAttempts?: number;
}
export interface UserConfig {
    providers: ProviderName[];
    failoverDelay: number;
    retryAttempts: number;
    maxTokens: number;
    rateLimitCooldown: number;
    logLevel: 'debug' | 'info' | 'warn' | 'error';
    customInstructions: string;
    includeCoAuthoredBy?: boolean;
    additionalDirectories?: string[];
    hooks?: HookConfig;
    strictCompletion?: boolean;
    completionConfidence?: number;
    ignoreToolFailures?: boolean;
    maxRetryAttempts?: number;
}
export type AgentEvent = 'issue-created' | 'execution-start' | 'execution-end' | 'error';
export interface Status {
    totalTasks: number;
    completedTasks: number;
    pendingTasks: number;
    currentTaskId?: string;
    availableProviders?: string[];
    rateLimitedProviders?: string[];
}
export type ProviderName = 'claude' | 'gemini' | 'mock';
export interface RateLimitData {
    limitedAt?: number;
    attempts?: number;
}
export interface ReflectionConfig {
    enabled: boolean;
    maxIterations: number;
    improvementThreshold: number;
    skipForSimpleSpecs: boolean;
}
export type ImprovementScore = number;
export declare enum ChangeType {
    ADD_ISSUE = "ADD_ISSUE",
    MODIFY_ISSUE = "MODIFY_ISSUE",
    ADD_PLAN = "ADD_PLAN",
    MODIFY_PLAN = "MODIFY_PLAN",
    ADD_DEPENDENCY = "ADD_DEPENDENCY"
}
export interface ImprovementChange {
    type: ChangeType;
    target: string;
    description: string;
    content: string;
    rationale: string;
}
export interface IdentifiedGap {
    type: string;
    description: string;
    relatedIssues: string[];
}
export interface ImprovementAnalysis {
    score: ImprovementScore;
    gaps: IdentifiedGap[];
    changes: ImprovementChange[];
    reasoning: string;
    iterationNumber: number;
    timestamp: string;
}
export interface ReflectionResult {
    enabled: boolean;
    performedIterations: number;
    totalImprovements: number;
    finalScore: ImprovementScore;
    improvements?: ImprovementAnalysis[];
    skippedReason?: string;
}
export interface ReflectionState {
    currentIteration: number;
    improvements: ImprovementAnalysis[];
    currentScore: number;
    isComplete: boolean;
    currentIssues: string[];
    currentPlans: string[];
}
export * from './hooks.js';
export * from './session.js';
