/**
 * Delete Feature Use Case
 *
 * Orchestrates feature deletion using a two-phase soft-delete approach:
 * 1. Immediately soft-delete the feature (set deletedAt + lifecycle=Deleting)
 *    so it vanishes from all queries — prevents the "reappear" bug
 * 2. Then perform cleanup (cancel agents, remove worktree/branches)
 *
 * Business Rules:
 * - Throws if the feature does not exist
 * - Cascade soft-deletes all sub-features before deleting the parent
 * - Cancels running/pending agent runs
 * - Gracefully handles worktree removal failures
 */
import type { Feature } from '../../../domain/generated/output.js';
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
import type { IWorktreeService } from '../../ports/output/services/worktree-service.interface.js';
import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
export interface DeleteFeatureOptions {
    cleanup?: boolean;
    cascadeDelete?: boolean;
    closePr?: boolean;
}
export declare class DeleteFeatureUseCase {
    private readonly featureRepo;
    private readonly worktreeService;
    private readonly processService;
    private readonly runRepo;
    private readonly gitPrService;
    constructor(featureRepo: IFeatureRepository, worktreeService: IWorktreeService, processService: IFeatureAgentProcessService, runRepo: IAgentRunRepository, gitPrService: IGitPrService);
    execute(featureId: string, options?: DeleteFeatureOptions): Promise<Feature>;
    /** Relocate direct children one level up (set their parentId to the deleted feature's parentId). */
    private relocateChildren;
    /** Recursively soft-delete all children (depth-first). */
    private cascadeSoftDelete;
    /** Set lifecycle to Deleting and soft-delete the feature. */
    private markDeletingAndSoftDelete;
    /** Recursively cleanup all children (depth-first). */
    private cascadeCleanupChildren;
    /** Cancel agent runs and clean up worktree/branches for a single feature. */
    private cleanupSingleFeature;
}
//# sourceMappingURL=delete-feature.use-case.d.ts.map