Breaking
- Removed
rawmode fromWebFetchTool— therawparameter is no longer accepted; content-type is now auto-detected and dispatched to the appropriate handler WebFetchToolconstructor now accepts an optionalFetchRegistryas second parameterWebToolsPackageconstructor now accepts an optionalFetchRegistryas third parameter
Features
- Content-type handler dispatch —
WebFetchToolnow auto-detects response content type and routes to a matching handler viaFetchRegistry - New content handlers:
HtmlHandler,JsonHandler,XmlHandler,CsvHandler,MarkdownHandler,PlainTextHandler,GenericTextHandler - JSON pretty-printing —
application/jsonresponses are parsed and re-serialized with 2-space indentation for readability - Automatic support for XML, CSV, and Markdown responses (returned as-is)
FetchRegistrywith lazy initialization and custom handler support — register your own handlers that take priority over built-in defaults- New public exports:
ContentHandlerRegistry(alias forFetchRegistry), all content handler classes, and theContentHandlerinterface type
Internal
- Updated
@johannes.latzel/llm-chatdependency from^0.5.0to^0.6.0 truncatefunction refactored fromweb-fetch.tsintolib/content-handlers/util.tswith improved boundary detection (paragraph → sentence → word → hard cut)- Config classes (
WebSearchConfiguration,WebFetchConfiguration) now have JSDoc annotations on all properties - All docs files rewritten: README, architecture.md, configuration.md, quickstart.md, usage.md
- New test suite for content handlers and
FetchRegistry - Various dependency bumps (
@typescript-eslint/*8.61.1→8.62.0,nanoid3.3.12→3.3.15,semver7.8.4→7.8.5,@types/node22.19.21→22.20.0) - README badge upgraded to NodeI co-branded shield
Full Changelog: v0.2.0...v0.3.0