feat(worker): accept #123 task numbers as MCP tool input
TaskIdResolver resolves a #123/bare-123 taskId parameter to its GUID before any lookup, across every External/ MCP tool that takes a task id, including the batch tools' id arrays (via delegation to the already-resolving single-entity methods) and update_task's dependsOnTaskId (empty string still passes through unchanged as the clear-link sentinel). An unknown number throws a clear error instead of a silent null. McpToolDocs.TaskNumberHint tells the agent to refer to tasks as #<number> when reporting to the user, added to the description of get_task, list_tasks, add_task, update_task_status and review_task.
This commit is contained in:
@@ -11,13 +11,15 @@ public sealed class RunHistoryMcpToolsTests : IDisposable
|
||||
private readonly DbFixture _db = new();
|
||||
private readonly ClaudeDoDbContext _ctx;
|
||||
private readonly TaskRunRepository _runs;
|
||||
private readonly TaskRepository _tasks;
|
||||
private readonly RunHistoryMcpTools _sut;
|
||||
|
||||
public RunHistoryMcpToolsTests()
|
||||
{
|
||||
_ctx = _db.CreateContext();
|
||||
_runs = new TaskRunRepository(_ctx);
|
||||
_sut = new RunHistoryMcpTools(_runs);
|
||||
_tasks = new TaskRepository(_ctx);
|
||||
_sut = new RunHistoryMcpTools(_runs, _tasks);
|
||||
}
|
||||
|
||||
public void Dispose() { _ctx.Dispose(); _db.Dispose(); }
|
||||
|
||||
Reference in New Issue
Block a user