import { z } from "zod"; /** * A single widget slot on the dashboard. `props` is passed to the widget's * server handler as query-string params; the dashboard forwards whatever's * here to `/api/widgets/?...`. */ export declare const layoutWidgetSchema: z.ZodObject<{ name: z.ZodString; props: z.ZodDefault>>; }, "strip", z.ZodTypeAny, { name: string; props: Record; }, { name: string; props?: Record | undefined; }>; export declare const roleSchema: z.ZodDefault>; /** * dashboard.yaml contract. `role` picks a preset; `widgets`, if present, * either replaces the preset (when `role: custom`) or overrides/extends it. */ export declare const dashboardLayoutSchema: z.ZodObject<{ role: z.ZodDefault>; widgets: z.ZodDefault>>; }, "strip", z.ZodTypeAny, { name: string; props: Record; }, { name: string; props?: Record | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { role: "custom" | "delivery" | "developer"; widgets: { name: string; props: Record; }[]; }, { role?: "custom" | "delivery" | "developer" | undefined; widgets?: { name: string; props?: Record | undefined; }[] | undefined; }>; export type LayoutWidget = z.infer; export type Role = z.infer; export type DashboardLayout = z.infer; /** * Role presets. Baked in so `dashboard.yaml` is optional — if the user * never creates one, `loadDashboardLayout` returns the `delivery` preset * as-is. * * Widget catalog (2026-05-14): only `recent-activity` ships in the base * cortex. New widgets land alongside new adapters/connectors — one * widget per connector when warranted — not as a curated PM/developer * surface. Both presets render the same single widget; the role enum * is kept for forward compat with custom dashboards that want to * pin a different surface later. * * The pyre-web dashboard (where the surface actually lives now) reads * this same registry over /api/widgets and renders each entry. Names * not in the registry render a placeholder so legacy `dashboard.yaml` * files referencing the retired widgets don't crash the page. */ export declare const ROLE_PRESETS: Record, LayoutWidget[]>; /** * Resolves the effective widget list for a layout. If `role` is `custom`, * the explicit `widgets` list wins outright. Otherwise the preset is used, * and any entry in `widgets` with a matching `name` overrides that * preset's props (merge, not replace). Names not in the preset are * appended in order. */ export declare function resolveLayout(layout: DashboardLayout): { role: Role; widgets: LayoutWidget[]; }; /** * Loads `dashboard.yaml` if present, falls back to the delivery preset. * Same local-first resolution as `loadCortexConfig` — `dashboard.local.yaml` * wins over the committed template. */ export declare function loadDashboardLayout(configPath: string): Promise; //# sourceMappingURL=layout.d.ts.map