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
@@ -848,7 +848,7 @@ public sealed class ExternalMcpServiceTests : IDisposable
// ── GetTaskConfig ─────────────────────────────────────────────────────────
private ConfigMcpTools BuildConfigSut() => new(_lists, _tasks, _broadcaster);
private ConfigMcpTools BuildConfigSut() => new(_lists, _tasks, _broadcaster, _db.CreateFactory());
[Fact]
public async Task GetTaskConfig_NotFound_Throws()