feat(attachments): MCP tools to attach/list/remove task files
AttachmentMcpTools exposes add_task_attachment (text or base64), list_task_attachments, and remove_task_attachment on the external MCP endpoint, so an agent can prepare reference files (plans, scripts) on a task that will run later. Re-attaching the same name overwrites; add/remove refuse on a running task.
This commit is contained in:
@@ -29,6 +29,12 @@ public sealed class TaskAttachmentRepository
|
||||
.FirstOrDefaultAsync(a => a.TaskId == taskId && a.FileName == fileName, ct);
|
||||
}
|
||||
|
||||
public async Task UpdateAsync(TaskAttachmentEntity entity, CancellationToken ct = default)
|
||||
{
|
||||
_context.TaskAttachments.Update(entity);
|
||||
await _context.SaveChangesAsync(ct);
|
||||
}
|
||||
|
||||
public async Task DeleteAsync(string taskId, string fileName, CancellationToken ct = default)
|
||||
{
|
||||
await _context.TaskAttachments
|
||||
|
||||
Reference in New Issue
Block a user