Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/agentenv-protocol/tests/test_computer_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,12 @@ async def test_a_screenshot_that_fails_after_the_input_reports_the_input_as_done

@pytest.mark.asyncio
async def test_the_automatic_release_waits_out_a_busy_queue():
driver = FakeDriver(settings=ComputerSettings(max_hold_ms=50, queue_wait_s=0.05))
# A hold longer than a loaded runner's round trip lets the drag take the queue first; the drag outlasts the hold.
driver = FakeDriver(settings=ComputerSettings(max_hold_ms=300, queue_wait_s=0.05))
async with mcp_session(driver) as session:
await _shot(session)
await session.call_tool("computer_keyboard_down", {"keys": ["Alt"]})
driver.slow["drag"] = 0.4
driver.slow["drag"] = 1.0
await session.call_tool("computer_drag", {"path": [[1, 1], [9, 9]]})
with anyio.fail_after(5):
while driver.screen.held:
Expand Down
3 changes: 2 additions & 1 deletion src/agent_env/agents/agents/claude-code/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ if ! on 'for shell in bash zsh; do command -v "$shell" >/dev/null && exit 0; don
fi

sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; }
fetch() { curl -fsSL --retry 3 "$1" -o "$2"; }
# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92).
fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; }
checked() { # checked FILE SHA256: FILE is what was published, or the install stops
[ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; }
}
Expand Down
3 changes: 2 additions & 1 deletion src/agent_env/agents/agents/codex/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ if ! on 'command -v bash >/dev/null'; then
fi

sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; }
fetch() { curl -fsSL --retry 3 "$1" -o "$2"; }
# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92).
fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; }
checked() { # checked FILE SHA256: FILE is what was published, or the install stops
[ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; }
}
Expand Down
3 changes: 2 additions & 1 deletion src/agent_env/agents/agents/gemini/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ if ! on 'command -v bash >/dev/null'; then
fi

sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; }
fetch() { curl -fsSL --retry 3 "$1" -o "$2"; }
# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92).
fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; }
checked() { # checked FILE SHA256: FILE is what was published, or the install stops
[ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; }
}
Expand Down
3 changes: 2 additions & 1 deletion src/agent_env/agents/agents/letta-code/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ if ! on 'command -v git >/dev/null'; then
fi

sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; }
fetch() { curl -fsSL --retry 3 "$1" -o "$2"; }
# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92).
fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; }
checked() { # checked FILE SHA256: FILE is what was published, or the install stops
[ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; }
}
Expand Down
3 changes: 2 additions & 1 deletion src/agent_env/agents/agents/opencode/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ if ! on 'command -v bash >/dev/null'; then
fi

sha256() { if command -v sha256sum >/dev/null; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d' ' -f1; }
fetch() { curl -fsSL --retry 3 "$1" -o "$2"; }
# One more go when curl fails: --retry passes over some transient failures, such as a reset HTTP/2 stream (exit 92).
fetch() { curl -fsSL --retry 3 "$1" -o "$2" || { sleep 2; curl -fsSL --retry 3 "$1" -o "$2"; }; }
checked() { # checked FILE SHA256: FILE is what was published, or the install stops
[ "$(sha256 "$1")" = "$2" ] || { echo "$(basename "$1") doesn't match its published checksum" >&2; exit 1; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ async def test_a_reply_waits_its_delay_and_hours_and_its_writes_name_the_fire(it

paced = [e for e in state["events"] if e["kind"] in ("delayed", "deferred", "action_ok")]
assert [e["kind"] for e in paced] == ["delayed", "deferred", "action_ok"]
delayed, deferred, _ = paced
_, deferred, _ = paced
assert deferred["until"] == "2026-10-14T09:00:00Z"
assert (_virtual(deferred) - _virtual(delayed)).total_seconds() >= 120
detected = next(e for e in state["events"] if e["kind"] == "detected" and e["trigger_id"] == "bob-hears-solver")
# The delay runs from the provoking call, read as it's detected, whose stamp can trail that reading a little at 60x.
assert (_virtual(deferred) - _virtual(detected)).total_seconds() >= 119
calls = [e for e in trajectory if e.get("event_type") == "tool_call"]
cause = [{"trigger_id": "bob-hears-solver", "action_index": 0, "fire": 1}]
assert ("list_items", "default", None) in [(e["tool_call"]["function_name"], e["role"], e.get("caused_by"))
Expand Down
Loading