/**
 * Local config stored in guild.json (in agent directory)
 */
export interface LocalConfig {
    agent_id: string;
    name: string;
    workspace_id?: string;
}
/**
 * Global config stored in ~/.guild/config.json
 */
export interface GlobalConfig {
    default_workspace?: string;
    default_workspace_name?: string;
    default_owner?: string;
    default_owner_name?: string;
    debug?: boolean;
    json?: boolean;
    quiet?: boolean;
}
/**
 * Combined config from local + global sources
 */
export interface ResolvedConfig {
    local?: LocalConfig;
    global?: GlobalConfig;
}
/**
 * Get path to global config directory
 */
export declare function getGlobalConfigDir(): string;
/**
 * Get path to global config file
 */
export declare function getGlobalConfigPath(): string;
/**
 * Get path to local config file in specified directory
 */
export declare function getLocalConfigPath(cwd?: string): string;
/**
 * Load global config from ~/.guild/config.json
 *
 * @returns GlobalConfig or undefined if not found
 */
export declare function loadGlobalConfig(): Promise<GlobalConfig | undefined>;
/**
 * Load local config from guild.json in specified directory
 *
 * @param cwd Directory to look in (defaults to process.cwd())
 * @returns LocalConfig or undefined if not found
 */
export declare function loadLocalConfig(cwd?: string): Promise<LocalConfig | undefined>;
/**
 * Load both local and global configs
 *
 * @param cwd Directory to look for local config (defaults to process.cwd())
 * @returns ResolvedConfig with local and global configs (either may be undefined)
 */
export declare function loadConfig(cwd?: string): Promise<ResolvedConfig>;
/**
 * Save global config to ~/.guild/config.json
 *
 * @param config Config to save (merged with existing config)
 */
export declare function saveGlobalConfig(config: Partial<GlobalConfig>): Promise<void>;
/**
 * Get the workspace ID to use, with proper priority.
 *
 * Priority (--workspace flag is handled by commands before calling this):
 * 1. GUILD_WORKSPACE_ID environment variable
 * 2. Local guild.json workspace_id (if in agent directory with workspace set)
 * 3. Global ~/.guild/config.json default_workspace
 * 4. undefined (caller should handle fallback)
 *
 * @param cwd Directory to look for local config
 * @returns Workspace ID and source, or undefined
 */
export declare function getWorkspaceId(cwd?: string): Promise<{
    workspaceId: string;
    source: 'env' | 'local' | 'global';
} | undefined>;
/**
 * Check if we're in an agent directory (has guild.json)
 */
export declare function isAgentDirectory(cwd?: string): Promise<boolean>;
/**
 * Get a human-readable label for the workspace source.
 * Returns undefined for 'env' (treated as explicit, like --workspace flag; no label needed).
 *
 * @param source - The source of workspace resolution
 * @returns Human-readable label, or undefined for env source
 *
 * @example
 * getWorkspaceSourceLabel('local')  // → 'guild.json'
 * getWorkspaceSourceLabel('global') // → 'global config'
 * getWorkspaceSourceLabel('env')    // → undefined
 */
export declare function getWorkspaceSourceLabel(source: 'env' | 'local' | 'global'): string | undefined;
//# sourceMappingURL=guild-config.d.ts.map