v0.1.0
What's new
Node.js support - The library now officially supports Node.js 20+ in addition to Cloudflare Workers.
New helpers
withStructured(full, structured)- split a large LLM response from a compact structured outputtoolFail(defaults)- typed error factory with preset default fieldsassertProviderToken(context)- narrows context type and throws if provider token is missing
Auto-wrap plain handler results - Handlers can now return a plain object; it is automatically wrapped as structured content.
New env vars
API_KEY_HEADER- customize the header name for API key auth (default:x-api-key)CUSTOM_HEADERS- JSON-encoded headers object forcustomauth strategy
Improvements
authStrategyin tool context is now typed as a union literal (oauth,bearer,api_key,custom,none)providerinfo available in context for OAuth toolssignalonAbortSignaldocumented for cancellation support- README updated to reflect Node.js runtime, new helpers, and full project structure
Tests
- Unit tests added for:
aes-gcm,echo,health,registry,types,base64,pagination bun testnow runs in CI before buildtestscript added topackage.json
Full Changelog: v0.0.8...v0.1.0