Commit e76b38b
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- spider_agent_html
- spider_agent_types
- spider_agent
- src/automation
- tests
- spider_cli
- spider_utils
- spider_worker
- spider
11 files changed
+945
-259
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments