Files
t3code/apps/server/src/vcs/VcsDriver.ts
T
Julius Marminge 82a8394cd8 Split git VCS driver from core service
- Introduce a dedicated `GitVcsDriver` service and `vcsLayer`
- Update server, orchestration, and workspace wiring to use the new layer
- Adjust tests and mocks for the new git-specific dependency
2026-05-02 00:02:06 -07:00

28 lines
999 B
TypeScript

import { Context, type Effect } from "effect";
import type {
VcsDriverCapabilities,
VcsError,
VcsListWorkspaceFilesResult,
VcsRepositoryIdentity,
} from "@t3tools/contracts";
import type { VcsProcessInput, VcsProcessOutput } from "./VcsProcess.ts";
export interface VcsDriverShape {
readonly capabilities: VcsDriverCapabilities;
readonly execute: (
input: Omit<VcsProcessInput, "command">,
) => Effect.Effect<VcsProcessOutput, VcsError>;
readonly detectRepository: (cwd: string) => Effect.Effect<VcsRepositoryIdentity | null, VcsError>;
readonly isInsideWorkTree: (cwd: string) => Effect.Effect<boolean, VcsError>;
readonly listWorkspaceFiles: (
cwd: string,
) => Effect.Effect<VcsListWorkspaceFilesResult, VcsError>;
readonly filterIgnoredPaths: (
cwd: string,
relativePaths: ReadonlyArray<string>,
) => Effect.Effect<ReadonlyArray<string>, VcsError>;
}
export class VcsDriver extends Context.Service<VcsDriver, VcsDriverShape>()("t3/vcs/VcsDriver") {}