summaryrefslogtreecommitdiff
path: root/makima/src/daemon/ws/protocol.rs
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/daemon/ws/protocol.rs')
-rw-r--r--makima/src/daemon/ws/protocol.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/makima/src/daemon/ws/protocol.rs b/makima/src/daemon/ws/protocol.rs
index 6e4f5cf..bd13975 100644
--- a/makima/src/daemon/ws/protocol.rs
+++ b/makima/src/daemon/ws/protocol.rs
@@ -380,6 +380,23 @@ pub enum DaemonMessage {
/// Error message if failed
error: Option<String>,
},
+
+ /// Request to merge a task's patch to supervisor's worktree (cross-daemon case).
+ /// Sent when a task completes on a different daemon than its supervisor.
+ MergePatchToSupervisor {
+ /// The task that completed.
+ #[serde(rename = "taskId")]
+ task_id: Uuid,
+ /// The supervisor task to merge into.
+ #[serde(rename = "supervisorTaskId")]
+ supervisor_task_id: Uuid,
+ /// Base64-gzipped patch data.
+ #[serde(rename = "patchData")]
+ patch_data: String,
+ /// Base commit SHA for the patch.
+ #[serde(rename = "baseSha")]
+ base_sha: String,
+ },
}
/// Information about a branch (used in BranchList message).
@@ -737,6 +754,23 @@ pub enum DaemonCommand {
/// Restart the daemon process.
RestartDaemon,
+
+ /// Apply a patch to a task's worktree (for cross-daemon merge).
+ /// Sent by server when routing MergePatchToSupervisor to the supervisor's daemon.
+ ApplyPatchToWorktree {
+ /// Target task whose worktree should be patched.
+ #[serde(rename = "targetTaskId")]
+ target_task_id: Uuid,
+ /// Source task that generated the patch (for logging).
+ #[serde(rename = "sourceTaskId")]
+ source_task_id: Uuid,
+ /// Base64-gzipped patch data.
+ #[serde(rename = "patchData")]
+ patch_data: String,
+ /// Base commit SHA for the patch.
+ #[serde(rename = "baseSha")]
+ base_sha: String,
+ },
}
impl DaemonMessage {