feat!: upgrade to eve 0.32 (ai 7.0.58) - #17
Merged
Merged
Conversation
- eve ^0.32.0 + ai exact-pin 7.0.58 across all packages and demos; @ai-sdk/*
ranges re-resolved to the latest minors so a single ai copy remains.
- sandbox backend: implement eve >=0.32's required SandboxBackendHandle.stop()
(authored-runtime pause; rejects on provider errors, unlike best-effort
shutdown()).
- tool factories return new ResolvedToolDefinition (eve >=0.31 widened
execute's return type with AsyncIterable streaming snapshots; this
re-narrows it to Promise for direct callers).
- defineCachedTool drains async-generator executors and caches the final
snapshot (cached tools don't stream).
- eve-demo: agent.send is positional in eve >=0.31 (send(value), not
send({message})).
- eve-extension dist rebuilt with eve 0.32: manifest now requires 0.32's
contribution formats, so consumers need eve >=0.32.
All 69 tests pass against real Redis/Box; all example apps build.
Drain-to-final-snapshot resolution, single-run caching of the drained value, and the empty-generator rejection not poisoning the cache.
…d of draining Cached tools don't stream — narrow DefineCachedToolConfig.execute (Promise<TOutput> | NonStreaming<TOutput>) so async-generator executors fail to compile, rather than accepting and draining them at runtime. The NonStreaming ([Symbol.asyncIterator]?: never) intersection is required: with a plain union TS infers TOutput as the generator itself. Drops the finalSnapshot/isAsyncIterable runtime path, the streaming tests (replaced by a @ts-expect-error type guard), and the ResolvedToolDefinition export — factory returns are plain ToolDefinition again; direct execute callers narrow the awaited union themselves.
The type-level guard doesn't reach JS callers; without a backstop, ToolCache would serialize the generator object into Redis as the cached result. A directly returned AsyncIterable now throws a TypeError naming the tool. Only direct returns count as streams (matching eve's semantics) — a promise resolving to an iterable is just a value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All 69 tests pass against real Redis/Box; all example apps build.