import { BosConfig } from "../../types.cjs";
//#region src/services/resolution/init-source.d.ts
interface SourceResult {
  sourceDir: string;
  parentConfig: BosConfig;
  cleanup: () => Promise<void>;
  /** The ref the tarball actually resolved from — release provenance (ADR 0034). */
  resolvedRef?: string;
  resolvedSha?: string;
}
interface CatalogChainSource {
  catalog: Record<string, string>;
  repository?: string;
  extendsChain: string[];
}
declare function resolveCatalogChainSource(opts: {
  /** Local source root (e.g. a downloaded release tarball) — the walk is
   * always local now: the platform manifest is the chain's catalog authority
   * (ADR 0034), so no network-side catalog walk exists. */
  sourceDir: string;
  /** The bos:// ref the caller resolved this chain from — recorded as the
   * chain head for provenance (writeResolvedConfig's extendsChain) instead of
   * the entry's own file path. */
  originRef?: string;
  /** Legacy head-ref spelling: synthesized into originRef when originRef is
   * absent. */
  extendsAccount?: string;
  extendsGateway?: string;
}): Promise<CatalogChainSource>;
declare function resolveSourceDir(opts: {
  extendsAccount: string;
  extendsGateway: string;
  source?: string;
  /** Release ref pinning the tarball (ADR 0034): the canonical `v<version>`
   * tag. Absent → fail loud — the scaffold surface never pulls a moving
   * branch head, only released bytes. */
  ref?: string;
}): Promise<SourceResult>;
declare function fetchParentConfig(extendsAccount: string, extendsGateway: string): Promise<BosConfig>;
declare function resolveRepositoryViaExtendsChain(extendsAccount: string, extendsGateway: string, visited?: Set<string>): Promise<{
  repository: string;
  config: BosConfig;
} | null>;
/**
 * The release tarball ref (ADR 0034 pt 4): the canonical `v<version>` tag —
 * sync's workflow pins and the release script both target it. One ref, one
 * resolution: a version names exactly one release.
 */
declare function releaseRefCandidates(frameworkVersion: string): string;
declare function downloadTarball(repoUrl: string, ref?: string | string[]): Promise<{
  dir: string;
  cleanup: () => Promise<void>;
  resolvedRef?: string;
  resolvedSha?: string;
}>;
declare function parseGitHubUrl(url: string): {
  owner: string;
  repo: string;
} | null;
//#endregion
export { CatalogChainSource, SourceResult, downloadTarball, fetchParentConfig, parseGitHubUrl, releaseRefCandidates, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir };
//# sourceMappingURL=init-source.d.cts.map