M1.1: Search and fetch tools #3

Merged
archeious merged 1 commit from feat/search-fetch-tools into main 2026-04-08 20:19:22 +00:00
Collaborator

Summary

  • tavily_search() — Tavily API wrapper, returns SearchResult dataclasses with SHA-256 content hashing
  • fetch_url() — async URL fetch with HTML text extraction, content hashing, graceful error handling
  • _extract_text() — simple HTML → clean text (strip scripts/styles/tags, decode entities)
  • 18 tests (all mocked, no real API calls)

Refs: #1

## Summary - `tavily_search()` — Tavily API wrapper, returns `SearchResult` dataclasses with SHA-256 content hashing - `fetch_url()` — async URL fetch with HTML text extraction, content hashing, graceful error handling - `_extract_text()` — simple HTML → clean text (strip scripts/styles/tags, decode entities) - 18 tests (all mocked, no real API calls) Refs: #1
claude-code added 1 commit 2026-04-08 20:19:11 +00:00
- tavily_search(): Tavily API wrapper returning SearchResult dataclasses
  with content hashing (raw_content preferred, falls back to summary)
- fetch_url(): async URL fetch with HTML text extraction, content hashing,
  and graceful error handling (timeout, HTTP errors, connection errors)
- _extract_text(): simple HTML → clean text (strip scripts/styles/tags,
  decode entities, collapse whitespace)
- _sha256(): SHA-256 content hashing with 'sha256:' prefix for traces

18 tests: hashing, HTML extraction, mocked Tavily search, mocked async
fetch (success, timeout, HTTP error, hash consistency).

Refs: archeious/marchwarden#1

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
archeious merged commit 851fed6a5f into main 2026-04-08 20:19:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/marchwarden#3
No description provided.