/** * Where the repository is hosted — the top-level `host` key of `.aidlc/config.yaml`. * * The one place that knows the three names. Every feature that talks to a host (`gh` today) * reads the key through here, so "absent means GitHub" is one rule rather than four * (gitlab-and-plain-git/AC-1, AC-2). * * Absent or invalid reads as `github`, not "detect now": every project configured before the * key existed runs `gh` today, and reading absence as a fresh `git` call would let a working * setup change without anyone running init (gitlab-and-plain-git design D1). * * The name `gitlab` was kept apart from `git` so that `glab` support could be a branch, not a * migration (design D2): autopilot now opens and merges merge requests with `glab` there * (autopilot-gitlab-merge-requests), while roadmap sync and the `github-issue` action still * treat it as off GitHub. * * @module */ export declare const HOSTS: readonly ["github", "gitlab", "git"]; export type Host = (typeof HOSTS)[number]; /** A valid host name, or undefined. */ export declare function parseHost(value: unknown): Host | undefined; /** `host` from config text; absent, invalid or unparseable is `github` (gitlab-and-plain-git/AC-2, AC-3). */ export declare function hostFromConfigText(text: string | null): Host; /** `host` from `/.aidlc/config.yaml`, under the same rule. */ export declare function readHost(projectRoot: string): Host; /** * The host name of a remote URL, lowercased, or null. Handles `https://`, `ssh://` and the * scp-like `git@host:owner/repo` form. Userinfo and port are dropped: an HTTPS remote can * carry a token (`https://user:token@host/...`), and only the host name may ever be printed. */ export declare function remoteHostName(url: string): string | null; /** * The host a remote points at, or null when it cannot tell * (gitlab-and-plain-git/AC-4, AC-5, AC-6). A self-hosted GitLab is recognised by name only; * anything else — Bitbucket, GitHub Enterprise, a bare server — is "cannot tell". */ export declare function detectHost(remoteUrl: string | null): Host | null; /** `git remote get-url origin` in `projectRoot`, or null when there is no such remote. */ export declare function originUrl(projectRoot: string): string | null; //# sourceMappingURL=host.d.ts.map