summaryrefslogtreecommitdiff
path: root/makima/src/daemon/ws
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-27 01:25:29 +0000
committersoryu <soryu@soryu.co>2026-01-27 01:25:40 +0000
commitb0d0b4848b2fc8a44c2575e09a08b34aaf6e1484 (patch)
treebd0dedfd8a3623d01f28ff590e97a028bc5456c5 /makima/src/daemon/ws
parentb28345d15730ffbefe81244d06c06fe13c30b0ea (diff)
downloadsoryu-b0d0b4848b2fc8a44c2575e09a08b34aaf6e1484.tar.gz
soryu-b0d0b4848b2fc8a44c2575e09a08b34aaf6e1484.zip
Default to shared worktree and add worktree endpoint
Diffstat (limited to 'makima/src/daemon/ws')
-rw-r--r--makima/src/daemon/ws/protocol.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/makima/src/daemon/ws/protocol.rs b/makima/src/daemon/ws/protocol.rs
index 018dc7b..6e4f5cf 100644
--- a/makima/src/daemon/ws/protocol.rs
+++ b/makima/src/daemon/ws/protocol.rs
@@ -270,6 +270,34 @@ pub enum DaemonMessage {
error: Option<String>,
},
+ /// Response to GetWorktreeInfo command.
+ WorktreeInfoResult {
+ #[serde(rename = "taskId")]
+ task_id: Uuid,
+ success: bool,
+ /// Path to the worktree directory
+ #[serde(rename = "worktreePath")]
+ worktree_path: Option<String>,
+ /// Whether the worktree exists
+ exists: bool,
+ /// Number of files changed
+ #[serde(rename = "filesChanged")]
+ files_changed: i32,
+ /// Total lines inserted
+ insertions: i32,
+ /// Total lines deleted
+ deletions: i32,
+ /// Changed files list: [{path, status, linesAdded, linesRemoved}]
+ files: Option<serde_json::Value>,
+ /// Current branch name
+ branch: Option<String>,
+ /// Current HEAD commit SHA
+ #[serde(rename = "headSha")]
+ head_sha: Option<String>,
+ /// Error message if failed
+ error: Option<String>,
+ },
+
/// Response to CreateCheckpoint command.
CheckpointCreated {
#[serde(rename = "taskId")]
@@ -449,6 +477,9 @@ pub enum DaemonCommand {
/// Whether the contract is in local-only mode (skips automatic completion actions).
#[serde(rename = "localOnly", default)]
local_only: bool,
+ /// Task ID to share worktree with (supervisor's task ID). If Some, use that task's worktree instead of creating a new one.
+ #[serde(rename = "supervisorWorktreeTaskId", default, skip_serializing_if = "Option::is_none")]
+ supervisor_worktree_task_id: Option<Uuid>,
},
/// Pause a running task.
@@ -656,6 +687,12 @@ pub enum DaemonCommand {
task_id: Uuid,
},
+ /// Get worktree information (files, stats, branch) for a task.
+ GetWorktreeInfo {
+ #[serde(rename = "taskId")]
+ task_id: Uuid,
+ },
+
/// Create a checkpoint (stage changes, commit, get stats).
CreateCheckpoint {
#[serde(rename = "taskId")]