agentrules 4.2.0__tar.gz → 4.3.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 (235) hide show
  1. {agentrules-4.2.0/src/agentrules.egg-info → agentrules-4.3.0}/PKG-INFO +28 -9
  2. {agentrules-4.2.0 → agentrules-4.3.0}/README.md +24 -5
  3. {agentrules-4.2.0 → agentrules-4.3.0}/pyproject.toml +4 -4
  4. agentrules-4.3.0/src/agentrules/cli/services/claude_code_runtime.py +126 -0
  5. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/claude_code.py +8 -5
  6. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/models/__init__.py +7 -4
  7. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/agents.py +589 -49
  8. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/architect.py +82 -45
  9. agentrules-4.3.0/src/agentrules/core/agents/anthropic/capabilities.py +309 -0
  10. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/client.py +11 -3
  11. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/request_builder.py +54 -36
  12. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/response_parser.py +42 -0
  13. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/base.py +3 -1
  14. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/claude_code/request_builder.py +53 -52
  15. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/claude_code/response_parser.py +5 -0
  16. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/architect.py +12 -0
  17. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/model_selection.py +9 -1
  18. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/models.py +15 -9
  19. agentrules-4.3.0/src/agentrules/core/agents/codex/reasoning.py +49 -0
  20. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/request_builder.py +11 -1
  21. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/architect.py +24 -10
  22. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/config.py +31 -0
  23. agentrules-4.3.0/src/agentrules/core/agents/deepseek/request_builder.py +108 -0
  24. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/tooling.py +3 -2
  25. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/factory/factory.py +4 -1
  26. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/capabilities.py +82 -3
  27. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/config.py +1 -0
  28. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/request_builder.py +16 -3
  29. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/architect.py +2 -2
  30. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/config.py +44 -9
  31. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/request_builder.py +36 -13
  32. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/manager.py +17 -1
  33. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/model_presets.py +118 -34
  34. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/claude_code.py +184 -14
  35. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/types/__init__.py +16 -0
  36. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/types/models.py +220 -13
  37. {agentrules-4.2.0 → agentrules-4.3.0/src/agentrules.egg-info}/PKG-INFO +28 -9
  38. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules.egg-info/SOURCES.txt +1 -0
  39. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules.egg-info/requires.txt +3 -3
  40. {agentrules-4.2.0 → agentrules-4.3.0}/tests/test_openai_responses.py +14 -0
  41. agentrules-4.2.0/src/agentrules/cli/services/claude_code_runtime.py +0 -89
  42. agentrules-4.2.0/src/agentrules/core/agents/anthropic/capabilities.py +0 -158
  43. agentrules-4.2.0/src/agentrules/core/agents/deepseek/request_builder.py +0 -73
  44. {agentrules-4.2.0 → agentrules-4.3.0}/LICENSE +0 -0
  45. {agentrules-4.2.0 → agentrules-4.3.0}/setup.cfg +0 -0
  46. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/__init__.py +0 -0
  47. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/__main__.py +0 -0
  48. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/__init__.py +0 -0
  49. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/app.py +0 -0
  50. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/bootstrap.py +0 -0
  51. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/__init__.py +0 -0
  52. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/analyze.py +0 -0
  53. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/configure.py +0 -0
  54. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/execplan.py +0 -0
  55. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/execplan_registry.py +0 -0
  56. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/keys.py +0 -0
  57. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/scaffold.py +0 -0
  58. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/snapshot.py +0 -0
  59. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/commands/tree.py +0 -0
  60. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/context.py +0 -0
  61. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/services/__init__.py +0 -0
  62. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/services/codex_runtime.py +0 -0
  63. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/services/configuration.py +0 -0
  64. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/services/output_validation.py +0 -0
  65. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/services/pipeline_runner.py +0 -0
  66. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/services/tree_preview.py +0 -0
  67. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/__init__.py +0 -0
  68. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/analysis_view.py +0 -0
  69. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/event_sink.py +0 -0
  70. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/main_menu.py +0 -0
  71. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/__init__.py +0 -0
  72. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/codex.py +0 -0
  73. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/exclusions/__init__.py +0 -0
  74. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/exclusions/editor.py +0 -0
  75. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/exclusions/preview.py +0 -0
  76. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/exclusions/summary.py +0 -0
  77. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/logging.py +0 -0
  78. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/menu.py +0 -0
  79. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/models/researcher.py +0 -0
  80. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/models/utils.py +0 -0
  81. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/outputs.py +0 -0
  82. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/settings/providers.py +0 -0
  83. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/cli/ui/styles.py +0 -0
  84. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/__init__.py +0 -0
  85. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/exclusions.py +0 -0
  86. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/__init__.py +0 -0
  87. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/final_analysis_prompt.py +0 -0
  88. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/phase_1_prompts.py +0 -0
  89. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/phase_2_prompts.py +0 -0
  90. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/phase_3_prompts.py +0 -0
  91. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/phase_4_prompts.py +0 -0
  92. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/prompts/phase_5_prompts.py +0 -0
  93. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/config/tools.py +0 -0
  94. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/__init__.py +0 -0
  95. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agent_tools/tool_manager.py +0 -0
  96. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agent_tools/web_search/__init__.py +0 -0
  97. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agent_tools/web_search/tavily.py +0 -0
  98. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/__init__.py +0 -0
  99. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/__init__.py +0 -0
  100. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/prompting.py +0 -0
  101. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/anthropic/tooling.py +0 -0
  102. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/claude_code/__init__.py +0 -0
  103. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/claude_code/architect.py +0 -0
  104. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/claude_code/client.py +0 -0
  105. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/claude_code/errors.py +0 -0
  106. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/__init__.py +0 -0
  107. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/client.py +0 -0
  108. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/errors.py +0 -0
  109. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/process.py +0 -0
  110. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/protocol.py +0 -0
  111. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/codex/response_parser.py +0 -0
  112. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/__init__.py +0 -0
  113. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/client.py +0 -0
  114. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/compat.py +0 -0
  115. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/prompting.py +0 -0
  116. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/deepseek/response_parser.py +0 -0
  117. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/factory/__init__.py +0 -0
  118. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/__init__.py +0 -0
  119. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/architect.py +0 -0
  120. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/client.py +0 -0
  121. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/errors.py +0 -0
  122. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/legacy.py +0 -0
  123. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/prompting.py +0 -0
  124. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/response_parser.py +0 -0
  125. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/gemini/tooling.py +0 -0
  126. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/__init__.py +0 -0
  127. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/architect.py +0 -0
  128. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/client.py +0 -0
  129. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/compat.py +0 -0
  130. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/openai/response_parser.py +0 -0
  131. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/__init__.py +0 -0
  132. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/client.py +0 -0
  133. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/prompting.py +0 -0
  134. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/response_parser.py +0 -0
  135. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/agents/xai/tooling.py +0 -0
  136. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/__init__.py +0 -0
  137. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/events.py +0 -0
  138. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/final_analysis.py +0 -0
  139. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/phase_1.py +0 -0
  140. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/phase_2.py +0 -0
  141. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/phase_3.py +0 -0
  142. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/phase_4.py +0 -0
  143. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/analysis/phase_5.py +0 -0
  144. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/__init__.py +0 -0
  145. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/constants.py +0 -0
  146. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/environment.py +0 -0
  147. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/models.py +0 -0
  148. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/repository.py +0 -0
  149. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/serde.py +0 -0
  150. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/__init__.py +0 -0
  151. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/codex.py +0 -0
  152. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/exclusions.py +0 -0
  153. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/features.py +0 -0
  154. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/logging.py +0 -0
  155. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/outputs.py +0 -0
  156. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/phase_models.py +0 -0
  157. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/services/providers.py +0 -0
  158. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/configuration/utils.py +0 -0
  159. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/__init__.py +0 -0
  160. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/creator.py +0 -0
  161. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/identity.py +0 -0
  162. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/locks.py +0 -0
  163. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/milestones.py +0 -0
  164. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/paths.py +0 -0
  165. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/registry.py +0 -0
  166. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/templates/EXECPLAN_TEMPLATE.md +0 -0
  167. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/execplan/templates/MILESTONE_FILE_TEMPLATE.md +0 -0
  168. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/logging/__init__.py +0 -0
  169. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/logging/config.py +0 -0
  170. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/__init__.py +0 -0
  171. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/config.py +0 -0
  172. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/factory.py +0 -0
  173. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/orchestrator.py +0 -0
  174. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/output.py +0 -0
  175. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/project_profile.py +0 -0
  176. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/pipeline/snapshot.py +0 -0
  177. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/streaming/__init__.py +0 -0
  178. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/streaming/types.py +0 -0
  179. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/types/agent_config.py +0 -0
  180. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/types/tool_config.py +0 -0
  181. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/async_stream.py +0 -0
  182. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/constants.py +0 -0
  183. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/__init__.py +0 -0
  184. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/constants.py +0 -0
  185. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/discovery.py +0 -0
  186. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/metadata.py +0 -0
  187. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/models.py +0 -0
  188. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/__init__.py +0 -0
  189. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/clojure.py +0 -0
  190. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/dart.py +0 -0
  191. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/dotnet.py +0 -0
  192. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/elixir.py +0 -0
  193. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/generic.py +0 -0
  194. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/go.py +0 -0
  195. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/helpers.py +0 -0
  196. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/java.py +0 -0
  197. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/javascript.py +0 -0
  198. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/php.py +0 -0
  199. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/python.py +0 -0
  200. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/ruby.py +0 -0
  201. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/swift.py +0 -0
  202. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/parsers/toml_based.py +0 -0
  203. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/registry.py +0 -0
  204. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/dependency_scanner/scan.py +0 -0
  205. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/agent_scaffold.py +0 -0
  206. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/atomic_write.py +0 -0
  207. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/cursorignore.py +0 -0
  208. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/phases_output.py +0 -0
  209. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/snapshot_artifact.py +0 -0
  210. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/snapshot_policy.py +0 -0
  211. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/templates/MILESTONE_TEMPLATE.md +0 -0
  212. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_creation/templates/PLANS.md +0 -0
  213. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_system/__init__.py +0 -0
  214. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_system/file_retriever.py +0 -0
  215. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_system/gitignore.py +0 -0
  216. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/file_system/tree_generator.py +0 -0
  217. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/formatters/__init__.py +0 -0
  218. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/formatters/clean_agentrules.py +0 -0
  219. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/model_config_helper.py +0 -0
  220. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/offline.py +0 -0
  221. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/parsers/__init__.py +0 -0
  222. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/parsers/agent_parser.py +0 -0
  223. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/provider_capabilities.py +0 -0
  224. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/provider_utils.py +0 -0
  225. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/release_metadata.py +0 -0
  226. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/structured_outputs.py +0 -0
  227. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/system_prompt.py +0 -0
  228. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/token_estimator.py +0 -0
  229. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules/core/utils/token_packer.py +0 -0
  230. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules.egg-info/dependency_links.txt +0 -0
  231. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules.egg-info/entry_points.txt +0 -0
  232. {agentrules-4.2.0 → agentrules-4.3.0}/src/agentrules.egg-info/top_level.txt +0 -0
  233. {agentrules-4.2.0 → agentrules-4.3.0}/tests/test_cli_services.py +0 -0
  234. {agentrules-4.2.0 → agentrules-4.3.0}/tests/test_env.py +0 -0
  235. {agentrules-4.2.0 → agentrules-4.3.0}/tests/test_smoke_discovery.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentrules
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: AGENTS.md/CLAUDE.md generator and ExecPlan harness for coding agents
5
5
  Author: trevor-nichols
