Repository navigation
Pluggable source control providers (custom CLI-backed providers for unsupported hosts) #13112
Replies: 5 comments
|
+1. Here's a concrete case: Repopack is a self-hosted git and agent-task platform. Its remotes look like What we do for now: Repopack serves a PR-shaped alias, The CLI contract you describe would close that gap for us. Our CLI already returns what a provider would need (
The existing |
|
+1. Here's a concrete case: Azure DevOps Server (on-prem), which #14105 was folded into. The built-in Azure provider goes through I've run a Server provider in a fork (Jonathanm10/t3code-azure-nightly) against a corporate server for a few days. What it needed:
The cost of keeping it in a fork is the one this discussion describes. The provider kind and settings sit in shared contracts, so the fork needed six hand-resolved upstream merges in three days to keep releasing. Which direction would you accept?
Once you pick one, I can propose a small first PR scoped to it. |
|
+1 from another Azure DevOps Server shop, with two details that differ from the fork described above. Setup: Azure DevOps Server 2022.2 on-prem, domain-joined Windows 11 clients, T3 Code desktop 0.1.2. We want the same read slice: find the PR for a thread's branch, show its status, and settle the thread on merge. Since #14626 we can link PRs by URL, but they stay
Either direction (a pluggable contract or a first-class provider) works for us, and read operations alone would cover what we need. |
|
+1 from a third Azure DevOps Server shop. We need the same read-only part as the comments above. Our setup: an on-prem Azure DevOps Server 2022, with an upgrade to the latest release planned soon. The collection is served at the site root, What we need: find the PR for a thread's branch, show its title and state, and settle the thread when the PR is merged or abandoned. Creating, merging and reviewing PRs can stay hidden. What we can do: we're happy to implement this read-only part, using the REST API with a PAT and optionally the git credential, in whichever direction you prefer: on the pluggable contract proposed here, or as a first-class Azure DevOps Server provider. A short note on the direction and scope you'd accept is enough for us to start with a small first PR. |
|
A read-only first slice, and one contract for the hosts that keep landing here Since #17739 and the source-control boundary stack (#23992–#24288), the provider kind is an open slug and each forge is a package that answers neutral hooks. What stays closed is the list: drivers and client definitions are compiled in, so any other host is Proposal. One more built-in driver, flowchart LR
C["Clients"] -->|WebSocket| S["T3 server<br/>PullRequestService"]
S --> D["external-command driver<br/>(one per configured entry)"]
D -->|"verb + JSON on stdin"| X["adapter CLI"]
X -->|"one JSON object, exit 0–4"| D
X -->|"its own credentials"| H["source control host"]
Safety. The entry lives in server settings, gated by Clients. The entry carries a small data descriptor: label, terminology, hosts and path templates such as Slices. 0: make the server's definition registry a service (no behaviour change; today it is a module constant read by ~25 files). 1, behind a flag: the driver; a configured host wins over built-in path heuristics ( Full design (contract v1 with JSON examples, errors and limits, configuration, threat model and safeguards, slices): https://gist.github.com/jean-humann/460ae76fc8d5d7bd67ed761c2d056aea @juliusmarminge, would you accept slices 0 and 1 as scoped, behind a flag, with you free to take them over? It is the driver a future plugin would register, not a competing runtime. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Both the VCS layer (
VcsDriverKind:git,jj) and the source control provider layer (SourceControlProviderKind:github,gitlab,forgejo,azure-devops,bitbucket) are closed enums. The provider is picked from a hardcoded hostname match on the remote URL. A repository hosted on anything else, such as an internal or less common code review system, is classified asunknown, and the change request features (create, list, status, checkout) don't work for it.Today the only way to get support is to add it to core or keep a fork. A fork is painful because the enums sit in
packages/contractsand are shared by the server and the client, so almost every nightly conflicts with it.Proposal
Add a minimal extension point for source control providers (and, possibly later, VCS drivers) that doesn't require changes to core. For example:
create,list,view,status, andcheckout, much like the built-in providers already wrapgh,glab, andazunknowntodayThis is a narrower, concrete slice of the general extension system discussed in #6714, and it relates to the VCS pluggability question raised in #7033.
Why
It lets people use T3 Code with hosting and review systems that will never get first-class support, without forking and without adding maintenance cost to core.
All reactions