import type { ProjectMetadata } from '../project/context.js'; /** The two pictures a project carries. Both are local files under `.bitmagic/`, both re-hostable. */ export type GameInfoImageKind = 'reference' | 'cover'; export interface GameInfoImage { /** The public URL the record names — where this picture lives for everyone but this machine. */ url: string; /** Whether the sidecar can serve local bytes. False means the dialog falls back to `url`. */ local: boolean; /** When it was accepted (reference) or generated (cover), ISO. */ at: string; /** Reference only: false when re-hosting failed, so `url` is the source and will expire. */ hosted?: boolean; /** Reference only, and only when a generated candidate rather than a bare URL was accepted. */ candidateId?: string; } export interface GameInfo { gameName: string; gameId: string; environment: string; engineVersion: string; template: string; /** `gameGenre` from the work copy, falling back to what `bitmagic.json` recorded at scaffold. */ genre: string; /** `physicsMode` from the work copy. Null on the genres that declare none. */ physicsMode: string | null; /** What every generation in this project inherits — `voxel` when game.json declares nothing. */ artStyle: string; /** False when that style is the default rather than a declaration, which is worth saying. */ artStyleDeclared: boolean; /** `desktop` unless the project says otherwise; null when it declares nothing at all. */ primaryPlatform: string | null; reference: GameInfoImage | null; cover: GameInfoImage | null; } export interface GameInfoSource { root: string; metadata: ProjectMetadata; gameId: string; gameName: string; environment: string; } export declare function readGameInfo(source: GameInfoSource): GameInfo; /** * The bytes of one picture, for the dialog's thumbnail. * * Served from disk rather than linked to the public URL because the local copy is the one that is * always there: an accepted reference whose re-host failed carries an Asset Forger URL that * expires, and a cover's URL is on whichever environment generated it. The content type is * sniffed rather than taken from the extension — both files are written as `.webp` whatever the * generator actually returned. */ export declare function readGameInfoImage(root: string, kind: GameInfoImageKind): { bytes: Buffer; contentType: string; } | null;