/**
 * AnswerAgentQuestionUseCase
 *
 * Records an answer for a pending {@link AgentQuestion} and:
 *  - validates the answer against the question's options when present,
 *  - transitions status to `answered`,
 *  - resolves the matching {@link IDeferredQuestionRegistry} entry so the
 *    SDK V2 `canUseTool` callback awaiting the answer returns,
 *  - for background-emitted questions tied to an approval gate, forwards
 *    `approve` / `reject` answers to the existing
 *    {@link ApproveAgentRunUseCase} / {@link RejectAgentRunUseCase} so the
 *    underlying gate state machine remains the single source of truth.
 *
 * Gate-linkage detection: a question is treated as gate-linked when its
 * `agentRunId` references a run currently in `waitingApproval` AND the
 * caller's answer matches the gate-vocabulary (`approve` / `reject`).
 * This keeps the unified-inbox surface backwards-compatible with the
 * existing approval flow without inventing a parallel pause primitive.
 */
import type { IAgentQuestionRepository } from '../../ports/output/repositories/agent-question-repository.interface.js';
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
import type { AnswerAgentQuestionInput, IDeferredQuestionRegistry } from '../../ports/output/agents/agent-question-service.interface.js';
import { type AgentQuestion } from '../../../domain/generated/output.js';
import { ApproveAgentRunUseCase } from './approve-agent-run.use-case.js';
import { RejectAgentRunUseCase } from './reject-agent-run.use-case.js';
export interface AnswerAgentQuestionResult {
    /** True when the collaboration feature flag is on and the answer was applied. */
    enabled: boolean;
    /** The updated question — populated only when `enabled` is true and the question existed. */
    question?: AgentQuestion;
    /** True when the answer was forwarded to the approval-gate use case. */
    forwardedToGate: boolean;
}
export declare class AnswerAgentQuestionUseCase {
    private readonly questionRepository;
    private readonly deferredRegistry;
    private readonly settings;
    private readonly agentRunRepository;
    private readonly approveAgentRun;
    private readonly rejectAgentRun;
    constructor(questionRepository: IAgentQuestionRepository, deferredRegistry: IDeferredQuestionRegistry, settings: ISettingsRepository, agentRunRepository: IAgentRunRepository, approveAgentRun: ApproveAgentRunUseCase, rejectAgentRun: RejectAgentRunUseCase);
    execute(input: AnswerAgentQuestionInput): Promise<AnswerAgentQuestionResult>;
    private maybeForwardToGate;
    private isCollaborationEnabled;
}
//# sourceMappingURL=answer-agent-question.use-case.d.ts.map