/** * GitHub release lookup and checksum helpers for binary install/update. * End-user updates resolve versions from GitHub, not the npm registry. */ import type { UpdateChannel } from "../config/update-channel"; export declare const RELEASE_REPO = "Yeachan-Heo/gajae-code"; export declare const GITHUB_API_ORIGIN = "https://api.github.com"; export declare const GITHUB_RELEASE_DOWNLOAD_ORIGIN = "https://github.com/Yeachan-Heo/gajae-code/releases/download"; export declare const BINARY_SHA256_ASSET = "gajae-release-binaries.sha256"; export declare const BINARY_MANIFEST_ASSET = "gajae-release-binaries-v1.json"; export interface GithubReleaseInfo { tag: string; version: string; channel: UpdateChannel; htmlUrl?: string; warnings: string[]; } export type GithubFetch = (input: string | URL | Request, init?: RequestInit) => Promise; export interface GithubReleaseLookupOptions { channel?: UpdateChannel; fetchImpl?: GithubFetch; lookupEnv?: (name: string) => string | undefined; apiOrigin?: string; timeoutMs?: number; useAmbientToken?: boolean; } export declare function isSafeReleaseTag(tag: string): boolean; export declare function versionFromTag(tag: string): string; export declare function githubReleaseHeaders(token: string | undefined): Record; export declare function fetchGithubChannelRelease(options?: GithubReleaseLookupOptions): Promise; export declare function parseChecksumForAsset(text: string, assetName: string): string | undefined; export declare function parseManifestChecksum(payload: unknown, assetName: string): string | undefined; export declare function sha256Buffer(bytes: Uint8Array): string; export declare function sha256File(filePath: string): Promise; export declare function fetchOptionalText(url: string, options?: { fetchImpl?: GithubFetch; lookupEnv?: (name: string) => string | undefined; timeoutMs?: number; }): Promise; export declare function verifyDownloadedBinaryChecksum(options: { tag: string; assetName: string; filePath: string; fetchImpl?: GithubFetch; lookupEnv?: (name: string) => string | undefined; downloadOrigin?: string; }): Promise<"verified">;