import type { IUserRegistry } from '@opentask/taskin-task-manager'; import type { User } from '@opentask/taskin-types'; export interface UserRegistryConfig { /** * Caminho do diretório `.taskin/` do projeto — não da raiz do projeto. * O registro é lido de `/.taskin-users.json`; ver * `resolveUsersFilePaths` em `users-file-location.ts`. */ taskinDir: string; } export interface UsersData { users: Record; } export interface ILogger { info(message: string): void; warn(message: string): void; } export declare const NullLogger: ILogger; /** * Registry for managing user information * Loads users from .taskin-users.json */ export declare class UserRegistry implements IUserRegistry { private users; private usersFilePath; private logger; constructor(config: UserRegistryConfig, logger?: ILogger); /** * Load users from .taskin-users.json */ load(): Promise; /** * Get user by ID */ getUser(userId: string): User | undefined; /** * Resolve user from name or ID * Tries to match by ID first, then by name */ resolveUser(nameOrId: string): User | undefined; /** * Ensure a user matching the current git config exists in the registry. * Tries to find by email first; if not found, creates and persists a new user. * Falls back to process.env / defaults when no git config is available. */ ensureCurrentUser(gitConfig?: { name: string; email: string; }): Promise; /** * Create a temporary user if not found in registry * Useful for backward compatibility */ createTemporaryUser(nameOrId: string): User; private findByEmail; private readGitConfig; /** * Get all users */ getAllUsers(): User[]; /** * Add or update a user */ saveUser(user: User): Promise; /** * Save users to .taskin-users.json */ private save; } //# sourceMappingURL=user-registry.d.ts.map