/** * GitHub asset-byte fetcher for the pointer-only install path. * * Given an upstream repo URL and a pinned commit SHA, walks the recursive * git tree at that commit and fetches the blob bytes for each requested path. * The Catalog never serves asset bytes — it only hands clients the Pointer * Triple (`source.url` + `source.commitSha` + per-file `{path, sha256}`), * and `installFromManifest` verifies every byte against those hashes. * * Authentication: an optional GitHub PAT is read from the `SKAILE_GITHUB_PAT` * environment variable when no `octokit` instance is injected. Public repos * work unauthenticated (subject to GitHub's anonymous rate limit). * * @docLink packages/library/concepts#install */ import { Octokit } from "@octokit/rest"; /** GitHub PAT environment variable used when no Octokit is injected. */ export declare const GITHUB_PAT_ENV = "SKAILE_GITHUB_PAT"; /** * Options for {@link fetchAssetFilesFromGitHub}. */ export interface FetchOpts { /** Upstream repo URL (e.g. `https://github.com/skaile-ai/skaile-ai-assets`). */ url: string; /** Immutable 40-char git commit SHA the asset version was pinned at. */ commitSha: string; /** Repo-relative paths to fetch. */ paths: string[]; /** Optional Octokit instance — injectable for tests. */ octokit?: Octokit; } /** * Fetch the bytes of each requested path from a GitHub repo at a pinned commit. * * Reads the recursive git tree at `commitSha`, maps each blob path to its blob * SHA, then fetches each requested path's blob and base64-decodes it. * * @returns A `{ path → Buffer }` map covering every requested path. * @throws An error whose message matches `/unreachable/i` if the tree cannot * be read or any requested path is absent from the tree. */ export declare function fetchAssetFilesFromGitHub(opts: FetchOpts): Promise>; //# sourceMappingURL=source-fetch-github.d.ts.map