Commit 948b72e
feat(agent): action handler hardening — duration caps, JS escape, timeout guards
- Cap LLM-controlled durations: Wait/ClickHold ≤30s, SetViewport ≤8K, OpenPage ≤20 URLs
- Add js_escape() for safe querySelector/KeyboardEvent interpolation (defense in depth)
- Replace raw page.evaluate() with eval_with_timeout in Fill/Type/Clear actions
- Check Fill type_str result instead of swallowing errors
- WaitForNavigation: use PageWaitStrategy::Load instead of fixed sleep(1000ms)
- Navigate: wrap page.goto() with 30s timeout to prevent indefinite blocking
- Screenshot: wrap page.screenshot() with 15s timeout in both capture methods
- Semaphore: replace .ok() with match + log::warn on closed semaphore (5 sites)
- Log level: upgrade extraction/fetch/synthesis failure logs from debug to warn
chore(release): 2.45.28
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e88e2b9 commit 948b72e
File tree
11 files changed
+520
-90
lines changed- spider_agent_html
- spider_agent_types
- spider_agent
- src
- automation
- spider_cli
- spider_utils
- spider_worker
- spider
11 files changed
+520
-90
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 | |
|---|---|---|---|
| |||
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 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
| 1252 | + | |
1252 | 1253 | | |
0 commit comments