export type WorkspaceResolutionSource = 'explicit' | 'client-env' | 'pwd' | 'git' | 'package' | 'cwd';
export interface WorkspaceResolution {
    workspaceRoot: string;
    cwd: string;
    source: WorkspaceResolutionSource;
    gitRoot?: string;
    candidateRoots: string[];
}
export interface WorkspaceContext extends WorkspaceResolution {
    repoRoot: string;
    repoName: string;
    remoteUrl?: string;
    workspaceSource: WorkspaceResolutionSource;
    stateRoot: string;
    stateKey: string;
    notes: string[];
}
export interface EngineStorageResolution {
    requestedRoot: string;
    storageRoot: string;
    fallbackApplied: boolean;
    fallbackReason?: string;
}
export interface EngineStorageOverride {
    engine: 'synapse' | 'architects' | 'workforce';
    requestedRoot: string;
    storageRoot: string;
    reason: string;
    createdAt: number;
    quarantinePath?: string;
    sourceDbPath?: string;
}
export declare function resolveHomeCodexRoot(): string;
export declare function createWorkspaceStateKey(workspaceRoot: string): string;
export declare function resolveWorkspaceStateRoot(workspaceRoot: string): string;
export declare function readEngineStorageOverride(requestedRoot: string, engineName: 'synapse' | 'architects' | 'workforce'): EngineStorageOverride | null;
export declare function writeEngineStorageOverride(input: EngineStorageOverride): string;
export declare function resolveEngineStorageRoot(requestedRoot: string, engineName: 'synapse' | 'architects' | 'workforce'): EngineStorageResolution;
export declare function resolveWorkspaceResolution(options?: {
    workspaceRoot?: string;
    cwd?: string;
    env?: NodeJS.ProcessEnv;
}): WorkspaceResolution;
export declare function resolveWorkspaceContext(options?: {
    workspaceRoot?: string;
    cwd?: string;
    env?: NodeJS.ProcessEnv;
}): WorkspaceContext;
export declare function resolveWorkspaceRoot(options?: {
    workspaceRoot?: string;
    cwd?: string;
    env?: NodeJS.ProcessEnv;
}): string;
