//#region src/model.d.ts /** Current serialized application-marquette format. */ declare const MARQUETTE_FORMAT_VERSION: 1; /** User-visible target produced by an application marquette. */ type MarquetteTarget = "web" | "native" | "desktop" | "terminal"; /** Runtime family that executes one environment. */ type RuntimeFamily = "browser" | "javascript" | "rust" | "go" | "jvm" | "native" | "desktop" | "terminal" | "external"; /** Side of the application graph that consumes an environment. */ type EnvironmentConsumer = "client" | "server"; /** Backend implementation family selected by an application. */ type BackendFamily = "javascript" | "rust" | "go" | "jvm" | "external"; /** Semantic family used by one data or procedure endpoint. */ type ProtocolFamily = "schema-query" | "typed-rpc" | "binary-rpc"; /** Rendering strategy selected for one route or target view. */ type RenderingMode = "client" | "static" | "server" | "stream" | "partial" | "hybrid" | "native" | "desktop" | "terminal"; /** Versioned capability understood by adapters and developer tools. */ interface CapabilityDefinition { /** Stable lowercase capability identifier. */ readonly id: string; /** Summary shown by diagnostics, documentation, and AI tooling. */ readonly description: string; /** * Capability contract version. * * @default 1 */ readonly version?: number; } /** Independently transformed and cached application environment. */ interface MarquetteEnvironment { /** Stable identifier, unique within the application. */ readonly id: Id; /** User-visible target served by this environment. */ readonly target: MarquetteTarget; /** Whether output is consumed by an end user or a trusted runtime. */ readonly consumer: EnvironmentConsumer; /** Runtime family that executes the output. */ readonly runtime: RuntimeFamily; /** * Authored entry module. * * @default undefined */ readonly entry?: string; /** * Environments that must build first. * * @default [] */ readonly dependsOn?: readonly DependencyId[]; /** * Capabilities required from the environment adapter. * * @default [] */ readonly capabilities?: readonly string[]; } /** Backend application or independently deployed service. */ interface MarquetteBackend { /** Stable backend identifier. */ readonly id: Id; /** Backend implementation family. */ readonly family: BackendFamily; /** * Server environment that owns local execution. * * @default undefined */ readonly environment?: EnvironmentId; /** * Capabilities required from the backend adapter. * * @default [] */ readonly capabilities?: readonly string[]; } /** Protocol endpoint exposed by a backend. */ interface MarquetteProtocol { /** Stable endpoint identifier. */ readonly id: Id; /** Protocol semantic family. */ readonly family: ProtocolFamily; /** Backend that owns the endpoint. */ readonly backend: BackendId; /** * Capabilities required from the protocol adapter. * * @default [] */ readonly capabilities?: readonly string[]; } /** Typed application route or target view. */ interface MarquetteRoute { /** Stable identifier used by generated navigation APIs. */ readonly id: Id; /** Logical path, always beginning with `/`. */ readonly path: `/${string}`; /** Environment that owns the rendered route. */ readonly environment: EnvironmentId; /** Rendering strategy used by the route. */ readonly rendering: RenderingMode; /** * Backend used by data loading, mutations, or server rendering. * * @default undefined */ readonly backend?: BackendId; /** * Protocol endpoint used as the route data contract. * * @default undefined */ readonly protocol?: ProtocolId; /** * Capabilities required by the route. * * @default [] */ readonly capabilities?: readonly string[]; } /** Complete, versioned application marquette. */ interface ApplicationMarquette { /** * Serialized contract format. * * @default 1 */ readonly formatVersion?: typeof MARQUETTE_FORMAT_VERSION; /** Stable lowercase application identifier. */ readonly application: string; /** * User-visible application targets. * * @default [] */ readonly targets?: readonly MarquetteTarget[]; /** * Versioned capability definitions keyed by identifier. * * @default {} */ readonly capabilities?: Readonly>; /** * Independently transformed application environments. * * @default [] */ readonly environments?: Environments; /** * Backend applications and services. * * @default [] */ readonly backends?: Backends; /** * Protocol endpoints. * * @default [] */ readonly protocols?: Protocols; /** * Typed routes and target views. * * @default [] */ readonly routes?: Routes; } /** Extracts identifiers only when a collection is present in the authored object. */ type DeclaredId = Marquette extends { readonly [Key in Collection]: readonly { readonly id: infer Id extends string; }[] } ? Id : never; /** Exact environment identifier union inferred from a marquette. */ type EnvironmentId = DeclaredId; /** Exact server-owned environment identifier union inferred from a marquette. */ type ServerEnvironmentId = Marquette extends { readonly environments: readonly (infer Environment)[]; } ? Environment extends { readonly consumer: "server"; readonly id: infer Id extends string; } ? Id : never : never; /** Exact backend identifier union inferred from a marquette. */ type BackendId = DeclaredId; /** Exact protocol identifier union inferred from a marquette. */ type ProtocolId = DeclaredId; /** Exact route identifier union inferred from a marquette. */ type RouteId = DeclaredId; /** Exact target union inferred from the authored target list. */ type TargetId = Marquette extends { readonly targets: readonly (infer Target extends MarquetteTarget)[]; } ? Target : never; /** Exact capability identifier union inferred from authored capability keys. */ type CapabilityId = Marquette extends { readonly capabilities: Readonly>; } ? Id : never; //#endregion export { RouteId as _, CapabilityId as a, TargetId as b, MARQUETTE_FORMAT_VERSION as c, MarquetteProtocol as d, MarquetteRoute as f, RenderingMode as g, ProtocolId as h, CapabilityDefinition as i, MarquetteBackend as l, ProtocolFamily as m, BackendFamily as n, EnvironmentConsumer as o, MarquetteTarget as p, BackendId as r, EnvironmentId as s, ApplicationMarquette as t, MarquetteEnvironment as u, RuntimeFamily as v, ServerEnvironmentId as y }; //# sourceMappingURL=model-B_mM8AeH.d.mts.map