diff --git a/src/ClaudeDo.Worker/External/ExternalMcpService.cs b/src/ClaudeDo.Worker/External/ExternalMcpService.cs index 4550988..7e811a4 100644 --- a/src/ClaudeDo.Worker/External/ExternalMcpService.cs +++ b/src/ClaudeDo.Worker/External/ExternalMcpService.cs @@ -90,17 +90,15 @@ public sealed class ExternalMcpService public async Task AddTask( string listId, string title, - string? description, - string createdBy, - bool queueImmediately, - CancellationToken cancellationToken) + string? description = null, + string? createdBy = null, + bool queueImmediately = false, + CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(listId)) throw new InvalidOperationException("listId is required."); if (string.IsNullOrWhiteSpace(title)) throw new InvalidOperationException("title is required."); - if (string.IsNullOrWhiteSpace(createdBy)) - throw new InvalidOperationException("createdBy is required."); var list = await _lists.GetByIdAsync(listId, cancellationToken) ?? throw new InvalidOperationException($"List {listId} not found."); @@ -114,7 +112,7 @@ public sealed class ExternalMcpService Status = TaskStatus.Idle, CreatedAt = DateTime.UtcNow, CommitType = list.DefaultCommitType, - CreatedBy = createdBy, + CreatedBy = createdBy.NullIfBlank() ?? "mcp", }; await _tasks.AddAsync(entity, cancellationToken);