export declare const GLOBAL_DIR: string; export declare const CREDENTIALS_PATH: string; export declare const GLOBAL_CONFIG_PATH: string; export declare const HUB_PLATFORM_DIR: string; export declare const PROJECT_CONFIG_DIR = "ductape"; export declare const PROJECT_CONFIG_PATH: string; export interface Credentials { user_id: string; email: string; auth_token: string; public_key: string; firstname?: string; lastname?: string; workspaces?: Array<{ workspace_id?: string; workspace_name?: string; _id?: string; name?: string; tag?: string; default?: boolean; }>; } export interface Profile { api_url: string; } export interface GlobalConfig { default_profile: string; profiles: Record; /** Set at login or via `ductape workspaces use` */ active_workspace_id?: string; active_workspace_name?: string; active_workspace_tag?: string; } /** Linked project config — use workspace_tag (human-readable); workspace_id is resolved by the CLI. */ export interface ProjectConfig { workspace_tag?: string; /** Resolved automatically; do not edit unless debugging */ workspace_id?: string; product_tag: string; env_slug: string; linked_profile?: string; project_id?: string; } export interface ResolvedProjectConfig extends ProjectConfig { workspace_id: string; } export declare function ensureGlobalDir(): void; export declare function loadCredentials(): Credentials | null; export declare function saveCredentials(creds: Credentials): void; export declare function clearCredentials(): void; export declare function getActiveWorkspaceId(): string | null; export declare function loadGlobalConfig(): GlobalConfig; export declare function saveGlobalConfig(config: GlobalConfig): void; export declare function getActiveProfileName(project?: ProjectConfig | null): string; export declare function getApiUrl(profileName?: string): string; /** Resolve workspace_id from tag (cached workspaces), explicit id, or global active workspace. */ export declare function resolveWorkspaceId(cfg: ProjectConfig, creds?: Credentials | null): string | null; export declare function findProjectConfig(startDir?: string): { dir: string; config: ProjectConfig; } | null; export declare function loadProjectConfig(): ResolvedProjectConfig; export declare function saveProjectConfig(dir: string, config: ProjectConfig): void; export declare function resolvePlatformDir(): string;