import { z } from "zod"; import type { Run } from "../../runtime/asyncContext.js"; export declare const GITHUB_API_BASE = "https://api.github.com"; export declare const GITHUB_USER_AGENT = "agency-lang (https://github.com/egonSchiele/agency-lang; contact via repo issues)"; /** * One GitHub REST endpoint, declared: method, path, params, and a zod schema * that validates the raw payload and transforms it to the public shape. The * full set of endpoints this module can ever hit is the set of these * declarations (prs.ts, issues.ts) — nothing else builds a request. */ export type GithubEndpoint = { /** Human-readable id for error messages, e.g. "GET /repos/{owner}/{repo}/pulls/{number}". */ name: string; method: "GET" | "POST" | "PATCH"; path: (params: Params) => string; query?: (params: Params) => Record; body?: (params: Params) => unknown; accept?: string; response: z.ZodType; }; /** * Run one declared endpoint. Called only from the endpoint bindings in * prs.ts/issues.ts, which are called only from Agency functions whose * interrupt has already been approved — so the token read below is always * downstream of an approval. The token lives only in this frame, which * contains no interrupt points, so no checkpoint can capture it. * * Uses the GLOBAL fetch on purpose: the fetchMocks test shim replaces * globalThis.fetch, and a saved reference would dodge it. */ export declare function _githubRequest(run: Run, endpoint: GithubEndpoint, params: Params): Promise;