/**
 * Merge Node — Agent-Driven Post-Implementation Merge Flow
 *
 * Handles the complete merge workflow after implementation using two agent calls:
 * 1. Commit + push + create PR (via agent executor)
 * 2. Merge/squash (via agent executor, after approval gate)
 *
 * Uses interrupt() for the merge approval gate when allowMerge=false.
 *
 * Sub-modules:
 * - ci-watch-fix-loop.ts: CI watch + automatic fix loop
 * - ci-helpers.ts: shared CI utility functions
 * - merge-output-parser.ts: structured data extraction from agent output
 */
import type { IAgentExecutor } from '../../../../../../application/ports/output/agents/agent-executor.interface.js';
import type { FeatureAgentState } from '../../state.js';
import type { IFeatureRepository } from '../../../../../../application/ports/output/repositories/feature-repository.interface.js';
import type { DiffSummary, IGitPrService } from '../../../../../../application/ports/output/services/git-pr-service.interface.js';
import type { CleanupFeatureWorktreeUseCase } from '../../../../../../application/use-cases/features/cleanup-feature-worktree.use-case.js';
import type { IGitForkService } from '../../../../../../application/ports/output/services/git-fork-service.interface.js';
export interface MergeNodeDeps {
    executor: IAgentExecutor;
    getDiffSummary: (cwd: string, baseBranch: string) => Promise<DiffSummary>;
    hasRemote: (cwd: string) => Promise<boolean>;
    getDefaultBranch: (cwd: string) => Promise<string>;
    featureRepository: Pick<IFeatureRepository, 'findById' | 'update'>;
    /**
     * Perform a local squash merge (deterministic git commands, no agent needed).
     */
    localMergeSquash: (cwd: string, featureBranch: string, baseBranch: string, commitMessage: string, hasRemote?: boolean) => Promise<void>;
    /**
     * Verify that featureBranch has been merged into baseBranch.
     * Returns true if baseBranch contains all commits from featureBranch.
     */
    verifyMerge: (cwd: string, featureBranch: string, baseBranch: string, premergeBaseSha?: string) => Promise<boolean>;
    /**
     * Resolve a branch ref to its current SHA.
     */
    revParse: (cwd: string, ref: string) => Promise<string>;
    gitPrService: IGitPrService;
    gitForkService?: IGitForkService;
    cleanupFeatureWorktreeUseCase: Pick<CleanupFeatureWorktreeUseCase, 'execute'>;
}
/**
 * Factory that creates the merge node function.
 *
 * @param deps - External dependencies injected by the graph factory
 * @returns A LangGraph node function
 */
export declare function createMergeNode(deps: MergeNodeDeps): (state: FeatureAgentState) => Promise<Partial<FeatureAgentState>>;
//# sourceMappingURL=merge.node.d.ts.map