/** * Copyright Daytona Platforms Inc. * SPDX-License-Identifier: Apache-2.0 */ export declare class HostGitManager { private operationQueue; /** Cached OID of an empty commit used to reserve branch refs (branches must point at commits, not blobs). */ private emptyCommitOidCache; /** * Checks if a git repository exists in the current directory * @returns true if a git repo exists, false otherwise */ hasRepo(cwd?: string): boolean; /** * Allocates the next available opencode/N branch number by scanning local refs and * reserving the chosen number by creating the ref immediately. * * This avoids relying on OpenCode's project ID and works even in repos with no commits. */ allocateAndReserveBranchNumber(cwd: string, prefix?: string): number; private refExists; /** * Returns a commit OID that branch refs can point at. Uses HEAD if the repo has commits, * otherwise creates and caches an empty commit (empty tree + commit). Branch refs must * point at commits, not blobs. */ private getOrCreateEmptyCommitOid; /** * Pushes local changes to the sandbox remote. * @param remoteName Numbered remote (e.g. sandbox-2) matching opencode/N. * @param sshUrl The SSH URL of the sandbox remote. * @param branch The branch to push to. * @param cwd Worktree path to run git in. * @returns true if push was successful, false if no repo exists */ pushLocalToSandboxRemote(remoteName: string, sshUrl: string, branch: string, cwd: string): Promise; private setRemote; pull(remoteName: string, sshUrl: string, branch: string, cwd: string, localBranch?: string): Promise; push(remoteName: string, sshUrl: string, branch: string, cwd: string): Promise; }