coderouter-cli 2.8.0__tar.gz → 2.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/CHANGELOG.md +105 -0
  2. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/PKG-INFO +1 -1
  3. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/adapters/registry.py +34 -9
  4. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/config/schemas.py +32 -7
  5. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/doctor.py +58 -0
  6. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/external-agents.en.md +32 -4
  7. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/external-agents.md +32 -4
  8. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/designs/agent-cli-plugin-extraction.md +5 -1
  9. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/language-tax.en.md +1 -1
  10. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/language-tax.md +1 -1
  11. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers-agent-cli.yaml +35 -6
  12. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/pyproject.toml +1 -1
  13. coderouter_cli-2.9.0/tests/test_agent_cli.py +84 -0
  14. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_doctor.py +95 -0
  15. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_plugin_adapter.py +55 -19
  16. coderouter_cli-2.8.0/coderouter/adapters/agent_cli.py +0 -1168
  17. coderouter_cli-2.8.0/tests/test_agent_cli.py +0 -1507
  18. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/.gitignore +0 -0
  19. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/LICENSE +0 -0
  20. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/README.en.md +0 -0
  21. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/README.md +0 -0
  22. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/__init__.py +0 -0
  23. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/__main__.py +0 -0
  24. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/adapters/__init__.py +0 -0
  25. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/adapters/anthropic_native.py +0 -0
  26. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/adapters/base.py +0 -0
  27. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/adapters/openai_compat.py +0 -0
  28. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/cli.py +0 -0
  29. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/cli_stats.py +0 -0
  30. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/config/__init__.py +0 -0
  31. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/config/capability_registry.py +0 -0
  32. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/config/env_file.py +0 -0
  33. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/config/loader.py +0 -0
  34. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/cost.py +0 -0
  35. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/data/__init__.py +0 -0
  36. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/data/model-capabilities.yaml +0 -0
  37. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/doctor_apply.py +0 -0
  38. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/env_security.py +0 -0
  39. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/errors.py +0 -0
  40. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/gguf_introspect.py +0 -0
  41. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/__init__.py +0 -0
  42. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/_fingerprint.py +0 -0
  43. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/backend_health.py +0 -0
  44. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/context_budget.py +0 -0
  45. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/continuous_probe.py +0 -0
  46. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/drift_actions.py +0 -0
  47. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/drift_detection.py +0 -0
  48. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/memory_budget.py +0 -0
  49. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/memory_pressure.py +0 -0
  50. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/self_healing.py +0 -0
  51. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/guards/tool_loop.py +0 -0
  52. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/hardware.py +0 -0
  53. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/__init__.py +0 -0
  54. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/anthropic_routes.py +0 -0
  55. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/app.py +0 -0
  56. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/dashboard_routes.py +0 -0
  57. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/launcher_routes.py +0 -0
  58. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/metrics_routes.py +0 -0
  59. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/ingress/openai_routes.py +0 -0
  60. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/language_tax.py +0 -0
  61. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/launcher_speculative.py +0 -0
  62. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/logging.py +0 -0
  63. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/metrics/__init__.py +0 -0
  64. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/metrics/collector.py +0 -0
  65. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/metrics/prometheus.py +0 -0
  66. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/output_filters.py +0 -0
  67. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/plugins/__init__.py +0 -0
  68. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/plugins/base.py +0 -0
  69. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/plugins/loader.py +0 -0
  70. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/plugins/registry.py +0 -0
  71. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/routing/__init__.py +0 -0
  72. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/routing/adaptive.py +0 -0
  73. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/routing/auto_router.py +0 -0
  74. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/routing/budget.py +0 -0
  75. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/routing/capability.py +0 -0
  76. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/routing/fallback.py +0 -0
  77. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/state/__init__.py +0 -0
  78. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/state/audit_log.py +0 -0
  79. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/state/replay.py +0 -0
  80. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/state/request_log.py +0 -0
  81. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/state/store.py +0 -0
  82. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/state/suggest_rules.py +0 -0
  83. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/token_estimation.py +0 -0
  84. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/token_estimation_accurate.py +0 -0
  85. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/translation/__init__.py +0 -0
  86. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/translation/anthropic.py +0 -0
  87. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/translation/convert.py +0 -0
  88. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/coderouter/translation/tool_repair.py +0 -0
  89. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/README.en.md +0 -0
  90. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/README.md +0 -0
  91. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/assets/dashboard-demo.png +0 -0
  92. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/claude-code-llamacpp-vllm.en.md +0 -0
  93. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/claude-code-llamacpp-vllm.md +0 -0
  94. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/gguf_dl.en.md +0 -0
  95. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/gguf_dl.md +0 -0
  96. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/hf-ollama-models.en.md +0 -0
  97. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/hf-ollama-models.md +0 -0
  98. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/install-backends.en.md +0 -0
  99. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/install-backends.md +0 -0
  100. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/launcher-quickstart.en.md +0 -0
  101. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/launcher-quickstart.md +0 -0
  102. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/launcher.en.md +0 -0
  103. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/launcher.md +0 -0
  104. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/llamacpp-direct.en.md +0 -0
  105. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/llamacpp-direct.md +0 -0
  106. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/lmstudio-direct.en.md +0 -0
  107. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/lmstudio-direct.md +0 -0
  108. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/backends/verify-ollama-0.23.1.md +0 -0
  109. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/architecture.en.md +0 -0
  110. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/architecture.md +0 -0
  111. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/context-budget.en.md +0 -0
  112. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/context-budget.md +0 -0
  113. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/continuous-probing.en.md +0 -0
  114. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/continuous-probing.md +0 -0
  115. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/drift-detection.en.md +0 -0
  116. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/drift-detection.md +0 -0
  117. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/partial-stitch.en.md +0 -0
  118. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/concepts/partial-stitch.md +0 -0
  119. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/designs/external-agents-adapter.md +0 -0
  120. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/designs/orchestration-companion.md +0 -0
  121. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/designs/v1.5-dashboard-mockup.html +0 -0
  122. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/designs/v1.6-auto-router-verification.md +0 -0
  123. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/designs/v1.6-auto-router.md +0 -0
  124. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/free-tier-guide.en.md +0 -0
  125. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/free-tier-guide.md +0 -0
  126. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/remote-access.en.md +0 -0
  127. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/remote-access.md +0 -0
  128. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/security.en.md +0 -0
  129. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/security.md +0 -0
  130. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/troubleshooting.en.md +0 -0
  131. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/troubleshooting.md +0 -0
  132. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/usage-guide.en.md +0 -0
  133. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/guides/usage-guide.md +0 -0
  134. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/low-memory-integration.en.md +0 -0
  135. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/low-memory-integration.md +0 -0
  136. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/openrouter-roster/CHANGES.md +0 -0
  137. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/openrouter-roster/README.md +0 -0
  138. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/openrouter-roster/latest.json +0 -0
  139. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v0.4.md +0 -0
  140. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v0.5-verify.md +0 -0
  141. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v0.5.md +0 -0
  142. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v0.6.md +0 -0
  143. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v0.7.md +0 -0
  144. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v1.0-verify.md +0 -0
  145. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/retrospectives/v1.0.md +0 -0
  146. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/start/quickstart.en.md +0 -0
  147. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/start/quickstart.md +0 -0
  148. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/start/when-do-i-need-coderouter.en.md +0 -0
  149. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/docs/start/when-do-i-need-coderouter.md +0 -0
  150. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/.env.example +0 -0
  151. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/README.md +0 -0
  152. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers-multiagent.yaml +0 -0
  153. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.context-budget-test.yaml +0 -0
  154. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.llamacpp-vllm.yaml +0 -0
  155. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.nvidia-nim.yaml +0 -0
  156. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.ollama-auto-custom.yaml +0 -0
  157. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.ollama-auto.yaml +0 -0
  158. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.ollama-free-chain.yaml +0 -0
  159. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.raspberrypi.yaml +0 -0
  160. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/examples/providers.yaml +0 -0
  161. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/demo_traffic.sh +0 -0
  162. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/openrouter_roster_diff.py +0 -0
  163. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/smoke_v2_2.sh +0 -0
  164. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/verify-providers.yaml +0 -0
  165. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/verify_ollama_0_23.py +0 -0
  166. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/verify_v0_5.sh +0 -0
  167. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/scripts/verify_v1_0.sh +0 -0
  168. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/__init__.py +0 -0
  169. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/conftest.py +0 -0
  170. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_adapter_anthropic.py +0 -0
  171. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_audit_log.py +0 -0
  172. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_auto_router.py +0 -0
  173. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_auto_router_cjk.py +0 -0
  174. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_backend_health.py +0 -0
  175. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_budget.py +0 -0
  176. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_capability.py +0 -0
  177. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_capability_degraded_payload.py +0 -0
  178. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_capability_registry.py +0 -0
  179. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_capability_registry_cache_control.py +0 -0
  180. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_capability_tool_choice.py +0 -0
  181. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_claude_code_suitability.py +0 -0
  182. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_cli.py +0 -0
  183. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_cli_bind_warning.py +0 -0
  184. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_cli_stats.py +0 -0
  185. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_config.py +0 -0
  186. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_config_shim_actions.py +0 -0
  187. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_context_budget.py +0 -0
  188. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_continuous_probe.py +0 -0
  189. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_dashboard_endpoint.py +0 -0
  190. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_doctor_apply.py +0 -0
  191. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_doctor_cache_probe.py +0 -0
  192. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_drift_actions.py +0 -0
  193. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_drift_detection.py +0 -0
  194. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_drift_detection_integration.py +0 -0
  195. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_env_file.py +0 -0
  196. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_env_security.py +0 -0
  197. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_errors.py +0 -0
  198. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_examples_yaml.py +0 -0
  199. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback.py +0 -0
  200. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_anthropic.py +0 -0
  201. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_cache_control.py +0 -0
  202. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_cache_observed.py +0 -0
  203. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_cache_strip.py +0 -0
  204. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_empty_response.py +0 -0
  205. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_misconfig_warn.py +0 -0
  206. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_paid_gate.py +0 -0
  207. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_thinking.py +0 -0
  208. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fallback_tool_choice_emulate.py +0 -0
  209. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_h1_prometheus_drift.py +0 -0
  210. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_h2_h6_translation.py +0 -0
  211. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_h3_client_reuse.py +0 -0
  212. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_h4_h5_guards.py +0 -0
  213. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_h7_probe_restore.py +0 -0
  214. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_h8_launcher_auth.py +0 -0
  215. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_mA_routing.py +0 -0
  216. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_mB_adapters.py +0 -0
  217. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_mC_convert.py +0 -0
  218. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_mD_logging_metrics.py +0 -0
  219. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_mE_config_validation.py +0 -0
  220. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_fix_mF_ingress.py +0 -0
  221. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_gguf_introspect.py +0 -0
  222. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_guards_tool_loop.py +0 -0
  223. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_hardware.py +0 -0
  224. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_ingress_anthropic.py +0 -0
  225. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_ingress_count_tokens.py +0 -0
  226. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_ingress_profile.py +0 -0
  227. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_language_tax.py +0 -0
  228. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_language_tax_integration.py +0 -0
  229. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_launcher_mtp.py +0 -0
  230. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_launcher_mtp_fallback.py +0 -0
  231. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_launcher_provider_sync.py +0 -0
  232. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_memory_budget.py +0 -0
  233. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_memory_pressure.py +0 -0
  234. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_cache.py +0 -0
  235. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_collector.py +0 -0
  236. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_cost.py +0 -0
  237. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_endpoint.py +0 -0
  238. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_jsonl.py +0 -0
  239. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_prometheus.py +0 -0
  240. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_metrics_prometheus_cache.py +0 -0
  241. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_models_passthrough.py +0 -0
  242. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_openai_compat.py +0 -0
  243. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_openrouter_roster_diff.py +0 -0
  244. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_output_filters.py +0 -0
  245. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_output_filters_adapters.py +0 -0
  246. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_partial_stitch.py +0 -0
  247. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_plugins_integration.py +0 -0
  248. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_plugins_loader.py +0 -0
  249. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_plugins_registry.py +0 -0
  250. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_reasoning_strip.py +0 -0
  251. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_repair_byte_fallback.py +0 -0
  252. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_request_log.py +0 -0
  253. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_role_normalization.py +0 -0
  254. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_routing_adaptive.py +0 -0
  255. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_self_healing.py +0 -0
  256. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_setup_sh.py +0 -0
  257. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_state_store.py +0 -0
  258. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_token_estimation.py +0 -0
  259. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_token_estimation_accurate.py +0 -0
  260. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_tokens_saved_metric.py +0 -0
  261. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_tool_repair.py +0 -0
  262. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_tool_repair_lenient.py +0 -0
  263. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_tool_repair_r4.py +0 -0
  264. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_toolrepair_bench.py +0 -0
  265. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_translation_anthropic.py +0 -0
  266. {coderouter_cli-2.8.0 → coderouter_cli-2.9.0}/tests/test_translation_reverse.py +0 -0
