Skip to content

feat(sdk): support per-user Vercel Connect subjects - #125

Merged
HugoRCD merged 1 commit into
mainfrom
feat/connect-per-user-subject
Aug 31, 2026
Merged

feat(sdk): support per-user Vercel Connect subjects#125
HugoRCD merged 1 commit into
mainfrom
feat/connect-per-user-subject

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • GithubConnectParams now accepts a subject; the default stays { type: 'app' } (the project's GitHub App installation), so nothing changes for existing consumers.
  • In the eve extension, connect.subject also accepts a per-caller resolver called with the tool execution context on every call — e.g. (ctx) => ({ type: 'user', id: ctx.session.auth.current!.principalId }). Multi-user apps where each user connects their own GitHub account can now mint each caller's own connection token instead of routing everyone through the shared app installation. A caller without an active connection gets UserAuthorizationRequiredError from Connect rather than silently falling back to the app token.
  • The extension threads the eve ToolContext from execute into token resolution; the token is minted lazily, per tool call. The durable-callback AST guard still passes — callbacks stay inline and only gain the ctx parameter.

Docs updated (Vercel Connect guide "Per-user tokens", eve extension page, API reference, published skill, extension README) plus a minor changeset for both packages.

Test plan

  • pnpm build, pnpm lint, pnpm typecheck, pnpm test all green (91 SDK tests, extension AST guard)
  • New test: explicit user subject passes through to getToken instead of the app default
  • Real-world check in a multi-user eve template: multi-step turn with a GitHub tool using the per-caller resolver

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-tools-docs Ready Ready Preview, v0 Aug 31, 2026 2:58pm
github-tools-test-agent Ready Ready Preview, v0 Aug 31, 2026 2:58pm

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@HugoRCD
HugoRCD merged commit c84ae07 into main Aug 31, 2026
20 checks passed
@HugoRCD
HugoRCD deleted the feat/connect-per-user-subject branch August 31, 2026 15:01
@github-actions github-actions Bot mentioned this pull request Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant