/**
 * Approve Agent Run Use Case
 *
 * Approves a paused agent run (waiting_approval status) and
 * spawns a new resume worker to continue graph execution.
 * Optionally accepts a PrdApprovalPayload to update spec.yaml
 * selections before resuming.
 *
 * Optionally accepts a {@link SupervisorActor}. When provided, the
 * approval is attributed to that actor in the audit log
 * (`actor_id = user:<id>` or `supervisor:<id>`) and the "user always
 * wins" invariant from spec 093 is enforced:
 *  - a supervisor actor cannot override a prior user decision on the
 *    same gate (the call returns `{ approved: false }`),
 *  - a user actor proceeds even when a prior supervisor decision
 *    exists; both rows remain in `activity_log` for audit.
 *
 * Existing user-only callers that omit `actor` are unaffected — no
 * activity-log row is written and the behaviour is byte-identical to
 * the pre-spec-093 implementation.
 */
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
import type { IPhaseTimingRepository } from '../../ports/output/agents/phase-timing-repository.interface.js';
import type { IActivityLogRepository } from '../../ports/output/repositories/activity-log-repository.interface.js';
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
import type { IWorktreePathProvider } from '../../ports/output/services/worktree-path-provider.interface.js';
import type { INodeHelpers } from '../../ports/output/services/node-helpers.interface.js';
import type { PrdApprovalPayload } from '../../../domain/generated/output.js';
import { type SupervisorActor } from '../../../domain/value-objects/supervisor-actor.js';
export declare class ApproveAgentRunUseCase {
    private readonly agentRunRepository;
    private readonly processService;
    private readonly featureRepository;
    private readonly phaseTimingRepository;
    private readonly worktreePaths;
    private readonly nodeHelpers;
    private readonly activityLog;
    constructor(agentRunRepository: IAgentRunRepository, processService: IFeatureAgentProcessService, featureRepository: IFeatureRepository, phaseTimingRepository: IPhaseTimingRepository, worktreePaths: IWorktreePathProvider, nodeHelpers: INodeHelpers, activityLog: IActivityLogRepository);
    execute(id: string, payload?: PrdApprovalPayload, actor?: SupervisorActor): Promise<{
        approved: boolean;
        reason: string;
    }>;
    /**
     * Returns the first user-actor gate decision recorded for `runId`, or
     * `undefined` when no user has acted yet. Used to block a supervisor
     * actor from overriding a prior user decision (the "user always wins"
     * invariant runs in BOTH directions: user beats prior supervisor AND
     * supervisor cannot beat prior user).
     */
    private findPriorUserGateDecision;
    private recordGateDecision;
}
//# sourceMappingURL=approve-agent-run.use-case.d.ts.map