/** * Canonical runtime kernel for decoding, normalizing, searching, and expiring * plugin marketplace data. Host packages retain network, filesystem, security, * and persistence policy while adapting this transport-neutral representation. */ import { z } from "zod"; /** Accepts package names safe for catalog lookup at the HTTP boundary. */ export declare function isValidRegistryPackageName(value: unknown): value is string; declare const appSchema: z.ZodObject<{ displayName: z.ZodOptional; category: z.ZodOptional; launchType: z.ZodOptional; launchUrl: z.ZodOptional>; icon: z.ZodOptional>; heroImage: z.ZodOptional>; capabilities: z.ZodOptional>; minPlayers: z.ZodOptional>; maxPlayers: z.ZodOptional>; runtimePlugin: z.ZodOptional; bridgeExport: z.ZodOptional; uiExtension: z.ZodOptional>; viewer: z.ZodOptional>; postMessageAuth: z.ZodOptional; sandbox: z.ZodOptional; }, z.core.$strip>>; session: z.ZodOptional; features: z.ZodOptional>>; }, z.core.$strip>>; viewKind: z.ZodOptional>; visibleInAppStore: z.ZodOptional; mainTab: z.ZodOptional; catalogSection: z.ZodOptional; featured: z.ZodOptional; defaultHidden: z.ZodOptional; scope: z.ZodOptional; }, z.core.$loose>; export declare const runtimeRegistryEntrySchema: z.ZodObject<{ git: z.ZodObject<{ repo: z.ZodString; v0: z.ZodObject<{ branch: z.ZodOptional>; version: z.ZodOptional>; }, z.core.$loose>; v1: z.ZodObject<{ branch: z.ZodOptional>; version: z.ZodOptional>; }, z.core.$loose>; v2: z.ZodObject<{ branch: z.ZodOptional>; version: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>; npm: z.ZodObject<{ repo: z.ZodString; v0: z.ZodOptional>; v1: z.ZodOptional>; v2: z.ZodOptional>; v0CoreRange: z.ZodOptional>; v1CoreRange: z.ZodOptional>; v2CoreRange: z.ZodOptional>; }, z.core.$loose>; supports: z.ZodObject<{ v0: z.ZodBoolean; v1: z.ZodBoolean; v2: z.ZodBoolean; }, z.core.$strip>; description: z.ZodOptional; homepage: z.ZodOptional>; topics: z.ZodOptional>; stargazers_count: z.ZodOptional; language: z.ZodOptional; origin: z.ZodOptional; source: z.ZodOptional; support: z.ZodOptional; builtIn: z.ZodOptional; firstParty: z.ZodOptional; thirdParty: z.ZodOptional; status: z.ZodOptional; kind: z.ZodOptional; registryKind: z.ZodOptional; directory: z.ZodOptional>; app: z.ZodOptional; category: z.ZodOptional; launchType: z.ZodOptional; launchUrl: z.ZodOptional>; icon: z.ZodOptional>; heroImage: z.ZodOptional>; capabilities: z.ZodOptional>; minPlayers: z.ZodOptional>; maxPlayers: z.ZodOptional>; runtimePlugin: z.ZodOptional; bridgeExport: z.ZodOptional; uiExtension: z.ZodOptional>; viewer: z.ZodOptional>; postMessageAuth: z.ZodOptional; sandbox: z.ZodOptional; }, z.core.$strip>>; session: z.ZodOptional; features: z.ZodOptional>>; }, z.core.$strip>>; viewKind: z.ZodOptional>; visibleInAppStore: z.ZodOptional; mainTab: z.ZodOptional; catalogSection: z.ZodOptional; featured: z.ZodOptional; defaultHidden: z.ZodOptional; scope: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; export type RuntimeRegistryWireEntry = z.infer; export interface NormalizedRegistryEntry { name: string; gitRepo: string; gitUrl: string; directory: string | null; description: string; homepage: string | null; topics: string[]; stars: number; language: string; npm: { package: string; v0Version: string | null; v1Version: string | null; v2Version: string | null; v0CoreRange: string | null; v1CoreRange: string | null; v2CoreRange: string | null; }; git: { v0Branch: string | null; v1Branch: string | null; v2Branch: string | null; }; supports: { v0: boolean; v1: boolean; v2: boolean; }; kind?: string; registryKind?: string; origin?: string; source?: string; support?: string; builtIn?: boolean; firstParty?: boolean; thirdParty?: boolean; status?: string; app?: z.infer; } export interface DecodeRuntimeRegistryOptions { sanitizeSandbox?: (value?: string) => string; } /** Decode the generated wire document once and return one normalized map. */ export declare function decodeRuntimeRegistry(input: unknown, options?: DecodeRuntimeRegistryOptions): Map; export interface RegistrySearchable { name: string; description: string; topics: string[]; stars: number; } /** Score and deterministically order registry entries using one host-neutral policy. */ export declare function searchRegistryEntries(entries: Iterable, query: string, limit: number, extraNames?: (entry: T) => string[], extraTerms?: (entry: T) => string[]): Array<{ entry: T; score: number; }>; /** Shared TTL rule; hosts remain responsible for cache storage and invalidation. */ export declare function isRegistryCacheFresh(fetchedAt: number, ttlMs: number, now?: number): boolean; export {};