export interface YagrN8nLocalConfig {
    host?: string;
    syncFolder?: string;
    projectId?: string;
    projectName?: string;
    instanceIdentifier?: string;
    customNodesPath?: string;
    runtimeSource?: 'managed-local' | 'external';
}
export interface YagrResolvedN8nRuntimeState {
    host?: string;
    apiKey?: string;
    syncFolder?: string;
    projectId?: string;
    projectName?: string;
    instanceIdentifier?: string;
    workflowDir?: string;
    credentialsAvailable: boolean;
    projectConfigured: boolean;
    initialized: boolean;
}
export interface ResolveN8nRuntimeStateOptions {
    allowEnvironmentFallback?: boolean;
}
/**
 * Computes the fully-qualified workflow directory for the current config:
 *   <syncFolder>/<instanceIdentifier>/<projectSlug>
 *
 * Returns undefined when any required field is missing (e.g. during bootstrap).
 * This is the single source of truth for this path calculation.
 */
export declare function resolveWorkflowDir(config: YagrN8nLocalConfig): string | undefined;
export declare function resolveN8nRuntimeState(configService: Pick<YagrN8nConfigService, 'getLocalConfig' | 'getApiKey'>, env?: NodeJS.ProcessEnv, options?: ResolveN8nRuntimeStateOptions): YagrResolvedN8nRuntimeState;
export declare class YagrN8nConfigService {
    private readonly globalStore;
    private readonly compatibilityStore;
    private readonly localConfigPath;
    private readonly legacyCredentialsPath;
    constructor();
    getLocalConfig(): YagrN8nLocalConfig;
    saveLocalConfig(config: YagrN8nLocalConfig): void;
    saveBootstrapState(host: string, syncFolder?: string, runtimeSource?: YagrN8nLocalConfig['runtimeSource']): void;
    getApiKey(host: string): string | undefined;
    saveApiKey(host: string, apiKey: string): void;
    clearLocalConfig(): void;
    clearAllApiKeys(): void;
    getOrCreateInstanceIdentifier(host: string): Promise<string>;
    private normalizeHost;
    private migrateLegacyCredentials;
    private syncCompatibilityCredentials;
}
//# sourceMappingURL=n8n-config-service.d.ts.map