il_patch_copy
Clone a read-only PLC project into a new directory, apply a unique text patch to a specified .IL file, and quarantine stale build artifacts while verifying the source file hash to prevent concurrent edits.
Instructions
在不改动源工程的前提下,生成打了唯一匹配文本补丁的新工程副本,并把失效缓存/陈旧产物移入隔离区。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"file": "<file>",
"expected_sha256": "<expected_sha256>",
"old_text": "<old_text>",
"new_text": "<new_text>",
"dest": "<dest>"
},
"name": "il_patch_copy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest | Yes | 新工程目录(必须不存在) | |
| file | Yes | 要修改的 .IL basename | |
| project | Yes | 源工程目录(只读) | |
| new_text | Yes | 替换后的文本(LF) | |
| old_text | Yes | 必须唯一匹配的原文(LF) | |
| quarantine | No | 是否隔离派生表 | |
| expected_sha256 | Yes | 源文件当前 SHA256(防并发改动) |