/** * GitHub App creation via the App-Manifest flow — `slowcook app init`. * * slowcook's agent identity must scale to EVERY consumer org, not one * hand-registered app for one repo (Amin's ruling, ledger O2). GitHub's * manifest flow makes org-owned App creation a single browser click: * * 1. slowcook starts a localhost server and opens the browser on a page * that auto-submits the manifest to GitHub's app-creation endpoint; * 2. the owner clicks "Create GitHub App" (that click IS the consent); * 3. GitHub redirects back to localhost with a one-time code; * 4. slowcook exchanges the code (POST /app-manifests/{code}/conversions) * and receives the App id, slug, and PEM — no form ever filled by hand. * * The App is owned BY THE CONSUMER (their org, their key custody), and once * created they install it on any of their repos, whenever they decide — * that is the "integrate with every repository" story without slowcook * holding anyone's private key. A centrally-published App with hosted * token minting is the dash-product variant of the same seam. * * This module is the pure/HTTP core; the CLI command owns arg parsing and * file writes. */ export interface ManifestOptions { /** App name (globally unique on GitHub). */ name: string; /** Org to own the App; omitted = the signed-in user's account. */ org?: string; /** localhost port the browser flow redirects back to. */ port: number; /** Public = other accounts may install it too. Default false (org-private). */ makePublic?: boolean; } /** The GitHub endpoint the manifest form POSTs to. */ export declare function manifestSubmitUrl(opts: ManifestOptions): string; /** * The manifest slowcook agents need: contents/issues/PRs read-write, no * webhook. Exactly the permission set the worker + refine/recipe/brew use. */ export declare function buildManifest(opts: ManifestOptions): Record; /** The self-submitting page served to the operator's browser. */ export declare function manifestFormHtml(opts: ManifestOptions): string; export interface CreatedApp { id: number; slug: string; pem: string; htmlUrl: string; installUrl: string; } /** Shape-check GitHub's conversion response; throws with a named cause. */ export declare function parseConversionResponse(data: unknown): CreatedApp; /** Exchange the redirect code for the created App's credentials. */ export declare function convertManifestCode(code: string): Promise; //# sourceMappingURL=app-manifest.d.ts.map