import type { RuntimeAdapter } from "../../../platform/adapters/base.js"; import { CYCLE_MANIFEST_SIDECAR_SUFFIX } from "../../../transforms/mdx/esm-module-loader/cache-format.js"; type CachePublication = () => Promise; export { CYCLE_MANIFEST_SIDECAR_SUFFIX }; /** Whether an immutable artifact belongs to the current source-graph snapshot. */ export declare function cycleArtifactBelongsToGraph(path: string, tmpDir: string, graphId: string): boolean; /** One transform graph's cycle entries and delayed cache publications. */ export declare class CycleManifestTransaction { #private; constructor(tmpDir: string, graphId?: any, artifactIds?: ReadonlyMap); /** Reserve an immutable module path for one edge before its target hash exists. */ registerEdge(targetFilePath: string, importerFilePath: string, isDynamic: boolean, plannedId?: string): string; /** Mark an importer whose persisted artifact depends on a cycle-bound child. */ markCycleBound(filePath: string): void; /** Whether this source belongs to the ancestry of a cycle-closing edge. */ isCycleBound(filePath: string): boolean; /** Track one recursive wait, or decline it when it would deadlock the graph. */ beginDependencyWait(importerFilePath: string, targetFilePath: string): (() => void) | null; /** Allocate one graph-content-addressed artifact path outside authored paths. */ reserveArtifactPath(filePath: string): string; /** Record the content-addressed artifact produced for a source module. */ recordArtifact(filePath: string, path: string, exposesDefault: boolean, isGraphRoot?: boolean): void; /** Whether this graph needs export metadata for the source module. */ referencesStaticTarget(filePath: string): boolean; /** Whether a cycle-closing edge addresses this source through the manifest. */ referencesTarget(filePath: string): boolean; /** Delay publication until every cycle entry is durable. */ deferCachePublication(publication: CachePublication): void; /** Mark a cycle member so a later root lookup fails closed without a sidecar. */ markMemberArtifactCode(code: string): string; /** Bind the complete manifest entry set to the graph root's immutable bytes. */ sealRootArtifactCode(code: string, rootSourcePath: string, rootExposesDefault: boolean, localAdapter: RuntimeAdapter): Promise; /** Persist all entries, then make the graph's caches visible. */ commit(localAdapter: RuntimeAdapter): Promise; } export type CycleManifestCacheState = "none" | "valid-root" | "invalid"; /** Validate the immutable cycle closure associated with a cached artifact. */ export declare function inspectCycleManifestCache(modulePath: string, tmpDir: string, localAdapter: RuntimeAdapter): Promise; /** Whether persistence changes the authored extension to a hashed JavaScript artifact. */ export declare function needsCycleManifest(filePath: string): boolean; //# sourceMappingURL=cycle-manifest.d.ts.map