/**
 * Resilient external-write helper (0865 T-007).
 *
 * Wraps a single provider write (JIRA transition, ADO state change, GitHub close)
 * with bounded-backoff retry for TRANSIENT failures (429 / 5xx / network) and, on
 * TERMINAL failure, enqueues a job into {@link SyncRetryQueue} so `sync-retry` can
 * drain it. Before this, the retry queue was structurally always-empty because no
 * live write path enqueued on failure.
 *
 * Never throws — the live closure flow already collects per-issue errors; this
 * helper additionally guarantees the failure is persisted for retry.
 *
 * @module sync/resilient-write
 */
import { type RetryOptions } from '../core/sync/retry-wrapper.js';
import { SyncRetryQueue } from '../core/sync/sync-retry-queue.js';
export interface ResilientWriteParams {
    /** Shared retry queue (file-backed, drained by `sync-retry`). */
    retryQueue: SyncRetryQueue;
    incrementId: string;
    provider: string;
    featureId: string;
    projectPath: string;
    projectName: string;
    /** Bounded backoff config. Defaults to 3 retries, 250ms base, 5s cap. */
    retry?: RetryOptions;
}
export interface ResilientWriteResult {
    ok: boolean;
    /** True when a job was enqueued into the retry queue (terminal failure). */
    enqueued: boolean;
    /** Masked error message on failure. */
    error?: string;
}
/**
 * Execute a provider write with transient-retry + terminal-enqueue semantics.
 *
 * @param write - The provider write to perform (e.g., `() => client.updateIssue(...)`).
 * @param params - Retry queue + identifying context for the enqueued job.
 */
export declare function resilientWrite<T>(write: () => Promise<T>, params: ResilientWriteParams): Promise<ResilientWriteResult>;
//# sourceMappingURL=resilient-write.d.ts.map