/** * Conflict naming + id derivation. * * When share/sync detects divergence it records the conflict to * `/.hq-conflicts/index.json` (consumed by the `/resolve-conflicts` * HQ skill) and decides a winner (`pickWinner` in `../cli/conflict.ts`). The * engine no longer writes a sibling `.conflict-…` twin beside the live * file: the cloud side is covered by S3 versioning, and the LOSING local body * (the only bytes S3 does not hold) is parked out of the tree under * `.hq/conflict-backups/` — a sync-ignored directory — so nothing is destroyed * and no twin ever pollutes the content tree again. * * `buildConflictPath` is kept ONLY so the legacy-twin reconciler * (`./conflict-reconcile.ts`) and the ephemeral-path filters can recognise the * twins older engines minted; no producer calls it any more. * * Machine-id provisioning lives in `./machine-id.ts` — hq-cloud owns the * source-of-truth file `/.hq/machine-id` so every sync host * (including Linux outposts with no menubar app) gets a stable id. This * module re-exports `readShortMachineId` for back-compat with existing * callers; new callers should import directly from `./machine-id.js`. */ export { readShortMachineId, getOrCreateMachineId } from "./machine-id.js"; /** hq-root-relative directory that holds losing bodies (sync-ignored via `.hq/`). */ export declare const CONFLICT_BACKUPS_DIR = ".hq/conflict-backups"; /** hq-root-relative scratch directory for convergence probes (always cleaned). */ export declare const CONFLICT_PROBE_DIR = ".hq/tmp"; /** * LEGACY sibling-twin name for an original. ISO uses `-` instead of `:` so * the result is filesystem-safe on every OS, and the original extension is * preserved at the end so editors syntax-highlight correctly. * * knowledge/notes.md, 2026-04-27T22:05:14Z, abc123 * → knowledge/notes.md.conflict-2026-04-27T22-05-14Z-abc123.md * * No producer writes this path any more — see the module doc. It remains the * grammar `parseLegacyConflictTwinName` recognises. */ export declare function buildConflictPath(originalRelative: string, detectedAt: string, shortMachineId: string): string; export interface LegacyConflictTwinName { /** Basename of the live file the twin shadows (`notes.md`). */ originalName: string; /** Filesystem-safe detection timestamp as stamped in the name. */ detectedAt: string; machineId: string; } /** * Recognise a legacy `.conflict--[.]` basename and * recover the live sibling's name. Returns null for anything else. */ export declare function parseLegacyConflictTwinName(basename: string): LegacyConflictTwinName | null; /** * Out-of-tree backup key for a LOSING body. Lives under `.hq/conflict-backups/` * mirroring the original's relative path, so backups of one file sort * together and the tree next to the live file stays clean: * * knowledge/notes.md, 2026-04-27T22:05:14Z, abc123 * → .hq/conflict-backups/knowledge/notes.md.2026-04-27T22-05-14Z-abc123.md * * Deliberately NOT the `.conflict-` grammar, so a backup can never be mistaken * for a legacy twin by the reconciler or the ephemeral-path filters. */ export declare function buildConflictBackupPath(originalRelative: string, detectedAt: string, shortMachineId: string): string; /** * Absolute scratch path for one convergence probe download. Under * `/.hq/tmp/` (sync-ignored, never beside the live file); the caller * MUST remove or move it before returning. */ export declare function buildConflictProbePath(hqRoot: string): string; /** * Stable conflict ID — used to dedupe re-detections of the same conflict. * Re-running sync after a conflict but before the user has resolved should * NOT pile up duplicate entries. The id is derived from the original path * and the detection timestamp; if the same original conflicts twice with * the user resolving in between, that's a new id (different timestamp), * which is correct. */ export declare function buildConflictId(originalRelative: string, detectedAt: string): string; //# sourceMappingURL=conflict-file.d.ts.map