mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-06 15:07:58 +00:00
Break up the oversized runtime.go (2510 lines) by extracting cohesive groups of functions into dedicated files, and move pure error classification utilities into a new reusable package. New files in pkg/runtime: - model_picker.go: model change/revert tool handlers - agent_delegation.go: sub-agent dispatch, task transfer, handoffs New package pkg/modelerrors: - ContextOverflowError type and detection - HTTP status code extraction (Anthropic, Gemini, OpenAI) - Retryable error classification - Exponential backoff with jitter - User-friendly error formatting Assisted-By: docker-agent