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

@@ -25,6 +25,38 @@ export type AgentVisibility = 'public' | 'silent';
export type PairedRoomRole = 'owner' | 'reviewer';
export type PairedWorkspaceTopology = 'shadow-snapshot' | 'reviewer-cow';
export type PairedTaskStatus =
| 'draft'
| 'review_ready'
| 'in_review'
| 'changes_requested'
| 'merge_ready'
| 'merged'
| 'discarded'
| 'failed';
export type PairedExecutionStatus =
| 'pending'
| 'running'
| 'succeeded'
| 'failed'
| 'cancelled';
export type PairedWorkspaceRole = 'owner' | 'reviewer';
export type PairedWorkspaceStatus =
| 'provisioning'
| 'ready'
| 'stale'
| 'failed'
| 'archived';
export type PairedApprovalStatus = 'pending' | 'approved' | 'rejected';
export type PairedArtifactType = 'comment' | 'report' | 'patch';
export interface RoomRoleContext {
serviceId: string;
role: PairedRoomRole;
@@ -33,6 +65,76 @@ export interface RoomRoleContext {
failoverOwner: boolean;
}
export interface PairedProject {
chat_jid: string;
group_folder: string;
canonical_work_dir: string;
workspace_topology: PairedWorkspaceTopology;
created_at: string;
updated_at: string;
}
export interface PairedTask {
id: string;
chat_jid: string;
group_folder: string;
owner_service_id: string;
reviewer_service_id: string;
title: string | null;
source_ref: string | null;
review_requested_at: string | null;
status: PairedTaskStatus;
created_at: string;
updated_at: string;
}
export interface PairedExecution {
id: string;
task_id: string;
service_id: string;
role: PairedWorkspaceRole;
workspace_id: string | null;
status: PairedExecutionStatus;
summary: string | null;
created_at: string;
started_at: string | null;
completed_at: string | null;
}
export interface PairedWorkspace {
id: string;
task_id: string;
role: PairedWorkspaceRole;
workspace_dir: string;
snapshot_source_dir: string | null;
status: PairedWorkspaceStatus;
snapshot_refreshed_at: string | null;
created_at: string;
updated_at: string;
}
export interface PairedApproval {
id: number;
task_id: string;
service_id: string;
role: PairedWorkspaceRole;
status: PairedApprovalStatus;
note: string | null;
created_at: string;
}
export interface PairedArtifact {
id: number;
task_id: string;
execution_id: string | null;
service_id: string;
artifact_type: PairedArtifactType;
title: string | null;
content: string | null;
file_path: string | null;
created_at: string;
}
export type StructuredAgentOutput =
| {
visibility: 'public';