apply_fuzzy_patch
Apply fuzzy code search-and-replace patches that tolerate indentation shifts, whitespace drift, and minor line mutations, ensuring edits succeed despite imperfect matches.
Instructions
[Cost: $0.0005 USDC on Base & Solana] Resilient fuzzy code search/replace patcher.
Heals indentation shifts, whitespace drift, and minor line mutations that break LLM edits.
Args:
original_code: Full original file or source string.
search_target: Code snippet or block to locate and replace.
replacement_code: New code content to substitute in.
min_similarity: Fuzzy line tolerance threshold (0.5-1.0, default: 0.75).
language: Optional language for syntax validation ('python', 'json').
payment_signature: Optional x402 Base/Solana USDC transaction hash (defaults to developer mock key).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ||
| original_code | Yes | ||
| search_target | Yes | ||
| min_similarity | No | ||
| replacement_code | No | ||
| payment_signature | No |