/** * WS15: Registry fetcher — HTTP fetch + atomic cache write. * * Fetches the registry from the remote URL, validates it, and writes to * ~/.cave/agent/registry-cache.json atomically (write-then-rename). */ import { type Registry } from "./schema.js"; export type FetchChannel = "stable" | "beta"; export type FetchRegistryResult = { ok: true; registry: Registry; cached: boolean; } | { ok: false; error: string; }; /** * Fetch registry JSON from remote URL, validate, and atomically write to * cachePath. Returns the validated Registry on success. * * @param cachePath Absolute path to write the cache file. * @param channel "stable" (default) or "beta". * @param fetchImpl Injectable fetch (defaults to globalThis.fetch / Node 18+). */ export declare function fetchAndCacheRegistry(cachePath: string, channel?: FetchChannel, fetchImpl?: typeof fetch): Promise; //# sourceMappingURL=fetcher.d.ts.map