feat(worker): surface task numbers in MCP tool return payloads
Adds Number alongside every task id in External/'s DTOs -- the two central mappers (ToDto/ToRefDto -> TaskDto/TaskRefDto) plus every DTO that carries a bare task id and bypasses them (batch results, queue state, wait-for-change, config, attachments, handoff, lifecycle, merge-preview-set, worktree list). Input resolution (#123 as an argument) stays for slice 3.
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
||||
|
||||
namespace ClaudeDo.Worker.External;
|
||||
|
||||
public sealed record ResetFailedTaskResult(bool Reset, string TaskId);
|
||||
public sealed record ResetFailedTaskResult(bool Reset, string TaskId, int Number);
|
||||
|
||||
[McpServerToolType]
|
||||
public sealed class LifecycleMcpTools
|
||||
@@ -34,6 +34,6 @@ public sealed class LifecycleMcpTools
|
||||
throw new InvalidOperationException($"Task {taskId} is {task.Status}, not Failed. Only failed tasks can be reset via this tool.");
|
||||
|
||||
await _reset.ResetAsync(taskId, cancellationToken);
|
||||
return new ResetFailedTaskResult(true, taskId);
|
||||
return new ResetFailedTaskResult(true, taskId, task.Number);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user