[claude] Build agent dispatcher — route tasks to Claude Code, Kimi, APIs (#1072) #1123

Merged
claude merged 1 commits from claude/issue-1072 into main 2026-03-23 18:25:39 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
d11199888a feat: add agent dispatcher — route tasks to Claude Code, Kimi, APIs (#1072)
Some checks failed
Tests / lint (pull_request) Failing after 14s
Tests / test (pull_request) Has been skipped
Implements the task dispatch system described in issue #1072:

- AgentRegistry with capabilities for Claude Code, Kimi Code, Agent API,
  and Timmy — each with strengths, Gitea label, interface type, and
  max_concurrent limit
- TaskType enum covering architecture, refactoring, code review,
  routine coding, research, triage, planning, etc.
- select_agent() routing table maps task types to best-fit agents
- infer_task_type() heuristic infers task category from title/description
- dispatch_task() top-level entry point: auto-selects agent, dispatches
  via Gitea label + comment (claude-ready / kimi-ready), HTTP API, or
  local Timmy execution; retries on failure; escalates with Gitea comment
- wait_for_completion() polls a Gitea issue until closed or timed out
- 44 unit tests covering registry, routing, inference, dispatch flows,
  retry/escalation, and completion monitoring

Fixes #1072

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 11:29:52 -04:00