feat: add paired review workspace flow

This commit is contained in:
Eyejoker
2026-03-28 21:14:25 +09:00
parent 79a8a2639e
commit e7f49d77da
19 changed files with 2719 additions and 20 deletions

View File

@@ -129,3 +129,32 @@ export function resolveServiceTaskSessionsPath(
ensureWithinBase(sessionsBaseDir, sessionsPath);
return sessionsPath;
}
export function resolvePairedTaskWorkspaceRoot(
folder: string,
taskId: string,
): string {
assertValidGroupFolder(folder);
assertValidRuntimeSegment(taskId, 'task ID');
const workspacesBaseDir = path.resolve(DATA_DIR, 'workspaces');
const workspacesPath = path.resolve(
workspacesBaseDir,
folder,
'tasks',
taskId,
);
ensureWithinBase(workspacesBaseDir, workspacesPath);
return workspacesPath;
}
export function resolvePairedTaskWorkspacePath(
folder: string,
taskId: string,
role: 'owner' | 'reviewer',
): string {
assertValidRuntimeSegment(role, 'workspace role');
const workspaceRoot = resolvePairedTaskWorkspaceRoot(folder, taskId);
const workspacePath = path.resolve(workspaceRoot, role);
ensureWithinBase(workspaceRoot, workspacePath);
return workspacePath;
}