export declare const LOBU_CONFIG_DIR: string;
export declare const DEFAULT_CONTEXT_NAME = "lobu";
export declare const DEFAULT_LOBU_MCP_URL = "https://lobu.ai/mcp";
/**
 * Org slugs are lowercase alphanumerics plus `-`/`_`, no leading/trailing
 * separator. Single source of truth for both the API client's slug guard and
 * `setActiveOrg` validation.
 */
export declare const ORG_SLUG_PATTERN: RegExp;
/**
 * Validate an org slug against {@link ORG_SLUG_PATTERN}, throwing `Error` with a
 * consistent message when it doesn't match. Callers that need a typed error
 * (e.g. `ApiClientError`) catch and rewrap.
 */
export declare function validateOrgSlug(slug: string): string;
export interface LobuServerConfig {
    port?: number;
    host?: string;
    cwd?: string;
    lifecycle?: "managed" | "external";
}
interface LobuContextEntry {
    url: string;
    activeOrg?: string;
    memoryUrl?: string;
    lifecycle?: "managed" | "external";
    cwd?: string;
}
interface LobuContextConfig {
    currentContext: string;
    contexts: Record<string, LobuContextEntry>;
}
export interface ResolvedContext {
    name: string;
    url: string;
    source: "default" | "config" | "env";
}
export declare function loadContextConfig(): Promise<LobuContextConfig>;
export declare function getCurrentContextName(): Promise<string>;
export declare function getActiveOrg(contextName?: string): Promise<string | undefined>;
export declare function getMemoryUrl(contextName?: string): Promise<string>;
export declare function setActiveOrg(orgSlug: string, contextName?: string): Promise<LobuContextConfig>;
export declare function setMemoryUrl(memoryUrl: string, contextName?: string): Promise<LobuContextConfig>;
export declare function resolveContext(preferredContext?: string): Promise<ResolvedContext>;
export declare function addContext(name: string, url: string, server?: LobuServerConfig): Promise<LobuContextConfig>;
export declare function removeContext(name: string): Promise<LobuContextConfig>;
export declare function setCurrentContext(name: string): Promise<LobuContextConfig>;
export declare function getServerConfig(contextName?: string): Promise<LobuServerConfig | undefined>;
export declare function findContextByUrl(apiUrl: string): Promise<ResolvedContext | undefined>;
export declare function findContextByMemoryUrl(memoryUrl: string): Promise<ResolvedContext | undefined>;
export {};
//# sourceMappingURL=context.d.ts.map