import type { VcsApi } from "@opencode-ai/client/effect/api" import type { FileDiff } from "@opencode-ai/schema/file-diff" import type { Vcs } from "@opencode-ai/schema/vcs" import type { Effect } from "effect" import type { Transform } from "./registration.js" export interface VcsScope { readonly directory: string readonly worktree: string readonly canonical: string readonly store?: string } export interface VcsBranchesInput extends VcsScope { readonly search?: string readonly limit?: number } export interface VcsDiffInput extends VcsScope { readonly mode: Vcs.Mode readonly context: number readonly maxOutputBytes: number } export interface VcsDefinition { readonly id: string readonly name: string readonly info: (input: VcsScope) => Effect.Effect readonly branches: (input: VcsBranchesInput) => Effect.Effect readonly status: (input: VcsScope) => Effect.Effect readonly diff: (input: VcsDiffInput) => Effect.Effect } export interface VcsDomain extends VcsApi { readonly transform: Transform readonly reload: () => Effect.Effect } export interface VcsDraft { add(definition: VcsDefinition): void readonly default: { get(): string | undefined set(selection: string): void } }