- cli.py: cmd_run() now uses agent.ainvoke() instead of pipeline
- ui.py: 'run all' button and chat use main agent; status tab fixed (thread + st.rerun)
- src/agent/runner_tools.py: new solve_task tool wrapping reliable single-task execution
- src/agent/agent.py: solve_task added to main agent tools
- src/agent/prompts.py: main_agent_instructions rewritten for LLM-first orchestration
LLM decides what to do and in what order; Python tools are just hands.
pipeline.py:
- _invoke_with_retry принимает callbacks и пробрасывает в agent.ainvoke()
- process_one_task принимает RunnableConfig и извлекает callbacks из него
- callbacks передаются при первой сдаче и при retry-исправлении
ui.py:
- Pipeline «все todo» запускается в потоке (не блокирует asyncio.run)
- AgentCallback собирает события и показывает их в реальном времени
- После завершения — раскрывающийся лог всего pipeline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- RetryOnRateLimitMiddleware: при 429 шлёт события rate_limit_wait/retry
в глобальный UI-канал (set_ui_event_queue) — без него не меняет поведение
- ui.py: рендерит ⏳ rate_limit_wait и 🔄 rate_limit_retry в лог событий
- ui.py: показывает «Агент работает... Nс» если нет событий >15с
- ui.py: кнопка «Стоп» прерывает ожидание в чате и pipeline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- src/agent/solve_tools.py: новые LLM-субагенты validate_teacher_comment и
generate_code_solution — агент сам решает когда их вызывать
- src/agent/solve_prompts.py: централизованные промпты для субагентов решения
- src/agent/gitea_tools.py: добавлен gitea_list_files для чтения файлов репо
- src/agent/agent.py: SOLVE_TOOLS подключены к homework_direct_agent и rework_agent
- src/agent/prompts.py: промпты переработаны в capability-based формат (без жёстких шагов)
- cli.py: единая точка входа (solve / run / status)
- ui.py: Streamlit UI с реал-тайм отображением вызовов инструментов
- requirements.txt: добавлен streamlit>=1.35.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Switch transport to streamable_http (matches solve_task.py)
- Add _persistent_client global to reuse MultiServerMCPClient across calls
- Add exponential backoff 15→30→60→120→240s on 429 responses
- Add _INTER_CALL_DELAY=1.5s between consecutive MCP calls to prevent burst
- Add _is_429() helper for clean 429 detection
- Recreate client on non-429 errors to recover from stale sessions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added _force_submit() and _is_submitted() helpers. After the agent
finishes writing code, the pipeline checks if the task was actually
submitted. If not (LLM failed to call tools), the pipeline submits
directly via MCP — no LLM involved in the critical submit step.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Token usage is now tracked on platform.brojs.ru.
Uses the same JOURNAL_TOKEN (jrnl_...) for both MCP and inference.
Removed OPENAI_API_KEY from .env.example.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Changed homework_doing_instructions delimiter from """ to ''' to avoid
SyntaxError caused by docstrings inside code examples within the string.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
prompts.py:
- Added detailed technical patterns for deepagents, FastMCP, LangGraph,
HumanInTheLoop, RAG with Qdrant, stream mode, text game
- LLM always via OpenRouter (never hub.pull/Ollama/hardcode)
- FastMCP correct pattern (module-level, NOT inside class)
- create_agent not compatible with AgentExecutor - documented
- DuckDuckGo search pattern (no API key needed)
pipeline.py:
- Added _invoke_with_retry: auto-retry on 429 rate limit (up to 5x, 90s backoff)
- Added TASK_PAUSE (15s) between tasks to reduce rate limit pressure
- Progress logging: per-task status messages
- Imported asyncio and re
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AgentMiddleware is a plain Generic class, not a Pydantic BaseModel,
so class-level field declarations don't work. Explicit __init__ required.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>