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:
Mika Kuns
2026-06-26 16:11:48 +02:00
parent 6a0c0f59a5
commit f7e946e472
5 changed files with 359 additions and 1 deletions
@@ -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