mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 00:49:41 +02:00
feat(execution): add ExecutionBridge for parallel task execution
Implements the Execution Optimizer Rework plan that enables the system to actually use the optimizer metadata (parallelGroups, agentType, recommendedModel, requiresFreshContext, estimatedTokens) that was previously generated but ignored. New components: - ExecutionBridge: Central coordinator that loads optimized plans, manages parallel execution within groups, and coordinates with SpawnOrchestrator for session-based execution - ModelSelector: Routes tasks to appropriate models (opus/sonnet/haiku) based on user defaults and agent type overrides. Optimizer recommendations are advisory only - user preferences always win - GroupScheduler: Builds topologically ordered execution groups, manages dependencies, determines execution mode (session vs task-tool) - ContextManager: Handles fresh context requirements via /clear+/init or new session spawning Features: - Parallel task execution within groups (configurable limit) - Group-level dependency tracking (lower groups complete first) - Partial failure handling (continue with non-dependent tasks) - Model configuration in App Settings > Models tab - Agent type overrides (explore, implement, test, review) - Execution control API endpoints (start, pause, resume, cancel) - SSE events for real-time execution progress visibility - Execution history tracking API endpoints: - GET/POST/PUT /api/execution/* for execution control - GET/PUT /api/execution/model-config for model settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -331,6 +331,16 @@
|
||||
<div class="monitor-empty">No screen sessions</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="monitor-section" id="monitorSubagentsSection">
|
||||
<div class="monitor-section-header">
|
||||
<span>Background Agents</span>
|
||||
<span class="task-stats" id="monitorSubagentStats">0 tracked</span>
|
||||
<button class="btn-toolbar btn-sm btn-danger" onclick="app.clearAllSubagents()" title="Clear all">Clear</button>
|
||||
</div>
|
||||
<div class="monitor-section-body" id="monitorSubagentsBody">
|
||||
<div class="monitor-empty">No background agents</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="monitor-section" id="backgroundTasksSection" style="display: none;">
|
||||
<div class="monitor-section-header">
|
||||
<span>Background Tasks</span>
|
||||
@@ -349,6 +359,7 @@
|
||||
Subagents <span id="subagentCountBadge" class="subagent-badge"></span>
|
||||
</div>
|
||||
<div class="subagents-panel-actions">
|
||||
<button class="btn-toolbar btn-sm btn-danger" onclick="app.clearAllSubagents()" title="Clear all tracked subagents">Clear All</button>
|
||||
<button class="btn-icon-sm" onclick="app.toggleSubagentsDetach()" title="Detach panel" id="subagentsDetachBtn">⧉</button>
|
||||
<button class="btn-icon-sm" onclick="app.toggleSubagentsPanel()" title="Toggle panel" id="subagentsToggleBtn">▲</button>
|
||||
<button class="btn-icon-sm" onclick="app.closeSubagentsPanel()" title="Close">×</button>
|
||||
@@ -489,6 +500,15 @@
|
||||
</div>
|
||||
<span class="form-hint">Completely resets context (use higher threshold than compact)</span>
|
||||
</div>
|
||||
|
||||
<div class="form-row form-row-switch">
|
||||
<label>Image Watcher</label>
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="modalImageWatcherEnabled" checked onchange="app.toggleSessionImageWatcher()">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span class="form-hint">Auto-popup new images (screenshots, etc.) in this session's directory</span>
|
||||
</div>
|
||||
</div><!-- End context-tab -->
|
||||
|
||||
<!-- Ralph Wiggum Tab Content -->
|
||||
@@ -685,6 +705,7 @@
|
||||
<div class="modal-tabs">
|
||||
<button class="modal-tab-btn active" data-tab="settings-display">Display</button>
|
||||
<button class="modal-tab-btn" data-tab="settings-claude">Claude CLI</button>
|
||||
<button class="modal-tab-btn" data-tab="settings-models">Models</button>
|
||||
<button class="modal-tab-btn" data-tab="settings-paths">Paths</button>
|
||||
<button class="modal-tab-btn" data-tab="settings-notifications">Notifications</button>
|
||||
</div>
|
||||
@@ -763,6 +784,16 @@
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Image Watcher Options Section -->
|
||||
<div class="settings-section-header">Image Watcher</div>
|
||||
<div class="settings-item" title="Automatically detect and popup new images in session directories">
|
||||
<span class="settings-item-label">Enable Globally</span>
|
||||
<label class="switch switch-sm">
|
||||
<input type="checkbox" id="appSettingsImageWatcherEnabled" checked>
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Claude CLI Tab -->
|
||||
@@ -805,6 +836,68 @@
|
||||
<span class="form-hint">Process priority (-20 to 19, higher = lower priority, default: 10)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Models Tab -->
|
||||
<div class="modal-tab-content hidden" id="settings-models">
|
||||
<div class="form-row">
|
||||
<label>Default Model</label>
|
||||
<select id="appSettingsDefaultModel" class="form-select">
|
||||
<option value="sonnet">Sonnet (Recommended - balanced)</option>
|
||||
<option value="opus">Opus (Most capable)</option>
|
||||
<option value="haiku">Haiku (Fast & cheap)</option>
|
||||
</select>
|
||||
<span class="form-hint">Model used for execution tasks. Optimizer suggestions are advisory only.</span>
|
||||
</div>
|
||||
<div class="form-row form-row-switch">
|
||||
<label>Show Optimizer Recommendations</label>
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="appSettingsShowModelRecommendations" checked>
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<span class="form-hint">Show what the optimizer recommends (doesn't override your choice)</span>
|
||||
</div>
|
||||
<div class="form-section-header">Agent Type Overrides</div>
|
||||
<p class="form-hint" style="margin: 0 0 12px 0;">Optionally set specific models for each task type. Leave as "Use Default" to use your default model.</p>
|
||||
<div class="form-row">
|
||||
<label>Explore Tasks</label>
|
||||
<select id="appSettingsModelExplore" class="form-select">
|
||||
<option value="">Use Default</option>
|
||||
<option value="haiku">Haiku</option>
|
||||
<option value="sonnet">Sonnet</option>
|
||||
<option value="opus">Opus</option>
|
||||
</select>
|
||||
<span class="form-hint">Quick searches, codebase exploration</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Implement Tasks</label>
|
||||
<select id="appSettingsModelImplement" class="form-select">
|
||||
<option value="">Use Default</option>
|
||||
<option value="haiku">Haiku</option>
|
||||
<option value="sonnet">Sonnet</option>
|
||||
<option value="opus">Opus</option>
|
||||
</select>
|
||||
<span class="form-hint">Code writing, feature implementation</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Test Tasks</label>
|
||||
<select id="appSettingsModelTest" class="form-select">
|
||||
<option value="">Use Default</option>
|
||||
<option value="haiku">Haiku</option>
|
||||
<option value="sonnet">Sonnet</option>
|
||||
<option value="opus">Opus</option>
|
||||
</select>
|
||||
<span class="form-hint">Writing and running tests</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Review Tasks</label>
|
||||
<select id="appSettingsModelReview" class="form-select">
|
||||
<option value="">Use Default</option>
|
||||
<option value="haiku">Haiku</option>
|
||||
<option value="sonnet">Sonnet</option>
|
||||
<option value="opus">Opus</option>
|
||||
</select>
|
||||
<span class="form-hint">Code review, quality checks</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Paths Tab -->
|
||||
<div class="modal-tab-content hidden" id="settings-paths">
|
||||
<div class="form-row">
|
||||
|
||||
Reference in New Issue
Block a user