feat(worker): add get_effective_run_config MCP tool

Adds a read-only get_effective_run_config(taskId) tool that reports the
model/max-turns/effort/permission-mode/agent-path/system-prompt/skills a
task will actually run with, each tagged with its source (task/list/
preset/global), plus max-turns' raw requested value and clamp status.

Extracted the model/max-turns/agent-path resolution out of
TaskRunner.ResolveConfigAsync into EffectiveRunConfigResolver so the run
path and the new reporting tool share one codepath instead of risking
drift, per docs/explore-notes/worker-task-pipeline.md's max-turns trap.
This commit is contained in:
mika kuns
2026-08-05 20:39:35 +02:00
parent bdee731376
commit a768bc4163
9 changed files with 383 additions and 20 deletions
@@ -20,7 +20,7 @@ public sealed class ConfigMcpToolsTests : IDisposable
_ctx = _db.CreateContext();
_lists = new ListRepository(_ctx);
_tasks = new TaskRepository(_ctx);
_sut = new ConfigMcpTools(_lists, _tasks, new HubBroadcaster(new CapturingHubContext()));
_sut = new ConfigMcpTools(_lists, _tasks, new HubBroadcaster(new CapturingHubContext()), _db.CreateFactory());
}
public void Dispose() { _ctx.Dispose(); _db.Dispose(); }