mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-17 02:43:09 +00:00
feat: add "blocked for human input" feature across full stack
Agents can now request structured human input when they encounter genuine blockers (API keys, design choices, external configs). The request is displayed in the UI with a dynamic form, and the human's response is stored and made available when the agent resumes. Changes span 21 files + 1 new component: - Database: 3 new columns (needs_human_input, human_input_request, human_input_response) with migration - MCP: new feature_request_human_input tool + guards on existing tools - API: new resolve-human-input endpoint, 4th feature bucket - Orchestrator: skip needs_human_input features in scheduling - Progress: 4-tuple return from count_passing_tests - WebSocket: needs_human_input count in progress messages - UI: conditional 4th Kanban column, HumanInputForm component, amber status indicators, dependency graph support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -689,15 +689,19 @@ async def poll_progress(websocket: WebSocket, project_name: str, project_dir: Pa
|
||||
last_in_progress = -1
|
||||
last_total = -1
|
||||
|
||||
last_needs_human_input = -1
|
||||
|
||||
while True:
|
||||
try:
|
||||
passing, in_progress, total = count_passing_tests(project_dir)
|
||||
passing, in_progress, total, needs_human_input = count_passing_tests(project_dir)
|
||||
|
||||
# Only send if changed
|
||||
if passing != last_passing or in_progress != last_in_progress or total != last_total:
|
||||
if (passing != last_passing or in_progress != last_in_progress
|
||||
or total != last_total or needs_human_input != last_needs_human_input):
|
||||
last_passing = passing
|
||||
last_in_progress = in_progress
|
||||
last_total = total
|
||||
last_needs_human_input = needs_human_input
|
||||
percentage = (passing / total * 100) if total > 0 else 0
|
||||
|
||||
await websocket.send_json({
|
||||
@@ -706,6 +710,7 @@ async def poll_progress(websocket: WebSocket, project_name: str, project_dir: Pa
|
||||
"in_progress": in_progress,
|
||||
"total": total,
|
||||
"percentage": round(percentage, 1),
|
||||
"needs_human_input": needs_human_input,
|
||||
})
|
||||
|
||||
await asyncio.sleep(2) # Poll every 2 seconds
|
||||
@@ -858,7 +863,7 @@ async def project_websocket(websocket: WebSocket, project_name: str):
|
||||
|
||||
# Send initial progress
|
||||
count_passing_tests = _get_count_passing_tests()
|
||||
passing, in_progress, total = count_passing_tests(project_dir)
|
||||
passing, in_progress, total, needs_human_input = count_passing_tests(project_dir)
|
||||
percentage = (passing / total * 100) if total > 0 else 0
|
||||
await websocket.send_json({
|
||||
"type": "progress",
|
||||
@@ -866,6 +871,7 @@ async def project_websocket(websocket: WebSocket, project_name: str):
|
||||
"in_progress": in_progress,
|
||||
"total": total,
|
||||
"percentage": round(percentage, 1),
|
||||
"needs_human_input": needs_human_input,
|
||||
})
|
||||
|
||||
# Keep connection alive and handle incoming messages
|
||||
|
||||
Reference in New Issue
Block a user