Repository navigation
refactor: platform provider seam (GitHub only for now) - #36
Merged
Merged
Conversation
Everything the runner needs from the hosting platform now goes through `src/providers/`: issues, labels, comments, pull requests, auto-merge, the claim lock and the incident latch. `github.ts` remains the only implementation and is wrapped by `providers/github.ts`; the runner resolves it once via `resolveProvider()` (`EASYGH_PROVIDER`, default `github`). - capabilities flags make the GitHub-only parts explicit (app-mode discovery, atomic tag-ref lock, auto-merge, draft PRs, incident latch) so a future GitLab/Gitea provider can degrade instead of pretending. - unknown providers fail loudly with a pointer to src/providers/<name>.ts and docs/portability.md; there is no silent fallback. - main.ts keeps the model "provider" (deepseek/...) separate from the platform "provider" (github): the platform object is `platform`. - tests: registry, default, env selection, unknown provider, registering a custom provider (67 total).
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.
按计划只做抽象,不实现 GitLab/Gitea。
agent-runner/src/providers/:types.ts(接口 + capabilities)、github.ts(唯一实现)、index.ts(注册表 +resolveProvider)。main.ts的 Issue/标签/评论/PR/auto-merge/锁/事故闭锁全部走 seam;EASYGH_PROVIDER选实现,未实现的平台明确报错、不静默回退。capabilities标记,未来平台可降级。platform。后续接 GitLab/Gitea 只需实现
Provider+ 提供发现仓库机制,见docs/portability.md§4。