@@ -9,6 +9,111 @@ are kept verbatim where the Japanese text itself is the subject).
9
9
 
10
10
  ---
11
11
 
12
+ ## [v2.9.0] — 2026-07-11 (agent_cli extraction Phase 2c — in-core adapter removed)
13
+
14
+ **BREAKING.** Phase 2c of the agent_cli plugin extraction
15
+ (`docs/designs/agent-cli-plugin-extraction.md` §5/§7): the in-core
16
+ `agent_cli` adapter branch is **removed** from `coderouter/adapters/registry.py`.
17
+ `kind: agent_cli` now resolves exclusively through the external plugin
18
+ **`coderouter-plugin-agents`** — the Phase 2b grace period, during which the
19
+ in-core copy still won resolution, has ended.
20
+
21
+ **Who is affected**: anyone with one or more `kind: agent_cli` providers in
22
+ `providers.yaml`. If the plugin isn't installed and enabled, `coderouter
23
+ serve` now fails at startup.
24
+
25
+ **What to do**: install the plugin and enable it —
26
+
27
+ ```bash
28
+ uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
29
+ # or: pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
30
+ # uv-tool installs of coderouter-cli need the plugin in the same tool env:
31
+ # uv tool install coderouter-cli \
32
+ # --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
33
+ ```
34
+
35
+ ```yaml
36
+ plugins:
37
+ enabled: [agents]
38
+ ```
39
+
40
+ **What is unchanged**: existing `kind: agent_cli` provider entries and the
41
+ `agent_cli:` sub-config (`AgentCliConfig` — schema, fields, defaults) need no
42
+ edits; they remain a stable Core contract per the design's §4.4 case (b).
43
+ Per-CLI behavior (claude/codex/antigravity/grok argv, auth, output parsing)
44
+ is unaffected — only the adapter's Core-vs-plugin wiring changed.
45
+
46
+ **Safety nets**: a `kind: agent_cli` provider without the plugin installed
47
+ and enabled now fails `serve` at startup with a targeted migration hint
48
+ (install command + `plugins.enabled` snippet) rather than a generic
49
+ unknown-kind error, and `coderouter doctor` independently emits a
50
+ config-level warning with the same fix snippet for configs that would hit
51
+ this at startup.
52
+
53
+ ### Removed
54
+
55
+ - **In-core `agent_cli` adapter** (`coderouter/adapters/agent_cli.py`, ~1181
56
+ lines) and the `build_adapter` in-core branch for `kind == "agent_cli"`
57
+ (`coderouter/adapters/registry.py`) — the adapter body, fully moved to
58
+ `coderouter-plugin-agents` 0.1.0 in Phase 2b, is deleted from Core. `kind:
59
+ agent_cli` now resolves only via the plugin-provided-kind lookup path.
60
+ - **`agent-cli-in-core-deprecated` warning** (introduced in Phase 2b,
61
+ `docs/designs/agent-cli-plugin-extraction.md` §5.1) — removed along with
62
+ the in-core branch it guarded; there is nothing left for it to warn about.
63
+
64
+ ### Added
65
+
66
+ - **`coderouter doctor` migration check** — detects a config with one or
67
+ more `kind: agent_cli` providers where `plugins.enabled` does not include
68
+ `agents` (or the plugin isn't installed/discoverable), and emits a
69
+ config-level warning with a ready-to-paste fix snippet
70
+ (`plugins:\n enabled: [agents]` plus the install command).
71
+ - **Targeted unknown-kind / migration hint at `serve` startup** — when
72
+ `build_adapter` cannot resolve `kind: agent_cli` (plugin missing or not
73
+ enabled), the raised error now names the specific migration steps (install
74
+ `coderouter-plugin-agents`, add `plugins.enabled: [agents]`) instead of
75
+ the generic "unknown kind" listing used for arbitrary typos.
76
+
77
+ ### Changed
78
+
79
+ - **`ProviderConfig` / `AgentCliConfig` docstrings and error text**
80
+ (`coderouter/config/schemas.py`) — updated to state plainly that
81
+ `agent_cli` is plugin-served as of v2.9.0 and that the schema itself is
82
+ unaffected.
83
+ - **`Adapter` plugin Protocol docstrings** (`coderouter/plugins/base.py`) —
84
+ updated to drop transitional Phase 2b language (in-core shadowing,
85
+ deprecation warning) now that `agent_cli` resolves solely through the
86
+ plugin path, same as any other plugin-provided `kind`.
87
+
88
+ ## [v2.8.1] — 2026-07-11 (agent_cli moved to coderouter-plugin-agents — Phase 2b)
89
+
90
+ **PR #72**. Phase 2b of the agent_cli plugin extraction
91
+ (`docs/designs/agent-cli-plugin-extraction.md` §4/§5/§7): the adapter body
92
+ and its behavior tests now live in the new external package
93
+ **`coderouter-plugin-agents`** (0.1.0, entry point `coderouter.adapter` →
94
+ `agents`, pins `coderouter-cli>=2.8,<3.0`). Core still bundles the in-core
95
+ `agent_cli` adapter unchanged during the transition — providers.yaml needs
96
+ no edits yet — and the in-core copy keeps winning resolution until Phase 2c
97
+ removes it.
98
+
99
+ ### Added
100
+
101
+ - **`agent-cli-in-core-deprecated` warning** (`adapters/registry.py`) —
102
+ fires once per process when the in-core `agent_cli` branch serves a
103
+ request while the plugin is also installed and enabled, signalling that
104
+ the plugin path takes over at Phase 2c.
105
+
106
+ ### Changed
107
+
108
+ - **`tests/test_agent_cli.py` slimmed 91 → 9** — the 82 adapter-behavior
109
+ tests (argv snapshots, parsers, env isolation, prompt-delivery
110
+ lifecycles, E2E, gemini rejection) moved verbatim to the plugin repo per
111
+ the design's §4.5 split map; the 9 retained tests cover the
112
+ `ProviderConfig`/`AgentCliConfig` pydantic validation that stays in Core
113
+ under §4.4 案(b) (AgentCliConfig remains a stable Core contract).
114
+ - `tests/test_plugin_adapter.py` +1 (deprecation-log semantics: in-core
115
+ still serves by identity, warning fires exactly once).
116
+
12
117
  ## [v2.8.0] — 2026-07-11 (Plugin SDK: Adapter hook wired — Phase 2a of the agent_cli extraction)
13
118
 
14
119
  Opens the Plugin SDK's Adapter surface: the previously dead-end `Adapter`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coderouter-cli
3
- Version: 2.8.0
3
+ Version: 2.9.0
4
4
  Summary: Local-first, free-first, fallback-built-in LLM router. Claude Code / OpenAI compatible.
5
5
  Project-URL: Homepage, https://github.com/zephel01/CodeRouter
6
6
  Project-URL: Repository, https://github.com/zephel01/CodeRouter
@@ -8,14 +8,37 @@ from coderouter.adapters.anthropic_native import AnthropicAdapter
8
8
  from coderouter.adapters.base import BaseAdapter
9
9
  from coderouter.adapters.openai_compat import OpenAICompatAdapter
10
10
  from coderouter.config.schemas import ProviderConfig
11
+ from coderouter.logging import get_logger
11
12
 
12
13
  if TYPE_CHECKING:
13
14
  from coderouter.plugins.registry import PluginRegistry
14
15
 
16
+ logger = get_logger(__name__)
17
+
15
18
  # in-core kinds, in resolution order. Kept as a tuple (not derived from
16
19
  # the if-chain below) so the "Unknown adapter kind" error message and
17
20
  # the plugin-shadow guard have a single source of truth.
18
- _IN_CORE_KINDS: tuple[str, ...] = ("openai_compat", "anthropic", "agent_cli")
21
+ #
22
+ # Phase 2c (docs/designs/agent-cli-plugin-extraction.md §7 row "2c"):
23
+ # "agent_cli" is no longer in this tuple. It is served exclusively by
24
+ # the coderouter-plugin-agents adapter plugin now that the in-core
25
+ # AgentCliAdapter and its build_adapter branch have been removed.
26
+ _IN_CORE_KINDS: tuple[str, ...] = ("openai_compat", "anthropic")
27
+
28
+ # Phase 2c migration hint (docs/designs/agent-cli-plugin-extraction.md
29
+ # §5.2): shown ONLY for kind="agent_cli" when no plugin resolves it, so
30
+ # operators upgrading from pre-2c configs get a targeted fix instead of
31
+ # the generic unknown-kind message.
32
+ _AGENT_CLI_MIGRATION_HINT = (
33
+ "kind='agent_cli' is served by the coderouter-plugin-agents plugin "
34
+ "(Core no longer ships an in-core agent_cli adapter as of Phase 2c). "
35
+ 'Install it with: pip install "coderouter-plugin-agents @ '
36
+ 'git+https://github.com/zephel01/coderouter-plugin-agents" and add '
37
+ "'agents' to plugins.enabled in providers.yaml, e.g.:\n"
38
+ "plugins:\n"
39
+ " enabled:\n"
40
+ " - agents"
41
+ )
19
42
 
20
43
 
21
44
  def _plugin_kinds(plugin_registry: PluginRegistry | None) -> list[str]:
@@ -34,23 +57,25 @@ def build_adapter(
34
57
  Resolution order (docs/designs/agent-cli-plugin-extraction.md §3.2):
35
58
  in-core kinds first, then plugin-provided kinds, then a fail-fast
36
59
  error. In-core kinds are checked first so a plugin can never shadow
37
- a kind Core itself guarantees (``openai_compat`` / ``anthropic`` /,
38
- during the Phase 2b migration window, ``agent_cli``).
60
+ a kind Core itself guarantees (``openai_compat`` / ``anthropic``).
61
+
62
+ As of Phase 2c, ``agent_cli`` is no longer an in-core kind — it
63
+ resolves ONLY via the plugin path (``coderouter-plugin-agents``).
39
64
  """
40
65
  if provider.kind == "openai_compat":
41
66
  return OpenAICompatAdapter(provider)
42
67
  if provider.kind == "anthropic":
43
68
  return AnthropicAdapter(provider)
44
- if provider.kind == "agent_cli":
45
- # Imported lazily so the external-agent adapter (and its subprocess /
46
- # os plumbing) is only pulled in when a config actually uses it.
47
- from coderouter.adapters.agent_cli import AgentCliAdapter
48
-
49
- return AgentCliAdapter(provider)
50
69
  if plugin_registry is not None:
51
70
  for factory in plugin_registry.adapters:
52
71
  if factory.kind == provider.kind:
53
72
  return factory.build(provider)
73
+ if provider.kind == "agent_cli":
74
+ # Targeted migration hint (§5.2) instead of the generic message
75
+ # below — this is the single most common post-2c misconfiguration
76
+ # (an un-migrated providers.yaml that still relies on the removed
77
+ # in-core adapter).
78
+ raise ValueError(f"Unknown adapter kind {provider.kind!r}. {_AGENT_CLI_MIGRATION_HINT}")
54
79
  raise ValueError(
55
80
  f"Unknown adapter kind {provider.kind!r}. "
56
81
  f"in-core kinds: {', '.join(_IN_CORE_KINDS)}; "
@@ -166,8 +166,21 @@ class CostConfig(BaseModel):
166
166
  class AgentCliConfig(BaseModel):
167
167
  """External coding-agent CLI settings for ``kind="agent_cli"`` providers.
168
168
 
169
- Introduced by the external-agents-adapter design (Phase 1). One
170
- ``agent_cli`` sub-config drives the :class:`AgentCliAdapter`, which
169
+ Introduced by the external-agents-adapter design (Phase 1). As of the
170
+ agent_cli plugin extraction's Phase 2c
171
+ (``docs/designs/agent-cli-plugin-extraction.md`` §4.4 case (b), §7),
172
+ the adapter that actually invokes the CLI (``AgentCliAdapter``,
173
+ argv construction / output parsing / sandbox flag tables) has moved
174
+ to the separately-distributed ``coderouter-plugin-agents`` plugin
175
+ (``pip install coderouter-plugin-agents`` + ``plugins.enabled:
176
+ [agents]``) — Core no longer ships it in-core. ``AgentCliConfig``
177
+ itself REMAINS in Core: it is a stable schema contract that has not
178
+ changed since Phase 1 (unlike the adapter body, which absorbs
179
+ per-CLI churn), so keeping it here preserves ``extra="forbid"``
180
+ fail-fast validation at config-load time regardless of whether the
181
+ plugin is installed.
182
+
183
+ One ``agent_cli`` sub-config drives the plugin's adapter, which
171
184
  invokes an external coding-agent CLI (codex / gemini / grok / claude /
172
185
  antigravity) in a single one-shot ``exec`` and returns the final answer
173
186
  as one ``prompt in → text out`` transformation. ``claude`` (Claude Code
@@ -355,10 +368,13 @@ class ProviderConfig(BaseModel):
355
368
  description=(
356
369
  "Adapter type. 'openai_compat' covers llama.cpp / Ollama / "
357
370
  "OpenRouter / LM Studio / Together / Groq. 'anthropic' is the "
358
- "native Anthropic Messages API passthrough (v0.3.x). 'agent_cli' "
359
- "invokes an external coding-agent CLI one-shot (see AgentCliConfig). "
360
- "Other values must be served by an adapter plugin listed in "
361
- "plugins.enabled."
371
+ "native Anthropic Messages API passthrough (v0.3.x). These two "
372
+ "are Core's only in-core kinds. 'agent_cli' invokes an external "
373
+ "coding-agent CLI one-shot (see AgentCliConfig) but, as of "
374
+ "Phase 2c, is served by the coderouter-plugin-agents adapter "
375
+ "plugin — install it and list 'agents' in plugins.enabled. "
376
+ "Any other value must likewise be served by an adapter plugin "
377
+ "listed in plugins.enabled."
362
378
  ),
363
379
  )
364
380
  # base_url is required for HTTP-backed adapters (openai_compat / anthropic)
@@ -428,9 +444,18 @@ class ProviderConfig(BaseModel):
428
444
  # kind="agent_cli": required external coding-agent CLI settings. Opt-in
429
445
  # (default None) exactly like ``restart_command`` — only meaningful when
430
446
  # ``kind == "agent_cli"``, and enforced by ``_check_kind_requirements``.
447
+ # The schema (this field + AgentCliConfig + the kind literal) stays in
448
+ # Core; the adapter that consumes it is the coderouter-plugin-agents
449
+ # plugin as of Phase 2c (docs/designs/agent-cli-plugin-extraction.md
450
+ # §4.4 case (b)).
431
451
  agent_cli: AgentCliConfig | None = Field(
432
452
  default=None,
433
- description="Required when kind='agent_cli': external agent CLI settings.",
453
+ description=(
454
+ "Required when kind='agent_cli': external agent CLI settings. "
455
+ "Served by the coderouter-plugin-agents adapter plugin — "
456
+ "`pip install coderouter-plugin-agents` and add 'agents' to "
457
+ "plugins.enabled."
458
+ ),
434
459
  )
435
460
 
436
461
  cost: CostConfig | None = Field(
@@ -1834,6 +1834,56 @@ async def _probe_cache(
1834
1834
  )
1835
1835
 
1836
1836
 
1837
+ # ---------------------------------------------------------------------------
1838
+ # Phase 2c migration guard (docs/designs/agent-cli-plugin-extraction.md §5.2,
1839
+ # §7 "2c" row): a config-level pre-check, not an HTTP probe. Core removed
1840
+ # its in-core agent_cli adapter in Phase 2c — kind="agent_cli" now resolves
1841
+ # ONLY via the coderouter-plugin-agents adapter plugin
1842
+ # (coderouter/adapters/registry.py's build_adapter). A provider that still
1843
+ # declares kind="agent_cli" without the plugin enabled will fail at engine
1844
+ # startup with a ValueError; surfacing it here lets `coderouter doctor`
1845
+ # catch it ahead of `coderouter serve`, with a copy-paste-able fix.
1846
+ # ---------------------------------------------------------------------------
1847
+
1848
+
1849
+ def _check_agent_cli_plugin_migration(
1850
+ config: CodeRouterConfig, provider: ProviderConfig
1851
+ ) -> ProbeResult | None:
1852
+ """Warn when ``provider`` needs the agent_cli plugin but it isn't enabled.
1853
+
1854
+ Returns ``None`` (no finding) when ``provider.kind`` isn't
1855
+ ``"agent_cli"``, or when ``"agents"`` is already listed in
1856
+ ``plugins.enabled`` — i.e. nothing actionable to report.
1857
+ """
1858
+ if provider.kind != "agent_cli":
1859
+ return None
1860
+ enabled = config.plugins.enabled if config.plugins is not None else []
1861
+ if "agents" in enabled:
1862
+ return None
1863
+ return ProbeResult(
1864
+ name="agent-cli-plugin-migration",
1865
+ verdict=ProbeVerdict.NEEDS_TUNING,
1866
+ detail=(
1867
+ f"provider {provider.name!r} declares kind='agent_cli', but the "
1868
+ "coderouter-plugin-agents adapter plugin is not enabled. As of "
1869
+ "v2.9.0 (Phase 2c), Core no longer ships an in-core agent_cli "
1870
+ "adapter — this provider cannot serve requests until the "
1871
+ "plugin is installed and listed in plugins.enabled."
1872
+ ),
1873
+ target_file="providers.yaml",
1874
+ suggested_patch=(
1875
+ "# install the plugin:\n"
1876
+ 'pip install "coderouter-plugin-agents @ '
1877
+ 'git+https://github.com/zephel01/coderouter-plugin-agents"\n'
1878
+ "\n"
1879
+ "# providers.yaml — enable it (merge into any existing list):\n"
1880
+ "plugins:\n"
1881
+ " enabled:\n"
1882
+ " - agents\n"
1883
+ ),
1884
+ )
1885
+
1886
+
1837
1887
  # ---------------------------------------------------------------------------
1838
1888
  # Orchestration
1839
1889
  # ---------------------------------------------------------------------------
@@ -1872,6 +1922,14 @@ async def check_model(
1872
1922
  resolved_caps=resolved,
1873
1923
  )
1874
1924
 
1925
+ migration = _check_agent_cli_plugin_migration(config, provider)
1926
+ if migration is not None:
1927
+ # Nothing to probe over HTTP — the provider has no adapter until
1928
+ # the plugin is enabled. Report the finding and stop here rather
1929
+ # than sending HTTP probes at a (kind-wise meaningless) base_url.
1930
+ report.results.append(migration)
1931
+ return report
1932
+
1875
1933
  auth_result = await _probe_auth_and_basic_chat(provider)
1876
1934
  report.results.append(auth_result)
1877
1935
 
@@ -4,6 +4,8 @@
4
4
 
5
5
  `kind: "agent_cli"` is an adapter that registers an external coding-agent CLI, such as the Claude Code CLI, as a single CodeRouter provider. It was newly added in v2.7.7 (Phase 1a: claude), v2.7.8 added grok (Phase 1d), v2.7.9 added codex (Phase 1b), and v2.7.10 added antigravity (Phase 1c). **Phase 1 (all four backends) is now complete.** See [`docs/designs/external-agents-adapter.md`](../designs/external-agents-adapter.md) for the full design.
6
6
 
7
+ > **Breaking change in v2.9.0 (agent_cli plugin extraction, Phase 2c)** — the in-core `agent_cli` adapter was removed in v2.9.0. Using `kind: "agent_cli"` now **requires** installing the external plugin **`coderouter-plugin-agents`** and adding `plugins.enabled: [agents]` to `providers.yaml`. Through v2.8.x there was a transition period (Phase 2b) where the in-core implementation still won; that grace period ended with v2.9.0. See the [Quickstart](#quickstart) below for the exact steps. Without the plugin, a `kind: agent_cli` provider now makes `coderouter serve` fail at startup with an error that includes a targeted migration hint; `coderouter doctor` also detects and warns about the same misconfiguration. The `agent_cli:` sub-config schema (`AgentCliConfig`) itself and existing provider entries are unchanged — nothing there needs editing.
8
+
7
9
  ---
8
10
 
9
11
  ## Overview
@@ -12,6 +14,7 @@ A coding-agent CLI is normally a stateful control loop that runs many turns auto
12
14
 
13
15
  - **Supported CLIs**: the `agent` field can declare `claude` / `codex` / `antigravity` / `grok`. `gemini` also remains in the schema's `Literal`, but it is always rejected (see below).
14
16
  - **Implementation status (as of v2.7.10)**: **Phase 1 is complete — `claude` (Claude Code CLI, Phase 1a), `codex` (OpenAI Codex CLI, Phase 1b), `antigravity` (Google Antigravity CLI, Phase 1c), and `grok` (Grok CLI, Phase 1d) are all implemented**. `gemini` fell out of scope because Google discontinued the Gemini CLI for individual accounts in June 2026; constructing the adapter with it always raises a dedicated migration error:
17
+ - **Prerequisite as of v2.9.0**: the adapter bodies for the four backends above moved to `coderouter-plugin-agents` in Phase 2b (v2.8.1), and the in-core copy was removed in Phase 2c (v2.9.0). As of v2.9.0, using `kind: agent_cli` therefore requires installing `coderouter-plugin-agents` and setting `plugins.enabled: [agents]`. The `agent_cli:` sub-config (`AgentCliConfig`), each CLI's argv/behavior, and how provider entries are written are all unchanged (see the per-CLI sections below).
15
18
 
16
19
  ```
