/** * Strategy representation and bounded pivots. * * A pivot is allowed only when it is materially different, evidence-backed, does * not expand scope or relax safety, and stays inside the remaining pivot budget. * A cosmetic rewrite of the same commands is rejected. Once pivots are * exhausted with no safe materially different strategy, blocks with * STRATEGY_EXHAUSTED. */ import type { ExecutionBudget, ExecutionStrategy, PivotRequest, PivotResult } from "./types.js"; export interface PivotBudget { maxStrategyPivots: number; maxPivotsPerPhase: number; maxEquivalentStrategies: number; } export interface PivotContext { usedPivots: number; usedPivotsThisPhase: number; phase: string; remainingBudget: Partial; strategyHistory: readonly ExecutionStrategy[]; } export interface PivotEvaluator { context: PivotContext; budget: PivotBudget; } /** Compare the projected actions of a pivot to the failed strategy's actions. */ export declare function isMateriallyDifferent(failed: ExecutionStrategy, plannedActions: readonly string[]): boolean; /** A pivot is a true scope-reducer or different-strategy only if it changes the hazard profile. */ export declare function scopeExpands(req: PivotRequest, _existing: readonly ExecutionStrategy[]): boolean; /** * Evaluate a pivot request deterministically. Returns an approved new strategy * or a structured rejection. */ export declare function evaluatePivot(evaluator: PivotEvaluator, req: PivotRequest): PivotResult; /** Count how many active/proposed strategies share the same action vector. */ export declare function equivalentStrategyCount(history: readonly ExecutionStrategy[], target: ExecutionStrategy): number; //# sourceMappingURL=strategy.d.ts.map