6
6
  License-Expression: MIT
@@ -14,8 +14,8 @@ Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: anthropic>=0.78.0
16
16
  Requires-Dist: rich
17
- Requires-Dist: openai
18
- Requires-Dist: google-genai>=1.51.0
17
+ Requires-Dist: openai>=2.45.0
18
+ Requires-Dist: google-genai>=1.56.0
19
19
  Requires-Dist: protobuf>=4.25
20
20
  Requires-Dist: python-dotenv
21
21
  Requires-Dist: tavily-python>=0.7.14
@@ -27,7 +27,7 @@ Requires-Dist: PyYAML>=6.0
27
27
  Requires-Dist: tomli; python_version < "3.11"
28
28
  Requires-Dist: tomli-w
29
29
  Requires-Dist: tiktoken>=0.7.0
30
- Requires-Dist: claude-agent-sdk>=0.2.88
30
+ Requires-Dist: claude-agent-sdk>=0.2.119
31
31
  Provides-Extra: dev
32
32
  Requires-Dist: pytest; extra == "dev"
33
33
  Requires-Dist: pytest-asyncio; extra == "dev"
@@ -341,10 +341,25 @@ Choose any available preset per phase through the CLI (`agentrules configure --m
341
341
 
342
342
  > **Preset tip:** Preset keys are compatibility IDs, not release markers. Static presets live in `config/agents.py`, while Codex runtime selections in the settings UI are discovered from the live app-server catalog.
343
343
 
344
+ ### Current model lifecycle
345
+
346
+ | Provider | Current or recommended selection | Compatibility and fallback |
347
+ | --- | --- | --- |
348
+ | OpenAI | GPT-5.6 Sol (the default), with Terra and Luna tiers | GPT-5.5 remains selectable as the immediate direct-API fallback. |
349
+ | DeepSeek | V4 Flash or V4 Pro | Saved `deepseek-chat` and `deepseek-reasoner` keys redirect to matching V4 Flash modes; do not restore the retired aliases after July 24, 2026. |
350
+ | Anthropic | Claude Sonnet 5 or Fable 5; generic Opus keys use Opus 4.8 | Opus 4.8 is the conservative fallback. Fable 5 requires the provider's 30-day retention policy. |
351
+ | xAI | Grok 4.5; pinned Grok 4.20 reasoning and non-reasoning variants are available | Grok 4.3 remains selectable. The 4.20 Multi-Agent model is intentionally excluded because this adapter uses Chat Completions. |
352
+ | Google | Gemini 3.5 Flash | Gemini 2.5 remains selectable until October 16, 2026; retired preview keys redirect to active 3.1 endpoints. |
353
+ | Codex | Runtime default or a model/effort discovered from app-server | Availability follows the installed runtime and account. AgentRules does not maintain a static Codex GPT-5.6 list. |
354
+ | Claude Code | Runtime default/moving aliases or a supported pinned Claude model | Moving choices follow runtime/account policy; pinned Claude 5 choices are guarded by the exact resolved runtime version. |
355
+
356
+ See [`docs/provider-model-lifecycle.md`](docs/provider-model-lifecycle.md) for reasoning contracts, retirements, data-retention caveats, safe live-smoke commands, and rollback choices.
357
+
344
358
  ## 🧠 Reasoning & Advanced Configuration
345
359
 
346
- - **Reasoning modes:** Anthropic presets use fixed-budget or adaptive thinking depending on the Claude family, Gemini presets use provider-native thinking controls, OpenAI presets map to reasoning effort or temperature based on model family, and DeepSeek/xAI presets keep their provider-native reasoning behavior (`src/agentrules/core/types/models.py`).
360
+ - **Reasoning modes:** Anthropic presets use fixed-budget or adaptive thinking depending on the Claude family, Gemini presets use provider-native thinking controls, OpenAI presets map to reasoning effort or temperature based on model family, DeepSeek V4 presets explicitly select thinking/non-thinking plus high/max effort, and xAI presets keep their model-specific reasoning behavior (`src/agentrules/core/types/models.py`). Saved `deepseek-chat` and `deepseek-reasoner` preset keys are redirected to equivalent V4 Flash modes before those aliases retire on July 24, 2026.
347
361
  - **Runtime modes:** Codex presets route phases through `codex app-server`, with runtime-discovered model/effort variants available from the live model catalog. Claude Code presets route phases through the Claude Agent SDK while preserving Claude Code's runtime behavior.
362
+ - **Provider lifecycle:** [`docs/provider-model-lifecycle.md`](docs/provider-model-lifecycle.md) records model-specific retirement, thinking, refusal, and data-retention constraints that require operator attention.
348
363
  - **Agent planning:** Phase 2 generates agent manifests that Phase 3 converts into live architects; when parsing fails the fallback extractor and default agents keep the pipeline running (`core/analysis/phase_2.py`, `core/analysis/phase_3.py`).
349
364
  - **Provider-specific tools:** `create_researcher_config` enables Tavily-backed tool use for whichever preset you promote to the Researcher role, and the CLI’s Researcher row simply flips that on/off (`core/types/models.py`, `config/tools.py`).
350
365
  - **Prompt customization:** Fine-tune behaviour by editing the phase prompts under `src/agentrules/config/prompts/`—heavy modifications should stay aligned with the YAML/XML formats expected by the parser utilities.
@@ -388,6 +403,7 @@ Toggle outputs with `agentrules configure --outputs` or via the config TOML.
388
403
  - Deterministic smoke runs (CI/local without API calls): `agentrules analyze --offline tests/tests_input`
389
404
  - Full suite: `pytest`
390
405
  - Releases are Release Please-driven: merges to `main` update/open a release PR, and merging that PR creates the `vX.Y.Z` tag + GitHub release automatically.
406
+ - Release Please PRs regenerate and commit `uv.lock` automatically; pull requests that change project or lock metadata must pass `uv lock --check`.
391
407
  - GitHub Actions publishes package artifacts with Trusted Publishing (OIDC) via `.github/workflows/publish-pypi.yml` (no long-lived PyPI API token).
392
408
  - Run a safe preflight publish first from Actions with `workflow_dispatch` and `repository = testpypi`; publish to production PyPI on release-tag push or manual `repository = pypi`.
393
409
  - Keep docs and presets in sync when adding providers (`config/agents.py`, `config/tools.py`, `core/agents/*`).
@@ -395,11 +411,14 @@ Toggle outputs with `agentrules configure --outputs` or via the config TOML.
395
411
  ### Release Process (PyPI)
396
412
 
397
413
  1. Merge feature PRs into `main` using Conventional Commit-style titles/messages (for example `feat: ...`, `fix: ...`).
414
+ For an intentional one-release version override, include a `Release-As: X.Y.Z` footer in a commit merged to `main`; do not manually edit `pyproject.toml` or `.release-please-manifest.json`.
398
415
  2. `.github/workflows/release-please.yml` updates or opens a release PR with the version bump and changelog.
399
- 3. (Optional, recommended) run `.github/workflows/publish-pypi.yml` manually with `repository = testpypi` from the release PR head commit.
400
- 4. Merge the release PR. Release Please creates/pushes the matching `vX.Y.Z` tag and publishes a GitHub release.
401
- 5. The tag push triggers `.github/workflows/publish-pypi.yml` to publish to production PyPI.
402
- 6. One-time setup for new projects:
416
+ 3. The release workflow regenerates `uv.lock` on the release PR branch and commits it when project metadata changed.
417
+ 4. Confirm the release PR passes the `Verify pyproject and uv.lock agree` check.
418
+ 5. (Optional, recommended) run `.github/workflows/publish-pypi.yml` manually with `repository = testpypi` from the release PR head commit.
419
+ 6. Merge the release PR. Release Please creates/pushes the matching `vX.Y.Z` tag and publishes a GitHub release.
420
+ 7. The tag push triggers `.github/workflows/publish-pypi.yml` to publish to production PyPI.
421
+ 8. One-time setup for new projects:
403
422
  - Configure a repo secret `RELEASE_PLEASE_TOKEN` (PAT or GitHub App token) with permission to create/update PRs, tags, and releases. This ensures tag pushes from Release Please trigger downstream workflows.
404
423
  - Configure Trusted Publishers on TestPyPI and PyPI for repository `trevor-nichols/agentrules-architect`, workflow `.github/workflows/publish-pypi.yml`, and environments `testpypi`/`pypi`.
405
424
 
@@ -302,10 +302,25 @@ Choose any available preset per phase through the CLI (`agentrules configure --m
302
302
 
303
303
  > **Preset tip:** Preset keys are compatibility IDs, not release markers. Static presets live in `config/agents.py`, while Codex runtime selections in the settings UI are discovered from the live app-server catalog.
304
304
 
305
+ ### Current model lifecycle
306
+
307
+ | Provider | Current or recommended selection | Compatibility and fallback |
308
+ | --- | --- | --- |
309
+ | OpenAI | GPT-5.6 Sol (the default), with Terra and Luna tiers | GPT-5.5 remains selectable as the immediate direct-API fallback. |
310
+ | DeepSeek | V4 Flash or V4 Pro | Saved `deepseek-chat` and `deepseek-reasoner` keys redirect to matching V4 Flash modes; do not restore the retired aliases after July 24, 2026. |
311
+ | Anthropic | Claude Sonnet 5 or Fable 5; generic Opus keys use Opus 4.8 | Opus 4.8 is the conservative fallback. Fable 5 requires the provider's 30-day retention policy. |
312
+ | xAI | Grok 4.5; pinned Grok 4.20 reasoning and non-reasoning variants are available | Grok 4.3 remains selectable. The 4.20 Multi-Agent model is intentionally excluded because this adapter uses Chat Completions. |
313
+ | Google | Gemini 3.5 Flash | Gemini 2.5 remains selectable until October 16, 2026; retired preview keys redirect to active 3.1 endpoints. |
314
+ | Codex | Runtime default or a model/effort discovered from app-server | Availability follows the installed runtime and account. AgentRules does not maintain a static Codex GPT-5.6 list. |
315
+ | Claude Code | Runtime default/moving aliases or a supported pinned Claude model | Moving choices follow runtime/account policy; pinned Claude 5 choices are guarded by the exact resolved runtime version. |
316
+
317
+ See [`docs/provider-model-lifecycle.md`](docs/provider-model-lifecycle.md) for reasoning contracts, retirements, data-retention caveats, safe live-smoke commands, and rollback choices.
318
+
305
319
  ## 🧠 Reasoning & Advanced Configuration
306
320
 
307
- - **Reasoning modes:** Anthropic presets use fixed-budget or adaptive thinking depending on the Claude family, Gemini presets use provider-native thinking controls, OpenAI presets map to reasoning effort or temperature based on model family, and DeepSeek/xAI presets keep their provider-native reasoning behavior (`src/agentrules/core/types/models.py`).
321
+ - **Reasoning modes:** Anthropic presets use fixed-budget or adaptive thinking depending on the Claude family, Gemini presets use provider-native thinking controls, OpenAI presets map to reasoning effort or temperature based on model family, DeepSeek V4 presets explicitly select thinking/non-thinking plus high/max effort, and xAI presets keep their model-specific reasoning behavior (`src/agentrules/core/types/models.py`). Saved `deepseek-chat` and `deepseek-reasoner` preset keys are redirected to equivalent V4 Flash modes before those aliases retire on July 24, 2026.
308
322
  - **Runtime modes:** Codex presets route phases through `codex app-server`, with runtime-discovered model/effort variants available from the live model catalog. Claude Code presets route phases through the Claude Agent SDK while preserving Claude Code's runtime behavior.
323
+ - **Provider lifecycle:** [`docs/provider-model-lifecycle.md`](docs/provider-model-lifecycle.md) records model-specific retirement, thinking, refusal, and data-retention constraints that require operator attention.
309
324
  - **Agent planning:** Phase 2 generates agent manifests that Phase 3 converts into live architects; when parsing fails the fallback extractor and default agents keep the pipeline running (`core/analysis/phase_2.py`, `core/analysis/phase_3.py`).
310
325
  - **Provider-specific tools:** `create_researcher_config` enables Tavily-backed tool use for whichever preset you promote to the Researcher role, and the CLI’s Researcher row simply flips that on/off (`core/types/models.py`, `config/tools.py`).
311
326
  - **Prompt customization:** Fine-tune behaviour by editing the phase prompts under `src/agentrules/config/prompts/`—heavy modifications should stay aligned with the YAML/XML formats expected by the parser utilities.
@@ -349,6 +364,7 @@ Toggle outputs with `agentrules configure --outputs` or via the config TOML.
349
364
  - Deterministic smoke runs (CI/local without API calls): `agentrules analyze --offline tests/tests_input`
350
365
  - Full suite: `pytest`
351
366
  - Releases are Release Please-driven: merges to `main` update/open a release PR, and merging that PR creates the `vX.Y.Z` tag + GitHub release automatically.
367
+ - Release Please PRs regenerate and commit `uv.lock` automatically; pull requests that change project or lock metadata must pass `uv lock --check`.
352
368
  - GitHub Actions publishes package artifacts with Trusted Publishing (OIDC) via `.github/workflows/publish-pypi.yml` (no long-lived PyPI API token).
353
369
  - Run a safe preflight publish first from Actions with `workflow_dispatch` and `repository = testpypi`; publish to production PyPI on release-tag push or manual `repository = pypi`.
354
370
  - Keep docs and presets in sync when adding providers (`config/agents.py`, `config/tools.py`, `core/agents/*`).
@@ -356,11 +372,14 @@ Toggle outputs with `agentrules configure --outputs` or via the config TOML.
356
372
  ### Release Process (PyPI)
357
373
 
358
374
  1. Merge feature PRs into `main` using Conventional Commit-style titles/messages (for example `feat: ...`, `fix: ...`).
375
+ For an intentional one-release version override, include a `Release-As: X.Y.Z` footer in a commit merged to `main`; do not manually edit `pyproject.toml` or `.release-please-manifest.json`.
359
376
  2. `.github/workflows/release-please.yml` updates or opens a release PR with the version bump and changelog.
360
- 3. (Optional, recommended) run `.github/workflows/publish-pypi.yml` manually with `repository = testpypi` from the release PR head commit.
361
- 4. Merge the release PR. Release Please creates/pushes the matching `vX.Y.Z` tag and publishes a GitHub release.
362
- 5. The tag push triggers `.github/workflows/publish-pypi.yml` to publish to production PyPI.
363
- 6. One-time setup for new projects:
377
+ 3. The release workflow regenerates `uv.lock` on the release PR branch and commits it when project metadata changed.
378
+ 4. Confirm the release PR passes the `Verify pyproject and uv.lock agree` check.
379
+ 5. (Optional, recommended) run `.github/workflows/publish-pypi.yml` manually with `repository = testpypi` from the release PR head commit.
380
+ 6. Merge the release PR. Release Please creates/pushes the matching `vX.Y.Z` tag and publishes a GitHub release.
381
+ 7. The tag push triggers `.github/workflows/publish-pypi.yml` to publish to production PyPI.
382
+ 8. One-time setup for new projects:
364
383
  - Configure a repo secret `RELEASE_PLEASE_TOKEN` (PAT or GitHub App token) with permission to create/update PRs, tags, and releases. This ensures tag pushes from Release Please trigger downstream workflows.
365
384
  - Configure Trusted Publishers on TestPyPI and PyPI for repository `trevor-nichols/agentrules-architect`, workflow `.github/workflows/publish-pypi.yml`, and environments `testpypi`/`pypi`.
366
385
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentrules"
7
- version = "4.2.0"
7
+ version = "4.3.0"
8
8
  description = "AGENTS.md/CLAUDE.md generator and ExecPlan harness for coding agents"
9
9
  readme = "README.md"
10
10
  authors = [{name = "trevor-nichols"}]
@@ -20,8 +20,8 @@ classifiers = [
20
20
  dependencies = [
21
21
  "anthropic>=0.78.0",
22
22
  "rich",
23
- "openai",
24
- "google-genai>=1.51.0",
23
+ "openai>=2.45.0",
24
+ "google-genai>=1.56.0",
25
25
  "protobuf>=4.25",
26
26
  "python-dotenv",
27
27
  "tavily-python>=0.7.14",
@@ -33,7 +33,7 @@ dependencies = [
33
33
  "tomli; python_version < '3.11'",
34
34
  "tomli-w",
35
35
  "tiktoken>=0.7.0",
36
- "claude-agent-sdk>=0.2.88",
36
+ "claude-agent-sdk>=0.2.119",
37
37
  ]
38
38
 
39
39
  [project.optional-dependencies]
@@ -0,0 +1,126 @@
1
+ """Synchronous helpers for inspecting the local Claude Code runtime."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+
7
+ from agentrules.core.configuration import (
8
+ CLAUDE_CODE_API_KEY_ENV_VARS,
9
+ CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR,
10
+ ConfigManager,
11
+ get_config_manager,
12
+ )
13
+ from agentrules.core.configuration.services import claude_code as claude_code_service
14
+
15
+ _DIAGNOSTIC_GATED_MODELS = ("claude-fable-5", "claude-sonnet-5", "claude-opus-5")
16
+
17
+
18
+ @dataclass(frozen=True)
19
+ class ClaudeCodeRuntimeDiagnostics:
20
+ cli_path: str | None
21
+ executable_path: str | None
22
+ sdk_available: bool
23
+ auth_strategy: str
24
+ sanitize_api_key_env: bool
25
+ oauth_token_present: bool
26
+ api_key_env_present_after_sanitization: bool
27
+ executable_source: str | None = None
28
+ version: str | None = None
29
+ runtime_error: str | None = None
30
+ version_error_code: str | None = None
31
+ version_error: str | None = None
32
+ unavailable_model_reasons: tuple[str, ...] = ()
33
+
34
+ @property
35
+ def is_available(self) -> bool:
36
+ return self.sdk_available and self.runtime_error is None
37
+
38
+
39
+ def get_claude_code_runtime_diagnostics(
40
+ *,
41
+ config_manager: ConfigManager | None = None,
42
+ timeout_seconds: float = claude_code_service.CLAUDE_CODE_VERSION_PROBE_TIMEOUT_SECONDS,
43
+ ) -> ClaudeCodeRuntimeDiagnostics:
44
+ manager = config_manager or get_config_manager()
45
+ runtime_config = manager.get_claude_code_config()
46
+ executable_path = manager.resolve_claude_code_executable()
47
+ executable_info = manager.resolve_claude_code_executable_info()
48
+ executable_source = (
49
+ executable_info.source
50
+ if executable_info is not None and executable_info.path == executable_path
51
+ else "configured"
52
+ if runtime_config.cli_path is not None and executable_path is not None
53
+ else "path"
54
+ if executable_path is not None
55
+ else None
56
+ )
57
+ sdk_available = manager.is_claude_agent_sdk_available()
58
+ child_env = manager.build_claude_code_environment()
59
+
60
+ version: str | None = None
61
+ version_error_code: str | None = None
62
+ version_error: str | None = None
63
+ runtime_error: str | None = None
64
+ unavailable_model_reasons: tuple[str, ...] = ()
65
+
66
+ if not sdk_available:
67
+ runtime_error = "Claude Agent SDK package could not be imported in the AgentRules environment."
68
+ elif executable_path is None:
69
+ if runtime_config.cli_path is None:
70
+ runtime_error = "Claude Code executable could not be resolved from the SDK default runtime settings."
71
+ else:
72
+ runtime_error = "Configured Claude Code executable could not be resolved from the current settings."
73
+ else:
74
+ probe = manager.get_claude_code_runtime_version_probe(timeout_seconds=timeout_seconds)
75
+ if probe is None:
76
+ runtime_error = "Claude Code executable could not be resolved during the version probe."
77
+ else:
78
+ version = str(probe.version) if probe.version is not None else None
79
+ version_error_code = probe.error_code
80
+ version_error = probe.error_message
81
+ unavailable_model_reasons = _unavailable_model_reasons(manager, probe.version)
82
+
83
+ return ClaudeCodeRuntimeDiagnostics(
84
+ cli_path=runtime_config.cli_path,
85
+ executable_path=executable_path,
86
+ sdk_available=sdk_available,
87
+ auth_strategy=runtime_config.auth_strategy,
88
+ sanitize_api_key_env=runtime_config.sanitize_api_key_env,
89
+ oauth_token_present=CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR in child_env,
90
+ api_key_env_present_after_sanitization=any(env_var in child_env for env_var in CLAUDE_CODE_API_KEY_ENV_VARS),
91
+ executable_source=executable_source,
92
+ version=version,
93
+ runtime_error=runtime_error,
94
+ version_error_code=version_error_code,
95
+ version_error=version_error,
96
+ unavailable_model_reasons=unavailable_model_reasons,
97
+ )
98
+
99
+
100
+ def clear_claude_code_runtime_version_probe_cache() -> None:
101
+ """Invalidate version data before an operator-requested runtime refresh."""
102
+
103
+ claude_code_service.clear_claude_code_version_probe_cache()
104
+
105
+
106
+ def _unavailable_model_reasons(
107
+ manager: ConfigManager,
108
+ runtime_version: claude_code_service.ClaudeCodeVersion | None,
109
+ ) -> tuple[str, ...]:
110
+ reasons: list[str] = []
111
+ for model_name in _DIAGNOSTIC_GATED_MODELS:
112
+ minimum = manager.minimum_claude_code_version_for_model(model_name)
113
+ if minimum is None:
114
+ continue
115
+ if runtime_version is None:
116
+ reasons.append(f"{model_name}: needs {minimum}+; runtime version is unverified")
117
+ elif runtime_version < minimum:
118
+ reasons.append(f"{model_name}: needs {minimum}+; resolved runtime is {runtime_version}")
119
+ return tuple(reasons)
120
+
121
+
122
+ __all__ = [
123
+ "ClaudeCodeRuntimeDiagnostics",
124
+ "clear_claude_code_runtime_version_probe_cache",
125
+ "get_claude_code_runtime_diagnostics",
126
+ ]
@@ -57,7 +57,8 @@ def _render_runtime_summary(
57
57
  live_table.add_column("Signal", style="bold")
58
58
  live_table.add_column("Value")
59
59
  live_table.add_row("Status", _format_status(diagnostics))
60
- live_table.add_row("Version", diagnostics.version or "[dim]-[/]")
60
+ live_table.add_row("Executable source", diagnostics.executable_source or "[dim]-[/]")
61
+ live_table.add_row("Parsed version", diagnostics.version or "[dim]-[/]")
61
62
  live_table.add_row("OAuth token present", _format_bool(diagnostics.oauth_token_present))
62
63
  live_table.add_row(
63
64
  "API-key env visible to child",
@@ -71,7 +72,10 @@ def _render_runtime_summary(
71
72
  if diagnostics.runtime_error:
72
73
  context.console.print(f"\n[red]Runtime error:[/] {diagnostics.runtime_error}")
73
74
  if diagnostics.version_error:
74
- context.console.print(f"\n[yellow]Version check:[/] {diagnostics.version_error}")
75
+ error_kind = f" ({diagnostics.version_error_code})" if diagnostics.version_error_code else ""
76
+ context.console.print(f"\n[yellow]Version check{error_kind}:[/] {diagnostics.version_error}")
77
+ for reason in diagnostics.unavailable_model_reasons:
78
+ context.console.print(f"\n[yellow]Unavailable model:[/] {reason}")
75
79
  for note in build_runtime_guidance(state, diagnostics):
76
80
  context.console.print(note)
77
81
  context.console.print("")
@@ -199,14 +203,13 @@ def configure_claude_code_runtime(context: CliContext) -> None:
199
203
 
200
204
  if selection == "__LOGIN_HELP__":
201
205
  console.print("[cyan]Run this in your terminal:[/] claude auth login")
202
- console.print(
203
- "[cyan]For automation/CI:[/] claude setup-token, then export CLAUDE_CODE_OAUTH_TOKEN"
204
- )
206
+ console.print("[cyan]For automation/CI:[/] claude setup-token, then export CLAUDE_CODE_OAUTH_TOKEN")
205
207
  console.print(
206
208
  "[dim]Complete the Claude.ai OAuth flow in Claude Code, then return here and refresh status.[/]"
207
209
  )
208
210
  continue
209
211
 
210
212
  if selection == "__REFRESH__":
213
+ claude_code_runtime.clear_claude_code_runtime_version_probe_cache()
211
214
  console.print("[green]Claude Code runtime status refreshed.[/]")
212
215
  continue
@@ -309,8 +309,6 @@ def _filter_claude_code_presets_for_runtime(
309
309
  preserved_key: str | None,
310
310
  ) -> list[model_presets.PresetInfo]:
311
311
  runtime_version = configuration.CONFIG_MANAGER.get_claude_code_runtime_version()
312
- if runtime_version is None:
313
- return presets
314
312
 
315
313
  filtered: list[model_presets.PresetInfo] = []
316
314
  for preset in presets:
@@ -325,15 +323,20 @@ def _filter_claude_code_presets_for_runtime(
325
323
  continue
326
324
 
327
325
  minimum_version = configuration.CONFIG_MANAGER.minimum_claude_code_version_for_model(model_name)
328
- if minimum_version is None or runtime_version >= minimum_version:
326
+ if minimum_version is None or (runtime_version is not None and runtime_version >= minimum_version):
329
327
  filtered.append(preset)
330
328
  continue
331
329
 
332
330
  if preset.key == preserved_key:
331
+ runtime_note = (
332
+ f"runtime needs {minimum_version}+"
333
+ if runtime_version is not None
334
+ else f"runtime version unverified; needs {minimum_version}+"
335
+ )
333
336
  filtered.append(
334
337
  model_presets.PresetInfo(
335
338
  key=preset.key,
336
- label=f"{preset.label} [current runtime needs {minimum_version}+]",
339
+ label=f"{preset.label} [current {runtime_note}]",
337
340
  description=preset.description,
338
341
  provider=preset.provider,
339
342
  )