Skip to content

feat: target the call's repository installation by default for Connect tokens - #161

Merged
HugoRCD merged 1 commit into
mainfrom
feat/connect-per-repository-default
Sep 24, 2026
Merged

HugoRCD merged 1 commit into
mainfrom
feat/connect-per-repository-default

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

🔗 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/sdk just to import it.

This PR makes it the default and removes the helper. #158 has not been released, so perRepository never shipped and nothing is deprecated.

  • App-subject tokens for a call with owner / repo (after context defaults) get authorizationDetails: [{ type: 'github_app_installation', org: owner, repositories: [repo] }]. Static connect params merge in. Calls without a repository target and calls outside a tool keep the connector's default installation.
  • An explicit installationId, authorizationDetails or repositories in the resolved params pins the installation and is never overridden. User subjects are not targeted: a user token already spans installations.
  • githubExtension({ connector }) with no connect now works on a GitHub App installed on several accounts. Scope derivation from preset / include / exclude is unchanged; Connect caching is unchanged.
  • perRepository and 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 test pass; SDK, extension and docs build. examples/eve and apps/chat fail the same way on main (missing optional microsandbox, workflow graph heap).

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
github-tools-docs Ready Ready Preview, v0 Sep 24, 2026 9:12am UTC
github-tools-test-agent Ready Ready Preview, v0 Sep 24, 2026 9:12am UTC

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@HugoRCD
HugoRCD force-pushed the feat/connect-per-repository-default branch from 4200020 to d1f924e Compare September 24, 2026 09:11
@HugoRCD
HugoRCD merged commit db141c9 into main Sep 24, 2026
14 of 16 checks passed
@HugoRCD
HugoRCD deleted the feat/connect-per-repository-default branch September 24, 2026 09:11
@github-actions github-actions Bot mentioned this pull request Sep 24, 2026

This branch was successfully deployed

2 active deployments
Preview – github-tools-docs — d1f924e0 Deployed Sep 24, 2026 by vercel[bot]
Preview – github-tools-test-agent — d1f924e0 Deployed Sep 24, 2026 by vercel[bot]
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