Skip to content

v0.1.0

Choose a tag to compare

@fuongz fuongz released this 05 Apr 05:19
· 30 commits to main since this release
a253b38

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 output
  • toolFail(defaults) - typed error factory with preset default fields
  • assertProviderToken(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 for custom auth strategy

Improvements

  • authStrategy in tool context is now typed as a union literal (oauth, bearer, api_key, custom, none)
  • provider info available in context for OAuth tools
  • signal on AbortSignal documented 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 test now runs in CI before build
  • test script added to package.json

Full Changelog: v0.0.8...v0.1.0