script_patch_source
Apply targeted patches to scripts without rewriting the whole file. Replace exact strings, line ranges, or regex matches in source code.
Instructions
Apply an incremental patch or replacement to a script without rewriting the entire file. Supports exact target replacement, line range replacement, or regex replacement.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | The exact string or regex pattern to locate in the script source. | |
| target | Yes | Full path or UUID of the script. | |
| isRegex | No | Whether search is a regular expression. Default false. | |
| replacement | Yes | The replacement string. | |
| allowMultiple | No | Whether to replace multiple occurrences if found. Default false. |