import { type MaterialCookProgram } from '@forgeax/engine-pack'; import type { MaterialSurfaceDeclaration, StandardLayerPlan } from '@forgeax/engine-types'; import type { MaterialLoadError, MaterialReady } from './loader.js'; /** JSON-safe Standard projection carried by the runtime material inspection. */ export interface MaterialRuntimeStandardInfo { readonly mode: StandardLayerPlan['mode']; readonly layers: StandardLayerPlan['layers']; readonly passFamily: StandardLayerPlan['passFamily']; readonly layerPlanIdentity: string; readonly passNames: readonly string[]; } /** * Read-only facts for one GUID after the MaterialReady gate succeeds. * `status` is retained for the existing runtime API; `readiness` is the * machine-readable first-level field for inspection consumers. This owner * does not invent transport provenance or compare transport URLs. */ export interface MaterialRuntimeInfo { readonly materialGuid: string; readonly readiness: 'ready'; readonly publicationGeneration: number; readonly specializationKey: string; readonly artifactDigest: string; readonly layoutIdentity: string; /** Derived program identities and selection conditions; never shader source bytes. */ readonly programs: readonly { readonly specializationKey: string; readonly artifactDigest: string; readonly byteLength: number; readonly selections: readonly Omit[]; }[]; readonly dependencies: readonly string[]; readonly profile: string; readonly sourceClosure: readonly string[]; readonly parameterContract: MaterialReady['record']['parameterContract']; readonly refs: MaterialReady['record']['refs']; readonly receipt: MaterialReady['record']['receipt']; /** Present for the built-in Standard module; absent for custom materials. */ readonly standard?: MaterialRuntimeStandardInfo; /** Root-published Surface model, when the material declares one. */ readonly surface?: MaterialSurfaceDeclaration; readonly status: 'Ready'; } export interface MaterialRuntimePendingInput { readonly status: 'Pending'; readonly guid: string; readonly specializationKey: string; readonly reason?: string; } export interface MaterialRuntimeLastKnownGoodInput { readonly status: 'LastKnownGood'; readonly ready: MaterialReady; readonly failure: MaterialLoadError; } export interface MaterialRuntimeFailureInfo { readonly materialGuid: string; readonly readiness: 'failed'; readonly specializationKey: string; readonly publicationGeneration: number | undefined; readonly preparationFailure: MaterialLoadError['error']; readonly status: 'Error'; } export interface MaterialRuntimePendingInfo { readonly materialGuid: string; readonly readiness: 'pending'; readonly specializationKey: string; readonly reason: string | undefined; readonly status: 'Pending'; } export interface MaterialRuntimeLastKnownGoodInfo { readonly materialGuid: string; readonly readiness: 'last-known-good'; readonly specializationKey: string; readonly lastKnownGood: MaterialRuntimeInfo; readonly preparationFailure: MaterialLoadError['error']; readonly status: 'LastKnownGood'; } export type MaterialRuntimeInput = MaterialReady | MaterialLoadError | MaterialRuntimePendingInput | MaterialRuntimeLastKnownGoodInput; export type MaterialRuntimeInspection = MaterialRuntimeInfo | MaterialRuntimeFailureInfo | MaterialRuntimePendingInfo | MaterialRuntimeLastKnownGoodInfo; /** * Project only the producer's material lifecycle result into a detached, * bounded inspection POD. Renderer code should consume resident bindings and * must not copy this producer state into a second readiness ledger. */ export declare function inspectMaterialRuntime(ready: MaterialReady): MaterialRuntimeInfo; export declare function inspectMaterialRuntime(input: MaterialRuntimeInput): MaterialRuntimeInspection; //# sourceMappingURL=inspection.d.ts.map