diff options
| author | soryu <soryu@soryu.co> | 2026-01-27 11:03:45 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-27 11:03:58 +0000 |
| commit | b6f239c19f0d3130515f3745f842e17a69212295 (patch) | |
| tree | 25b10a4fa2b7f1b38086c0067ba2f102cfb27b43 /makima/src/daemon/ws | |
| parent | ee45906b07d1032afaf8a56cce48826bea0c3f8b (diff) | |
| download | soryu-b6f239c19f0d3130515f3745f842e17a69212295.tar.gz soryu-b6f239c19f0d3130515f3745f842e17a69212295.zip | |
Add patch merging and fix task healthcheck failing due to worktrees
Diffstat (limited to 'makima/src/daemon/ws')
| -rw-r--r-- | makima/src/daemon/ws/protocol.rs | 34 |
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 { |
