import { access, chmod, mkdir, readFile, rename, rm, stat, writeFile } from 'node:fs/promises'; /** Pinned Oxigraph release. Bump deliberately (re-pin checksums below). */ export declare const OXIGRAPH_VERSION = "0.5.8"; interface OxigraphAsset { /** GitHub release asset filename. */ asset: string; /** SHA-256 of the asset bytes (GitHub release API `digest`, sans prefix). */ sha256: string; } /** * Host (`${platform}-${arch}`) → release asset + integrity hash, pinned to * v0.5.8. Checksums are the GitHub release API `digest` values; re-fetch * and re-pin when bumping `OXIGRAPH_VERSION`. */ export declare const OXIGRAPH_ASSETS: Readonly>; export interface ResolvedOxigraphAsset { asset: string; sha256: string; url: string; /** Cache filename (stable across boots, version-stamped). */ fileName: string; } /** * Map a host to its release asset, or throw an actionable error for * platforms Oxigraph doesn't publish a self-contained binary for. */ export declare function resolveOxigraphAsset(platform?: NodeJS.Platform, arch?: string): ResolvedOxigraphAsset; export interface OxigraphBinaryIo { fetch: typeof globalThis.fetch; mkdir: typeof mkdir; writeFile: typeof writeFile; readFile: typeof readFile; chmod: typeof chmod; rename: typeof rename; rm: typeof rm; stat: typeof stat; access: typeof access; /** Clear the macOS quarantine xattr; best-effort, never throws. */ clearQuarantine: (path: string) => Promise; } export interface EnsureOxigraphBinaryOptions { /** Directory to cache the binary under (e.g. `/oxigraph`). */ cacheDir: string; platform?: NodeJS.Platform; arch?: string; log?: (msg: string) => void; /** Download timeout in ms. Default 120_000 (binaries are ~20 MB). */ timeoutMs?: number; io?: Partial; /** * Override the resolved asset (url + integrity hash + cache filename). * Production omits this and resolves from `platform`/`arch`; tests use * it to supply a checksum matching their mocked bytes. */ asset?: ResolvedOxigraphAsset; } /** * Ensure the pinned Oxigraph binary exists in `cacheDir` and return its * absolute path. Reuses a cached binary whose checksum matches; otherwise * downloads, verifies the SHA-256, marks it executable, clears macOS * quarantine, and atomically moves it into place. */ export declare function ensureOxigraphBinary(opts: EnsureOxigraphBinaryOptions): Promise; export {}; //# sourceMappingURL=oxigraph-binary.d.ts.map