feat(worker): expose maxParallelExecutions in get_app_settings
The list-handler prompt (MergeHelperDefault) tells the handler to read maxParallelExecutions via get_app_settings, but the DTO never carried the field. Handler had to fall back to reading app_settings directly from the DB on the 2026-07-29 E2E run.
This commit is contained in:
@@ -40,7 +40,7 @@ Interfaces (e.g. `IQueueWaker`, `IPrimeClock`, `ITaskStateService`) live in an `
|
||||
- `RunHistoryMcpTools` — `ListRuns`, `GetRun`, `GetTaskLog` (latest run's log, tail-capped at 256 KB)
|
||||
- `AgentMcpTools` — `ListAgents`
|
||||
- `LifecycleMcpTools` — `ResetFailedTask`
|
||||
- `AppSettingsMcpTools` — `GetAppSettings` (read-only)
|
||||
- `AppSettingsMcpTools` — `GetAppSettings` (read-only; includes `MaxParallelExecutions`)
|
||||
- `AttachmentMcpTools` — `AddTaskAttachment(taskId, fileName, textContent?|base64Content?)`, `ListTaskAttachments`, `RemoveTaskAttachment`. Re-attaching the same fileName overwrites; add/remove refuse on a Running task.
|
||||
- `ExternalMcpService` also exposes two daily-prep tools:
|
||||
- `GetDailyPrepCandidates` — returns Idle, non-blocked tasks in a git repo NOT excluded by `AppSettings.ReportExcludedPaths` and not already `IsMyDay`, plus the current Idle MyDay tasks and `maxTasks` (= `DailyPrepMaxTasks`). Repo-exclusion logic lives in the `DailyPrepFilter` helper (same file).
|
||||
|
||||
+3
-1
@@ -8,6 +8,7 @@ namespace ClaudeDo.Worker.External;
|
||||
|
||||
public sealed record AppSettingsReadDto(
|
||||
string DefaultModel, int DefaultMaxTurns, string DefaultPermissionMode,
|
||||
int MaxParallelExecutions,
|
||||
string WorktreeStrategy, string? CentralWorktreeRoot,
|
||||
bool WorktreeAutoCleanupEnabled, int WorktreeAutoCleanupDays);
|
||||
|
||||
@@ -18,13 +19,14 @@ public sealed class AppSettingsMcpTools
|
||||
|
||||
public AppSettingsMcpTools(IDbContextFactory<ClaudeDoDbContext> dbFactory) => _dbFactory = dbFactory;
|
||||
|
||||
[McpServerTool, Description("Read the worker's app-level defaults (model, max turns, permission mode, worktree strategy). Read-only.")]
|
||||
[McpServerTool, Description("Read the worker's app-level defaults (model, max turns, permission mode, max parallel execution slots, worktree strategy). Read-only.")]
|
||||
public async Task<AppSettingsReadDto> GetAppSettings(CancellationToken cancellationToken)
|
||||
{
|
||||
using var ctx = await _dbFactory.CreateDbContextAsync(cancellationToken);
|
||||
var row = await new AppSettingsRepository(ctx).GetAsync(cancellationToken);
|
||||
return new AppSettingsReadDto(
|
||||
row.DefaultModel, row.DefaultMaxTurns, row.DefaultPermissionMode,
|
||||
row.MaxParallelExecutions,
|
||||
row.WorktreeStrategy, row.CentralWorktreeRoot,
|
||||
row.WorktreeAutoCleanupEnabled, row.WorktreeAutoCleanupDays);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user