Function: enrichValidationError()
ts
function enrichValidationError(
originalError,
toolName,
actionKey,
config): SelfHealingResult;Defined in: packages/core/src/introspection/ContractAwareSelfHealing.ts:92
Enrich a validation error with contract change context.
If the tool has relevant contract changes (from SelfHealingConfig.activeDeltas), this function injects them into the error XML so the LLM can self-correct.
Parameters
| Parameter | Type | Description |
|---|---|---|
originalError | string | The original XML error from formatValidationError() |
toolName | string | The tool that failed validation |
actionKey | string | The action that failed |
config | SelfHealingConfig | Self-healing configuration with active deltas |
Returns
Enriched error string with contract context