Skip to content

fix(eve): provide auth context to dynamic tools#954

Closed
ahwei wants to merge 1 commit into
vercel:mainfrom
ahwei:fix/dynamic-tool-auth
Closed

fix(eve): provide auth context to dynamic tools#954
ahwei wants to merge 1 commit into
vercel:mainfrom
ahwei:fix/dynamic-tool-auth

Conversation

@ahwei

@ahwei ahwei commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route live dynamic-tool execution through the same auth-capable wrapper used by static authored tools
  • preserve ctx.getToken() and ctx.requireAuth() when session/turn-scoped dynamic tools are replayed from durable metadata
  • align the public dynamic-tool executor context type with ToolContext
  • document the auth behavior and add a patch changeset

Root cause

Dynamic tools were wrapped with buildBaseToolContext, which only provides the base session/tool fields. Static authored tools use createToolExecuteWithAuth, which augments that context with inline provider auth. The live dynamic path and both durable replay paths therefore omitted getToken and requireAuth at runtime.

Validation

  • pnpm fmt
  • pnpm lint
  • pnpm typecheck
  • pnpm guard:invariants
  • pnpm docs:check
  • pnpm test
  • focused dynamic lifecycle regression suite: 41 tests passed

Fixes #946

Signed-off-by: AhWeiHENGuEi <aa9440307@gmail.com>
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@ahwei is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@AndrewBarba

Copy link
Copy Markdown
Collaborator

Thank you @ahwei for the clear report, thoughtful implementation, regression coverage, documentation, and changeset. We brought the contribution in-house as #970 so the trusted CI and preview suites can run, and preserved your credit as co-author. Closing this PR in favor of #970. We really appreciate the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic tools receive a ToolContext without ctx.getToken / ctx.requireAuth

2 participants