Skip to content

Commit e88e2b9

Browse files
j-mendezclaude
andcommitted
feat(agent): eval timeouts, spawn concurrency limiter, PageWaitStrategy, panic hardening
- Add eval_with_timeout() helper wrapping page.evaluate() with tokio timeout - Replace all `let _ = page.evaluate(...)` with eval_with_timeout + proper error handling across engine loops (TTT, WAM, NEST, CIRCLE, WS) and action handlers (Press, KeyDown, KeyUp, Scroll*, GoBack, GoForward, Reload, Hover, Select, Focus, Blur, Evaluate) - Add per-agent spawn concurrency via Semaphore on SpawnPageOptions (DEFAULT_SPAWN_CONCURRENCY=5), wired into both run_spawn_pages_with_options and run_spawn_pages_with_factory - Add PageWaitStrategy enum (Load, NetworkIdle, NetworkAlmostIdle, Selector, DomStable, Delay, None) replacing hard-coded sleeps in spawn page functions - Cap InfiniteScroll to MAX_INFINITE_SCROLL_ITERATIONS (100) - Cap WaitForWithTimeout to MAX_WAIT_FOR_TIMEOUT_MS (30s) - Fix TempStorage::default() panic — fallback to std::env::temp_dir() on initial failure instead of unconditional expect() - Fix capture_profiles.last().expect() — use Default fallback for empty slice Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e76b38b commit e88e2b9

File tree

10 files changed

+521
-86
lines changed

10 files changed

+521
-86
lines changed

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spider/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spider"
3-
version = "2.45.26"
3+
version = "2.45.27"
44
authors = ["j-mendez <jeff@spider.cloud>"]
55
description = "A web crawler and scraper, building blocks for data curation workloads."
66
repository = "https://github.com/spider-rs/spider"
@@ -120,11 +120,11 @@ features = ["serde", "headers", "dynamic-versions"]
120120

121121
[dependencies.spider_agent_types]
122122
path = "../spider_agent_types"
123-
version = "2.45.26"
123+
version = "2.45.27"
124124

125125
[dependencies.spider_agent]
126126
path = "../spider_agent"
127-
version = "2.45.26"
127+
version = "2.45.27"
128128
optional = true
129129
default-features = false
130130

spider_agent/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spider_agent"
3-
version = "2.45.26"
3+
version = "2.45.27"
44
authors = ["j-mendez <jeff@spider.cloud>"]
55
description = "A concurrent-safe multimodal agent for web automation and research."
66
repository = "https://github.com/spider-rs/spider"
@@ -28,8 +28,8 @@ parking_lot = "0.12"
2828
base64 = "0.22"
2929

3030
# Extracted types and HTML processing
31-
spider_agent_types = { version = "2.45.26", path = "../spider_agent_types" }
32-
spider_agent_html = { version = "2.45.26", path = "../spider_agent_html" }
31+
spider_agent_types = { version = "2.45.27", path = "../spider_agent_types" }
32+
spider_agent_html = { version = "2.45.27", path = "../spider_agent_html" }
3333

3434
# HTML processing (still needed for engine internals)
3535
lol_html = "2"

0 commit comments

Comments
 (0)