import type { Logger } from './logger'; export type ModelEntry = { taskType: string; id: string; }; export type RegistryData = { version: string; models: Record; architectureTaskTypes: Record; modalityTaskTypes: Record; }; export type Registry = { /** Look up the taskType for a model (AIR or slug). */ getModelTaskType: (model: string) => Promise; /** Look up the canonical model ID for a model (used to build doc URLs). */ getModelId: (model: string) => Promise; /** * Resolve a model identifier to its canonical AIR. Accepts either an AIR * (e.g. "runware:101@1") or a curated-model slug (e.g. "flux-1-dev"). * Returns null if the identifier doesn't match any known curated model. */ resolveModelAir: (model: string) => Promise; /** Look up the taskType for an architecture (e.g. 'sdxl', 'flux-1-dev'). */ getArchitectureTaskType: (key: string) => Promise; /** Look up the taskType for a modality (e.g. 'image', 'video'). */ getModalityTaskType: (key: string) => Promise; /** * Force a refresh from the remote endpoint. Throws if the fetch fails so * callers (e.g. day-zero workflows) can detect that the new data wasn't * actually loaded. */ refresh: () => Promise; /** * Notify the registry that an external version was observed. * Triggers a background refresh if it differs from the cached version. */ notifyVersion: (version: string) => void; /** Currently cached registry version, if any. */ getVersion: () => string | undefined; }; export type RegistryFallback = { models: Record; architectureTaskTypes: Record; modalityTaskTypes: Record; }; export type RegistryOptions = { url: string; fetchImpl?: typeof fetch; log: Logger; fallback: RegistryFallback; /** Background refresh interval in ms. Internal — not exposed via SDKConfig. */ ttl?: number; /** Max time to wait for the initial fetch before falling back. Default 3000ms. */ initialFetchTimeout?: number; }; export declare const createRegistry: (options: RegistryOptions) => Registry; //# sourceMappingURL=registry.d.ts.map