fix(runtime): harden tool-call pairing and extend run_command timeouts

Prevent invalid tool_calls replay by requiring immediate tool-result adjacency in message building, and raise run_command default and tool-level timeout ceilings to reduce install-command timeout failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-06 22:34:54 +08:00
parent 6628cd1220
commit d731288ffa
4 changed files with 26 additions and 7 deletions

View file

@ -74,7 +74,7 @@ def test_local_adapter_backend_roundtrip(tmp_path: Path, monkeypatch) -> None:
def test_run_command_tool_handler(monkeypatch) -> None:
class _Adapter:
def run_command(self, *, command: str, cwd: str | None = None, timeout: int = 30):
def run_command(self, *, command: str, cwd: str | None = None, timeout: int = 300):
return {"ok": True, "command": command, "cwd": cwd, "timeout": timeout}
monkeypatch.setattr("oclaw.runtime.tools.public.run_command_tool.get_local_adapter", lambda: _Adapter())