/** * Pure export helpers for the fly lexicon — strip live flaps state to the * authored shape and build import IR from it. All flaps I/O stays in the caller * (`../export-resources`); this module is deterministic and unit-testable. * * The strip mirrors the read-only field lists the parser drops, so a live * machine/app reaches the same declared shape a user would have written. Machine * ownership is a per-resource marker (`managed-by: chant` in `config.metadata`, * read via `isChantOwned`); the app carries no marker, so under the `owned` * filter its ownership is inferred at the app boundary (an app is chant-managed * when one of its machines is), and the limitation is logged rather than * silently returning everything — the seam contract, matching gcp/aws. * * `verbatim` is inert for fly (the core contract permits this for targets whose * importable surface is already the declared shape): the App/Machine * constructors accept only the writable surface, so server-written fields are * not constructor parameters and cannot round-trip into the generated code. The * option is accepted for signature parity. */ import type { ExportedTemplate, ResourceSelector } from "@intentius/chant/lexicon"; import { type FlapsMachine } from "../op/activities/fly-apply.js"; /** Drop server-written read-only machine fields to reach the authored shape. Returns a new object. */ export declare function stripMachineServerFields(machine: Record): Record; /** Drop server-written read-only app fields, keeping `name`/`org_slug`. Returns a new object. */ export declare function stripAppServerFields(app: Record): Record; /** * Build export IR from one app's live flaps state. Reuses {@link FlyParser} as * the single wire→authoring mapping authority by feeding it a cleaned * app-with-machines bundle. * * `opts.owned` keeps only machines carrying the chant marker, and includes the * app only when it is chant-managed (a machine is). `opts.verbatim` keeps server * fields. Pure: logging is delegated to `opts.onBoundaryInference`, which the * I/O caller wires to a single warn. */ export declare function buildExportFromApp(app: Record | undefined, machines: FlapsMachine[], opts?: { verbatim?: boolean; selector?: ResourceSelector; owned?: boolean; onBoundaryInference?: () => void; }): ExportedTemplate; //# sourceMappingURL=live-export.d.ts.map