import { t as ApplicationMarquette } from "./model-B_mM8AeH.mjs"; //#region src/adapter-model.d.ts /** Current serialized adapter-capability manifest format. */ declare const ADAPTER_CAPABILITY_FORMAT_VERSION: 1; /** Inclusive version range supported for one capability contract. */ interface AdapterCapabilitySupport { /** Stable capability identifier from an application marquette. */ readonly id: string; /** Oldest supported capability contract version, inclusive. */ readonly minVersion: number; /** Newest supported capability contract version, inclusive. */ readonly maxVersion: number; } /** Versioned, language-neutral capabilities offered by one adapter. */ interface AdapterCapabilityManifest { /** * Serialized manifest format. * * @default 1 */ readonly formatVersion?: typeof ADAPTER_CAPABILITY_FORMAT_VERSION; /** Stable adapter identifier shown in diagnostics and reports. */ readonly adapter: string; /** * Supported capability ranges. * * @default [] */ readonly capabilities?: readonly AdapterCapabilitySupport[]; } /** Stable validation code for an adapter capability manifest. */ type AdapterCapabilityDiagnosticCode = "invalid-format-version" | "invalid-adapter-id" | "invalid-capability-id" | "invalid-version" | "invalid-version-range" | "duplicate-capability"; /** Deterministic validation diagnostic for an adapter capability manifest. */ interface AdapterCapabilityDiagnostic { /** Stable machine-readable diagnostic code. */ readonly code: AdapterCapabilityDiagnosticCode; /** JSON-style path of the invalid value. */ readonly path: string; /** Human-readable explanation. */ readonly message: string; } /** Stable incompatibility code emitted during capability negotiation. */ type AdapterCapabilityMismatchCode = "unknown-requirement" | "missing-capability" | "version-below-minimum" | "version-above-maximum"; /** One failed adapter capability requirement. */ interface AdapterCapabilityMismatch { /** Stable machine-readable mismatch code. */ readonly code: AdapterCapabilityMismatchCode; /** Required capability identifier. */ readonly capability: string; /** JSON-style path of the unsupported application capability requirement. */ readonly path: string; /** Human-readable explanation with stable wording for renderer diagnostics. */ readonly message: string; /** Required contract version when the capability is declared. */ readonly requiredVersion?: number; /** Adapter minimum when support exists. */ readonly minVersion?: number; /** Adapter maximum when support exists. */ readonly maxVersion?: number; } /** Deterministic result of negotiating requirements with one adapter. */ interface AdapterCapabilityNegotiation { /** Adapter whose support was inspected. */ readonly adapter: string; /** Whether the manifest is valid and every requirement is supported. */ readonly compatible: boolean; /** Manifest validation failures, in stable path order. */ readonly diagnostics: readonly AdapterCapabilityDiagnostic[]; /** Unsupported or unknown requirements, in stable capability order. */ readonly mismatches: readonly AdapterCapabilityMismatch[]; } /** Compatibility classification for one adapter capability change. */ type CompatibilityChangeKind = "additive" | "breaking"; /** One stable adapter capability compatibility change. */ interface AdapterCapabilityCompatibilityChange { /** Compatibility classification. */ readonly kind: CompatibilityChangeKind; /** JSON-style path of the changed capability support. */ readonly path: string; /** Human-readable summary. */ readonly message: string; } /** Deterministic compatibility report between two adapter manifests. */ interface AdapterCapabilityCompatibilityReport { /** Validation failures in the previous manifest. */ readonly previousDiagnostics: readonly AdapterCapabilityDiagnostic[]; /** Validation failures in the next manifest. */ readonly nextDiagnostics: readonly AdapterCapabilityDiagnostic[]; /** All changes in stable path order. */ readonly changes: readonly AdapterCapabilityCompatibilityChange[]; } //#endregion //#region src/adapter-native-profile.d.ts /** Current contract version shared by the native-engine capability profile. */ declare const NATIVE_ENGINE_CAPABILITY_VERSION: 1; /** Closed set of capability identifiers required from a native rendering engine. */ declare const NATIVE_ENGINE_CAPABILITY_IDS: readonly ["native.rendering", "native.events", "native.layout", "native.text", "native.images", "native.animation", "native.accessibility", "native.lifecycle"]; /** One identifier from the canonical native-engine capability profile. */ type NativeEngineCapabilityId = (typeof NATIVE_ENGINE_CAPABILITY_IDS)[number]; /** * Creates the canonical version-one native-engine capability profile. * * A fresh list is returned so an adapter can extend its manifest without * mutating the shared profile seen by another consumer. */ declare function nativeEngineCapabilityProfile(): readonly AdapterCapabilitySupport[]; //#endregion //#region src/adapter-compatibility.d.ts /** * Compares adapter capability support from older to newer. * * Adding support or widening an inclusive version range is additive. * Removing support or narrowing either bound is breaking. */ declare function compareAdapterCapabilities(previous: AdapterCapabilityManifest, next: AdapterCapabilityManifest): AdapterCapabilityCompatibilityReport; //#endregion //#region src/adapter-negotiate.d.ts /** * Negotiates application capability requirements against one adapter. * * Requirement identifiers are deduplicated and sorted. Unknown application * capability identifiers fail closed instead of being treated as adapter * omissions. An invalid manifest never produces a compatible result. */ declare function negotiateAdapterCapabilities(marquette: ApplicationMarquette, requiredCapabilities: readonly string[], manifest: AdapterCapabilityManifest): AdapterCapabilityNegotiation; //#endregion //#region src/adapter-validate.d.ts /** Validates an adapter capability manifest without mutating it. */ declare function validateAdapterCapabilityManifest(manifest: AdapterCapabilityManifest): AdapterCapabilityDiagnostic[]; /** * Parses an untrusted manifest with strict field and primitive checks. * * Unknown fields, missing required fields, and mismatched primitive types * throw before negotiation. Semantic range errors remain available from * {@link validateAdapterCapabilityManifest}. */ declare function parseAdapterCapabilityManifest(value: unknown): AdapterCapabilityManifest; //#endregion export { ADAPTER_CAPABILITY_FORMAT_VERSION, type AdapterCapabilityCompatibilityChange, type AdapterCapabilityCompatibilityReport, type AdapterCapabilityDiagnostic, type AdapterCapabilityDiagnosticCode, type AdapterCapabilityManifest, type AdapterCapabilityMismatch, type AdapterCapabilityMismatchCode, type AdapterCapabilityNegotiation, type AdapterCapabilitySupport, type CompatibilityChangeKind, NATIVE_ENGINE_CAPABILITY_IDS, NATIVE_ENGINE_CAPABILITY_VERSION, type NativeEngineCapabilityId, compareAdapterCapabilities, nativeEngineCapabilityProfile, negotiateAdapterCapabilities, parseAdapterCapabilityManifest, validateAdapterCapabilityManifest }; //# sourceMappingURL=adapter.d.mts.map