feat(HAI-002): add maxWorktrees setting to limit total git worktrees

- Add maxWorktrees field to Settings interface with default of 4
- Enforce worktree limit in Scheduler.schedule() alongside maxConcurrent
- Wire setting through dashboard startup from persisted settings
- Include maxWorktrees in /api/config response
- Add Max Worktrees input to Settings Modal UI
- Backward compatible: existing configs without maxWorktrees use default
This commit is contained in:
Dustin Byrne
2026-03-25 20:32:07 -04:00
parent 93651835b6
commit 6fbf3519b5
5 changed files with 48 additions and 6 deletions

View File

@@ -43,11 +43,13 @@ export interface TaskCreateInput {
export interface Settings {
maxConcurrent: number;
maxWorktrees: number;
pollIntervalMs: number;
}
export const DEFAULT_SETTINGS: Settings = {
maxConcurrent: 2,
maxWorktrees: 4,
pollIntervalMs: 15000,
};