import type { FastifyRequest, FastifyReply } from 'fastify';
import type { Logger } from 'pino';
import { type RepositoryConfig } from '../../../../../config/loader.js';
import type { ClaudeInvokerDependencies } from '../../../../../frameworks/claude/claudeInvoker.js';
import type { GateClaudeInvocationUseCase } from '../../../../../modules/review-execution/usecases/gateClaudeInvocation.usecase.js';
import type { ProcessorBuilder } from '../../../../../modules/review-execution/services/processorRegistry.js';
import type { ReviewRequestTrackingGateway } from '../../../../../modules/tracking/interface-adapters/gateways/reviewRequestTracking.gateway.js';
import type { TrackAssignmentUseCase } from '../../../../../modules/tracking/usecases/tracking/trackAssignment.usecase.js';
import type { RecordReviewCompletionUseCase } from '../../../../../modules/tracking/usecases/tracking/recordReviewCompletion.usecase.js';
import type { RecordPushUseCase } from '../../../../../modules/tracking/usecases/tracking/recordPush.usecase.js';
import type { TransitionStateUseCase } from '../../../../../modules/tracking/usecases/tracking/transitionState.usecase.js';
import type { CheckFollowupNeededUseCase } from '../../../../../modules/tracking/usecases/tracking/checkFollowupNeeded.usecase.js';
import type { SyncThreadsUseCase } from '../../../../../modules/tracking/usecases/tracking/syncThreads.usecase.js';
import type { RecordBypassUseCase } from '../../../../../modules/tracking/usecases/tracking/recordBypass.usecase.js';
import type { HandlePlatformApprovalUseCase } from '../../../../../modules/tracking/usecases/tracking/handlePlatformApproval.usecase.js';
import type { NoteCommentPostGateway } from '../../../../../modules/platform-integration/entities/noteComment/noteCommentPost.gateway.js';
import type { ApprovalRevocationGateway } from '../../../../../modules/platform-integration/entities/approvalRevocation/approvalRevocation.gateway.js';
import type { ReviewContextGateway } from '../../../../../modules/review-execution/entities/reviewContext/reviewContext.gateway.js';
import type { ThreadFetchGateway } from '../../../../../modules/platform-integration/entities/threadFetch/threadFetch.gateway.js';
import type { DiffMetadataFetchGateway } from '../../../../../modules/platform-integration/entities/diffMetadata/diffMetadata.gateway.js';
import type { DiffStatsFetchGateway } from '../../../../../modules/shared-kernel/entities/diffStats/diffStatsFetch.gateway.js';
import type { EnforceBudgetUseCase } from '../../../../../modules/token-accounting/usecases/enforceBudget/enforceBudget.usecase.js';
import type { BudgetExceededPayload } from '../../../../../main/websocket.js';
import type { RemoveResult, WorktreeIdentity } from '../../../../../modules/worktree-management/entities/worktree/worktree.schema.js';
export type RemoveWorktreeAction = (input: {
    identity: WorktreeIdentity;
    sourceCheckoutPath: string;
}) => Promise<RemoveResult>;
export declare function extractBaseUrl(remoteUrl: string): string | null;
export interface GitLabWebhookDependencies {
    reviewContextGateway: ReviewContextGateway;
    threadFetchGateway: ThreadFetchGateway;
    diffMetadataFetchGateway: DiffMetadataFetchGateway;
    diffStatsFetchGateway: DiffStatsFetchGateway;
    trackAssignment: TrackAssignmentUseCase;
    recordCompletion: RecordReviewCompletionUseCase;
    recordPush: RecordPushUseCase;
    transitionState: TransitionStateUseCase;
    checkFollowupNeeded: CheckFollowupNeededUseCase;
    syncThreads: SyncThreadsUseCase;
    enforceBudget: Pick<EnforceBudgetUseCase, 'execute'>;
    broadcastBudgetExceeded: (payload: BudgetExceededPayload) => void;
    getRepositories: () => RepositoryConfig[];
    claudeInvokerDeps?: ClaudeInvokerDependencies;
    gateClaudeInvocation?: GateClaudeInvocationUseCase;
    removeWorktree: RemoveWorktreeAction;
    recordBypass: RecordBypassUseCase;
    noteCommentPostGateway: NoteCommentPostGateway;
    handlePlatformApproval: HandlePlatformApprovalUseCase;
    approvalRevocationGateway: ApprovalRevocationGateway;
    getQualityThreshold: (projectPath: string) => number | null;
    now: () => string;
}
export declare function handleGitLabWebhook(request: FastifyRequest, reply: FastifyReply, logger: Logger, trackingGateway: ReviewRequestTrackingGateway, deps: GitLabWebhookDependencies): Promise<void>;
type GitLabReviewProcessorDeps = Pick<GitLabWebhookDependencies, 'reviewContextGateway' | 'threadFetchGateway' | 'diffMetadataFetchGateway' | 'diffStatsFetchGateway' | 'recordCompletion' | 'claudeInvokerDeps'>;
export declare function buildGitLabReviewProcessor(deps: GitLabReviewProcessorDeps, logger: Logger): ProcessorBuilder;
export {};
//# sourceMappingURL=gitlab.controller.d.ts.map