/** * GitHub reviewer-identity via OAuth device flow (0.6.0). * * Implements core's `ForgeReviewerAuth` so a hosted LCR can let each reviewer * sign in as THEMSELVES — their comments are then attributed to their own * GitHub account, not a shared host token. See core/forge.ts for the seam + why * the token-exchange must run server-side (GitHub's token endpoints aren't * CORS-open to browsers; only `api.github.com` reads/writes with a user token * are). The cli/overlay host `requestDeviceCode` + `pollAccessToken` next to the * mock; the browser uses the resulting token directly. * * Needs a GitHub OAuth App **Client ID** with Device Flow enabled. No client * secret is used (device flow is a public-client grant). */ import type { ForgeReviewerAuth, DeviceCodeGrant, PollResult, ReviewerIdentity } from "@slowcook-ai/core"; /** * Default OAuth App Client ID for the shared "slowcook reviewer" app * (Device Flow enabled). A Client ID is a PUBLIC identifier — not a secret — * so it ships as the zero-config default. Because device flow uses no * callback URL and an OAuth-App grant is per-user (scoped globally, not * per-repo), this ONE app works for every consumer repo on every box: a * reviewer authorizes it once and can comment on any repo they can access. * Override per-project via config when someone wants their own consent-screen * branding (or a tighter-scoped GitHub App). */ export declare const SLOWCOOK_REVIEW_OAUTH_CLIENT_ID = "Ov23liYJzTY9HiXGeTUN"; export interface GitHubReviewerAuthOptions { /** OAuth App Client ID (Device Flow enabled). Defaults to the shared slowcook app. */ clientId?: string; /** * OAuth scope to request. `public_repo` lets reviewers comment on public * repos; private repos need `repo`. Default `public_repo`. */ scope?: string; /** Injectable for tests; defaults to global fetch. */ fetchImpl?: typeof fetch; } export declare class GitHubReviewerAuth implements ForgeReviewerAuth { private readonly clientId; private readonly scope; private readonly f; constructor(opts?: GitHubReviewerAuthOptions); requestDeviceCode(): Promise; pollAccessToken(deviceCode: string): Promise; identify(token: string): Promise; } //# sourceMappingURL=reviewer-auth.d.ts.map