import type { GithubExecute } from '@volter-ai-dev/twin-github'; export declare function splitRoute(route: string, params: Record): { method: string; path: string; rest: Array<[string, unknown]>; }; export type GhRun = (args: string[], input?: string) => { status: number | null; stdout: string; stderr: string; error?: Error; }; /** Build the `gh api` argv + body for one twin request. Exposed for unit tests. */ export declare function ghApiArgs(route: string, params?: Record): { args: string[]; input?: string; }; /** Parse `gh api --include` output (status line + headers, blank line, body) into {status,data}. */ export declare function parseGhResponse(stdout: string, exitOk: boolean): { status: number; data: unknown; }; /** A token-backed (fetch) GithubExecute that correctly puts GET params in the query string. */ export declare function tokenExecute(token: string, baseUrl?: string): GithubExecute; /** The gh-CLI-backed GithubExecute. `run` is injectable for tests. */ export declare function ghExecute(run?: GhRun): GithubExecute; /** 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 a correct fetch * executor; fall back to shelling `gh api`. Never blocks — bad/missing auth surfaces as an * HTTP 401 at request time, not a stop. */ export declare function resolveGithubExecute(): GithubExecute;