import type { HttpMethod } from "../contracts/common.js"; import type { BetterPortalRegistry, RegisteredRoute, RegisteredViewRenderer } from "../contracts/registry.js"; import type { BpSchemaOutput, PluginManifest } from "../contracts/manifest.js"; export interface ResolvedRoute { readonly route: RegisteredRoute; readonly params: Record; } /** * Resolve a request path to a registered route. * Static segments have priority over dynamic params (Next.js convention). */ export declare function resolveRoute(registry: BetterPortalRegistry, path: string, method: HttpMethod): ResolvedRoute | null; export interface ResolvedRenderer { readonly renderer: RegisteredViewRenderer; readonly rendererKey: string; } /** Resolve an exact compatibility renderer for a route. */ export declare function resolveRenderer(route: RegisteredRoute, rendererKey: string, type: "page" | "component" | "fragment", method?: HttpMethod, componentId?: string, fragmentKey?: string): ResolvedRenderer | null; export interface ManifestBaseFields { pluginId: string; title: string; description: string; category?: PluginManifest["category"]; deploymentModes?: ReadonlyArray; capabilities?: ReadonlyArray; configSchemas?: PluginManifest["configSchemas"]; permissions?: PluginManifest["permissions"]; adminApis?: PluginManifest["adminApis"]; webhooks?: PluginManifest["webhooks"]; apiContracts?: PluginManifest["apiContracts"]; m2mRequests?: PluginManifest["m2mRequests"]; developerResources?: PluginManifest["developerResources"]; shell?: PluginManifest["shell"]; cacheHints?: PluginManifest["cacheHints"]; } /** * Build a PluginManifest from the registry, auto-deriving: * - version (from package.json) * - supportedRenderers (from route renderers) * - supportedRenderModes (from renderer types) * - views (from non-fragment routes) * - capabilities (from renderers + view types) */ export declare function buildManifestFromRegistry(registry: BetterPortalRegistry, packageJson: { version: string; }, base: ManifestBaseFields): PluginManifest; /** * Build /.well-known/bp/schema.json output. */ export declare function buildBpSchema(registry: BetterPortalRegistry, manifest: PluginManifest): BpSchemaOutput; //# sourceMappingURL=registry.d.ts.map