feat: target the call's repository installation by default for Connect tokens - #161
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
HugoRCD
force-pushed
the
feat/connect-per-repository-default
branch
from
September 24, 2026 09:11
4200020 to
d1f924e
Compare
Merged
This branch was successfully deployed
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.
🔗 Linked issue
Follow-up to #158.
📚 Description
#158 made per-repository Connect token minting an opt-in (
connect: perRepository()). For an app-subject token there is no case where pinning the token to a repository other than the call's target is wanted, so the static default was the broken configuration and the helper the only correct one. It also forced every eve agent to depend on@github-tools/sdkjust to import it.This PR makes it the default and removes the helper. #158 has not been released, so
perRepositorynever shipped and nothing is deprecated.owner/repo(aftercontextdefaults) getauthorizationDetails: [{ type: 'github_app_installation', org: owner, repositories: [repo] }]. Staticconnectparams merge in. Calls without a repository target and calls outside a tool keep the connector's default installation.installationId,authorizationDetailsorrepositoriesin the resolved params pins the installation and is never overridden. User subjects are not targeted: a user token already spans installations.githubExtension({ connector })with noconnectnow works on a GitHub App installed on several accounts. Scope derivation frompreset/include/excludeis unchanged; Connect caching is unchanged.perRepositoryand its tests are deleted; the feat: mint Connect tokens per tool call for the target repository #158 changeset is trimmed accordingly so the combined release notes describe only what ships. Docs, READMEs and the published skill reference describe the default and how to pin an installation.Runtime cost: one Connect account lookup the first time each
(owner, repo)is seen per process, then cache hits. Single-installation connectors resolve to the same installation they used before.Tests cover: default applied across two owners, no target / no call untouched, user subject untouched, each explicit pin winning, resolver params targeted, owner-naming installation error with no
connect.pnpm lint,pnpm typecheck,pnpm testpass; SDK, extension and docs build.examples/eveandapps/chatfail the same way onmain(missing optionalmicrosandbox, workflow graph heap).📝 Checklist