Skip to content

Commit e76b38b

Browse files
j-mendezclaude
andcommitted
feat(agent): action feedback, partial result preservation, and JS error capture
Three reliability improvements to the web automation engine: 1. Action feedback to LLM: execute_single_action now returns ActionOutcome with structured error messages (e.g., "selector not found: #btn"). Failed action outcomes are injected as PREVIOUS ACTION RESULTS into the next round's prompt, enabling the model to self-correct. 2. Partial result preservation: LLM inference failures no longer propagate with `?`. Instead, accumulated extracted data, usage stats, and spawn pages from prior rounds are returned in AutomationResult with success=false, preventing data loss on transient API errors. 3. Evaluate JS error capture: JavaScript execution errors are now caught and surfaced through the action feedback system instead of being silently swallowed, giving the model visibility into its own JS mistakes. All changes use stack-local Vec/String/Option only — no mutexes, no Arc, no blocking. 207 tests pass with zero regressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 443188f commit e76b38b

File tree

11 files changed

+945
-259
lines changed

11 files changed

+945
-259
lines changed

Cargo.lock

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async fn main() {
100100
101101
## Benchmarks
102102

103-
Crawling 185 pages on `rsseau.fr` ([source](./benches/BENCHMARKS.md), 10 samples averaged):
103+
Crawling 185 pages ([source](./benches/BENCHMARKS.md), 10 samples averaged):
104104

105105
**Apple M1 Max** (10-core, 64 GB RAM):
106106

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.25"
3+
version = "2.45.26"
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.25"
123+
version = "2.45.26"
124124

125125
[dependencies.spider_agent]
126126
path = "../spider_agent"
127-
version = "2.45.25"
127+
version = "2.45.26"
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.25"
3+
version = "2.45.26"
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.25", path = "../spider_agent_types" }
32-
spider_agent_html = { version = "2.45.25", path = "../spider_agent_html" }
31+
spider_agent_types = { version = "2.45.26", path = "../spider_agent_types" }
32+
spider_agent_html = { version = "2.45.26", path = "../spider_agent_html" }
3333

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

0 commit comments

Comments
 (0)