/**
 * @license
 * Copyright 2026 HopCode Team
 * SPDX-License-Identifier: Apache-2.0
 */
// Centralised path constants and helpers for the `hopcode review` subcommands.
// All paths are relative to the project root (the current working directory
// when the command is invoked). Use `path.join` rather than string
// concatenation so Windows backslashes are produced when needed.
import { join } from 'node:path';
export const REVIEW_TMP_DIR = join('.hopcode', 'tmp');
export const REVIEWS_DIR = join('.hopcode', 'reviews');
export const REVIEW_CACHE_DIR = join('.hopcode', 'review-cache');
/** Worktree path for a given PR review session. */
export function worktreePath(prNumber) {
    return join(REVIEW_TMP_DIR, `review-pr-${prNumber}`);
}
/** Local branch ref name for a fetched PR head. */
export function reviewBranch(prNumber) {
    return `hopcode-review/pr-${prNumber}`;
}
/**
 * Per-target side-file path (review JSON, PR context, presubmit report).
 *
 * Files live under `.hopcode/tmp/` rather than the OS temp dir so the path is
 * stable across platforms (macOS's `os.tmpdir()` returns `/var/folders/...`,
 * not `/tmp` — using the project-local dir avoids that mismatch entirely)
 * and so they're scoped to the project rather than the user's whole machine.
 */
export function tmpFile(target, suffix) {
    return join(REVIEW_TMP_DIR, `hopcode-review-${target}-${suffix}`);
}
/** Filename prefix used by `tmpFile`; useful for cleanup globbing. */
export function tmpPrefix(target) {
    return `hopcode-review-${target}-`;
}
//# sourceMappingURL=paths.js.map