17
20
  AdapterError: Google discontinued Gemini CLI for individual accounts (June 2026).
@@ -43,15 +46,36 @@ Google's stated successor is the **Antigravity CLI** (command name `agy`). It is
43
46
 
44
47
  ## Quickstart
45
48
 
46
- 1. **Install the Claude Code CLI** (verify with `claude --version`).
47
- 2. **Log in** — either run `claude` interactively and complete `/login`, or, on a headless machine, follow the [platform-specific authentication](#platform-specific-authentication) steps using `claude setup-token`.
48
- 3. **Start with the example config**:
49
+ 1. **Install `coderouter-plugin-agents` and enable it** (required as of v2.9.0 — skipping this makes `coderouter serve` fail at startup whenever a `kind: agent_cli` provider is present):
50
+
51
+ ```bash
52
+ # with uv
53
+ uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
54
+
55
+ # with pip
56
+ pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
57
+
58
+ # if CodeRouter itself is installed via uv tool install, the plugin must live in the same tool environment
59
+ uv tool install coderouter-cli \
60
+ --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
61
+ ```
62
+
63
+ Add `plugins.enabled: [agents]` to `providers.yaml` (a two-stage gate — installing the package alone does not activate it):
64
+
65
+ ```yaml
66
+ plugins:
67
+ enabled: [agents]
68
+ ```
69
+
70
+ 2. **Install the Claude Code CLI** (verify with `claude --version`).
71
+ 3. **Log in** — either run `claude` interactively and complete `/login`, or, on a headless machine, follow the [platform-specific authentication](#platform-specific-authentication) steps using `claude setup-token`.
72
+ 4. **Start with the example config** (`examples/providers-agent-cli.yaml` already has `plugins.enabled: [agents]` set):
49
73
 
50
74
  ```bash
51
75
  uv run coderouter serve --config examples/providers-agent-cli.yaml --port 8088
52
76
  ```
53
77
 
54
- 4. **Verify it works**:
78
+ 5. **Verify it works**:
55
79
 
56
80
  ```bash
57
81
  curl http://localhost:8088/v1/chat/completions \
@@ -109,6 +133,8 @@ Because the child process does not inherit the parent environment, exporting `AN
109
133
 
110
134
  ## Configuration reference
111
135
 
136
+ > The `agent_cli:` sub-config schema (`AgentCliConfig`) is unchanged in v2.9.0. The only change is "install `coderouter-plugin-agents` and add `plugins.enabled: [agents]` to `providers.yaml`" — existing provider entries need no edits (see [Quickstart](#quickstart)).
137
+
112
138
  All fields of the `agent_cli:` sub-config (`AgentCliConfig`) in `providers.yaml`. `extra: forbid` applies, so an unknown key fails immediately at config load.
113
139
 
114
140
  | Field | Type | Default | Description |
@@ -445,6 +471,8 @@ The grok CLI is early beta (v0.2.93 [stable] channel as of 2026-07-10). Its JSON
445
471
  | `agent: gemini` raises an `AdapterError` / you see `IneligibleTierError` | Google discontinued the Gemini CLI for individual accounts in June 2026 (field-verified: `IneligibleTierError: This client is no longer supported for Gemini Code Assist for individuals...`) | Switch to `agent: antigravity`. See the [antigravity (Google Antigravity CLI)](#antigravity-google-antigravity-cli) section for a working example |
446
472
  | `agy` hangs and never responds | Something is being piped into agy's stdin (e.g. `printf '...' \| agy -p "..."`) | Don't pipe stdin — write nothing and redirect from `</dev/null`. Calls made through CodeRouter already do this (the adapter closes stdin immediately) |
447
473
  | CLI fails to launch (`failed to launch ...`) | `command` (defaults to the same name as `agent`, except antigravity which defaults to `agy`) isn't on `PATH` | Confirm `claude --version` / `codex --version` / `agy --version` / `grok --version` works. You can also point `command` at a full path |
474
+ | `coderouter serve` fails at startup even though a `kind: agent_cli` provider is configured | v2.9.0 (Phase 2c) removed the in-core `agent_cli` adapter; `coderouter-plugin-agents` plus `plugins.enabled: [agents]` are now required | Run `uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"` (or the pip / `uv tool install coderouter-cli --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"` variant), then add `plugins.enabled: [agents]` to `providers.yaml`. The startup error message itself includes the same migration steps (install + `plugins.enabled`) |
475
+ | `coderouter doctor` reports an `agent_cli`-related config warning | A `kind: agent_cli` provider exists but `plugins.enabled` doesn't list `agents` (or the plugin isn't installed) | Same install command as above plus adding `plugins.enabled: [agents]`. `doctor`'s output also prints a fix snippet |
448
476
 
449
477
  ---
450
478
 
@@ -4,6 +4,8 @@
4
4
 
5
5
  `kind: "agent_cli"` は、Claude Code CLI のような外部コーディングエージェントを CodeRouter の 1 プロバイダとして登録するアダプタである。v2.7.7 で新規追加され(Phase 1a: claude)、v2.7.8 で grok が追加され(Phase 1d)、v2.7.9 で codex が追加され(Phase 1b)、v2.7.10 で antigravity が追加された(Phase 1c)。これにより **Phase 1(4バックエンド)は完了**した。詳細設計は [`docs/designs/external-agents-adapter.md`](../designs/external-agents-adapter.md) を参照。
6
6
 
7
+ > **重要: v2.9.0 で破壊的変更(agent_cli plugin 切り出し Phase 2c)** — in-core の `agent_cli` アダプタは v2.9.0 で削除された。`kind: "agent_cli"` を使うには外部プラグイン **`coderouter-plugin-agents`** のインストールと、`providers.yaml` への `plugins.enabled: [agents]` の指定が **必須**になった。v2.8.x までは in-core 実装が優先して動く猶予期間(Phase 2b)があったが、v2.9.0 でその猶予は終了している。手順は下記の[クイックスタート](#クイックスタート)を参照。プラグイン未導入のまま `kind: agent_cli` を書くと `coderouter serve` は起動時にエラーで停止し、移行手順を示すメッセージが表示される。`coderouter doctor` も同じ設定ミスを検出して警告する。`agent_cli:` サブ設定(`AgentCliConfig`)のスキーマ自体および各プロバイダのエントリは無変更であり、書き換える必要はない。
8
+
7
9
  ---
8
10
 
9
11
  ## 概要
@@ -12,6 +14,7 @@
12
14
 
13
15
  - **対象 CLI**: `agent` フィールドで `claude` / `codex` / `antigravity` / `grok` の4種を宣言できる。`gemini` もスキーマの `Literal` には残っているが、常に拒否される(下記参照)。
14
16
  - **実装状況(v2.7.10 時点)**: **Phase 1 が完了し、`claude`(Claude Code CLI・Phase 1a)・`codex`(OpenAI Codex CLI・Phase 1b)・`antigravity`(Google Antigravity CLI・Phase 1c)・`grok`(Grok CLI・Phase 1d)の4バックエンドすべてが実装済み**。`gemini` は Google が2026年6月に個人アカウント向け Gemini CLI の提供を終了したため実装対象から外れ、アダプタ構築時に必ず次のような専用メッセージ付きの AdapterError で拒否される:
17
+ - **v2.9.0 以降の前提条件**: 上記4バックエンドのアダプタ本体は Phase 2b(v2.8.1)で `coderouter-plugin-agents` へ移設され、Phase 2c(v2.9.0)で in-core コピーが削除された。したがって v2.9.0 以降、`kind: agent_cli` を使うには `coderouter-plugin-agents` のインストール + `plugins.enabled: [agents]` が必須である。`agent_cli:` サブ設定(`AgentCliConfig`)・各 CLI の argv/挙動・provider エントリの書き方はいずれも無変更(下記の各セクション参照)。
15
18
 
16
19
  ```
17
20
  AdapterError: Google discontinued Gemini CLI for individual accounts (June 2026).
@@ -43,15 +46,36 @@ Google が後継として案内しているのは **Antigravity CLI**(コマン
43
46
 
44
47
  ## クイックスタート
45
48
 
46
- 1. **Claude Code CLI をインストールする**(`claude --version` で確認できること)
47
- 2. **ログインを済ませる** — 対話起動して `claude` を実行し `/login` を通すか、ヘッドレス環境なら [プラットフォーム別の認証](#プラットフォーム別の認証) の手順で `claude setup-token` を使う。
48
- 3. **サンプル設定で起動する**:
49
+ 1. **`coderouter-plugin-agents` をインストールし、有効化する**(v2.9.0 以降必須。未実施だと `kind: agent_cli` の provider がある状態で `coderouter serve` が起動時エラーになる):
50
+
51
+ ```bash
52
+ # uv の場合
53
+ uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
54
+
55
+ # pip の場合
56
+ pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
57
+
58
+ # CodeRouter 本体を uv tool install で入れている場合は同じツール環境に同居させる
59
+ uv tool install coderouter-cli \
60
+ --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
61
+ ```
62
+
63
+ `providers.yaml` に `plugins.enabled: [agents]` を追記する(二段ゲート — インストールしただけでは有効にならない):
64
+
65
+ ```yaml
66
+ plugins:
67
+ enabled: [agents]
68
+ ```
69
+
70
+ 2. **Claude Code CLI をインストールする**(`claude --version` で確認できること)。
71
+ 3. **ログインを済ませる** — 対話起動して `claude` を実行し `/login` を通すか、ヘッドレス環境なら [プラットフォーム別の認証](#プラットフォーム別の認証) の手順で `claude setup-token` を使う。
72
+ 4. **サンプル設定で起動する**(`examples/providers-agent-cli.yaml` には既に `plugins.enabled: [agents]` が入っている):
49
73
 
50
74
  ```bash
51
75
  uv run coderouter serve --config examples/providers-agent-cli.yaml --port 8088
52
76
  ```
53
77
 
54
- 4. **動作確認**:
78
+ 5. **動作確認**:
55
79
 
56
80
  ```bash
57
81
  curl http://localhost:8088/v1/chat/completions \
@@ -109,6 +133,8 @@ Claude Code CLI は Keychain からトークンを解決する際に `USER` 環
109
133
 
110
134
  ## 設定リファレンス
111
135
 
136
+ > `agent_cli:` サブ設定(`AgentCliConfig`)のスキーマは v2.9.0 でも変更されていない。変更点は「`coderouter-plugin-agents` のインストール + `providers.yaml` への `plugins.enabled: [agents]` の追加」のみであり、既存の provider エントリ自体を書き換える必要はない([クイックスタート](#クイックスタート)参照)。
137
+
112
138
  `providers.yaml` の `agent_cli:` サブ設定(`AgentCliConfig`)の全フィールド。`extra: forbid` なので未知のキーは設定読み込み時に即座にエラーになる。
113
139
 
114
140
  | フィールド | 型 | 既定値 | 説明 |
@@ -445,6 +471,8 @@ grok CLI は early beta である(v0.2.93 [stable] チャネル、2026-07-10 時
445
471
  | `agent: gemini` を指定すると `AdapterError` になる/`IneligibleTierError` が出る | Google が2026年6月に個人アカウント向け Gemini CLI 提供を終了したため(実機で `IneligibleTierError: This client is no longer supported for Gemini Code Assist for individuals...` を確認) | `agent: antigravity` に切り替える。設定例は [antigravity(Google Antigravity CLI)](#antigravitygoogle-antigravity-cli) セクションを参照 |
446
472
  | `agy` が応答を返さずハングする | agy に stdin をパイプしている(例: `printf '...' \| agy -p "..."`) | stdin をパイプしない。何も書かず `</dev/null` にリダイレクトする。CodeRouter 経由の呼び出しではアダプタが既にこの対策(stdin 即クローズ)を取っている |
447
473
  | CLI 起動に失敗する(`failed to launch ...`) | `command`(既定は `agent` と同名。ただし antigravity のみ既定 `agy`)が `PATH` 上に無い | `claude --version` / `codex --version` / `agy --version` / `grok --version` が通ることを確認する。フルパスを `command` に指定してもよい |
474
+ | `kind: agent_cli` の provider があるのに `coderouter serve` が起動時にエラーで停止する | v2.9.0(Phase 2c)で in-core `agent_cli` アダプタが削除され、`coderouter-plugin-agents` の導入 + `plugins.enabled: [agents]` が必須になった | `uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"`(または pip、あるいは `uv tool install coderouter-cli --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"`)を実行し、`providers.yaml` に `plugins.enabled: [agents]` を追記する。起動時のエラーメッセージ自体にも同じ移行手順(インストール + `plugins.enabled`)が案内される |
475
+ | `coderouter doctor` が `agent_cli` 関連の設定警告を出す | `kind: agent_cli` の provider があるのに `plugins.enabled` に `agents` が含まれていない(または plugin 未インストール) | 上記と同じインストールコマンド + `plugins.enabled: [agents]` の追記で解消する。`doctor` の出力にも修正用の yaml スニペットが表示される |
448
476
 
449
477
  ---
450
478
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 対象バージョン: CodeRouter v2.8+ 系 / Phase 2(Adapter hook 配線 + 別リポ移設)
4
4
  > 関連: [`external-agents-adapter.md`](./external-agents-adapter.md) §9.3・§11.3〜§11.5、[`docs/inside/future.md`](../inside/future.md) §1.2・§2.5、[`plan.md`](../../plan.md)
5
- > ステータス: 設計中(レビュー前)
5
+ > ステータス: Phase 2a/2b/2c すべて実装済み(設計完了)
6
6
 
7
7
  本設計書は、現在 CodeRouter 本体に in-core 実装されている外部コーディングエージェント CLI アダプタ(`kind="agent_cli"`、`coderouter/adapters/agent_cli.py`、1168 行)を、別配布の plugin パッケージ `coderouter-plugin-agents` へ前方互換で切り出す方式を定義するものである。切り出しの前提として、現状デッドエンド(`name: str` のみ)である Adapter Protocol(`coderouter/plugins/base.py` L156-168)を engine に配線する設計を併せて確定する。CLI 固有仕様はすべて `external-agents-adapter.md` §11.3〜§11.5 の実 CLI 検証結果を、拡張点のコード上の根拠はすべて本体実装の該当行を典拠とする。
8
8
 
@@ -408,3 +408,7 @@ Literal による静的保証は不要と判断した。
408
408
  - [`docs/inside/future.md`](../inside/future.md) — §1.2 三層モデル・Core 5 deps 不変条件(L187-253)、§2.5 方向性(L368+)、タスク #15(L112)
409
409
  - [`plan.md`](../../plan.md) — Core 5 deps 方針 / プラグイン制による外部委譲(L689)
410
410
  - 実装典拠: `coderouter/plugins/base.py` L156-168 / `coderouter/plugins/loader.py` L44-134 / `coderouter/plugins/registry.py` L43-66 / `coderouter/adapters/registry.py` L11-23 / `coderouter/adapters/agent_cli.py` L204-1168 / `coderouter/adapters/base.py` L162-263 / `coderouter/config/schemas.py` L166-329・L342-505・L1477-1519・L1674-1684 / `coderouter/routing/fallback.py` L1100-1110・L1178-1220 / `tests/test_agent_cli.py`(91 件)
411
+
412
+ ### 9.1 完了記録(2026-07-11)
413
+
414
+ 本設計の Phase 2a・2b・2c はすべて 2026-07-11 に実装完了した(v2.8.0 = Phase 2a、v2.8.1 = Phase 2b、v2.9.0 = Phase 2c、`coderouter-plugin-agents` 0.1.0)。§5.1・§7 が想定していた「2b の in-core 猶予期間」は、owner 判断により意図的にスキップされ、2b→2c を同日中に連続実施する形になった(当初想定していたような複数リリースにまたがる猶予期間は設けられていない)。この短縮に対する緩和策は次の3点である: (1) plugin 未導入のまま `kind: agent_cli` を使うと `serve` 起動時に移行手順込みのエラーで即座に停止する(§3.3 のエラーメッセージを 2c でさらに具体化)、(2) `coderouter doctor` が同じ設定ミスを config-level warning として検出し修正スニペットを提示する、(3) v2.9.0 の CHANGELOG エントリで本変更を **BREAKING** として先頭に明記し、影響範囲・対処コマンド・不変点・上記2つの安全網を明示している。
@@ -31,7 +31,7 @@ Two distinct axes:
31
31
 
32
32
  ## 2. Measured data
33
33
 
34
- Measured with real production tokenizers (reproduce: `_OUTPUTS/CodeRouter-language-tax/measure/`).
34
+ Measured with real production tokenizers (reproduce: `_OUTPUTS/01-機能実装/language-tax/measure/`).
35
35
 
36
36
  ### Economic tax — same meaning, JA vs EN (avg of 5 translation pairs)
37
37
 
@@ -31,7 +31,7 @@ English version: [`language-tax.en.md`](./language-tax.en.md)
31
31
 
32
32
  ## 2. 実測データ
33
33
 
34
- 実在の本番トークナイザで計測した結果です(再現スクリプト: `_OUTPUTS/CodeRouter-language-tax/measure/`)。
34
+ 実在の本番トークナイザで計測した結果です(再現スクリプト: `_OUTPUTS/01-機能実装/language-tax/measure/`)。
35
35
 
36
36
  ### 経済的な税 — 同じ意味で JA vs EN(対訳5ペアの平均)
37
37
 
@@ -2,8 +2,14 @@
2
2
  # CodeRouter providers.yaml — 外部コーディングエージェント CLI (agent_cli)
3
3
  # 【カテゴリ】 kind="agent_cli" アダプタ / Phase 1 完了 — claude (1a)・codex (1b)・
4
4
  # antigravity (1c)・grok (1d) の4バックエンドすべて実装済み
5
+ # / agent_cli plugin 切り出し Phase 2c 完了(v2.9.0) —
6
+ # in-core アダプタは削除済み。kind: agent_cli を使うには
7
+ # coderouter-plugin-agents のインストール +
8
+ # plugins.enabled: [agents] が必須 (破壊的変更。下記
9
+ # plugins: ブロックと「使い方」節を参照)。
5
10
  #
6
- # 出典: docs/designs/external-agents-adapter.md
11
+ # 出典: docs/designs/external-agents-adapter.md,
12
+ # docs/designs/agent-cli-plugin-extraction.md
7
13
  # 目的: Claude Code CLI (`claude -p --output-format json`)、Codex CLI、
8
14
  # Antigravity CLI (`agy`)、Grok CLI を CodeRouter の1プロバイダとして
9
15
  # 登録し、他のオーケストレータ (別の Claude Code / Cursor 等) から
@@ -34,14 +40,24 @@
34
40
  # (既定 true のため上書き必須)。
35
41
  #
36
42
  # 使い方:
37
- # 1. claude CLI がインストール済み・`claude` が PATH 上にあること
43
+ # 1. coderouter-plugin-agents をインストールする (v2.9.0 以降必須。
44
+ # 未実施だと下記 provider 群がある状態で `coderouter serve` が
45
+ # 起動時エラーで止まる):
46
+ # uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
47
+ # # または pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
48
+ # # uv tool install 構成の場合は同じツール環境に同居させる:
49
+ # # uv tool install coderouter-cli \
50
+ # # --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
51
+ # このファイルには下記に `plugins: enabled: [agents]` を既に
52
+ # 含めてある (二段ゲート — インストールしただけでは有効にならない)。
53
+ # 2. claude CLI がインストール済み・`claude` が PATH 上にあること
38
54
  # (`claude --version` で確認)。
39
- # 2. サブスクリプション認証を済ませておく (`claude` を対話起動して
55
+ # 3. サブスクリプション認証を済ませておく (`claude` を対話起動して
40
56
  # ログイン、または `claude setup-token` で1年トークンを発行し
41
57
  # CLAUDE_CODE_OAUTH_TOKEN として環境変数に設定)。
42
- # 3. cp examples/providers-agent-cli.yaml ~/.coderouter/providers.yaml
43
- # 4. coderouter serve --port 8088
44
- # 5. 動作確認:
58
+ # 4. cp examples/providers-agent-cli.yaml ~/.coderouter/providers.yaml
59
+ # 5. coderouter serve --port 8088
60
+ # 6. 動作確認:
45
61
  # curl http://localhost:8088/v1/chat/completions \
46
62
  # -H 'Content-Type: application/json' \
47
63
  # -H 'X-CodeRouter-Profile: claude-agent' \
@@ -72,6 +88,19 @@
72
88
 
73
89
  default_profile: claude-agent
74
90
 
91
+ # v2.9.0 以降必須: kind: agent_cli の provider を使うには
92
+ # coderouter-plugin-agents をインストールした上で、ここに "agents" を
93
+ # 列挙して有効化する必要がある (二段ゲート)。インストールコマンド:
94
+ # uv pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
95
+ # # または: pip install "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
96
+ # # uv tool install 構成なら:
97
+ # # uv tool install coderouter-cli \
98
+ # # --with "coderouter-plugin-agents @ git+https://github.com/zephel01/coderouter-plugin-agents"
99
+ # 未インストール/未列挙のままだと coderouter serve は起動時エラーで
100
+ # 停止する (docs/backends/external-agents.md のトラブルシューティング参照)。
101
+ plugins:
102
+ enabled: [agents]
103
+
75
104
  providers:
76
105
  # ---- Claude Code CLI (Phase 1a・実装済み) ----
77
106
  - name: agent-claude
@@ -11,7 +11,7 @@
11
11
  # in plan.md §11.B; once granted, this name will become an alias and
12
12
  # `coderouter` will become the canonical distribution name.
13
13
  name = "coderouter-cli"
14
- version = "2.8.0"
14
+ version = "2.9.0"
15
15
  description = "Local-first, free-first, fallback-built-in LLM router. Claude Code / OpenAI compatible."
16
16
  readme = "README.md"
17
17
  requires-python = ">=3.12"