import type { WorkspaceInfo } from "@cline/shared"; export interface WorkspaceInfoDiagnostics { info: WorkspaceInfo; vcsType: "git" | "none"; gitState: GitWorkspaceState; error?: { errorType: string; message: string; }; } export interface BuiltWorkspaceMetadata { workspaceInfo: WorkspaceInfo; workspaceMetadata: string; durationMs: number; vcsType: "git" | "none"; gitState: GitWorkspaceState; initError?: { errorType: string; message: string; }; } export interface GitWorkspaceState { url?: string; branch?: string; } export declare function readSessionGitMetadata(metadata: Record | undefined): GitWorkspaceState; export declare function withSessionGitMetadata(metadata: Record | undefined, state: GitWorkspaceState): Record | undefined; export declare function hasCurrentSessionGitMetadata(metadata: Record | undefined, state: GitWorkspaceState): boolean; export declare function normalizeWorkspacePath(workspacePath: string): string; export declare function generateWorkspaceInfo(workspacePath: string): Promise; export declare function generateWorkspaceInfoWithDiagnostics(workspacePath: string): Promise; /** Read the mutable git identity persisted with an active session. */ export declare function readGitWorkspaceState(workspacePath: string): Promise; export declare function buildWorkspaceMetadata(cwd: string): Promise; /** * Generate workspace metadata as both a structured `WorkspaceInfo` object and * its pre-serialized string form. * * Use this instead of calling `buildWorkspaceMetadata` + `generateWorkspaceInfo` * separately so the git I/O only happens once. */ export declare function buildWorkspaceMetadataWithInfo(cwd: string): Promise;