@devries-cameron20 / t3code-1 / commits / 507361bc73
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

refactor(source-control): GitHub lives in @t3tools/source-control-github (#17607)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 9, 2026 at 14:50 UTC 507361bc7301982279b9f115bbae8f22268ce9d6
51 files changed +411 -195
apps/server/package.json
+1
@@ -49,6 +49,7 @@
49 "@t3tools/source-control-bitbucket": "workspace:*",
50 "@t3tools/source-control-core": "workspace:*",
51 "@t3tools/source-control-forgejo": "workspace:*",
52 + "@t3tools/source-control-github": "workspace:*",
53 "@t3tools/source-control-gitlab": "workspace:*",
54 "effect": "catalog:",
55 "jose": "catalog:",
apps/server/scripts/evaluate-thread-titles.ts
+1 -4
@@ -23,7 +23,6 @@ import {
23 } from "@t3tools/provider-core/server/threadTitleContext";
24 import * as ThreadTitleLinks from "../src/textGeneration/ThreadTitleLinks.ts";
25 import * as SourceControlProviderRegistry from "../src/sourceControl/SourceControlProviderRegistry.ts";
26 -import * as GitHubApi from "../src/sourceControl/GitHubApi.ts";
26 import * as SourceControlBuiltInDrivers from "../src/sourceControl/builtInDrivers.ts";
27 import * as ServerSettings from "../src/serverSettings.ts";
28 import * as VcsProcess from "../src/vcs/VcsProcess.ts";
@@ -147,9 +146,7 @@ await Effect.runPromise(
146 Layer.mergeAll(
147 ProcessRunner.layer,
148 SourceControlProviderRegistry.layer.pipe(
150 - Layer.provide(
151 - Layer.mergeAll(GitHubApi.layerWithDependencies, SourceControlBuiltInDrivers.layer),
152 - ),
149 + Layer.provide(SourceControlBuiltInDrivers.layer),
150 // Default settings: no saved Bitbucket token, gh's own GitHub account choice.
151 Layer.provide(ServerSettings.layerTest()),
152 Layer.provide(VcsDriverRegistry.layer.pipe(Layer.provide(VcsProjectConfig.layer))),
apps/server/scripts/measure-pr-preview.ts
+23 -10
@@ -10,14 +10,19 @@ import * as Option from "effect/Option";
10 import * as Schema from "effect/Schema";
11 import { FetchHttpClient } from "effect/http";
12
13 -import * as GitHubPullRequestApi from "../src/pullRequest/GitHubPullRequestApi.ts";
14 -import * as GitHubPullRequestProvider from "../src/pullRequest/GitHubPullRequestProvider.ts";
15 -import * as GitHubApi from "../src/sourceControl/GitHubApi.ts";
16 -import * as GitHubCredentials from "../src/sourceControl/GitHubCredentials.ts";
13 +import * as GitHubPullRequestApi from "@t3tools/source-control-github/server/GitHubPullRequestApi";
14 +import * as GitHubPullRequestProvider from "@t3tools/source-control-github/server/GitHubPullRequestProvider";
15 +import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
16 +import * as GitHubCredentials from "@t3tools/source-control-github/server/GitHubCredentials";
17 +import * as ServerConfig from "../src/config.ts";
18 import * as ServerSettings from "../src/serverSettings.ts";
18 -import * as GitHubQuota from "../src/sourceControl/githubQuota.ts";
19 +import * as GitHubQuota from "@t3tools/source-control-github/server/GitHubQuota";
20 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
21 +import * as ServerSourceControlHost from "../src/sourceControl/ServerSourceControlHost.ts";
22 +import * as GitVcsDriver from "../src/vcs/GitVcsDriver.ts";
23 +import * as VcsDriverRegistry from "../src/vcs/VcsDriverRegistry.ts";
24 import * as VcsProcess from "../src/vcs/VcsProcess.ts";
25 +import * as VcsProjectConfig from "../src/vcs/VcsProjectConfig.ts";
26
27 const [repository, ...numbers] = process.argv.slice(2);
28 if (!repository || numbers.length === 0 || numbers.some((number) => !/^\d+$/.test(number))) {
@@ -41,6 +46,17 @@ function withRateLimit(query: string): string {
46 : `${query.slice(0, end)}\n rateLimit { cost }\n${query.slice(end)}`;
47 }
48
49 +// The server's host port over default settings: gh's own account choice, no saved token.
50 +const sourceControlHost = ServerSourceControlHost.layer.pipe(
51 + Layer.provide(VcsDriverRegistry.layer.pipe(Layer.provide(VcsProjectConfig.layer))),
52 + Layer.provide(GitVcsDriver.layer),
53 + Layer.provide(ServerSettings.layerTest()),
54 + // A scratch state directory, so nothing here touches a real T3 home.
55 + Layer.provide(ServerConfig.layerTest(process.cwd(), { prefix: "t3-measure-pr-preview-" })),
56 + Layer.provideMerge(VcsProcess.layer),
57 + Layer.provideMerge(NodeServices.layer),
58 +);
59 +
60 const measuredApi = Layer.effect(
61 GitHubApi.GitHubApi,
62 Effect.gen(function* () {
@@ -73,18 +89,15 @@ const measuredApi = Layer.effect(
89 });
90 }),
91 ).pipe(
76 - Layer.provide(GitHubCredentials.layer.pipe(Layer.provide(ServerSettings.layerTest()))),
92 + Layer.provide(GitHubCredentials.layer),
93 Layer.provide(GitHubQuota.layer),
94 Layer.provide(SourceControlRateLimit.layer),
95 Layer.provide(FetchHttpClient.layer),
80 - Layer.provide(VcsProcess.layer),
81 - Layer.provide(NodeServices.layer),
96 );
97
98 const services = GitHubPullRequestApi.layer.pipe(
99 Layer.provideMerge(measuredApi),
86 - Layer.provideMerge(VcsProcess.layer),
87 - Layer.provideMerge(NodeServices.layer),
100 + Layer.provideMerge(sourceControlHost),
101 );
102
103 const encodeJson = Schema.encodeSync(Schema.fromJsonString(Schema.Unknown));
apps/server/src/assets/AssetAccess.test.ts
+1 -1
@@ -35,7 +35,7 @@ import { ASSET_ROUTE_PREFIX, issueAssetUrl, resolveAsset } from "./AssetAccess.t
35 import * as NativeAppIconResolver from "./NativeAppIconResolver.ts";
36 import { openMediaFile } from "./MediaFile.ts";
37 import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
38 -import * as GitHubCredentials from "../sourceControl/GitHubCredentials.ts";
38 +import * as GitHubCredentials from "@t3tools/source-control-github/server/GitHubCredentials";
39 import { githubMediaResponse } from "./GitHubMediaFetch.ts";
40
41 vi.mock("node:fs/promises", async (importOriginal) => {
apps/server/src/assets/GitHubMediaFetch.ts
+1 -1
@@ -12,7 +12,7 @@ import {
12 type HttpClientResponse,
13 } from "effect/http";
14
15 -import * as GitHubCredentials from "../sourceControl/GitHubCredentials.ts";
15 +import * as GitHubCredentials from "@t3tools/source-control-github/server/GitHubCredentials";
16
17 /**
18 * Exactly the hosts the credential is for. Everything a redirect leads to — the presigned
apps/server/src/git/GitManager.test.ts
+1 -1
@@ -43,7 +43,7 @@ import {
43 ThreadId,
44 } from "@t3tools/contracts";
45 import * as DateTime from "effect/DateTime";
46 -import { decodeGitHubPullRequestListJson } from "../sourceControl/gitHubPullRequests.ts";
46 +import { decodeGitHubPullRequestListJson } from "@t3tools/source-control-github/server/gitHubPullRequests";
47 import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli";
48 import type * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
49 import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
apps/server/src/pullRequest/PullRequestProviderRateLimit.test.ts
+2 -2
@@ -2,12 +2,12 @@ import { assert, it } from "@effect/vitest";
2
3 import * as AzureDevOpsCli from "@t3tools/source-control-azure-devops/server/AzureDevOpsCli";
4 import * as BitbucketApi from "@t3tools/source-control-bitbucket/server/BitbucketApi";
5 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
5 +import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
6 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
7 import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli";
8 import { azureDevOpsProviderFailure } from "@t3tools/source-control-azure-devops/server/AzureDevOpsPullRequestProvider";
9 import { bitbucketProviderFailure } from "@t3tools/source-control-bitbucket/server/BitbucketPullRequestProvider";
10 -import { gitHubProviderFailure } from "./GitHubPullRequestProvider.ts";
10 +import { gitHubProviderFailure } from "@t3tools/source-control-github/server/GitHubPullRequestProvider";
11 import { gitLabProviderFailure } from "@t3tools/source-control-gitlab/server/GitLabPullRequestProvider";
12
13 const cause = new Error("redacted provider failure");
apps/server/src/pullRequest/PullRequestProviderRegistry.ts
+3 -16
@@ -3,9 +3,6 @@ import * as Effect from "effect/Effect";
3 import * as Layer from "effect/Layer";
4 import type { SourceControlProviderKind } from "@t3tools/contracts";
5
6 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
7 -import * as GitHubPullRequestApi from "./GitHubPullRequestApi.ts";
8 -import * as GitHubPullRequestProvider from "./GitHubPullRequestProvider.ts";
6 import * as BuiltInDrivers from "../sourceControl/builtInDrivers.ts";
7 import type { PullRequestProviderApi } from "@t3tools/source-control-core/server/PullRequestProvider";
8
@@ -36,24 +33,14 @@ export function fromProviders(
33 * @public Service construction is part of the canonical Effect module API.
34 */
35 export const make = Effect.gen(function* () {
39 - const providers = yield* Effect.all([GitHubPullRequestProvider.make]);
36 const drivers = yield* Effect.forEach(BuiltInDrivers.BUILT_IN_SOURCE_CONTROL_DRIVERS, (driver) =>
37 driver.make.pipe(Effect.map((instance) => instance.pullRequests)),
38 );
43 - return fromProviders([
44 - ...providers,
45 - ...drivers.filter((provider): provider is PullRequestProviderApi => provider !== null),
46 - ]);
39 + return fromProviders(
40 + drivers.filter((provider): provider is PullRequestProviderApi => provider !== null),
41 + );
42 });
43
44 export const layer = Layer.effect(PullRequestProviderRegistry, make).pipe(
50 - Layer.provide(
51 - GitHubPullRequestApi.layer.pipe(
52 - Layer.provide(
53 - // Built here too, so a registry built alone still has one budget and pause per host.
54 - GitHubApi.layerWithDependencies,
55 - ),
56 - ),
57 - ),
45 Layer.provide(BuiltInDrivers.layer),
46 );
apps/server/src/pullRequest/PullRequestService.ts
+1 -1
@@ -77,7 +77,7 @@ import {
77 import { resolveProjectSettings } from "@t3tools/shared/projectSettings";
78 import { detectSourceControlProviderFromRemoteUrl } from "@t3tools/shared/sourceControl";
79
80 -import { AllowGitHubReserve } from "../sourceControl/GitHubApi.ts";
80 +import { AllowGitHubReserve } from "@t3tools/source-control-github/server/GitHubApi";
81 import * as ProjectService from "../project/ProjectService.ts";
82 import * as ServerSettings from "../serverSettings.ts";
83 import * as PullRequestFilesViewed from "../persistence/PullRequestFilesViewed.ts";
apps/server/src/server.ts
+3 -4
@@ -52,7 +52,6 @@ import * as ProviderHostLive from "./provider/ProviderHostLive.ts";
52 import * as AcpRegistrySupport from "@t3tools/provider-acp-registry/server/AcpRegistrySupport";
53 import * as CheckpointDiffQuery from "./checkpointing/CheckpointDiffQuery.ts";
54 import * as CheckpointStore from "./checkpointing/CheckpointStore.ts";
55 -import * as GitHubApi from "./sourceControl/GitHubApi.ts";
55 import * as ForgejoCli from "@t3tools/source-control-forgejo/server/ForgejoCli";
56 import * as SourceControlBuiltInDrivers from "./sourceControl/builtInDrivers.ts";
57 import * as TextGeneration from "./textGeneration/TextGeneration.ts";
@@ -296,7 +295,7 @@ const layerPersistence = Layer.empty.pipe(Layer.provideMerge(SqlitePersistence.l
295 const layerVcsDriverRegistry = VcsDriverRegistry.layer.pipe(Layer.provide(VcsProjectConfig.layer));
296
297 const layerSourceControlProviderRegistry = SourceControlProviderRegistry.layer.pipe(
299 - Layer.provide(Layer.mergeAll(GitHubApi.layerWithDependencies, SourceControlBuiltInDrivers.layer)),
298 + Layer.provideMerge(SourceControlBuiltInDrivers.layer),
299 Layer.provideMerge(GitVcsDriver.layer),
300 Layer.provideMerge(layerVcsDriverRegistry),
301 );
@@ -585,9 +584,9 @@ const layerRuntimeCoreDependenciesBase = Layer.mergeAll(
584 Layer.provideMerge(RuntimeLayer.layerEventInfrastructure),
585 Layer.provideMerge(Layer.merge(ProjectStore.layer, ThreadSearch.layer)),
586 Layer.provideMerge(layerServerSettings),
588 - // The asset route uses the registry's GitHub credential for private PR media.
587 + // The asset route uses the registry's GitHub credential for private PR media, which the
588 + // built-in drivers' layer provides alongside the registry.
589 Layer.provideMerge(layerSourceControlProviderRegistry),
590 - Layer.provideMerge(GitHubApi.layerWithDependencies),
590 Layer.provideMerge(layerGit),
591 Layer.provideMerge(layerVcs),
592 Layer.provideMerge(Layer.mergeAll(layerTerminal, layerPreview, layerDevice)),
apps/server/src/sourceControl/ServerSourceControlHost.ts
+2
@@ -24,6 +24,8 @@ export const layer = Layer.effect(
24 settings: { get: serverSettings.getSettings },
25 process: { run: process.run },
26 git: {
27 + execute: git.execute,
28 + resolveCommit: git.resolveCommit,
29 remotes: (cwd) =>
30 vcsRegistry.resolve({ cwd }).pipe(Effect.map((handle) => handle.driver.listRemotes(cwd))),
31 readConfigValue: git.readConfigValue,
apps/server/src/sourceControl/SourceControlDiscovery.test.ts
+3 -1
@@ -20,7 +20,8 @@ import * as AzureDevOpsCli from "@t3tools/source-control-azure-devops/server/Azu
20 import * as AzureDevOpsPullRequestCli from "@t3tools/source-control-azure-devops/server/AzureDevOpsPullRequestCli";
21 import * as BitbucketApi from "@t3tools/source-control-bitbucket/server/BitbucketApi";
22 import * as BitbucketPullRequestApi from "@t3tools/source-control-bitbucket/server/BitbucketPullRequestApi";
23 -import * as GitHubApi from "./GitHubApi.ts";
23 +import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
24 +import * as GitHubPullRequestApi from "@t3tools/source-control-github/server/GitHubPullRequestApi";
25 import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli";
26 import * as GitLabPullRequestCli from "@t3tools/source-control-gitlab/server/GitLabPullRequestCli";
27 import * as ForgejoCli from "@t3tools/source-control-forgejo/server/ForgejoCli";
@@ -46,6 +47,7 @@ const layerSourceControlProviderRegistryTest = (input: {
47 Layer.mock(BitbucketApi.BitbucketApi)(input.bitbucket),
48 Layer.mock(BitbucketPullRequestApi.BitbucketPullRequestApi)({}),
49 ServerSettings.ServerSettingsService.layerTest(),
50 + Layer.mock(GitHubPullRequestApi.GitHubPullRequestApi)({}),
51 Layer.mock(GitHubApi.GitHubApi)({}),
52 Layer.mock(GitVcsDriver.GitVcsDriver)({}),
53 Layer.mock(GitLabCli.GitLabCli)({}),
apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts
+4 -2
@@ -18,8 +18,9 @@ import * as AzureDevOpsPullRequestCli from "@t3tools/source-control-azure-devops
18 import * as BitbucketApi from "@t3tools/source-control-bitbucket/server/BitbucketApi";
19 import * as BitbucketPullRequestApi from "@t3tools/source-control-bitbucket/server/BitbucketPullRequestApi";
20 import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
21 -import * as GitHubApi from "./GitHubApi.ts";
22 -import * as GitHubCredentials from "./GitHubCredentials.ts";
21 +import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
22 +import * as GitHubPullRequestApi from "@t3tools/source-control-github/server/GitHubPullRequestApi";
23 +import * as GitHubCredentials from "@t3tools/source-control-github/server/GitHubCredentials";
24 import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli";
25 import * as GitLabPullRequestCli from "@t3tools/source-control-gitlab/server/GitLabPullRequestCli";
26 import * as ForgejoCli from "@t3tools/source-control-forgejo/server/ForgejoCli";
@@ -115,6 +116,7 @@ function makeRegistry(input: {
116 Layer.mock(BitbucketApi.BitbucketApi)({}),
117 Layer.mock(BitbucketPullRequestApi.BitbucketPullRequestApi)({}),
118 ServerSettings.ServerSettingsService.layerTest(),
119 + Layer.mock(GitHubPullRequestApi.GitHubPullRequestApi)({}),
120 Layer.mock(GitHubApi.GitHubApi)({
121 // No GitHub credential unless a test supplies one, so custom hosts stay unclaimed.
122 credential: (host) => Effect.fail(new GitHubCredentials.GitHubNotSignedInError({ host })),
apps/server/src/sourceControl/SourceControlProviderRegistry.ts
+1 -16
@@ -11,7 +11,6 @@ import {
11 import type { SourceControlProviderKind } from "@t3tools/contracts";
12 import { detectSourceControlProviderFromRemoteUrl } from "@t3tools/shared/sourceControl";
13
14 -import * as GitHubSourceControlProvider from "./GitHubSourceControlProvider.ts";
14 import * as BuiltInDrivers from "./builtInDrivers.ts";
15 import * as SourceControlProvider from "@t3tools/source-control-core/server/SourceControlProvider";
16 import {
@@ -302,8 +301,6 @@ export const makeWithProviders = Effect.fn("makeSourceControlProviderRegistryWit
301 );
302
303 export const make = Effect.gen(function* () {
305 - const github = yield* GitHubSourceControlProvider.make;
306 - const githubDiscovery = yield* GitHubSourceControlProvider.makeDiscovery;
304 const drivers = yield* Effect.forEach(BuiltInDrivers.BUILT_IN_SOURCE_CONTROL_DRIVERS, (driver) =>
305 driver.make.pipe(
306 Effect.map((instance): SourceControlProviderRegistration => ({
@@ -313,19 +310,7 @@ export const make = Effect.gen(function* () {
310 })),
311 ),
312 );
316 - // Discovery lists hosts in this order, so it is kept while hosts move into packages.
317 - const order = ["github", "gitlab", "azure-devops", "bitbucket", "forgejo"];
318 - const registrations: ReadonlyArray<SourceControlProviderRegistration> = [
319 - {
320 - kind: "github",
321 - provider: github,
322 - discovery: githubDiscovery,
323 - },
324 - ...drivers,
325 - ];
326 - return yield* makeWithProviders(
327 - registrations.toSorted((left, right) => order.indexOf(left.kind) - order.indexOf(right.kind)),
328 - );
313 + return yield* makeWithProviders(drivers);
314 });
315
316 export const layer = Layer.effect(SourceControlProviderRegistry, make);
apps/server/src/sourceControl/builtInDrivers.ts
+8
@@ -15,6 +15,9 @@ import * as BitbucketPullRequestApi from "@t3tools/source-control-bitbucket/serv
15 import * as BitbucketDriver from "@t3tools/source-control-bitbucket/server/driver";
16 import * as ForgejoCli from "@t3tools/source-control-forgejo/server/ForgejoCli";
17 import * as ForgejoDriver from "@t3tools/source-control-forgejo/server/driver";
18 +import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
19 +import * as GitHubPullRequestApi from "@t3tools/source-control-github/server/GitHubPullRequestApi";
20 +import * as GitHubDriver from "@t3tools/source-control-github/server/driver";
21 import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli";
22 import * as GitLabPullRequestCli from "@t3tools/source-control-gitlab/server/GitLabPullRequestCli";
23 import * as GitLabDriver from "@t3tools/source-control-gitlab/server/driver";
@@ -24,6 +27,7 @@ import * as Layer from "effect/Layer";
27 import * as ServerSourceControlHost from "./ServerSourceControlHost.ts";
28
29 const drivers = [
30 + GitHubDriver.driver,
31 GitLabDriver.driver,
32 AzureDevOpsDriver.driver,
33 BitbucketDriver.driver,
@@ -34,12 +38,16 @@ const drivers = [
38 export type BuiltInSourceControlDriversEnv =
39 (typeof drivers)[number] extends SourceControlDriver<infer R> ? R : never;
40
41 +/** Ordered as the hosts appear in discovery. */
42 export const BUILT_IN_SOURCE_CONTROL_DRIVERS: ReadonlyArray<
43 SourceControlDriver<BuiltInSourceControlDriversEnv>
44 > = drivers;
45
46 /** The services the built-in drivers' packages own, plus the host port they all run against. */
47 export const layer = Layer.mergeAll(
48 + // `GitHubApi.layerWithDependencies` carries the quota reserve and rate-limit pause every GitHub
49 + // reader shares, so the server builds it once, here.
50 + GitHubPullRequestApi.layer.pipe(Layer.provideMerge(GitHubApi.layerWithDependencies)),
51 AzureDevOpsPullRequestCli.layer.pipe(Layer.provideMerge(AzureDevOpsCli.layer)),
52 BitbucketPullRequestApi.layer.pipe(Layer.provideMerge(BitbucketApi.layer)),
53 ForgejoCli.layer,
apps/server/src/sourceControl/githubStackRebase.test.ts renamed
+14 -3
@@ -5,15 +5,26 @@ import * as FileSystem from "effect/FileSystem";
5 import * as Layer from "effect/Layer";
6 import * as Redacted from "effect/Redacted";
7
8 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
8 +import * as GitHubApi from "@t3tools/source-control-github/server/GitHubApi";
9 +import { cascadeRebaseStack } from "@t3tools/source-control-github/server/githubStackRebase";
10 +
11 +import * as ServerSettings from "../serverSettings.ts";
12 +import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
13 +import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts";
14 import * as VcsProcess from "../vcs/VcsProcess.ts";
10 -import { cascadeRebaseStack } from "./githubStackRebase.ts";
15 +import * as ServerSourceControlHost from "./ServerSourceControlHost.ts";
16
17 const layer = Layer.mergeAll(
18 Layer.mock(GitHubApi.GitHubApi)({
19 credential: () => Effect.succeed({ token: Redacted.make("token"), fingerprint: "fp" }),
20 }),
16 - VcsProcess.layer,
21 + // The cascade runs real git through the server's host; the git driver itself is never asked.
22 + ServerSourceControlHost.layer.pipe(
23 + Layer.provide(ServerSettings.layerTest()),
24 + Layer.provide(Layer.mock(GitVcsDriver.GitVcsDriver)({})),
25 + Layer.provide(Layer.mock(VcsDriverRegistry.VcsDriverRegistry)({})),
26 + Layer.provideMerge(VcsProcess.layer),
27 + ),
28 ).pipe(Layer.provideMerge(NodeServices.layer));
29
30 /**
apps/server/src/ws.ts
+1 -7
@@ -229,7 +229,6 @@ import * as SqlClient from "effect/sql/SqlClient";
229 import * as PullRequestSyncReactor from "./orchestration-v2/PullRequestSyncReactor.ts";
230 import * as SourceControlDiscovery from "./sourceControl/SourceControlDiscovery.ts";
231 import * as SourceControlRepositoryService from "./sourceControl/SourceControlRepositoryService.ts";
232 -import * as GitHubApi from "./sourceControl/GitHubApi.ts";
232 import * as SourceControlBuiltInDrivers from "./sourceControl/builtInDrivers.ts";
233 import * as SourceControlProviderRegistry from "./sourceControl/SourceControlProviderRegistry.ts";
234 import * as GitVcsDriver from "./vcs/GitVcsDriver.ts";
@@ -3199,12 +3198,7 @@ export const layer = Layer.unwrap(
3198 SourceControlDiscovery.layer.pipe(
3199 Layer.provide(
3200 SourceControlProviderRegistry.layer.pipe(
3202 - Layer.provide(
3203 - Layer.mergeAll(
3204 - GitHubApi.layerWithDependencies,
3205 - SourceControlBuiltInDrivers.layer,
3206 - ),
3207 - ),
3201 + Layer.provide(SourceControlBuiltInDrivers.layer),
3202 Layer.provideMerge(GitVcsDriver.layer),
3203 Layer.provide(
3204 VcsDriverRegistry.layer.pipe(Layer.provide(VcsProjectConfig.layer)),
package.json
+1 -1
@@ -28,7 +28,7 @@
28 "tc": "vp run -r --concurrency-limit 2 typecheck",
29 "lint": "vp lint --report-unused-disable-directives",
30 "knip": "knip --preprocessor ./scripts/knip-schemas.ts",
31 - "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace apps/server --workspace apps/desktop --workspace apps/web --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --workspace packages/provider-core --workspace packages/provider-acp --workspace packages/provider-acp-registry --workspace packages/provider-testing --workspace packages/provider-pi --workspace packages/provider-muse --workspace packages/provider-opencode --workspace packages/provider-cursor --workspace packages/provider-grok --workspace packages/source-control-core --workspace packages/source-control-azure-devops --workspace packages/source-control-bitbucket --workspace packages/source-control-forgejo --workspace packages/source-control-gitlab --workspace packages/source-control-testing --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",
31 + "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace apps/server --workspace apps/desktop --workspace apps/web --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --workspace packages/provider-core --workspace packages/provider-acp --workspace packages/provider-acp-registry --workspace packages/provider-testing --workspace packages/provider-pi --workspace packages/provider-muse --workspace packages/provider-opencode --workspace packages/provider-cursor --workspace packages/provider-grok --workspace packages/source-control-core --workspace packages/source-control-azure-devops --workspace packages/source-control-bitbucket --workspace packages/source-control-forgejo --workspace packages/source-control-github --workspace packages/source-control-gitlab --workspace packages/source-control-testing --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",
32 "knip:production": "knip --production --preprocessor ./scripts/knip-schemas.ts",
33 "lint:mobile": "node scripts/mobile-native-static-check.ts",
34 "test": "vp run -r test",
packages/source-control-core/src/server/SourceControlHost.ts
+15
@@ -54,6 +54,11 @@ export interface SourceControlProcessOutput {
54 readonly stderrInvalidUtf8?: boolean;
55 }
56
57 +export type SourceControlGitOutput = Omit<
58 + SourceControlProcessOutput,
59 + "stdoutInvalidUtf8" | "stderrInvalidUtf8"
60 +>;
61 +
62 export interface SourceControlGitRemoteBranch {
63 readonly cwd: string;
64 readonly remoteName: string;
@@ -73,6 +78,16 @@ export class SourceControlHost extends Context.Service<
78 ) => Effect.Effect<SourceControlProcessOutput, VcsError>;
79 };
80 readonly git: {
81 + /** Runs `git -C cwd …args` through the server's git driver, with its limits and metrics. */
82 + readonly execute: (input: {
83 + readonly operation: string;
84 + readonly cwd: string;
85 + readonly args: ReadonlyArray<string>;
86 + }) => Effect.Effect<SourceControlGitOutput, GitCommandError>;
87 + readonly resolveCommit: (input: {
88 + readonly cwd: string;
89 + readonly revision: string;
90 + }) => Effect.Effect<{ readonly commitSha: string }, GitCommandError>;
91 /**
92 * Lists the remotes of the repository at `cwd`. The outer effect resolves the repository
93 * and fails when the server cannot drive one there; the inner one lists its remotes.
packages/source-control-github/package.json new
+85
@@ -0,0 +1,85 @@
1 +{
2 + "name": "@t3tools/source-control-github",
3 + "private": true,
4 + "type": "module",
5 + "exports": {
6 + "./server/driver": {
7 + "types": "./src/server/driver.ts",
8 + "import": "./src/server/driver.ts"
9 + },
10 + "./server/GitHubApi": {
11 + "types": "./src/server/GitHubApi.ts",
12 + "import": "./src/server/GitHubApi.ts"
13 + },
14 + "./server/gitHubAuthStatus": {
15 + "types": "./src/server/gitHubAuthStatus.ts",
16 + "import": "./src/server/gitHubAuthStatus.ts"
17 + },
18 + "./server/gitHubConditionalChecks": {
19 + "types": "./src/server/gitHubConditionalChecks.ts",
20 + "import": "./src/server/gitHubConditionalChecks.ts"
21 + },
22 + "./server/GitHubCredentials": {
23 + "types": "./src/server/GitHubCredentials.ts",
24 + "import": "./src/server/GitHubCredentials.ts"
25 + },
26 + "./server/githubGraphQl": {
27 + "types": "./src/server/githubGraphQl.ts",
28 + "import": "./src/server/githubGraphQl.ts"
29 + },
30 + "./server/GitHubPullRequestApi": {
31 + "types": "./src/server/GitHubPullRequestApi.ts",
32 + "import": "./src/server/GitHubPullRequestApi.ts"
33 + },
34 + "./server/gitHubPullRequestJson": {
35 + "types": "./src/server/gitHubPullRequestJson.ts",
36 + "import": "./src/server/gitHubPullRequestJson.ts"
37 + },
38 + "./server/GitHubPullRequestProvider": {
39 + "types": "./src/server/GitHubPullRequestProvider.ts",
40 + "import": "./src/server/GitHubPullRequestProvider.ts"
41 + },
42 + "./server/gitHubPullRequests": {
43 + "types": "./src/server/gitHubPullRequests.ts",
44 + "import": "./src/server/gitHubPullRequests.ts"
45 + },
46 + "./server/GitHubQuota": {
47 + "types": "./src/server/GitHubQuota.ts",
48 + "import": "./src/server/GitHubQuota.ts"
49 + },
50 + "./server/gitHubRepositoryResolution": {
51 + "types": "./src/server/gitHubRepositoryResolution.ts",
52 + "import": "./src/server/gitHubRepositoryResolution.ts"
53 + },
54 + "./server/GitHubSourceControlProvider": {
55 + "types": "./src/server/GitHubSourceControlProvider.ts",
56 + "import": "./src/server/GitHubSourceControlProvider.ts"
57 + },
58 + "./server/githubStackActions": {
59 + "types": "./src/server/githubStackActions.ts",
60 + "import": "./src/server/githubStackActions.ts"
61 + },
62 + "./server/githubStackRebase": {
63 + "types": "./src/server/githubStackRebase.ts",
64 + "import": "./src/server/githubStackRebase.ts"
65 + }
66 + },
67 + "scripts": {
68 + "typecheck": "tsc --noEmit",
69 + "test": "vp test run --config ../../vite.config.ts --dir ."
70 + },
71 + "dependencies": {
72 + "@t3tools/contracts": "workspace:*",
73 + "@t3tools/provider-core": "workspace:*",
74 + "@t3tools/shared": "workspace:*",
75 + "@t3tools/source-control-core": "workspace:*",
76 + "effect": "catalog:"
77 + },
78 + "devDependencies": {
79 + "@effect/platform-node": "catalog:",
80 + "@effect/vitest": "catalog:",
81 + "@t3tools/source-control-testing": "workspace:*",
82 + "@types/node": "catalog:",
83 + "vite-plus": "catalog:"
84 + }
85 +}
packages/source-control-github/src/server/GitHubApi.test.ts renamed
+7 -7
@@ -1,4 +1,5 @@
1 import { describe, expect, it } from "@effect/vitest";
2 +import * as NodeCrypto from "@effect/platform-node/NodeCrypto";
3 import * as NodeServices from "@effect/platform-node/NodeServices";
4 import * as Effect from "effect/Effect";
5 import * as Layer from "effect/Layer";
@@ -12,10 +13,10 @@ import { HttpClient, HttpClientResponse, type HttpClientRequest } from "effect/h
13
14 import * as GitHubApi from "./GitHubApi.ts";
15 import * as GitHubCredentials from "./GitHubCredentials.ts";
15 -import * as GitHubQuota from "./githubQuota.ts";
16 +import * as GitHubQuota from "./GitHubQuota.ts";
17 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
17 -import * as VcsProcess from "../vcs/VcsProcess.ts";
18 -import * as ServerSettings from "../serverSettings.ts";
18 +import type * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
19 +import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
20
21 const NOW = Date.parse("2026-10-05T12:00:00.000Z");
22
@@ -439,11 +440,10 @@ describe("GitHubApi", () => {
440 });
441
442 describe("GitHubCredentials", () => {
442 - const credentialsWith = (run: VcsProcess.VcsProcess["Service"]["run"]) =>
443 + const credentialsWith = (run: SourceControlHost.SourceControlHost["Service"]["process"]["run"]) =>
444 GitHubCredentials.layer.pipe(
444 - Layer.provide(Layer.mock(VcsProcess.VcsProcess)({ run })),
445 - Layer.provide(NodeServices.layer),
446 - Layer.provide(ServerSettings.layerTest()),
445 + Layer.provide(TestSourceControlHost.layer({ process: { run } })),
446 + Layer.provide(NodeCrypto.layer),
447 );
448
449 it.effect("fails with GitHubCliMissingError when gh is not on PATH", () =>
packages/source-control-github/src/server/GitHubApi.ts renamed
+6 -4
@@ -12,7 +12,7 @@ import { HttpClient, HttpClientRequest, type HttpClientResponse } from "effect/h
12
13 import { collectUint8StreamText } from "@t3tools/provider-core/server/collectStreamText";
14 import * as GitHubCredentials from "./GitHubCredentials.ts";
15 -import * as GitHubQuota from "./githubQuota.ts";
15 +import * as GitHubQuota from "./GitHubQuota.ts";
16 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
17
18 const DEFAULT_TIMEOUT = Duration.seconds(30);
@@ -30,7 +30,9 @@ export const PinnedGitHubCredential = Context.Reference<{
30 readonly host: string;
31 readonly token: Redacted.Redacted<string>;
32 readonly credentialFingerprint: string;
33 -} | null>("t3/sourceControl/PinnedGitHubCredential", { defaultValue: () => null });
33 +} | null>("@t3tools/source-control-github/server/GitHubApi/PinnedGitHubCredential", {
34 + defaultValue: () => null,
35 +});
36
37 /**
38 * Set by interactive callers (a user's read or write, not a background sweep). Requests made
@@ -38,7 +40,7 @@ export const PinnedGitHubCredential = Context.Reference<{
40 * pull request should not be refused because a background read exhausted the quota.
41 */
42 export const AllowGitHubReserve = Context.Reference<boolean>(
41 - "t3/sourceControl/AllowGitHubReserve",
43 + "@t3tools/source-control-github/server/GitHubApi/AllowGitHubReserve",
44 { defaultValue: () => false },
45 );
46
@@ -162,7 +164,7 @@ export class GitHubApi extends Context.Service<
164 GitHubApiError
165 >;
166 }
165 ->()("t3/sourceControl/GitHubApi") {}
167 +>()("@t3tools/source-control-github/server/GitHubApi") {}
168
169 function normalizeHost(host: string): string {
170 return host.trim().toLowerCase();
packages/source-control-github/src/server/GitHubCredentials.test.ts renamed
+39 -27
@@ -1,12 +1,14 @@
1 +import * as NodeCrypto from "@effect/platform-node/NodeCrypto";
2 import { afterEach, beforeEach, describe, expect, it, vi } from "@effect/vitest";
2 -import * as NodeServices from "@effect/platform-node/NodeServices";
3 import * as Effect from "effect/Effect";
4 import * as Layer from "effect/Layer";
5 import * as Redacted from "effect/Redacted";
6 import { ChildProcessSpawner } from "effect/process";
7
8 -import * as ServerSettings from "../serverSettings.ts";
9 -import * as VcsProcess from "../vcs/VcsProcess.ts";
8 +import { DEFAULT_SERVER_SETTINGS } from "@t3tools/contracts";
9 +import type * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
10 +import { applyServerSettingsPatch } from "@t3tools/shared/serverSettings";
11 +import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
12 import * as GitHubCredentials from "./GitHubCredentials.ts";
13
14 const TOKEN_VARIABLES = [
@@ -16,41 +18,51 @@ const TOKEN_VARIABLES = [
18 "GITHUB_ENTERPRISE_TOKEN",
19 ] as const;
20
21 +/** Settings keep `enabled` explicit; a host the test leaves it off is enabled. */
22 +const hostSettings = (
23 + hosts: Record<string, { readonly account?: string; readonly enabled?: boolean }>,
24 +) =>
25 + Object.fromEntries(
26 + Object.entries(hosts).map(([host, choice]) => [host, { enabled: true, ...choice }]),
27 + );
28 +
29 function harness(
30 hosts: Record<string, { readonly account?: string; readonly enabled?: boolean }> = {},
31 signedOut: ReadonlyArray<string> = [],
32 tokens: Record<string, string> = {},
33 ) {
34 const calls: Array<ReadonlyArray<string>> = [];
25 - const process = Layer.mock(VcsProcess.VcsProcess)({
26 - run: (input) =>
27 - Effect.sync(() => {
28 - calls.push(input.args);
29 - const user = input.args[input.args.indexOf("--user") + 1];
30 - if (input.args.includes("--user") && user !== undefined && signedOut.includes(user)) {
31 - return {
32 - exitCode: ChildProcessSpawner.ExitCode(0),
33 - stdout: "",
34 - stderr: "",
35 - stdoutTruncated: false,
36 - stderrTruncated: false,
37 - };
38 - }
35 + const run: SourceControlHost.SourceControlHost["Service"]["process"]["run"] = (input) =>
36 + Effect.sync(() => {
37 + calls.push(input.args);
38 + const user = input.args[input.args.indexOf("--user") + 1];
39 + if (input.args.includes("--user") && user !== undefined && signedOut.includes(user)) {
40 return {
41 exitCode: ChildProcessSpawner.ExitCode(0),
41 - stdout: input.args.includes("--user") ? `token-for-${user}\n` : "active-token\n",
42 + stdout: "",
43 stderr: "",
44 stdoutTruncated: false,
45 stderrTruncated: false,
46 };
46 - }),
47 - });
47 + }
48 + return {
49 + exitCode: ChildProcessSpawner.ExitCode(0),
50 + stdout: input.args.includes("--user") ? `token-for-${user}\n` : "active-token\n",
51 + stderr: "",
52 + stdoutTruncated: false,
53 + stderrTruncated: false,
54 + };
55 + });
56 const layer = GitHubCredentials.layer.pipe(
57 Layer.provideMerge(
50 - ServerSettings.ServerSettingsService.layerTest({ github: { hosts, tokens } }),
58 + TestSourceControlHost.layer({
59 + settings: applyServerSettingsPatch(DEFAULT_SERVER_SETTINGS, {
60 + github: { hosts: hostSettings(hosts), tokens },
61 + }),
62 + process: { run },
63 + }),
64 ),
52 - Layer.provide(process),
53 - Layer.provide(NodeServices.layer),
65 + Layer.provide(NodeCrypto.layer),
66 );
67 return { layer, calls };
68 }
@@ -112,20 +124,20 @@ describe("GitHubCredentials", () => {
124 const { layer, calls } = harness();
125 return Effect.gen(function* () {
126 const credentials = yield* GitHubCredentials.GitHubCredentials;
115 - const settings = yield* ServerSettings.ServerSettingsService;
127 + const settings = yield* TestSourceControlHost.TestSourceControlHostSettings;
128 expect(Redacted.value((yield* credentials.get("github.com")).token)).toBe("active-token");
129
118 - yield* settings.updateSettings({
130 + yield* settings.update({
131 github: { hosts: { "github.com": { account: "work", enabled: true } } },
132 });
133 expect(Redacted.value((yield* credentials.get("github.com")).token)).toBe("token-for-work");
134
123 - yield* settings.updateSettings({ github: { hosts: { "github.com": { enabled: false } } } });
135 + yield* settings.update({ github: { hosts: { "github.com": { enabled: false } } } });
136 expect((yield* Effect.flip(credentials.get("github.com")))._tag).toBe(
137 "GitHubHostDisabledError",
138 );
139
128 - yield* settings.updateSettings({ github: { hosts: {} } });
140 + yield* settings.update({ github: { hosts: {} } });
141 expect(Redacted.value((yield* credentials.get("github.com")).token)).toBe("active-token");
142 // The unpinned token stayed cached; only the newly pinned account cost a gh call.
143 expect(calls).toHaveLength(2);
packages/source-control-github/src/server/GitHubCredentials.ts renamed
+6 -7
@@ -13,8 +13,7 @@ import * as Schema from "effect/Schema";
13
14 import { HostProcessEnvironment, HostProcessWorkingDirectory } from "@t3tools/shared/hostProcess";
15
16 -import * as ServerSettings from "../serverSettings.ts";
17 -import * as VcsProcess from "../vcs/VcsProcess.ts";
16 +import * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
17
18 /** How long a token is reused before `gh` is asked again, so a `gh auth switch` applies soon. */
19 const TOKEN_TTL = Duration.minutes(5);
@@ -94,7 +93,7 @@ export class GitHubCredentials extends Context.Service<
93 /** Drops the held token after GitHub refused it, so the next read asks its source again. */
94 readonly invalidate: (host: string) => Effect.Effect<void>;
95 }
97 ->()("t3/sourceControl/GitHubCredentials") {}
96 +>()("@t3tools/source-control-github/server/GitHubCredentials") {}
97
98 function normalizeHost(host: string): string {
99 return host.trim().toLowerCase();
@@ -128,8 +127,8 @@ export function environmentToken(
127
128 /** @public Service construction is part of the canonical Effect module API. */
129 export const make = Effect.gen(function* () {
131 - const process = yield* VcsProcess.VcsProcess;
132 - const serverSettings = yield* ServerSettings.ServerSettingsService;
130 + const sourceControlHost = yield* SourceControlHost.SourceControlHost;
131 + const process = sourceControlHost.process;
132 const crypto = yield* Crypto.Crypto;
133 const environment = yield* HostProcessEnvironment;
134 const workingDirectory = yield* HostProcessWorkingDirectory;
@@ -179,14 +178,14 @@ export const make = Effect.gen(function* () {
178
179 /** The Settings choice for a host; unreadable settings fall back to gh's own choice. */
180 const hostChoice = (host: string) =>
182 - serverSettings.getSettings.pipe(
181 + sourceControlHost.settings.get.pipe(
182 Effect.map((settings) => settings.github.hosts[host]),
183 Effect.orElseSucceed(() => undefined),
184 );
185
186 /** A token saved in Settings for the host, read fresh so a saved or removed one applies at once. */
187 const savedToken = (host: string) =>
189 - serverSettings.getSettings.pipe(
188 + sourceControlHost.settings.get.pipe(
189 Effect.map((settings) => settings.github.tokens[host]?.trim() || null),
190 Effect.orElseSucceed(() => null),
191 );
packages/source-control-github/src/server/GitHubPullRequestApi.test.ts renamed
+8 -7
@@ -12,12 +12,12 @@ import * as Redacted from "effect/Redacted";
12
13 import { HttpClient, HttpClientResponse } from "effect/http";
14
15 -import { AllowGitHubReserve } from "../sourceControl/GitHubApi.ts";
16 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
17 -import * as GitHubCredentials from "../sourceControl/GitHubCredentials.ts";
18 -import * as GitHubQuota from "../sourceControl/githubQuota.ts";
15 +import { AllowGitHubReserve } from "./GitHubApi.ts";
16 +import * as GitHubApi from "./GitHubApi.ts";
17 +import * as GitHubCredentials from "./GitHubCredentials.ts";
18 +import * as GitHubQuota from "./GitHubQuota.ts";
19 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
20 -import * as VcsProcess from "../vcs/VcsProcess.ts";
20 +import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
21 import * as GitHubPullRequestApi from "./GitHubPullRequestApi.ts";
22 import { KnownWorkflowRuns } from "./gitHubConditionalChecks.ts";
23
@@ -103,7 +103,8 @@ const layer = it.layer(
103 Layer.provideMerge(mockApi),
104 Layer.provideMerge(GitHubQuota.layer),
105 Layer.provide(NodeCrypto.layer),
106 - Layer.provide(VcsProcess.layer.pipe(Layer.provideMerge(NodeServices.layer))),
106 + Layer.provide(TestSourceControlHost.layer()),
107 + Layer.provide(NodeServices.layer),
108 ),
109 );
110
@@ -509,7 +510,7 @@ it.effect(
510 Layer.provide(Layer.mergeAll(credentials, http)),
511 Layer.provide(GitHubQuota.layer),
512 Layer.provide(SourceControlRateLimit.layer),
512 - Layer.merge(VcsProcess.layer),
513 + Layer.merge(TestSourceControlHost.layer()),
514 Layer.provideMerge(NodeServices.layer),
515 ),
516 ),
packages/source-control-github/src/server/GitHubPullRequestApi.ts renamed
+6 -6
@@ -42,9 +42,9 @@ import {
42 type PullRequestPreview,
43 } from "@t3tools/contracts";
44
45 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
46 -import { readGraphQlPages } from "../sourceControl/githubGraphQl.ts";
47 -import * as VcsProcess from "../vcs/VcsProcess.ts";
45 +import * as GitHubApi from "./GitHubApi.ts";
46 +import { readGraphQlPages } from "./githubGraphQl.ts";
47 +import * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
48 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
49 import {
50 ACTOR_AVATARS_GRAPHQL_QUERY,
@@ -793,7 +793,7 @@ export class GitHubPullRequestApi extends Context.Service<
793 readonly body: string;
794 }) => Effect.Effect<void, GitHubPullRequestApiError>;
795 }
796 ->()("t3/pullRequest/GitHubPullRequestApi") {}
796 +>()("@t3tools/source-control-github/server/GitHubPullRequestApi") {}
797
798 /**
799 * The GraphQL API takes owner and name as separate arguments, so `owner/repo` is split here.
@@ -1105,7 +1105,7 @@ const SIMPLE_ACTION_MUTATIONS = {
1105 /** @public Service construction is part of the canonical Effect module API. */
1106 export const make = Effect.gen(function* () {
1107 const api = yield* GitHubApi.GitHubApi;
1108 - const vcsProcess = yield* VcsProcess.VcsProcess;
1108 + const sourceControlHost = yield* SourceControlHost.SourceControlHost;
1109 const fileSystem = yield* FileSystem.FileSystem;
1110 const revalidateChecks = yield* makeChecksRevalidator;
1111 const routingIdentities = new Map<
@@ -2497,7 +2497,7 @@ export const make = Effect.gen(function* () {
2497 if (input.stackNumber !== undefined)
2498 return runGitHubStackAction({ ...input, stackNumber: input.stackNumber }).pipe(
2499 Effect.provideService(GitHubApi.GitHubApi, api),
2500 - Effect.provideService(VcsProcess.VcsProcess, vcsProcess),
2500 + Effect.provideService(SourceControlHost.SourceControlHost, sourceControlHost),
2501 Effect.provideService(FileSystem.FileSystem, fileSystem),
2502 );
2503 if (input.action === "revert") {
packages/source-control-github/src/server/GitHubPullRequestProvider.test.ts renamed
+1 -1
@@ -6,7 +6,7 @@ import * as Result from "effect/Result";
6 import type { PullRequestReaction } from "@t3tools/contracts";
7
8 import { decodePullRequestDetailJson } from "./gitHubPullRequestJson.ts";
9 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
9 +import * as GitHubApi from "./GitHubApi.ts";
10 import * as GitHubPullRequestApi from "./GitHubPullRequestApi.ts";
11 import type { GitHubPullRequestCore } from "./gitHubPullRequestJson.ts";
12 import { gitHubViewerPermissions, loginAvatarUrl, make } from "./GitHubPullRequestProvider.ts";
packages/source-control-github/src/server/GitHubPullRequestProvider.ts renamed
+1 -1
@@ -7,7 +7,7 @@ import type {
7 PullRequestViewerPermissions,
8 } from "@t3tools/contracts";
9
10 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
10 +import * as GitHubApi from "./GitHubApi.ts";
11 import * as GitHubPullRequestApi from "./GitHubPullRequestApi.ts";
12 import {
13 PullRequestProviderError,
packages/source-control-github/src/server/GitHubQuota.test.ts renamed
+1 -1
@@ -2,7 +2,7 @@ import { assert, describe, it } from "@effect/vitest";
2 import * as Effect from "effect/Effect";
3 import * as TestClock from "effect/testing/TestClock";
4
5 -import * as GitHubQuota from "./githubQuota.ts";
5 +import * as GitHubQuota from "./GitHubQuota.ts";
6 import { CredentialScope } from "@t3tools/source-control-core/server/SourceControlRateLimit";
7
8 const RESET = Date.parse("2099-08-13T14:00:00Z");
packages/source-control-github/src/server/GitHubQuota.ts renamed
+1 -1
@@ -70,7 +70,7 @@ export class GitHubQuota extends Context.Service<
70 headers: Readonly<Record<string, string | undefined>>,
71 ) => Effect.Effect<void>;
72 }
73 ->()("t3/sourceControl/githubQuota") {}
73 +>()("@t3tools/source-control-github/server/GitHubQuota") {}
74
75 const make = Effect.gen(function* () {
76 const snapshots = yield* Ref.make<ReadonlyMap<string, QuotaSnapshot>>(new Map());
packages/source-control-github/src/server/GitHubSourceControlProvider.test.ts renamed
+20 -15
@@ -10,8 +10,8 @@ import * as Schema from "effect/Schema";
10 import { ChildProcessSpawner } from "effect/process";
11 import * as TestClock from "effect/testing/TestClock";
12
13 -import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
14 -import * as VcsProcess from "../vcs/VcsProcess.ts";
13 +import type * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
14 +import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
15 import * as GitHubApi from "./GitHubApi.ts";
16 import * as GitHubCredentials from "./GitHubCredentials.ts";
17 import { parseGitHubAuthStatus } from "./gitHubAuthStatus.ts";
@@ -25,7 +25,7 @@ const processResult = (
25 readonly stderr?: string;
26 readonly exitCode?: ChildProcessSpawner.ExitCode;
27 },
28 -): VcsProcess.VcsProcessOutput => ({
28 +): SourceControlHost.SourceControlProcessOutput => ({
29 exitCode: options?.exitCode ?? ChildProcessSpawner.ExitCode(0),
30 stdout,
31 stderr: options?.stderr ?? "",
@@ -33,7 +33,10 @@ const processResult = (
33 stderrTruncated: false,
34 });
35
36 -const processOutput = (stdout: string, exitCode = 0): VcsProcess.VcsProcessOutput => ({
36 +const processOutput = (
37 + stdout: string,
38 + exitCode = 0,
39 +): SourceControlHost.SourceControlProcessOutput => ({
40 exitCode: ChildProcessSpawner.ExitCode(exitCode),
41 stdout,
42 stderr: "",
@@ -87,7 +90,7 @@ function harness(input: {
90 git.push([name, args]);
91 return value;
92 });
90 - const driver = Layer.mock(GitVcsDriver.GitVcsDriver)({
93 + const hostGit: Partial<SourceControlHost.SourceControlHost["Service"]["git"]> = {
94 execute: (args) =>
95 Effect.sync(() => {
96 git.push(["execute", args.args]);
@@ -108,18 +111,20 @@ function harness(input: {
111 ? Effect.succeed([...(input.localBranches ?? [])])
112 : Effect.fail(input.gitFailure as never),
113 resolveCommit: () => Effect.succeed({ commitSha: "abc123" }),
111 - });
112 - const process = Layer.mock(VcsProcess.VcsProcess)({
113 - run: (args) =>
114 - Effect.succeed(
115 - args.args[0] === "remote"
116 - ? processOutput(input.remotes)
117 - : processOutput(input.resolved ?? "", input.resolved ? 0 : 1),
118 - ),
114 + };
115 + const host = TestSourceControlHost.layer({
116 + git: hostGit,
117 + process: {
118 + run: (args) =>
119 + Effect.succeed(
120 + args.args[0] === "remote"
121 + ? processOutput(input.remotes)
122 + : processOutput(input.resolved ?? "", input.resolved ? 0 : 1),
123 + ),
124 + },
125 });
126 const layer = Layer.mergeAll(
121 - driver,
122 - process,
127 + host,
128 Layer.mock(GitHubApi.GitHubApi)(input.api),
129 NodeServices.layer,
130 );
packages/source-control-github/src/server/GitHubSourceControlProvider.ts renamed
+7 -8
@@ -22,8 +22,6 @@ import { HostProcessEnvironment } from "@t3tools/shared/hostProcess";
22 import { decodeJsonResult } from "@t3tools/shared/schemaJson";
23 import { isSshRemoteUrl } from "@t3tools/shared/sourceControl";
24
25 -import * as ServerSettings from "../serverSettings.ts";
26 -import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
25 import * as GitHubApi from "./GitHubApi.ts";
26 import {
27 decodeGitHubPullRequestEntries,
@@ -54,7 +52,7 @@ import {
52 type SourceControlCliDiscoverySpec,
53 type SourceControlManagedCliDiscoverySpec,
54 } from "@t3tools/source-control-core/server/discovery";
57 -import * as VcsProcess from "../vcs/VcsProcess.ts";
55 +import * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
56
57 const decodeLinkSubject = Schema.decodeUnknownEffect(
58 Schema.fromJsonString(
@@ -192,9 +190,9 @@ function environmentTokenVariable(environment: NodeJS.ProcessEnv): string | null
190 */
191 export const makeDiscovery = Effect.gen(function* () {
192 const api = yield* GitHubApi.GitHubApi;
195 - const process = yield* VcsProcess.VcsProcess;
193 + const sourceControlHost = yield* SourceControlHost.SourceControlHost;
194 + const process = sourceControlHost.process;
195 const environment = yield* HostProcessEnvironment;
197 - const serverSettings = yield* ServerSettings.ServerSettingsService;
196
197 return {
198 type: "managed-cli",
@@ -202,7 +200,7 @@ export const makeDiscovery = Effect.gen(function* () {
200 label: discovery.label,
201 installHint: discovery.installHint,
202 probe: Effect.fn("GitHubSourceControlProvider.discovery")(function* (cwd: string) {
205 - const settings = yield* serverSettings.getSettings.pipe(
203 + const settings = yield* sourceControlHost.settings.get.pipe(
204 Effect.map((current) => current.github),
205 Effect.orElseSucceed(() => DEFAULT_SERVER_SETTINGS.github),
206 );
@@ -477,9 +475,10 @@ const contextHost = (context: SourceControlProvider.SourceControlProviderContext
475
476 export const make = Effect.gen(function* () {
477 const api = yield* GitHubApi.GitHubApi;
480 - const process = yield* VcsProcess.VcsProcess;
478 + const sourceControlHost = yield* SourceControlHost.SourceControlHost;
479 + const process = sourceControlHost.process;
480 const environment = yield* HostProcessEnvironment;
482 - const git = yield* GitVcsDriver.GitVcsDriver;
481 + const git = sourceControlHost.git;
482 const fileSystem = yield* FileSystem.FileSystem;
483
484 const gitRead = (cwd: string, args: ReadonlyArray<string>) =>
packages/source-control-github/src/server/driver.ts new
+20
@@ -0,0 +1,20 @@
1 +/**
2 + * The GitHub driver: repository operations and discovery through `gh` and git, and pull requests
3 + * through the GitHub REST and GraphQL APIs.
4 + *
5 + * @module source-control-github/server/driver
6 + */
7 +import { defineSourceControlDriver } from "@t3tools/source-control-core/server/driver";
8 +import * as Effect from "effect/Effect";
9 +
10 +import * as GitHubPullRequestProvider from "./GitHubPullRequestProvider.ts";
11 +import * as GitHubSourceControlProvider from "./GitHubSourceControlProvider.ts";
12 +
13 +export const driver = defineSourceControlDriver({
14 + kind: "github",
15 + make: Effect.all({
16 + sourceControl: GitHubSourceControlProvider.make,
17 + discovery: GitHubSourceControlProvider.makeDiscovery,
18 + pullRequests: GitHubPullRequestProvider.make,
19 + }),
20 +});
packages/source-control-github/src/server/gitHubAuthStatus.ts renamed
packages/source-control-github/src/server/gitHubConditionalChecks.test.ts renamed
+1 -1
@@ -6,7 +6,7 @@ import * as Schema from "effect/Schema";
6 import * as Redacted from "effect/Redacted";
7 import type { PullRequestCheck } from "@t3tools/contracts";
8
9 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
9 +import * as GitHubApi from "./GitHubApi.ts";
10 import { KnownWorkflowRuns, makeChecksRevalidator } from "./gitHubConditionalChecks.ts";
11
12 const encodeJson = Schema.encodeSync(Schema.fromJsonString(Schema.Unknown));
packages/source-control-github/src/server/gitHubConditionalChecks.ts renamed
+4 -2
@@ -7,7 +7,7 @@ import * as Schema from "effect/Schema";
7 import * as Semaphore from "effect/Semaphore";
8 import { PositiveInt, type PullRequestChecks } from "@t3tools/contracts";
9
10 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
10 +import * as GitHubApi from "./GitHubApi.ts";
11 import type { GitHubPullRequestDetail } from "./gitHubPullRequestJson.ts";
12 import type { GitHubPullRequestApiError } from "./GitHubPullRequestApi.ts";
13 import type { ProviderRepositoryRef } from "@t3tools/source-control-core/server/PullRequestProvider";
@@ -43,7 +43,9 @@ export type KnownWorkflowRun = typeof WorkflowRunSchema.Type;
43 export const KnownWorkflowRuns = Context.Reference<{
44 readonly headSha: string;
45 readonly runs: ReadonlyArray<KnownWorkflowRun>;
46 -} | null>("t3/pullRequest/KnownWorkflowRuns", { defaultValue: () => null });
46 +} | null>("@t3tools/source-control-github/server/gitHubConditionalChecks/KnownWorkflowRuns", {
47 + defaultValue: () => null,
48 +});
49
50 type Validator = { etag: string | undefined; next: boolean; body: string };
51
packages/source-control-github/src/server/gitHubPullRequestJson.test.ts renamed
packages/source-control-github/src/server/gitHubPullRequestJson.ts renamed
+1 -1
@@ -35,7 +35,7 @@ import type {
35 import { quoteGitPatchPath } from "@t3tools/shared/gitPatchPath";
36 import { decodeJsonResult } from "@t3tools/shared/schemaJson";
37
38 -import { aliasedGraphQlDocument, type GraphQlDocument } from "../sourceControl/githubGraphQl.ts";
38 +import { aliasedGraphQlDocument, type GraphQlDocument } from "./githubGraphQl.ts";
39 import { dedupeChecks } from "@t3tools/source-control-core/server/pullRequestChecks";
40
41 /**
packages/source-control-github/src/server/gitHubPullRequests.ts renamed
packages/source-control-github/src/server/gitHubRepositoryResolution.test.ts renamed
packages/source-control-github/src/server/gitHubRepositoryResolution.ts renamed
packages/source-control-github/src/server/githubGraphQl.test.ts renamed
packages/source-control-github/src/server/githubGraphQl.ts renamed
packages/source-control-github/src/server/githubStackActions.test.ts renamed
+18 -16
@@ -7,8 +7,8 @@ import * as TestClock from "effect/testing/TestClock";
7 import * as FileSystem from "effect/FileSystem";
8 import * as Redacted from "effect/Redacted";
9 import { ChildProcessSpawner } from "effect/process";
10 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
11 -import * as VcsProcess from "../vcs/VcsProcess.ts";
10 +import * as GitHubApi from "./GitHubApi.ts";
11 +import * as TestSourceControlHost from "@t3tools/source-control-testing/TestSourceControlHost";
12 import { runGitHubStackAction as runStackAction } from "./githubStackActions.ts";
13
14 /**
@@ -24,20 +24,22 @@ type Send = (
24 /** Every git command the cascade ran, in order; none actually runs. */
25 let gitCalls: Array<ReadonlyArray<string>> = [];
26 const fakeGit = Layer.mergeAll(
27 - Layer.mock(VcsProcess.VcsProcess)({
28 - run: (input) =>
29 - Effect.sync(() => {
30 - gitCalls.push(input.args);
31 - const stdout =
32 - input.args[0] === "rev-parse" || input.args[0] === "merge-base" ? "new-sha\n" : "";
33 - return {
34 - exitCode: ChildProcessSpawner.ExitCode(0),
35 - stdout,
36 - stderr: "",
37 - stdoutTruncated: false,
38 - stderrTruncated: false,
39 - };
40 - }),
27 + TestSourceControlHost.layer({
28 + process: {
29 + run: (input) =>
30 + Effect.sync(() => {
31 + gitCalls.push(input.args);
32 + const stdout =
33 + input.args[0] === "rev-parse" || input.args[0] === "merge-base" ? "new-sha\n" : "";
34 + return {
35 + exitCode: ChildProcessSpawner.ExitCode(0),
36 + stdout,
37 + stderr: "",
38 + stdoutTruncated: false,
39 + stderrTruncated: false,
40 + };
41 + }),
42 + },
43 }),
44 FileSystem.layerNoop({ makeTempDirectoryScoped: () => Effect.succeed("/tmp/scratch") }),
45 );
packages/source-control-github/src/server/githubStackActions.ts renamed
+2 -2
@@ -8,8 +8,8 @@ import * as Clock from "effect/Clock";
8 import * as Result from "effect/Result";
9 import * as Schema from "effect/Schema";
10
11 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
12 -import { aliasedGraphQlDocument } from "../sourceControl/githubGraphQl.ts";
11 +import * as GitHubApi from "./GitHubApi.ts";
12 +import { aliasedGraphQlDocument } from "./githubGraphQl.ts";
13 import { decodePullRequestStacksJson } from "./gitHubPullRequestJson.ts";
14 import { cascadeRebaseStack } from "./githubStackRebase.ts";
15
packages/source-control-github/src/server/githubStackRebase.ts renamed
+3 -3
@@ -4,8 +4,8 @@ import * as Redacted from "effect/Redacted";
4 import * as Schema from "effect/Schema";
5 import * as Base64 from "effect/encoding/Base64";
6
7 -import * as GitHubApi from "../sourceControl/GitHubApi.ts";
8 -import * as VcsProcess from "../vcs/VcsProcess.ts";
7 +import * as GitHubApi from "./GitHubApi.ts";
8 +import * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
9
10 /** One open layer of a stack, bottom to top, with the head the reader reviewed. */
11 export interface CascadeLayer {
@@ -58,7 +58,7 @@ export const cascadeRebaseStack = Effect.fn("cascadeRebaseStack")(function* (inp
58 readonly remote?: string;
59 }) {
60 const api = yield* GitHubApi.GitHubApi;
61 - const process = yield* VcsProcess.VcsProcess;
61 + const { process } = yield* SourceControlHost.SourceControlHost;
62 const fileSystem = yield* FileSystem.FileSystem;
63 const { token } = yield* api.credential(input.host);
64 const first = input.layers[0];
packages/source-control-github/tsconfig.json new
+7
@@ -0,0 +1,7 @@
1 +{
2 + "extends": "../../tsconfig.base.json",
3 + "compilerOptions": {
4 + "types": ["node"]
5 + },
6 + "include": ["src"]
7 +}
packages/source-control-testing/package.json
+1
@@ -13,6 +13,7 @@
13 },
14 "dependencies": {
15 "@t3tools/contracts": "workspace:*",
16 + "@t3tools/shared": "workspace:*",
17 "@t3tools/source-control-core": "workspace:*",
18 "effect": "catalog:"
19 },
packages/source-control-testing/src/TestSourceControlHost.ts
+39 -15
@@ -1,15 +1,23 @@
1 /**
2 - * A `SourceControlHost.SourceControlHost` for provider tests. Settings are fixed unless the test
3 - * supplies its own. Process runs and git operations go to what the test supplies; anything else
4 - * dies, so an unexpected CLI or git call is visible.
2 + * A `SourceControlHost.SourceControlHost` for provider tests. Settings start from the defaults
3 + * or what the test supplies, and `TestSourceControlHostSettings` patches them mid-test the way a
4 + * client's settings write would. Process runs and git operations go to what the test supplies;
5 + * anything else dies, so an unexpected CLI or git call is visible.
6 *
7 * @module source-control-testing/TestSourceControlHost
8 */
8 -import { DEFAULT_SERVER_SETTINGS, type ServerSettings } from "@t3tools/contracts";
9 +import {
10 + DEFAULT_SERVER_SETTINGS,
11 + type ServerSettings,
12 + type ServerSettingsPatch,
13 +} from "@t3tools/contracts";
14 +import { applyServerSettingsPatch } from "@t3tools/shared/serverSettings";
15 import * as SourceControlHost from "@t3tools/source-control-core/server/SourceControlHost";
16 +import * as Context from "effect/Context";
17 import * as Effect from "effect/Effect";
18 import * as Layer from "effect/Layer";
19 import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
20 +import * as Ref from "effect/Ref";
21
22 export interface TestSourceControlHostOptions {
23 readonly settings?: ServerSettings;
@@ -17,12 +25,20 @@ export interface TestSourceControlHostOptions {
25 readonly git?: Partial<SourceControlHost.SourceControlHost["Service"]["git"]>;
26 }
27
28 +/** Lets a test change the settings its `layer` reports. */
29 +export class TestSourceControlHostSettings extends Context.Service<
30 + TestSourceControlHostSettings,
31 + { readonly update: (patch: ServerSettingsPatch) => Effect.Effect<void> }
32 +>()("@t3tools/source-control-testing/TestSourceControlHost/TestSourceControlHostSettings") {}
33 +
34 type Git = SourceControlHost.SourceControlHost["Service"]["git"];
35
36 const unexpectedGit = (operation: string) => () =>
37 Effect.die(`Unexpected git ${operation} in a test that supplied none.`);
38
39 const failingGit: Git = {
40 + execute: unexpectedGit("execute"),
41 + resolveCommit: unexpectedGit("resolveCommit"),
42 remotes: unexpectedGit("remotes"),
43 readConfigValue: unexpectedGit("readConfigValue"),
44 resolvePrimaryRemoteName: unexpectedGit("resolvePrimaryRemoteName"),
@@ -36,17 +52,25 @@ const failingGit: Git = {
52
53 export const layer = (
54 options: TestSourceControlHostOptions = {},
39 -): Layer.Layer<SourceControlHost.SourceControlHost> =>
40 - Layer.succeed(
41 - SourceControlHost.SourceControlHost,
42 - SourceControlHost.SourceControlHost.of({
43 - settings: { get: Effect.succeed(options.settings ?? DEFAULT_SERVER_SETTINGS) },
44 - process: {
45 - run:
46 - options.process?.run ??
47 - ((input) => Effect.die(`Unexpected ${input.command} run in ${input.operation}.`)),
48 - },
49 - git: { ...failingGit, ...options.git },
55 +): Layer.Layer<SourceControlHost.SourceControlHost | TestSourceControlHostSettings> =>
56 + Layer.effectContext(
57 + Effect.gen(function* () {
58 + const settings = yield* Ref.make(options.settings ?? DEFAULT_SERVER_SETTINGS);
59 + const host = SourceControlHost.SourceControlHost.of({
60 + settings: { get: Ref.get(settings) },
61 + process: {
62 + run:
63 + options.process?.run ??
64 + ((input) => Effect.die(`Unexpected ${input.command} run in ${input.operation}.`)),
65 + },
66 + git: { ...failingGit, ...options.git },
67 + });
68 + return Context.make(SourceControlHost.SourceControlHost, host).pipe(
69 + Context.add(TestSourceControlHostSettings, {
70 + update: (patch) =>
71 + Ref.update(settings, (current) => applyServerSettingsPatch(current, patch)),
72 + }),
73 + );
74 }),
75 );
76
pnpm-lock.yaml
+40
@@ -660,6 +660,9 @@ importers:
660 '@t3tools/source-control-forgejo':
661 specifier: workspace:*
662 version: link:../../packages/source-control-forgejo
663 + '@t3tools/source-control-github':
664 + specifier: workspace:*
665 + version: link:../../packages/source-control-github
666 '@t3tools/source-control-gitlab':
667 specifier: workspace:*
668 version: link:../../packages/source-control-gitlab
@@ -1640,6 +1643,40 @@ importers:
1643 specifier: 1.0.0
1644 version: 1.0.0(@types/node@24.12.4)(@vitest/ui@5.0.1(vitest@5.0.1))(bufferutil@4.1.0)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(msw@2.12.11(@types/node@24.12.4)(typescript@7.0.2))(terser@5.48.0)(typescript@7.0.2)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
1645
1646 + packages/source-control-github:
1647 + dependencies:
1648 + '@t3tools/contracts':
1649 + specifier: workspace:*
1650 + version: link:../contracts
1651 + '@t3tools/provider-core':
1652 + specifier: workspace:*
1653 + version: link:../provider-core
1654 + '@t3tools/shared':
1655 + specifier: workspace:*
1656 + version: link:../shared
1657 + '@t3tools/source-control-core':
1658 + specifier: workspace:*
1659 + version: link:../source-control-core
1660 + effect:
1661 + specifier: 4.0.2
1662 + version: 4.0.2(patch_hash=ec61ee307eaec3e17f757e0e6a16296ea4b7a8c3188df0c6ec5e66301fd78688)
1663 + devDependencies:
1664 + '@effect/platform-node':
1665 + specifier: 4.0.2
1666 + version: 4.0.2(bufferutil@4.1.0)(effect@4.0.2(patch_hash=ec61ee307eaec3e17f757e0e6a16296ea4b7a8c3188df0c6ec5e66301fd78688))(redis@6.2.1)(utf-8-validate@6.0.6)
1667 + '@effect/vitest':
1668 + specifier: 4.0.2
1669 + version: 4.0.2(patch_hash=595b7d26fb635caba9c3d39fcb189bb78a000192f8d3b60ead7174b310d1ade9)(@types/node@24.12.4)(@vitest/ui@5.0.1)(bufferutil@4.1.0)(effect@4.0.2(patch_hash=ec61ee307eaec3e17f757e0e6a16296ea4b7a8c3188df0c6ec5e66301fd78688))(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(msw@2.12.11(@types/node@24.12.4)(typescript@7.0.2))(terser@5.48.0)(typescript@7.0.2)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
1670 + '@t3tools/source-control-testing':
1671 + specifier: workspace:*
1672 + version: link:../source-control-testing
1673 + '@types/node':
1674 + specifier: 24.12.4
1675 + version: 24.12.4
1676 + vite-plus:
1677 + specifier: 1.0.0
1678 + version: 1.0.0(@types/node@24.12.4)(@vitest/ui@5.0.1(vitest@5.0.1))(bufferutil@4.1.0)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(msw@2.12.11(@types/node@24.12.4)(typescript@7.0.2))(terser@5.48.0)(typescript@7.0.2)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
1679 +
1680 packages/source-control-gitlab:
1681 dependencies:
1682 '@t3tools/contracts':
@@ -1673,6 +1710,9 @@ importers:
1710 '@t3tools/contracts':
1711 specifier: workspace:*
1712 version: link:../contracts
1713 + '@t3tools/shared':
1714 + specifier: workspace:*
1715 + version: link:../shared
1716 '@t3tools/source-control-core':
1717 specifier: workspace:*
1718 version: link:../source-control-core
scripts/release-smoke.ts
+1
@@ -41,6 +41,7 @@ const workspaceFiles = [
41 "packages/source-control-bitbucket/package.json",
42 "packages/source-control-core/package.json",
43 "packages/source-control-forgejo/package.json",
44 + "packages/source-control-github/package.json",
45 "packages/source-control-gitlab/package.json",
46 "packages/source-control-testing/package.json",
47 "packages/effect-acp/package.json",