diff --git a/bin/response-harvester.py b/bin/response-harvester.py index ff5d3e3..4f02fc8 100755 --- a/bin/response-harvester.py +++ b/bin/response-harvester.py @@ -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