/** * `cleo cloud conflicts`: the sync conflicts this store's apply recorded * (T12344 PR-6; journal spec ยง3.2 "conflict records"). * * Every conflict an apply decides is a `_sync_conflict` row: a typed-rule * refusal or override, an edit of a deleted row, a delete over newer edits, * a concurrent divergent edit, a dangling reference, a guard refusal, a * parent delete with live children, a uid collision, a broken post-apply * invariant. Nothing is silently dropped; this lists them, and `resolve` * acknowledges one once its resolution (an ordinary write) is made or it * was reviewed; it never replays the voided op. Each conflict carries the * row's human id, both sides' values per column and the device that wrote * the op (T12997). Local, except that device names come from the account's * device list unless `offline` is set. * * @module cloud/nexus-cloud-conflicts * @task T12344 */ import type { CloudConflictResolveResult, CloudConflictsResult, CloudVaultScope } from '@cleocode/contracts'; import { type ConflictKeep } from '../store/sync/apply/resolve-conflict.js'; import type { NexusCloudOptions } from './nexus-cloud.js'; /** Options of {@link nexusCloudConflicts}. */ export interface NexusCloudConflictsOptions extends NexusCloudOptions { /** The project directory (default: the current project). */ readonly cwd?: string; /** Which store (default `project`). */ readonly scope?: CloudVaultScope; /** Include resolved conflicts (default: open ones only). */ readonly all?: boolean; /** Only this stream's conflicts. */ readonly stream?: string; /** Skip the device-name lookup: no request leaves the machine. */ readonly offline?: boolean; } /** * List the store's recorded sync conflicts, oldest first. * * @param opts - Store, scope and filters. * @returns The conflicts, the open and total counts, and warnings. */ export declare function nexusCloudConflicts(opts?: NexusCloudConflictsOptions): Promise; /** * Parse `--keep`: `mine`, `theirs`, or `column=mine|theirs,...`. * * @param text - The flag value. * @returns The choice, or null when it is not one of those forms. */ export declare function parseConflictKeep(text: string): ConflictKeep | null; /** * Resolve one open conflict. Without `keep` it is acknowledged (marked * resolved). With `keep`, the chosen side per column is kept: mine writes * nothing, theirs is an ordinary local write that syncs, refused when a * typed rule would refuse it on a receiver (T12997). It never replays or * revives the voided transaction. * * @param opts - Store, scope, the conflict id and the side to keep. * @returns Whether an open conflict had that id, and the columns written. * @throws {ConflictResolveError} When `keep` cannot be applied. */ export declare function resolveNexusCloudConflict(opts: { readonly cwd?: string; readonly scope?: CloudVaultScope; readonly id: number; readonly keep?: ConflictKeep; }): Promise; //# sourceMappingURL=nexus-cloud-conflicts.d.ts.map