refactor(sdk): remove ctx.yavio injection in favor of yavio singleton#3
Merged
johannmachemer merged 2 commits intomainfrom Feb 26, 2026
Merged
Conversation
The SDK previously offered two ways to access the tracking context:
`ctx.yavio` (injected into the tool handler's extra parameter) and the
`yavio` module singleton. Both resolved to the same AsyncLocalStorage
store, making ctx.yavio redundant. This removes the injection and
establishes the singleton as the single access pattern.
BREAKING CHANGE: `ctx.yavio` is no longer injected into tool handlers.
Use `import { yavio } from "@yavio/sdk"` instead.
Add pnpm.overrides to bump transitive deps hono (>=4.12.2) and rollup (>=4.59.0) to resolve newly disclosed CVEs (GHSA-xh87-mx6m-69f3, GHSA-mw96-cpmx-2vgc).
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.
Summary
ctx.yavioinjection from tool handler'sextraparameter inproxy.tsyaviomodule singleton (viaAsyncLocalStorage) as the single access pattern for tracking contextBreaking Change
ctx.yaviois no longer available in tool handlers. Useimport { yavio } from "@yavio/sdk"instead.Test plan
pnpm turbo run build typecheck lint test --filter=@yavio/sdk)