import { type Database } from "../data/database.js"; export interface MemberGlobalConfig { model?: string | null; credentialId?: string | null; thinkingLevel?: string | null; skills?: string[]; mcpServers?: string[]; } export interface MemberRecord { avatarShape?: string | null; avatarColor?: string | null; id: string; name: string; title?: string; agentTemplate: string; global: MemberGlobalConfig; createdAt: number; updatedAt: number; } export interface MemberIdentityProjection { id: string; name: string; } export interface CreateMemberInput { name?: string; title?: string; agentTemplate?: string; avatarShape?: string | null; avatarColor?: string | null; model?: string | null; credentialId?: string | null; thinkingLevel?: string | null; skills?: string[]; mcpServers?: string[]; } export declare class MemberNameTakenError extends Error { readonly code = "name_taken"; constructor(name: string); } export declare class MemberNotFoundError extends Error { readonly code = "not_found"; constructor(id: string); } export declare function normalizeMemberName(name: unknown): string; export declare function validateMemberName(name: string): void; export declare function getMember(id: string, db?: Database): MemberRecord | null; export declare function requireMember(id: string, db?: Database): MemberRecord; export declare function getRetainedMember(id: string, db?: Database): MemberRecord | null; export declare function listMembers(db?: Database): MemberRecord[]; /** Complete retained identity snapshot for historical display. This projection * never grants access to archived members or infers identities from archives. */ export declare function listMemberIdentityDirectory(db?: Database): MemberIdentityProjection[]; export declare function findMemberByName(name: string, db?: Database): MemberRecord | null; export declare function resolveMemberRef(ref: string): MemberRecord | null; export declare function allocateUniqueMemberName(base?: string): string; /** Prepare identity only. The application coordinates assets, settings and the user DM. */ export declare function prepareMemberIdentity(input: CreateMemberInput): MemberRecord; /** Strict SQL insertion of a normalized record. No file creation or cross-domain side effects. */ export declare function insertMemberIdentity(record: MemberRecord, db?: Database): void; export declare function importArchivedMember(record: MemberRecord, path: string, timestamp: number, db?: Database): void; export declare function storeMemberIdentity(record: MemberRecord, db?: Database): void; export declare function memberArchivePath(id: string, db?: Database): string | null; export declare function retireMemberIdentity(id: string, path: string, timestamp: number, db?: Database): void; export declare function onMemberIdentityChanged(listener: (member: MemberRecord) => void): () => void; export declare function onMemberAppearanceChanged(listener: (member: MemberRecord) => void): () => void; export declare function updateMember(id: string, patch: { avatarShape?: string | null; avatarColor?: string | null; name?: string; title?: string | null; global?: Partial; }): MemberRecord; export declare function getMemberConfiguration(id: string): MemberGlobalConfig; /** Current identity projection without reading runtime configuration. */ export declare function readMemberIdentity(id: string, retained?: boolean): { id: string; name: string; agentTemplate: string; createdAt: number; updatedAt: number; } | null; //# sourceMappingURL=identity.d.ts.map