import type { FinalityState } from './finality.js';
import type { TypedEvidence } from './evidence.js';
export type DisputeStatus = 'filed' | 'acknowledged' | 'investigating' | 'resolved' | 'escalated' | 'dismissed' | 'timeout';
export type DisputeResolution = 'upheld' | 'dismissed' | 'compromise' | 'timeout';
export type DisputeSubject = 'action' | 'receipt' | 'delivery' | 'payment' | 'scope_violation' | 'quality' | 'non_performance';
/** Resolver neutrality class — who resolved and under what authority.
 *  Critical for later distinguishing self-serving resolution from neutral arbitration. */
export type ResolverRole = 'initiating_principal' | 'counterparty_principal' | 'joint_resolution' | 'designated_arbitrator' | 'timeout_default';
/** Slashing bond — filing a dispute costs spend/reputation.
 *  Dismissed = bond slashed to respondent (compensation for frozen capital).
 *  Upheld = bond returned to claimant.
 *  Options pricing theory: a free dispute is a free option exploit. */
export interface DisputeBond {
    amount: number;
    delegationId: string;
    /** false if bond-exempt (e.g., principal filing against own agent) */
    slashable: boolean;
}
export interface DisputeArtifact {
    disputeId: string;
    claimantId: string;
    claimantSignature: string;
    bond: DisputeBond;
    subject: DisputeSubject;
    challengedArtifactId: string;
    challengedArtifactType: 'receipt' | 'escrow' | 'deliverable' | 'delegation';
    claim: string;
    evidence: TypedEvidence[];
    respondentId: string;
    responseEvidence?: TypedEvidence[];
    status: DisputeStatus;
    finality: FinalityState;
    filedAt: string;
    /** Hard deadline for resolution (ISO datetime). Un-extendable.
     *  Escrow TTL pauses during dispute, but only up to this deadline. */
    resolutionTTL: string;
    freezeScope: {
        escrowIds: string[];
        actionScopes?: string[];
    };
    freezeSeverity: 'hard' | 'soft' | 'warning';
    /** Upstream contamination — SIR epidemiological model.
     *  Receipt IDs that this dispute taints (cascade dispute). */
    contestedUpstream?: string[];
    resolution?: {
        outcome: DisputeResolution;
        resolvedBy: string;
        resolverRole: ResolverRole;
        resolvedAt: string;
        reasoning: string;
        enforcement: {
            escrowAction?: 'release' | 'refund' | 'split';
            splitRatio?: number;
            bondAction: 'return' | 'slash' | 'partial_slash';
            bondSlashRatio?: number;
            reputationImpact?: Array<{
                agentId: string;
                adjustment: 'penalize' | 'reward' | 'none';
                magnitude?: number;
            }>;
            revocationTriggered?: string[];
        };
    };
    gatewayId: string;
    gatewaySignature: string;
}
/** Defeasible dispute overlay — applied AFTER lattice evaluation */
export interface DisputeOverlay {
    /** Is the agent currently under active dispute? */
    hasActiveDispute: boolean;
    /** Active dispute IDs affecting this agent */
    activeDisputeIds: string[];
    /** Scopes currently frozen by disputes */
    frozenScopes: string[];
    /** Effective severity of the overlay */
    effectiveSeverity: 'hard' | 'soft' | 'warning' | 'none';
    /** Whether this specific action's scope overlaps a frozen scope */
    actionAffected: boolean;
}
//# sourceMappingURL=dispute.d.ts.map