import type { RetryContext, RetryDecision, RetryRule } from './types.mts'; export type NoMatchReason = 'no-rule' | 'invalid-rule' | 'invalid-target' | 'missing-target'; export type DecisionResult = { decision: Exclude; matchedRule: string; } | { decision: 'rerun'; matchedRule: string; targetName: string; } | { decision: 'no-match'; matchedRule: string; reason: NoMatchReason; }; export interface EvaluateRulesOptions { afterRuleEvaluated?: (context: RetryContext, rule: RetryRule) => Promise | void; /** Defaults to `no-match`. Use `dispatch` when unmatched work should leave the retry engine. */ unmatchedDecision?: 'no-match' | 'dispatch'; } export declare function decide(context: RetryContext, rules: readonly RetryRule[], options?: EvaluateRulesOptions): Promise;