mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 23:30:53 +08:00
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:
parent
6628cd1220
commit
d731288ffa
4 changed files with 26 additions and 7 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue