diff --git a/apps/server/integration/OrchestrationEngineHarness.integration.ts b/apps/server/integration/OrchestrationEngineHarness.integration.ts index d4c61e8aa9..d2ff44a55a 100644 --- a/apps/server/integration/OrchestrationEngineHarness.integration.ts +++ b/apps/server/integration/OrchestrationEngineHarness.integration.ts @@ -33,7 +33,6 @@ import { ProjectionCheckpointRepositoryLive } from "../src/persistence/Layers/Pr import { ProjectionPendingApprovalRepositoryLive } from "../src/persistence/Layers/ProjectionPendingApprovals.ts"; import { ProviderSessionRuntimeRepositoryLive } from "../src/persistence/Layers/ProviderSessionRuntime.ts"; import { makeSqlitePersistenceLive } from "../src/persistence/Layers/Sqlite.ts"; -import { VcsDriver, type VcsDriverShape } from "../src/vcs/VcsDriver.ts"; import { ProjectionCheckpointRepository } from "../src/persistence/Services/ProjectionCheckpoints.ts"; import { ProjectionPendingApprovalRepository } from "../src/persistence/Services/ProjectionPendingApprovals.ts"; import { makeAdapterRegistryMock } from "../src/provider/testUtils/providerAdapterRegistryMock.ts"; @@ -292,7 +291,7 @@ export const makeOrchestrationIntegrationHarness = ( Layer.provide(providerEventLoggersLayer), ); - const checkpointStoreLayer = CheckpointStoreLive.pipe(Layer.provide(GitVcsDriver.layer)); + const checkpointStoreLayer = CheckpointStoreLive.pipe(Layer.provide(GitVcsDriver.vcsLayer)); const projectionSnapshotQueryLayer = OrchestrationProjectionSnapshotQueryLive; const runtimeServicesLayer = Layer.mergeAll( projectionSnapshotQueryLayer, @@ -308,17 +307,17 @@ export const makeOrchestrationIntegrationHarness = ( Layer.provideMerge(runtimeServicesLayer), Layer.provideMerge(serverSettingsLayer), ); - const vcsDriverLayer = Layer.succeed(VcsDriver, { - renameBranch: (input: Parameters[0]) => + const gitVcsDriverLayer = Layer.succeed(GitVcsDriver.GitVcsDriver, { + renameBranch: (input: Parameters[0]) => Effect.succeed({ branch: input.newBranch }), - } as unknown as VcsDriverShape); + } as unknown as GitVcsDriver.GitVcsDriverShape); const textGenerationLayer = Layer.succeed(TextGeneration, { generateBranchName: () => Effect.succeed({ branch: "update" }), generateThreadTitle: () => Effect.succeed({ title: "New thread" }), } as unknown as TextGenerationShape); const providerCommandReactorLayer = ProviderCommandReactorLive.pipe( Layer.provideMerge(runtimeServicesLayer), - Layer.provideMerge(vcsDriverLayer), + Layer.provideMerge(gitVcsDriverLayer), Layer.provideMerge(textGenerationLayer), Layer.provideMerge(serverSettingsLayer), ); @@ -343,7 +342,7 @@ export const makeOrchestrationIntegrationHarness = ( Layer.provideMerge( WorkspaceEntriesLive.pipe( Layer.provide(WorkspacePathsLive), - Layer.provideMerge(GitVcsDriver.layer), + Layer.provideMerge(GitVcsDriver.vcsLayer), Layer.provide(NodeServices.layer), ), ), diff --git a/apps/server/src/checkpointing/Layers/CheckpointStore.test.ts b/apps/server/src/checkpointing/Layers/CheckpointStore.test.ts index ce9d6b305e..363e5ba6fc 100644 --- a/apps/server/src/checkpointing/Layers/CheckpointStore.test.ts +++ b/apps/server/src/checkpointing/Layers/CheckpointStore.test.ts @@ -18,7 +18,7 @@ const ServerConfigLayer = ServerConfig.layerTest(process.cwd(), { prefix: "t3-checkpoint-store-test-", }); const VcsProcessTestLayer = VcsProcess.layer.pipe(Layer.provide(NodeServices.layer)); -const VcsDriverTestLayer = GitVcsDriver.layer.pipe(Layer.provide(VcsProcessTestLayer)); +const VcsDriverTestLayer = GitVcsDriver.vcsLayer.pipe(Layer.provide(VcsProcessTestLayer)); const CheckpointStoreTestLayer = CheckpointStoreLive.pipe( Layer.provideMerge(VcsDriverTestLayer), Layer.provideMerge(NodeServices.layer), diff --git a/apps/server/src/git/Layers/GitManager.test.ts b/apps/server/src/git/Layers/GitManager.test.ts index fb5c2ee2d8..4213f6336e 100644 --- a/apps/server/src/git/Layers/GitManager.test.ts +++ b/apps/server/src/git/Layers/GitManager.test.ts @@ -23,7 +23,6 @@ import { import { type TextGenerationShape, TextGeneration } from "../Services/TextGeneration.ts"; import * as GitVcsDriver from "../../vcs/GitVcsDriver.ts"; import * as VcsProcess from "../../vcs/VcsProcess.ts"; -import { VcsDriver } from "../../vcs/VcsDriver.ts"; import { makeGitManager } from "./GitManager.ts"; import { ServerConfig } from "../../config.ts"; import { ServerSettingsService } from "../../serverSettings.ts"; @@ -212,30 +211,18 @@ function runGit( ): Effect.Effect< { readonly code: number; readonly stdout: string; readonly stderr: string }, GitCommandError, - VcsDriver + GitVcsDriver.GitVcsDriver > { return Effect.gen(function* () { - const vcs = yield* VcsDriver; - const result = yield* vcs - .execute({ - operation: "GitManager.test.runGit", - cwd, - args, - allowNonZeroExit, - }) - .pipe( - Effect.mapError( - (error) => - new GitCommandError({ - operation: "GitManager.test.runGit", - command: `git ${args.join(" ")}`, - cwd, - detail: error.message, - }), - ), - ); + const git = yield* GitVcsDriver.GitVcsDriver; + const result = yield* git.execute({ + operation: "GitManager.test.runGit", + cwd, + args, + allowNonZeroExit, + }); return { - code: result.exitCode, + code: result.code, stdout: result.stdout, stderr: result.stderr, }; @@ -247,7 +234,7 @@ function initRepo( ): Effect.Effect< void, PlatformError.PlatformError | GitCommandError, - FileSystem.FileSystem | Scope.Scope | VcsDriver + FileSystem.FileSystem | Scope.Scope | GitVcsDriver.GitVcsDriver > { return Effect.gen(function* () { const fs = yield* FileSystem.FileSystem; @@ -263,7 +250,7 @@ function initRepo( function createBareRemote(): Effect.Effect< string, PlatformError.PlatformError | GitCommandError, - FileSystem.FileSystem | Scope.Scope | VcsDriver + FileSystem.FileSystem | Scope.Scope | GitVcsDriver.GitVcsDriver > { return Effect.gen(function* () { const remoteDir = yield* makeTempDir("t3code-git-remote-"); @@ -277,7 +264,7 @@ function configureRemote( remoteName: string, remotePath: string, fetchNamespace: string, -): Effect.Effect { +): Effect.Effect { return Effect.gen(function* () { yield* runGit(cwd, ["config", `remote.${remoteName}.url`, remotePath]); yield* runGit(cwd, [ diff --git a/apps/server/src/git/Layers/GitManager.ts b/apps/server/src/git/Layers/GitManager.ts index b6b87f8f9c..a25cb6856b 100644 --- a/apps/server/src/git/Layers/GitManager.ts +++ b/apps/server/src/git/Layers/GitManager.ts @@ -49,7 +49,7 @@ import { decodeGitHubPullRequestListJson, formatGitHubJsonDecodeError, } from "../githubPullRequests.ts"; -import { VcsDriver } from "../../vcs/VcsDriver.ts"; +import { GitVcsDriver } from "../../vcs/GitVcsDriver.ts"; const COMMIT_TIMEOUT_MS = 10 * 60_000; const MAX_PROGRESS_TEXT_LENGTH = 500; @@ -491,7 +491,7 @@ function toPullRequestHeadRemoteInfo(pr: { } export const makeGitManager = Effect.fn("makeGitManager")(function* () { - const gitCore = yield* VcsDriver; + const gitCore = yield* GitVcsDriver; const gitHubCli = yield* GitHubCli; const textGeneration = yield* TextGeneration; const projectSetupScriptRunner = yield* ProjectSetupScriptRunner; diff --git a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts index ff267b11ab..4ccf68f925 100644 --- a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts +++ b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts @@ -307,11 +307,11 @@ describe("CheckpointReactor", () => { Layer.provideMerge(RuntimeReceiptBusLive), Layer.provideMerge(Layer.succeed(ProviderService, provider.service)), Layer.provideMerge(gitStatusBroadcasterLayer), - Layer.provideMerge(CheckpointStoreLive.pipe(Layer.provide(GitVcsDriver.layer))), + Layer.provideMerge(CheckpointStoreLive.pipe(Layer.provide(GitVcsDriver.vcsLayer))), Layer.provideMerge( WorkspaceEntriesLive.pipe( Layer.provide(WorkspacePathsLive), - Layer.provideMerge(GitVcsDriver.layer), + Layer.provideMerge(GitVcsDriver.vcsLayer), ), ), Layer.provideMerge(WorkspacePathsLive), diff --git a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts index 293fa0e600..d510041835 100644 --- a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts +++ b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts @@ -51,7 +51,7 @@ import { OrchestrationEngineService } from "../Services/OrchestrationEngine.ts"; import { ProviderCommandReactor } from "../Services/ProviderCommandReactor.ts"; import * as NodeServices from "@effect/platform-node/NodeServices"; import { ServerSettingsService } from "../../serverSettings.ts"; -import { VcsDriver, type VcsDriverShape } from "../../vcs/VcsDriver.ts"; +import * as GitVcsDriver from "../../vcs/GitVcsDriver.ts"; const asProjectId = (value: string): ProjectId => ProjectId.make(value); const asApprovalRequestId = (value: string): ApprovalRequestId => ApprovalRequestId.make(value); @@ -324,7 +324,11 @@ describe("ProviderCommandReactor", () => { const layer = ProviderCommandReactorLive.pipe( Layer.provideMerge(orchestrationLayer), Layer.provideMerge(Layer.succeed(ProviderService, service)), - Layer.provideMerge(Layer.succeed(VcsDriver, { renameBranch } as unknown as VcsDriverShape)), + Layer.provideMerge( + Layer.succeed(GitVcsDriver.GitVcsDriver, { + renameBranch, + } as unknown as GitVcsDriver.GitVcsDriverShape), + ), Layer.provideMerge( Layer.succeed(GitStatusBroadcaster, { getStatus: () => Effect.die("getStatus should not be called in this test"), diff --git a/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts b/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts index 89c3c9cdec..d3793c7622 100644 --- a/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts +++ b/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts @@ -28,7 +28,7 @@ import { type ProviderCommandReactorShape, } from "../Services/ProviderCommandReactor.ts"; import { ServerSettingsService } from "../../serverSettings.ts"; -import { VcsDriver } from "../../vcs/VcsDriver.ts"; +import { GitVcsDriver } from "../../vcs/GitVcsDriver.ts"; type ProviderIntentEvent = Extract< OrchestrationEvent, @@ -168,7 +168,7 @@ function buildGeneratedWorktreeBranchName(raw: string): string { const make = Effect.gen(function* () { const orchestrationEngine = yield* OrchestrationEngineService; const providerService = yield* ProviderService; - const git = yield* VcsDriver; + const git = yield* GitVcsDriver; const gitStatusBroadcaster = yield* GitStatusBroadcaster; const textGeneration = yield* TextGeneration; const serverSettingsService = yield* ServerSettingsService; diff --git a/apps/server/src/server.test.ts b/apps/server/src/server.test.ts index a9d5a46c8c..27cc34ba85 100644 --- a/apps/server/src/server.test.ts +++ b/apps/server/src/server.test.ts @@ -104,6 +104,7 @@ import { import { WorkspaceEntriesLive } from "./workspace/Layers/WorkspaceEntries.ts"; import { WorkspaceFileSystemLive } from "./workspace/Layers/WorkspaceFileSystem.ts"; import { WorkspacePathsLive } from "./workspace/Layers/WorkspacePaths.ts"; +import * as GitVcsDriver from "./vcs/GitVcsDriver.ts"; import { VcsDriver, type VcsDriverShape } from "./vcs/VcsDriver.ts"; import { ServerSecretStoreLive } from "./auth/Layers/ServerSecretStore.ts"; import { ServerAuthLive } from "./auth/Layers/ServerAuth.ts"; @@ -315,6 +316,7 @@ const buildAppUnderTest = (options?: { serverSettings?: Partial; open?: Partial; vcsDriver?: Partial; + gitVcsDriver?: Partial; gitManager?: Partial; gitStatusBroadcaster?: Partial; projectSetupScriptRunner?: Partial; @@ -384,6 +386,9 @@ const buildAppUnderTest = (options?: { filterIgnoredPaths: (_cwd, relativePaths) => Effect.succeed(relativePaths), ...options?.layers?.vcsDriver, }); + const gitVcsDriverLayer = Layer.mock(GitVcsDriver.GitVcsDriver)({ + ...options?.layers?.gitVcsDriver, + }); const gitManagerLayer = Layer.mock(GitManager)({ ...options?.layers?.gitManager, }); @@ -444,6 +449,7 @@ const buildAppUnderTest = (options?: { }), ), Layer.provide(gitManagerLayer), + Layer.provide(gitVcsDriverLayer), Layer.provideMerge(gitStatusBroadcasterLayer), Layer.provide( Layer.mock(ProjectSetupScriptRunner)({ @@ -2377,7 +2383,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { worktreePath: null, }), }, - vcsDriver: { + gitVcsDriver: { pullCurrentBranch: () => Effect.succeed({ status: "pulled", @@ -2531,7 +2537,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { let statusCalls = 0; yield* buildAppUnderTest({ layers: { - vcsDriver: { + gitVcsDriver: { pullCurrentBranch: () => Effect.fail(gitError), }, gitManager: { @@ -2685,7 +2691,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { Effect.gen(function* () { yield* buildAppUnderTest({ layers: { - vcsDriver: { + gitVcsDriver: { pullCurrentBranch: () => Effect.succeed({ status: "pulled" as const, @@ -3499,13 +3505,14 @@ it.layer(NodeServices.layer)("server router seam", (it) => { pr: null, }), ); - const createWorktree = vi.fn((_: Parameters[0]) => - Effect.succeed({ - worktree: { - branch: "t3code/bootstrap-branch", - path: "/tmp/bootstrap-worktree", - }, - }), + const createWorktree = vi.fn( + (_: Parameters[0]) => + Effect.succeed({ + worktree: { + branch: "t3code/bootstrap-branch", + path: "/tmp/bootstrap-worktree", + }, + }), ); const runForThread = vi.fn( (_: Parameters[0]) => @@ -3520,7 +3527,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { yield* buildAppUnderTest({ layers: { - vcsDriver: { + gitVcsDriver: { createWorktree, }, gitStatusBroadcaster: { @@ -3624,13 +3631,14 @@ it.layer(NodeServices.layer)("server router seam", (it) => { it.effect("records setup-script failures without aborting bootstrap turn start", () => Effect.gen(function* () { const dispatchedCommands: Array = []; - const createWorktree = vi.fn((_: Parameters[0]) => - Effect.succeed({ - worktree: { - branch: "t3code/bootstrap-branch", - path: "/tmp/bootstrap-worktree", - }, - }), + const createWorktree = vi.fn( + (_: Parameters[0]) => + Effect.succeed({ + worktree: { + branch: "t3code/bootstrap-branch", + path: "/tmp/bootstrap-worktree", + }, + }), ); const runForThread = vi.fn( (_: Parameters[0]) => @@ -3639,7 +3647,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { yield* buildAppUnderTest({ layers: { - vcsDriver: { + gitVcsDriver: { createWorktree, }, orchestrationEngine: { @@ -3717,13 +3725,14 @@ it.layer(NodeServices.layer)("server router seam", (it) => { it.effect("does not misattribute setup activity dispatch failures as setup launch failures", () => Effect.gen(function* () { const dispatchedCommands: Array = []; - const createWorktree = vi.fn((_: Parameters[0]) => - Effect.succeed({ - worktree: { - branch: "t3code/bootstrap-branch", - path: "/tmp/bootstrap-worktree", - }, - }), + const createWorktree = vi.fn( + (_: Parameters[0]) => + Effect.succeed({ + worktree: { + branch: "t3code/bootstrap-branch", + path: "/tmp/bootstrap-worktree", + }, + }), ); const runForThread = vi.fn( (_: Parameters[0]) => @@ -3739,7 +3748,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => { yield* buildAppUnderTest({ layers: { - vcsDriver: { + gitVcsDriver: { createWorktree, }, orchestrationEngine: { @@ -3835,13 +3844,14 @@ it.layer(NodeServices.layer)("server router seam", (it) => { it.effect("cleans up created bootstrap threads when worktree creation defects", () => Effect.gen(function* () { const dispatchedCommands: Array = []; - const createWorktree = vi.fn((_: Parameters[0]) => - Effect.die(new Error("worktree exploded")), + const createWorktree = vi.fn( + (_: Parameters[0]) => + Effect.die(new Error("worktree exploded")), ); yield* buildAppUnderTest({ layers: { - vcsDriver: { + gitVcsDriver: { createWorktree, }, orchestrationEngine: { diff --git a/apps/server/src/server.ts b/apps/server/src/server.ts index 8632e46921..a478be135a 100644 --- a/apps/server/src/server.ts +++ b/apps/server/src/server.ts @@ -136,7 +136,7 @@ const ReactorLayerLive = Layer.empty.pipe( const CheckpointingLayerLive = Layer.empty.pipe( Layer.provideMerge(CheckpointDiffQueryLive), - Layer.provideMerge(CheckpointStoreLive.pipe(Layer.provide(GitVcsDriver.layer))), + Layer.provideMerge(CheckpointStoreLive.pipe(Layer.provide(GitVcsDriver.vcsLayer))), ); const ProviderSessionDirectoryLayerLive = ProviderSessionDirectoryLive.pipe( @@ -173,7 +173,7 @@ const TerminalLayerLive = TerminalManagerLive.pipe(Layer.provide(PtyAdapterLive) const WorkspaceEntriesLayerLive = WorkspaceEntriesLive.pipe( Layer.provide(WorkspacePathsLive), - Layer.provideMerge(GitVcsDriver.layer), + Layer.provideMerge(GitVcsDriver.vcsLayer), ); const WorkspaceFileSystemLayerLive = WorkspaceFileSystemLive.pipe( diff --git a/apps/server/src/vcs/GitVcsDriver.test.ts b/apps/server/src/vcs/GitVcsDriver.test.ts index e8fb4d97ef..7e981cd991 100644 --- a/apps/server/src/vcs/GitVcsDriver.test.ts +++ b/apps/server/src/vcs/GitVcsDriver.test.ts @@ -18,7 +18,7 @@ const GitVcsDriverTestDependencies = ServerConfig.layerTest(process.cwd(), { prefix: "t3-git-vcs-driver-test-", }).pipe(Layer.provide(NodeServices.layer)); -it.layer(Layer.empty)("GitVcsDriver.layer", (it) => { +it.layer(Layer.empty)("GitVcsDriver.vcsLayer", (it) => { describe("workspace helpers", () => { it.effect("filterIgnoredPaths chunks large path lists and preserves kept paths", () => Effect.gen(function* () { @@ -32,7 +32,7 @@ it.layer(Layer.empty)("GitVcsDriver.layer", (it) => { ); const seenChunks: string[][] = []; - const layer = GitVcsDriver.layer.pipe( + const layer = GitVcsDriver.vcsLayer.pipe( Layer.provideMerge(GitVcsDriverTestDependencies), Layer.provideMerge(NodeServices.layer), Layer.provide( @@ -81,7 +81,7 @@ it.layer(Layer.empty)("GitVcsDriver.layer", (it) => { it.effect("listWorkspaceFiles disables fsmonitor and untracked cache helpers", () => Effect.gen(function* () { - const layer = GitVcsDriver.layer.pipe( + const layer = GitVcsDriver.vcsLayer.pipe( Layer.provideMerge(GitVcsDriverTestDependencies), Layer.provideMerge(NodeServices.layer), Layer.provide( diff --git a/apps/server/src/vcs/GitVcsDriver.ts b/apps/server/src/vcs/GitVcsDriver.ts index 7ccc5c9334..7df9c13581 100644 --- a/apps/server/src/vcs/GitVcsDriver.ts +++ b/apps/server/src/vcs/GitVcsDriver.ts @@ -1,10 +1,17 @@ -import { DateTime, Effect, Layer } from "effect"; +import { Context, DateTime, Effect, Layer } from "effect"; import { VcsProcessExitError } from "@t3tools/contracts"; import { makeGitCore } from "../git/Layers/GitCore.ts"; +import type { GitCoreShape } from "../git/Services/GitCore.ts"; import { VcsDriver, type VcsDriverShape } from "./VcsDriver.ts"; import { VcsProcess, type VcsProcessShape } from "./VcsProcess.ts"; +export interface GitVcsDriverShape extends GitCoreShape {} + +export class GitVcsDriver extends Context.Service()( + "t3/vcs/GitVcsDriver", +) {} + const WORKSPACE_FILES_MAX_OUTPUT_BYTES = 16 * 1024 * 1024; const GIT_CHECK_IGNORE_MAX_STDIN_BYTES = 256 * 1024; const WORKSPACE_GIT_HARDENED_CONFIG_ARGS = [ @@ -92,9 +99,8 @@ const gitCommand = ( : {}), }); -export const make = Effect.fn("makeGitVcsDriver")(function* () { +export const makeVcsDriver = Effect.fn("makeGitVcsDriver")(function* () { const process = yield* VcsProcess; - const legacyGit = yield* makeGitCore(); const capabilities = { kind: "git" as const, supportsWorktrees: true, @@ -243,7 +249,6 @@ export const make = Effect.fn("makeGitVcsDriver")(function* () { ); return VcsDriver.of({ - ...legacyGit, capabilities, execute, detectRepository, @@ -253,4 +258,10 @@ export const make = Effect.fn("makeGitVcsDriver")(function* () { }); }); -export const layer = Layer.effect(VcsDriver, make()); +export const make = Effect.fn("makeGitVcsDriverService")(function* () { + const legacyGit = yield* makeGitCore(); + return GitVcsDriver.of(legacyGit); +}); + +export const vcsLayer = Layer.effect(VcsDriver, makeVcsDriver()); +export const layer = Layer.effect(GitVcsDriver, make()); diff --git a/apps/server/src/vcs/VcsDriver.ts b/apps/server/src/vcs/VcsDriver.ts index d94e0a53f6..7dfa3b707a 100644 --- a/apps/server/src/vcs/VcsDriver.ts +++ b/apps/server/src/vcs/VcsDriver.ts @@ -6,10 +6,9 @@ import type { VcsListWorkspaceFilesResult, VcsRepositoryIdentity, } from "@t3tools/contracts"; -import type { GitCoreShape } from "../git/Services/GitCore.ts"; import type { VcsProcessInput, VcsProcessOutput } from "./VcsProcess.ts"; -export interface VcsDriverShape extends Omit { +export interface VcsDriverShape { readonly capabilities: VcsDriverCapabilities; readonly execute: ( input: Omit, diff --git a/apps/server/src/workspace/Layers/WorkspaceEntries.test.ts b/apps/server/src/workspace/Layers/WorkspaceEntries.test.ts index 3c39526ff2..a0ec468a3e 100644 --- a/apps/server/src/workspace/Layers/WorkspaceEntries.test.ts +++ b/apps/server/src/workspace/Layers/WorkspaceEntries.test.ts @@ -15,7 +15,7 @@ const TestLayer = Layer.empty.pipe( Layer.provideMerge(WorkspaceEntriesLive.pipe(Layer.provide(WorkspacePathsLive))), Layer.provideMerge(WorkspacePathsLive), Layer.provideMerge(VcsProcess.layer), - Layer.provideMerge(GitVcsDriver.layer.pipe(Layer.provide(VcsProcess.layer))), + Layer.provideMerge(GitVcsDriver.vcsLayer.pipe(Layer.provide(VcsProcess.layer))), Layer.provide( ServerConfig.layerTest(process.cwd(), { prefix: "t3-workspace-entries-test-", diff --git a/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts b/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts index fffc401a8c..b19b810dd1 100644 --- a/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts +++ b/apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts @@ -20,7 +20,7 @@ const TestLayer = Layer.empty.pipe( Layer.provideMerge(ProjectLayer), Layer.provideMerge(WorkspaceEntriesLive.pipe(Layer.provide(WorkspacePathsLive))), Layer.provideMerge(WorkspacePathsLive), - Layer.provideMerge(GitVcsDriver.layer.pipe(Layer.provide(VcsProcess.layer))), + Layer.provideMerge(GitVcsDriver.vcsLayer.pipe(Layer.provide(VcsProcess.layer))), Layer.provide( ServerConfig.layerTest(process.cwd(), { prefix: "t3-workspace-files-test-", diff --git a/apps/server/src/ws.ts b/apps/server/src/ws.ts index 065706ca3f..38a34884d6 100644 --- a/apps/server/src/ws.ts +++ b/apps/server/src/ws.ts @@ -49,7 +49,7 @@ import { TerminalManager } from "./terminal/Services/Manager.ts"; import { WorkspaceEntries } from "./workspace/Services/WorkspaceEntries.ts"; import { WorkspaceFileSystem } from "./workspace/Services/WorkspaceFileSystem.ts"; import { WorkspacePathOutsideRootError } from "./workspace/Services/WorkspacePaths.ts"; -import { VcsDriver } from "./vcs/VcsDriver.ts"; +import { GitVcsDriver } from "./vcs/GitVcsDriver.ts"; import { ProjectSetupScriptRunner } from "./project/Services/ProjectSetupScriptRunner.ts"; import { RepositoryIdentityResolver } from "./project/Services/RepositoryIdentityResolver.ts"; import { ServerEnvironment } from "./environment/Services/ServerEnvironment.ts"; @@ -137,7 +137,7 @@ const makeWsRpcLayer = (currentSessionId: AuthSessionId) => const keybindings = yield* Keybindings; const open = yield* Open; const gitManager = yield* GitManager; - const git = yield* VcsDriver; + const git = yield* GitVcsDriver; const gitStatusBroadcaster = yield* GitStatusBroadcaster; const terminalManager = yield* TerminalManager; const providerRegistry = yield* ProviderRegistry;