///
///
import type { NormalizedQuestionsCliOptions } from './questionsCliOptions';
/**
* Resolved project directory and its enclosing working tree. Project artifacts belong to `projectPath`;
* Git paths and synchronization belong to `repositoryRoot`, which may be an enclosing monorepo.
*
* @private shared workspace context for Coder and workspace server commands
*/
export type WorkspaceRepositoryContext = {
readonly projectPath: string;
readonly repositoryRoot?: string;
readonly gitDirectory?: string;
readonly repositoryStatus: 'missing' | 'reused' | 'initialized';
};
/**
* Command policy is separate from discovery: previews never initialize; explicit init needs no confirmation.
*
* @private shared workspace policy for Coder and workspace server commands
*/
export type WorkspaceRepositoryPolicy = 'initialize' | 'mutate' | 'read-only';
/**
* Resolves the requested project once and discovers Git using Git itself, without requiring `HEAD`.
* Broken metadata, bare repositories, ownership errors and unavailable Git are failures, not missing repositories.
*
* @private shared workspace discovery for CLI commands
*/
export declare function $resolveWorkspaceRepository(projectDirectory?: string): Promise;
/**
* Checks the shared prerequisite before any project writes, Git synchronization, installation or startup.
* Only an affirmative interactive answer or an explicit initializer authorizes `git init`.
*
* @private shared workspace preflight for Coder and workspace server commands
*/
export declare function $preflightWorkspaceRepository(options: {
readonly projectDirectory?: string;
readonly policy: WorkspaceRepositoryPolicy;
} & Partial): Promise;
/**
* Executes Git without a shell, optional index locks, or credential prompts, retaining raw output boundaries.
* Drains both output streams without execFile's fixed buffer limit so large repository listings remain complete.
* @private shared Git discovery and commit-scope inspection
*/
export declare function $runWorkspaceGit(projectPath: string, argumentsList: ReadonlyArray, options?: {
readonly env?: Record;
readonly signal?: AbortSignal;
readonly input?: string | Buffer;
}): Promise;