import { FileDecisionAction, FileDecisionScope } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
/** Options narrowing a file decision to a single file and binding its digest. */
export interface FileDecisionOptions {
    /**
     * Decision scope. Defaults to `FILE` when {@link fileChangeId} is set, else
     * `CHANGE_SET` (the whole-set decision that covers every file).
     */
    readonly scope?: FileDecisionScope;
    /** The captured file this decision targets; required for `FILE` scope. */
    readonly fileChangeId?: string;
    /**
     * The digest the reviewer saw (`aggregate_digest` for CHANGE_SET,
     * `file_digest` for FILE). The server enforces it at decision time and the
     * runner re-verifies it at reconcile — "what you approve is what gets applied".
     */
    readonly expectedDigest?: string;
    /** Optional free-text comment recorded on the decision (audit trail). */
    readonly reason?: string;
    /**
     * Set on an APPROVE to consciously KEEP a change whose diff could not be fully
     * reviewed. Honored only for a binary file at `FILE` scope (a binary has no
     * text diff, but its exact bytes are captured and reconcilable). It never
     * relaxes the digest gate, and is ignored for other incompleteness. See DD-16.
     */
    readonly acknowledgeUnreviewable?: boolean;
}
/** Return value of {@link useFileReview}. */
export interface UseFileReviewReturn {
    /**
     * Submit an approve/reject decision for a change set (or one file within it).
     * Resolves when the backend accepts the decision; the execution stream will
     * deliver the updated `file_change_sets` projection.
     */
    readonly submitFileDecision: (executionId: string, changeSetId: string, action: FileDecisionAction, options?: FileDecisionOptions) => Promise<void>;
    /**
     * Keys (`changeSetId` for a whole-set decision, `changeSetId:fileChangeId` for
     * a per-file one) currently being submitted — drives per-button loading state
     * when a reviewer decides files independently. Build a key with
     * {@link fileDecisionKey}.
     */
    readonly submittingDecisionKeys: ReadonlySet<string>;
    /**
     * Per-decision failures, keyed exactly like {@link submittingDecisionKeys}
     * (via {@link fileDecisionKey}). This is the per-target parallel of the
     * in-flight Set: a review card has many decision targets (the whole set plus
     * each file), so a failure must be attributable to the *one* control that
     * failed — a single scalar cannot say which file. {@link FileReviewCard}
     * consumes this map to render the error in-card, beside the failed control.
     */
    readonly decisionErrors: ReadonlyMap<string, Error>;
    /** Clear the error for one decision key (e.g. before a retry of that target). */
    readonly clearDecisionError: (key: string) => void;
    /**
     * The most-recent decision failure, or `null` when healthy — a convenience
     * mirror of {@link decisionErrors} for a headless consumer that wants a single
     * error value (a banner). The map is authoritative for per-control surfacing.
     */
    readonly error: Error | null;
    /** Reset every decision error (both {@link decisionErrors} and {@link error}). */
    readonly clearError: () => void;
}
/**
 * The loading-state key for a file decision: the change set id for a whole-set
 * (CHANGE_SET) decision, or `changeSetId:fileChangeId` for a per-file one.
 */
export declare function fileDecisionKey(changeSetId: string, fileChangeId?: string): string;
/**
 * Behavior hook that wraps `agentExecution.submitFileDecision()` with per-decision
 * loading state and error management — the file-review sibling of
 * {@link useSubmitApproval}.
 *
 * File edits are reviewed as a captured change set (the `file_change_sets`
 * projection), NOT as tool-call approvals. Platform builders who want full
 * control over the review UI use this hook directly; those who prefer a drop-in
 * surface use {@link FileReviewCard}, which accepts the callback shape this
 * hook produces.
 *
 * @example
 * ```tsx
 * const { submitFileDecision, submittingDecisionKeys } = useFileReview();
 *
 * // Approve the whole change set:
 * await submitFileDecision(executionId, changeSet.id, FileDecisionAction.APPROVE, {
 *   expectedDigest: changeSet.aggregateDigest,
 * });
 * ```
 */
export declare function useFileReview(): UseFileReviewReturn;
//# sourceMappingURL=useFileReview.d.ts.map