import { IRequestContext, IResponse, IAuthToken } from './interfaces.core.js'; /** * Abstract base class for all registry protocol implementations */ export abstract class BaseRegistry { /** * Initialize the registry */ abstract init(): Promise; /** * Handle an incoming HTTP request * @param context - Request context * @returns Response object */ abstract handleRequest(context: IRequestContext): Promise; /** * Get the base path for this registry protocol */ abstract getBasePath(): string; /** * Validate that a token has the required permissions * @param token - Authentication token * @param resource - Resource being accessed * @param action - Action being performed * @returns true if authorized */ protected abstract checkPermission( token: IAuthToken | null, resource: string, action: string ): Promise; }