import { type ReleaseRef, type ReleaseSlots } from "./release-ref.js"; declare const PACKAGE_NAME = "@yuanzhangjing/niubot"; export declare const SHARED_MANIFEST_SCHEMA_VERSION = 1; export declare const SHARED_HOME_REF_SCHEMA_VERSION = 1; export type ArtifactSourceKind = "npm" | "source" | "seed" | "legacy"; export interface ArtifactIdentity { version: string; nodeAbi: string; platform: NodeJS.Platform; arch: string; sourceDigest: string; lockDigest: string; } export interface SharedReleaseManifest { schemaVersion: typeof SHARED_MANIFEST_SCHEMA_VERSION; artifactId: string; packageName: typeof PACKAGE_NAME; version: string; sourceKind: ArtifactSourceKind; sourceDigest: string; lockDigest?: string; treeDigest: string; installedAt: string; installerNodePath: string; nodeVersion: string; nodeAbi: string; platform: NodeJS.Platform; arch: string; } export interface PendingHomeRef { transactionId: string; protected: ReleaseRef[]; updatedAt: string; } export interface SharedHomeRef { schemaVersion: typeof SHARED_HOME_REF_SCHEMA_VERSION; homeId: string; homePath: string; active: ReleaseSlots; pending?: PendingHomeRef; rollback: ReleaseRef[]; runtimePath?: string; updatedAt: string; } export interface PublishStagedArtifactOptions { stagingDirectory: string; manifest: SharedReleaseManifest; } export type PublishResult = "published" | "reused"; export declare class SharedReleaseStore { readonly rootDirectory: string; readonly releasesDirectory: string; readonly stagingDirectory: string; readonly packagesDirectory: string; readonly locksDirectory: string; readonly refsDirectory: string; readonly trashDirectory: string; readonly lockFile: string; constructor(rootDirectory: string); ensureDirectories(): void; acquireLock(timeoutMs?: number): () => void; createStagingDirectory(prefix?: string): string; releaseDirectory(artifactId: string): string; packageDirectory(artifactId: string): string; artifactIdForRuntimePath(runtimePath: string): string | undefined; manifestFile(artifactId: string): string; publishPackageArchive(stagedArchive: string, filename?: string): string; publishStagedArtifact(options: PublishStagedArtifactOptions): PublishResult; readManifest(artifactId: string): SharedReleaseManifest | undefined; assertUsableArtifact(artifactId: string, expectedTreeDigest?: string, verifyTree?: boolean): SharedReleaseManifest; writeHomeRef(ref: SharedHomeRef): void; readHomeRef(homeId: string): SharedHomeRef | undefined; readAllHomeRefs(): SharedHomeRef[]; readAllHomeRefsStrict(): SharedHomeRef[]; homeRefFile(homeId: string): string; private recoverHomeRefBackups; stagingOwnerIsActive(stagingPath: string): boolean; } export declare function buildArtifactId(identity: ArtifactIdentity): string; export declare function buildImportedArtifactId(options: { sourceKind: "npm" | "seed" | "legacy"; version: string; nodeAbi: string; platform: NodeJS.Platform; arch: string; treeDigest: string; }): string; export declare function createHomeId(homePath: string): string; export declare function computeTreeDigest(rootDirectory: string): string; export declare function createSharedReleaseManifest(options: Omit): SharedReleaseManifest; export {};