feat(harvester): auto-extract and execute curl commands against box.muse-dev.online

This commit is contained in:
operator
2026-10-05 05:28:55 +00:00
parent de0a1da24d
commit 7381feb1d6
+11
View File
@@ -152,6 +152,17 @@ def parse_tool_calls(text):
calls.append((d["op"], d.get("args", {})))
except Exception:
pass
# Extract curl command tool calls (e.g. curl ... -d '{"op": "...", "args": ...}')
for m in re.finditer(r"curl\s+.*?https?://(?:box\.muse-dev\.online|100\.123\.153\.75:8444|exec\.muse-dev\.online)/exec.*?-[dD]\s+(['\"])(.*?)\1", text or "", re.DOTALL):
raw_body = m.group(2)
try:
d = json.loads(raw_body)
if isinstance(d, dict) and "op" in d:
calls.append((d["op"], d.get("args", {})))
except Exception:
pass
return calls