/**
 * Central headquarters resolution utilities.
 *
 * Search priority:
 * 1. PRLT_HQ_PATH env var (ONLY when DEVCONTAINER=true or PRLT_TEST_ENV=true)
 * 2. Walk up directory tree looking for .proletariat/config.json with type='hq'
 *    - If found but not registered, emit warning to register
 * 3. ~/.proletariat/config.json activeHeadquarters (fallback when NOT in any HQ)
 * 4. Global config ~/.proletariat/config.json defaultHQ (legacy fallback)
 *
 * NOTE: PRLT_HQ_PATH is ignored on host machines to support multiple agents
 * working in different HQs simultaneously. Each agent uses the HQ
 * they're physically in, not a global env var that could cause conflicts.
 *
 * Environment variables:
 * - DEVCONTAINER=true: Enables PRLT_HQ_PATH (for devcontainer mounts)
 * - PRLT_TEST_ENV=true: Enables PRLT_HQ_PATH (for E2E test isolation)
 */
export interface WorkspaceLocation {
    path: string;
    source: 'env' | 'registry' | 'cwd' | 'global';
}
/**
 * Find HQ workspace root directory.
 *
 * @param startDir Starting directory for search (default: process.cwd())
 * @returns HQ path or null if not found
 *
 * Priority:
 * 1. PRLT_HQ_PATH environment variable
 * 2. Walk up directory tree from startDir
 * 3. Global config default
 */
export declare function findHQRoot(startDir?: string): string | null;
/**
 * Find HQ workspace root with source information.
 * Useful for debugging and logging where the workspace was resolved from.
 */
export declare function findHQRootWithSource(startDir?: string): WorkspaceLocation | null;
/**
 * Check if a directory is a valid HQ workspace.
 * Valid HQ has .proletariat/config.json with type='hq'
 */
export declare function isValidHQ(dir: string): boolean;
/**
 * Get the .proletariat directory path for a workspace.
 * Respects PRLT_HQ_PATH for override.
 */
export declare function getProletariatDir(workspacePath?: string): string;
/**
 * Get the workspace database path.
 */
export declare function getWorkspaceDbPath(workspacePath?: string): string;
/**
 * Require HQ context - throws helpful error if not in HQ.
 */
export declare function requireHQ(startDir?: string): string;
/**
 * Find all HQ workspaces in directory tree (for debugging/diagnostics).
 * Useful for detecting multiple workspaces that could cause confusion.
 */
export declare function findAllHQs(startDir?: string): string[];
/**
 * Warn if multiple HQ workspaces are detected.
 * This can cause confusion as commands may target different workspaces.
 */
export declare function warnIfMultipleHQs(startDir?: string): void;
