AirCoding
2ef0af6a55
feat: close full execution chain — MainAgent→Scheduler→Worker→LLM→Tool→File
Verified end-to-end: user types task → file created by AI.
Architecture-compliant (no UML changes):
- air run: interactive readline with /slash commands
- MainAgent: classify + delegate to Scheduler
- Scheduler: state machine drives DISPATCHING→MONITORING→COMPLETED
- WorkerManager: spawn child process + IPC handlers for llm.request/tool.call
- Worker main.ts: routes llm.response to WorkerRuntime.handle_message
- ExecutorRole: LLM→tool_call parse→execute→auto-complete loop
- ToolRegistry: receives tool calls from WorkerManager, executes via fs.write/etc.
- File path resolution: project_root from RuntimeApp config
Key fixes:
- Worker main.ts: add llm.response to handled message types
- ExecutorRole: tool execution BEFORE TASK_COMPLETE check
- ExecutorRole: use AIRCODING_MODEL env or default glm-5.1 for LLM calls
- RuntimeApp: wire EventStore with real DB, MigrationRunner with exec()
- Scheduler: task status transitions (pending→running→completed)
- Scheduler: MONITORING event loop delay for worker completion
Tested: MainAgent→Scheduler→Worker→LLM→Tool→File ✅
tsc: 0 errors. E2E: 13/13 gates.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>