Releases: obetomuniz/web-ai-sdk
Release list
@web-ai-sdk/webmcp@0.11.1
Patch Changes
- 827bb4e: Accept native object-valued discovery schemas from Chrome 155.0.8051.0 while retaining legacy trial strings. RegisteredTool.inputSchema is now optional object | string in vanilla and React. Discovery preserves schemas and metadata unchanged; use a typeof guard before consuming mixed trial values.
@web-ai-sdk/all@0.9.4
Patch Changes
- Updated dependencies [827bb4e]
- @web-ai-sdk/webmcp@0.11.1
@web-ai-sdk/webmcp@0.11.0
Minor Changes
- 19d4e43: Add the optional consequentialHint tool annotation. Preserve explicit values through registration and discovery, and document that the hint does not authorize execution or guarantee confirmation.
@web-ai-sdk/all@0.9.3
Patch Changes
- Updated dependencies [19d4e43]
- @web-ai-sdk/webmcp@0.11.0
@web-ai-sdk/webmcp@0.10.0
Minor Changes
- 7c45464: Expose native WebMCP execution abort signals to registered tool callbacks.
@web-ai-sdk/all@0.9.2
Patch Changes
- Updated dependencies [7c45464]
- @web-ai-sdk/webmcp@0.10.0
@web-ai-sdk/webmcp@0.9.1
Patch Changes
- e7ccb26: Isolate failed-registration cleanup from same-name replacement tools. Browser builds with the pre-WebMCP-PR-#240 ordering attach the signal's unregister algorithm before validating
exposedTo, so aborting the signal of a rejected registration could unregister a later valid tool with the same name. Cleanup returned byregisterTool()(and React unmount viauseWebMCP) no longer aborts once the native registration has rejected; cancelling a pending registration and unregistering a successful one are unchanged, and cleanup stays idempotent.
@web-ai-sdk/all@0.9.1
Patch Changes
- Updated dependencies [e7ccb26]
- @web-ai-sdk/webmcp@0.9.1
@web-ai-sdk/writer@0.7.0
Minor Changes
- de9b36b: Add TTL and forced refresh to result caches. Built-in "session" / "local" entries now use a versioned envelope and expire after one hour (DEFAULT_CACHE_TTL_MS). New cacheTtl option overrides the TTL per call; new cacheRefresh option skips the cache read and replaces the value after a successful run. Legacy raw entries and malformed envelopes count as misses and are replaced. Custom { get, set } caches keep their contract and own their expiry policy.
- 8644ed2: Add intent-driven prepare and release leases to every task package. New prepareLanguageModel / prepareSummarizer / prepareTranslator / prepareLanguageDetector / prepareWriter / prepareRewriter / prepareProofreader start native session creation when user intent is clear and return a lease ({ ready, release }). The matching operation reuses the prepared session without a second create. Leases pin sessions against LRU eviction; release is idempotent and the final release destroys the session once no other lease or in-flight call uses it. Session cache controls are now uniform: prompt gains configureLanguageModelCache / clearLanguageModelSession(s), and summarizer now exports its configureSummarizerCache / clearSummarizerSession(s). Clearing detaches leased sessions and destroys them when the last pin drops. Breaking: writer, rewriter, and proofreader no longer export getOrCreateWriter / getOrCreateRewriter / getOrCreateProofreader, getWriterApi / getRewriterApi / getProofreaderApi, defaultCacheKey, or resolveCache; use the prepare lease and cache controls instead.
@web-ai-sdk/translator@0.7.0
Minor Changes
-
de9b36b: Add TTL and forced refresh to result caches. Built-in "session" / "local" entries now use a versioned envelope and expire after one hour (DEFAULT_CACHE_TTL_MS). New cacheTtl option overrides the TTL per call; new cacheRefresh option skips the cache read and replaces the value after a successful run. Legacy raw entries and malformed envelopes count as misses and are replaced. Custom { get, set } caches keep their contract and own their expiry policy.
-
8644ed2: Add intent-driven prepare and release leases to every task package. New prepareLanguageModel / prepareSummarizer / prepareTranslator / prepareLanguageDetector / prepareWriter / prepareRewriter / prepareProofreader start native session creation when user intent is clear and return a lease ({ ready, release }). The matching operation reuses the prepared session without a second create. Leases pin sessions against LRU eviction; release is idempotent and the final release destroys the session once no other lease or in-flight call uses it. Session cache controls are now uniform: prompt gains configureLanguageModelCache / clearLanguageModelSession(s), and summarizer now exports its configureSummarizerCache / clearSummarizerSession(s). Clearing detaches leased sessions and destroys them when the last pin drops. Breaking: writer, rewriter, and proofreader no longer export getOrCreateWriter / getOrCreateRewriter / getOrCreateProofreader, getWriterApi / getRewriterApi / getProofreaderApi, defaultCacheKey, or resolveCache; use the prepare lease and cache controls instead.
-
bfcb0f1: Add streaming and native operation cancellation to the Translator wrapper.
translate()accepts anonUpdatecallback and consumes the nativetranslateStreaming()method when the implementation provides it. Updates deliver the cumulative translation so far, not raw deltas. Implementations without streaming deliver the one-shot result as a single final update.The caller's
AbortSignalis now forwarded to the native translation operation. Aborting rejects withAbortError, keeps shared sessions reusable for other callers, and never writes partial output to the result cache.useTranslator()reports a new"streaming"status and exposes the cumulative partial output while chunks arrive.