/**
 * GitHub API client for the Issues subsystem.
 *
 * Uses native fetch against the GitHub REST API. Token resolution
 * follows the priority order defined in gh_auth.ts.
 *
 * Supports:
 *   - Public issues (Issues API)
 *   - Issue comments (as messages)
 */
import type { GitHubIssue, GitHubComment } from "./types.js";
/** Applied to every GitHub issue created through Neotoma issue tooling (MCP, CLI, API). */
export declare const NEOTOMA_ISSUE_TOOLING_GITHUB_LABEL = "neotoma";
/**
 * Ensures tooling-submitted issues carry the canonical GitHub label plus any caller labels,
 * deduplicated in stable order (canonical first).
 */
export declare function mergeNeotomaToolingIssueLabels(userLabels?: string[]): string[];
interface GitHubApiOptions {
    token?: string;
    repo?: string;
}
/**
 * Create a new GitHub issue (for public mirror only).
 *
 * When GitHub returns 422 (Unprocessable Entity) for unknown labels, the
 * unknown labels are dropped and the request is retried with only the labels
 * that exist on the repo. A warning is logged for each dropped label. This
 * prevents a stale or unknown label name from silently aborting the mirror.
 */
export declare function createIssue(params: {
    title: string;
    body: string;
    labels?: string[];
}, opts?: GitHubApiOptions): Promise<GitHubIssue>;
/**
 * Add a comment (message) to an existing GitHub issue.
 */
export declare function addIssueComment(issueNumber: number, body: string, opts?: GitHubApiOptions): Promise<GitHubComment>;
/**
 * Get a single issue by number.
 */
export declare function getIssue(issueNumber: number, opts?: GitHubApiOptions): Promise<GitHubIssue>;
/**
 * List issues from the configured GitHub repo.
 */
export declare function listIssues(params?: {
    state?: "open" | "closed" | "all";
    labels?: string[];
    since?: string;
    per_page?: number;
    page?: number;
}, opts?: GitHubApiOptions): Promise<GitHubIssue[]>;
/**
 * List comments on a specific issue.
 */
export declare function listIssueComments(issueNumber: number, params?: {
    since?: string;
    per_page?: number;
    page?: number;
}, opts?: GitHubApiOptions): Promise<GitHubComment[]>;
/**
 * Close an issue.
 */
export declare function closeIssue(issueNumber: number, opts?: GitHubApiOptions): Promise<GitHubIssue>;
/**
 * Add labels to an issue.
 */
export declare function addIssueLabels(issueNumber: number, labels: string[], opts?: GitHubApiOptions): Promise<Array<{
    name: string;
}>>;
/**
 * List all label names defined on a repo (used to validate labels before issue creation).
 */
export declare function listRepoLabelNames(opts?: GitHubApiOptions): Promise<string[]>;
export {};
//# sourceMappingURL=github_client.d.ts.map