/**
 * GitHub ↔ Neotoma issues sync (`syncIssuesFromGitHub`, `syncIssueIfStale`).
 *
 * Pull leg — GitHub → Neotoma:
 *   - issue entity (per GitHub issue)
 *   - conversation entity (one per issue, linked via REFERS_TO)
 *   - conversation_message entities (one per comment, PART_OF conversation);
 *     sender_kind is `user` here (GitHub mirror). MCP/CLI issue tooling uses `agent`.
 *
 * Push leg — Neotoma → GitHub (when `push` param is true, default):
 *   - Finds local issue entities with `visibility: "public"` and no `github_number`
 *     (i.e. `sync_pending: true` or never pushed).
 *   - Runs `runRedactionGuard` (scan mode) on title+body before creating on GitHub.
 *   - Writes `github_number`, `github_url`, `sync_pending: false` back via `correct`.
 *
 * Identity: `issue` via github_number + repo; `conversation` thread via
 * `conversation_id` from {@link githubIssueThreadConversationId}; `conversation_message` via
 * schema `turn_key` (see `github_thread_keys.ts` — not `github_comment_id` alone).
 */
import type { Operations } from "../../core/operations.js";
import type { IssueSyncParams } from "./types.js";
export interface SyncResult {
    issues_synced: number;
    messages_synced: number;
    errors: string[];
    /** Number of local public issues successfully pushed to GitHub. */
    issues_pushed: number;
    /** Per-issue push errors (non-fatal — pull leg still runs). */
    push_errors: string[];
}
/**
 * Sync issues between Neotoma and GitHub.
 *
 * Push leg (default on): local public issues with no github_number are
 * sanitized and created on GitHub, then updated locally with the returned number/url.
 *
 * Pull leg: GitHub issues and their comments are pulled into local entities.
 *
 * Both legs are idempotent. Push failures are non-fatal: the pull leg still runs.
 */
export declare function syncIssuesFromGitHub(ops: Operations, params?: IssueSyncParams): Promise<SyncResult>;
/**
 * Check if sync is needed based on staleness threshold.
 */
export declare function isSyncStale(lastSyncedAt: string | null): Promise<boolean>;
/**
 * Sync a single issue by number if it's stale.
 */
export declare function syncIssueIfStale(ops: Operations, issueNumber: number, lastSyncedAt: string | null): Promise<boolean>;
//# sourceMappingURL=sync_issues_from_github.d.ts.map