Plan Fixes • AI Agent SDK
plan_fixes: Produce a :class:`RepairPlan` describing what the doctor repair changes.
plan_fixes
Method
</div>
This is a method of the DoctorRulesRegistry class in the doctor_registry module.
Produce a :class:RepairPlan describing what the doctor repair changes.
Safety contract:
- Diff preview: every applied rule records a before/after `
ConfigDiff`. - Refuse-on-unrecoverable: a rule that raises is skipped, its blocking
- finding(s) recorded in `
refused`, and its partial change discarded. - Backup: when `
dry_run=Falseandbackup=True` the original - config is snapshotted to `
backup_path` before returning. - Re-validation: after applying, residual findings are re-collected so
- callers can report “repair left N finding(s)”.
Signature
def plan_fixes(config: Dict[str, Any]) -> RepairPlanParameters
ParamField
Dict[str, Any]The configuration to repair (never mutated).
Returns
ResponseField
RepairPlanclass:RepairPlan.
Uses
copy.deepcopyget_rulesrule.collect_findingswarnings.warnFindingrule.apply_fixConfigDiffcollect_all_findingsRepairPlan
Used By
Source
View on GitHubpraisonaiagents/runtime/doctor_registry.py at line 79