import type { ViewCore, TuiPresenter, TextPresenter } from './contract.js'; export interface ResolvedView { id: string; dir: string; scope: 'project' | 'user' | 'builtin'; core: string; tui: string | null; web: string | null; text: string | null; } /** Scope search project→user→builtin; first hit wins. null if no scope holds a * `/core.mjs`. */ export declare function resolveView(name: string): ResolvedView | null; /** Find a directory named `name` across scopes even when it holds no core.mjs — * lets a caller distinguish "no such view" from "a dir that isn't a valid view" * (e.g. a pre-contract `view.mjs`-only dir) and name the contract in the error. */ export declare function findViewDir(name: string): string | null; /** Enumerate every resolvable core-shaped view across scopes (first scope wins * per id). Targets per view are derivable from the tui/web/text fields. */ export declare function listViews(): ResolvedView[]; /** Import + validate the portable core. Throws a guided error if malformed. */ export declare function loadCore(r: ResolvedView): Promise; /** Import + validate the TUI presenter. Call requireTui first. */ export declare function loadTui(r: ResolvedView): Promise; /** Import the text presenter if present; null otherwise (the host synthesizes a * generic one-line dump when a view ships no text.mjs). */ export declare function loadText(r: ResolvedView): Promise; /** Per-host presenter validation: `view run` requires a TUI presenter. */ export declare function requireTui(r: ResolvedView): void; /** Per-host presenter validation: `view serve` requires a web presenter. */ export declare function requireWeb(r: ResolvedView): void;