import type { RemoteExecute, RemoteExecuteRequest, RemoteExecuteResponse } from '@volter/world-core'; export type GhRun = (args: string[], input?: string) => { status: number | null; stdout: string; stderr: string; error?: Error; }; /** Build the `gh api` argv (and stdin body) for one request. Exposed for unit tests. */ export declare function ghApiArgs(request: RemoteExecuteRequest): { args: string[]; input?: string; }; /** Parse `gh api --include` output (status line and headers, a blank line, the body). */ export declare function parseGhResponse(stdout: string, exitOk: boolean): RemoteExecuteResponse; /** A token-backed RemoteExecute: a fetch against the GitHub API. */ export declare function tokenExecute(token: string, baseUrl?: string): RemoteExecute; /** The gh-CLI-backed RemoteExecute. `run` is injectable for tests. */ export declare function ghExecute(run?: GhRun): RemoteExecute; /** Get a GitHub token without PROMPTING: an explicit env token, else the token the gh CLI is * already authenticated with (`gh auth token`). Returns '' if neither exists. */ export declare function resolveGithubToken(): string; /** The executor ztrack drives: PREFER a real token (env, else gh's own) via fetch; fall back to * shelling `gh api`. Never blocks — bad/missing auth surfaces as an HTTP 401 at request time. */ export declare function resolveGithubExecute(): RemoteExecute;