// cli/project-detector.ts — Detect projectId from path using same hash as storage (SPEC-124)
import { createHash } from 'node:crypto';
import { resolve } from 'node:path';
/**
 * Compute a deterministic projectId from a filesystem path.
 * Uses the same SHA-256 algorithm as storage/base-store.ts hashProjectPath.
 */
export function detectProjectId(path) {
    const resolved = resolve(path ?? process.cwd());
    return createHash('sha256').update(resolved).digest('hex').slice(0, 16);
}
//# sourceMappingURL=project-detector.js.map