/** * Remix provenance — the captured host baseline a seeded app starts from. * * The SHAPE belongs on the contract door: it is the on-disk format of * `.vendo/remixable/.json`, and the console reads those bytes from a * browser — as do the pure verdicts over it (drift). * What READS or WRITES a store (the seed surface, ship diff) stays server-side. * * `Seed*` is the whole remix vocabulary: a remix is an app created from * something that already existed, and "pin" only ever named the mechanism. */ import { type AppDocument, type IsoDateTime, type Json } from "@vendoai/core"; import { z } from "zod"; /** 06-apps §8 — source captured from one host remixable component slot. */ export interface SeedBaseline { slot: string; source: string; hash: string; exportable: boolean; capturedAt: IsoDateTime; sourceImports?: Record; subSources?: Record; sampleProps?: Record; styles?: SeedStyle[]; ported?: SeedPort; } /** The splitter's output for this slot: the PORTED half a remix starts from. * Absent = the component was not provably splittable and gets no ✦. */ export interface SeedPort { /** The ported component: real TSX in the screen dialect, host classNames intact. */ source: string; /** Envelope names this port's `useQuery`/`tools.*` calls bind to. */ tools: string[]; /** Component names the port renders as holes (npm + host sub-components). */ holes: string[]; } /** Captured source-owned virtual module plus its own resolved import table. */ export interface SeedSubSource { source: string; imports: Record; } /** One inert host stylesheet snapshot captured from a canonical app root. */ export interface SeedStyle { path: string; css: string; } /** 06-apps §8 — validated persisted representation of a captured host baseline. */ export declare const seedBaselineSchema: z.ZodObject<{ slot: z.ZodString; source: z.ZodString; hash: z.ZodString; exportable: z.ZodBoolean; capturedAt: z.ZodString; sourceImports: z.ZodOptional>; subSources: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ source: z.ZodString; imports: z.ZodRecord; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ source: z.ZodString; imports: z.ZodRecord; }, z.ZodTypeAny, "passthrough">>>>; sampleProps: z.ZodOptional>; styles: z.ZodOptional, z.objectInputType<{ path: z.ZodString; css: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; ported: z.ZodOptional; holes: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ source: z.ZodString; tools: z.ZodArray; holes: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ source: z.ZodString; tools: z.ZodArray; holes: z.ZodArray; }, z.ZodTypeAny, "passthrough">>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ slot: z.ZodString; source: z.ZodString; hash: z.ZodString; exportable: z.ZodBoolean; capturedAt: z.ZodString; sourceImports: z.ZodOptional>; subSources: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ source: z.ZodString; imports: z.ZodRecord; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ source: z.ZodString; imports: z.ZodRecord; }, z.ZodTypeAny, "passthrough">>>>; sampleProps: z.ZodOptional>; styles: z.ZodOptional, z.objectInputType<{ path: z.ZodString; css: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; ported: z.ZodOptional; holes: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ source: z.ZodString; tools: z.ZodArray; holes: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ source: z.ZodString; tools: z.ZodArray; holes: z.ZodArray; }, z.ZodTypeAny, "passthrough">>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ slot: z.ZodString; source: z.ZodString; hash: z.ZodString; exportable: z.ZodBoolean; capturedAt: z.ZodString; sourceImports: z.ZodOptional>; subSources: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ source: z.ZodString; imports: z.ZodRecord; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ source: z.ZodString; imports: z.ZodRecord; }, z.ZodTypeAny, "passthrough">>>>; sampleProps: z.ZodOptional>; styles: z.ZodOptional, z.objectInputType<{ path: z.ZodString; css: z.ZodString; }, z.ZodTypeAny, "passthrough">>, "many">>; ported: z.ZodOptional; holes: z.ZodArray; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ source: z.ZodString; tools: z.ZodArray; holes: z.ZodArray; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ source: z.ZodString; tools: z.ZodArray; holes: z.ZodArray; }, z.ZodTypeAny, "passthrough">>>; }, z.ZodTypeAny, "passthrough">>; /** * The host component a seeded app started from changed under it (or its * baseline disappeared). A WARNING, never an action: re-seeding is always the * user's choice, because it replaces whatever they have made with the pristine * new component. */ export interface SeedDrift { /** The captured host component the app was seeded from (`AppSeed.component`). */ component: string; /** The generated-component name the copy ships under (`seedComponentName`). */ componentName: string; /** The baseline hash the seed records (`AppSeed.baseline`). */ baseline: string; /** The hash of the currently captured host baseline, when one exists. */ current?: string; reason: "baseline-changed" | "baseline-missing"; } /** * Generic drift: the seed's hash is not the hash the host captures today. * * Pure over the document and the composition's loaded baselines, so the opener, * the edit path and the seed surface all report the same verdict. One seed, one * verdict — there are no rows to walk. */ export declare const seedDrift: (document: AppDocument, baselines: readonly SeedBaseline[]) => SeedDrift | null; //# sourceMappingURL=seed.d.ts.map