Cover config defaults, 13 action types deserialization, serialization
roundtrip, credential management, and data type parsing. Also add
PartialEq derive to HandStatus for test assertions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix needs_approval field in BrowserHand::new() from false to true to
match the TOML config (hands/browser.HAND.toml says requires_approval = true).
Browser automation has security implications and should require approval.
Add 11 unit tests covering:
- Config id and enabled state
- needs_approval correctness (after fix)
- Action deserialization (Navigate, Click, Type, Scrape, Screenshot)
- Roundtrip serialization for all major action variants
- BrowserSequence builder with stop_on_error()
- Multi-step sequence execution
- FormField deserialization
Also add stop_on_error() builder method to BrowserSequence which was
referenced in the test plan but missing from the struct.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix extract_visible_text to use proper byte position tracking (pos += char_len)
instead of iterating chars without position context, which caused script/style
tag detection to fail on multi-byte content. Also adds script/style stripping
logic and raises truncation limit to 10000 chars.
Adds 9 unit tests covering:
- Config identity verification
- OutputFormat serialization round-trip
- HTML text extraction (basic, script stripping, style stripping, empty input)
- Aggregate action with empty URLs
- CollectorAction deserialization (Collect/Aggregate/Extract)
- CollectionTarget deserialization
- Add comprehensive test suite: config, types, action deserialization, URL encoding,
HTML text extraction, hand trait methods
- Fix summary field: generate rule-based summary from top search results (was always None)
- Fix extract_text_from_html: correct position tracking for script/style tag detection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add BrowserHand implementation with:
- BrowserAction enum for all automation actions
- Navigate, Click, Type, Scrape, Screenshot, FillForm
- Wait, Execute (JavaScript), GetSource, GetUrl, GetTitle
- Scroll, Back, Forward, Refresh, Hover, PressKey, Upload
- Hand trait implementation with config and execute
- Integration with existing Tauri browser commands
Browser Hand enables agents to interact with web pages
for navigation, form filling, scraping, and automation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>