feat(workspace): session-scoped Caller.Holder + ReleaseByHolder for ACP integration

This commit is contained in:
2026-05-07 14:21:00 +08:00
parent 9fc96b0a1a
commit 3e50da4a49
6 changed files with 91 additions and 4 deletions
+10
View File
@@ -81,3 +81,13 @@ DELETE FROM workspace_worktrees WHERE id = $1;
UPDATE workspace_worktrees
SET status = 'idle'
WHERE id = $1 AND status = 'pruning';
-- name: ReleaseWorktreesByHolder :many
UPDATE workspace_worktrees
SET status = 'idle',
active_holder = NULL,
acquired_at = NULL,
last_used_at = now(),
prune_warning_at = NULL
WHERE active_holder = $1 AND status = 'active'
RETURNING *;