agentrules 4.0.0__tar.gz → 4.1.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 (230) hide show
  1. {agentrules-4.0.0/src/agentrules.egg-info → agentrules-4.1.0}/PKG-INFO +2 -1
  2. {agentrules-4.0.0 → agentrules-4.1.0}/pyproject.toml +3 -2
  3. agentrules-4.1.0/src/agentrules/cli/services/claude_code_runtime.py +89 -0
  4. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/services/configuration.py +31 -0
  5. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/__init__.py +2 -0
  6. agentrules-4.1.0/src/agentrules/cli/ui/settings/claude_code.py +212 -0
  7. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/menu.py +5 -1
  8. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/models/__init__.py +3 -2
  9. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/models/researcher.py +1 -1
  10. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/models/utils.py +2 -0
  11. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/styles.py +2 -0
  12. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/agents.py +47 -0
  13. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/base.py +1 -0
  14. agentrules-4.1.0/src/agentrules/core/agents/claude_code/__init__.py +11 -0
  15. agentrules-4.1.0/src/agentrules/core/agents/claude_code/architect.py +299 -0
  16. agentrules-4.1.0/src/agentrules/core/agents/claude_code/client.py +216 -0
  17. agentrules-4.1.0/src/agentrules/core/agents/claude_code/errors.py +22 -0
  18. agentrules-4.1.0/src/agentrules/core/agents/claude_code/request_builder.py +179 -0
  19. agentrules-4.1.0/src/agentrules/core/agents/claude_code/response_parser.py +122 -0
  20. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/factory/factory.py +3 -0
  21. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/__init__.py +12 -0
  22. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/constants.py +6 -0
  23. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/environment.py +3 -0
  24. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/manager.py +59 -2
  25. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/model_presets.py +1 -0
  26. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/models.py +28 -0
  27. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/serde.py +67 -2
  28. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/__init__.py +2 -1
  29. agentrules-4.1.0/src/agentrules/core/configuration/services/claude_code.py +164 -0
  30. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/providers.py +3 -1
  31. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/utils.py +36 -1
  32. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/types/models.py +15 -0
  33. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/provider_capabilities.py +1 -1
  34. agentrules-4.1.0/src/agentrules/core/utils/provider_utils.py +104 -0
  35. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/structured_outputs.py +19 -1
  36. {agentrules-4.0.0 → agentrules-4.1.0/src/agentrules.egg-info}/PKG-INFO +2 -1
  37. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules.egg-info/SOURCES.txt +10 -0
  38. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules.egg-info/requires.txt +1 -0
  39. {agentrules-4.0.0 → agentrules-4.1.0}/LICENSE +0 -0
  40. {agentrules-4.0.0 → agentrules-4.1.0}/README.md +0 -0
  41. {agentrules-4.0.0 → agentrules-4.1.0}/setup.cfg +0 -0
  42. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/__init__.py +0 -0
  43. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/__main__.py +0 -0
  44. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/__init__.py +0 -0
  45. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/app.py +0 -0
  46. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/bootstrap.py +0 -0
  47. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/__init__.py +0 -0
  48. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/analyze.py +0 -0
  49. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/configure.py +0 -0
  50. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/execplan.py +0 -0
  51. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/execplan_registry.py +0 -0
  52. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/keys.py +0 -0
  53. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/scaffold.py +0 -0
  54. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/snapshot.py +0 -0
  55. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/commands/tree.py +0 -0
  56. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/context.py +0 -0
  57. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/services/__init__.py +0 -0
  58. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/services/codex_runtime.py +0 -0
  59. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/services/output_validation.py +0 -0
  60. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/services/pipeline_runner.py +0 -0
  61. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/services/tree_preview.py +0 -0
  62. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/__init__.py +0 -0
  63. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/analysis_view.py +0 -0
  64. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/event_sink.py +0 -0
  65. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/main_menu.py +0 -0
  66. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/codex.py +0 -0
  67. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/exclusions/__init__.py +0 -0
  68. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/exclusions/editor.py +0 -0
  69. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/exclusions/preview.py +0 -0
  70. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/exclusions/summary.py +0 -0
  71. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/logging.py +0 -0
  72. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/outputs.py +0 -0
  73. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/cli/ui/settings/providers.py +0 -0
  74. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/__init__.py +0 -0
  75. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/exclusions.py +0 -0
  76. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/__init__.py +0 -0
  77. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/final_analysis_prompt.py +0 -0
  78. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/phase_1_prompts.py +0 -0
  79. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/phase_2_prompts.py +0 -0
  80. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/phase_3_prompts.py +0 -0
  81. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/phase_4_prompts.py +0 -0
  82. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/prompts/phase_5_prompts.py +0 -0
  83. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/config/tools.py +0 -0
  84. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/__init__.py +0 -0
  85. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agent_tools/tool_manager.py +0 -0
  86. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agent_tools/web_search/__init__.py +0 -0
  87. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agent_tools/web_search/tavily.py +0 -0
  88. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/__init__.py +0 -0
  89. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/__init__.py +0 -0
  90. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/architect.py +0 -0
  91. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/capabilities.py +0 -0
  92. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/client.py +0 -0
  93. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/prompting.py +0 -0
  94. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/request_builder.py +0 -0
  95. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/response_parser.py +0 -0
  96. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/anthropic/tooling.py +0 -0
  97. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/__init__.py +0 -0
  98. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/architect.py +0 -0
  99. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/client.py +0 -0
  100. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/errors.py +0 -0
  101. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/models.py +0 -0
  102. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/process.py +0 -0
  103. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/protocol.py +0 -0
  104. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/request_builder.py +0 -0
  105. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/codex/response_parser.py +0 -0
  106. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/__init__.py +0 -0
  107. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/architect.py +0 -0
  108. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/client.py +0 -0
  109. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/compat.py +0 -0
  110. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/config.py +0 -0
  111. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/prompting.py +0 -0
  112. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/request_builder.py +0 -0
  113. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/response_parser.py +0 -0
  114. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/deepseek/tooling.py +0 -0
  115. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/factory/__init__.py +0 -0
  116. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/__init__.py +0 -0
  117. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/architect.py +0 -0
  118. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/capabilities.py +0 -0
  119. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/client.py +0 -0
  120. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/errors.py +0 -0
  121. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/legacy.py +0 -0
  122. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/prompting.py +0 -0
  123. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/response_parser.py +0 -0
  124. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/gemini/tooling.py +0 -0
  125. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/__init__.py +0 -0
  126. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/architect.py +0 -0
  127. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/client.py +0 -0
  128. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/compat.py +0 -0
  129. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/config.py +0 -0
  130. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/request_builder.py +0 -0
  131. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/openai/response_parser.py +0 -0
  132. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/__init__.py +0 -0
  133. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/architect.py +0 -0
  134. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/client.py +0 -0
  135. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/config.py +0 -0
  136. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/prompting.py +0 -0
  137. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/request_builder.py +0 -0
  138. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/response_parser.py +0 -0
  139. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/agents/xai/tooling.py +0 -0
  140. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/__init__.py +0 -0
  141. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/events.py +0 -0
  142. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/final_analysis.py +0 -0
  143. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/phase_1.py +0 -0
  144. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/phase_2.py +0 -0
  145. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/phase_3.py +0 -0
  146. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/phase_4.py +0 -0
  147. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/analysis/phase_5.py +0 -0
  148. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/repository.py +0 -0
  149. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/codex.py +0 -0
  150. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/exclusions.py +0 -0
  151. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/features.py +0 -0
  152. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/logging.py +0 -0
  153. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/outputs.py +0 -0
  154. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/configuration/services/phase_models.py +0 -0
  155. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/__init__.py +0 -0
  156. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/creator.py +0 -0
  157. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/identity.py +0 -0
  158. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/locks.py +0 -0
  159. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/milestones.py +0 -0
  160. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/paths.py +0 -0
  161. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/registry.py +0 -0
  162. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/templates/EXECPLAN_TEMPLATE.md +0 -0
  163. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/execplan/templates/MILESTONE_FILE_TEMPLATE.md +0 -0
  164. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/logging/__init__.py +0 -0
  165. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/logging/config.py +0 -0
  166. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/__init__.py +0 -0
  167. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/config.py +0 -0
  168. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/factory.py +0 -0
  169. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/orchestrator.py +0 -0
  170. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/output.py +0 -0
  171. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/project_profile.py +0 -0
  172. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/pipeline/snapshot.py +0 -0
  173. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/streaming/__init__.py +0 -0
  174. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/streaming/types.py +0 -0
  175. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/types/__init__.py +0 -0
  176. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/types/agent_config.py +0 -0
  177. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/types/tool_config.py +0 -0
  178. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/async_stream.py +0 -0
  179. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/constants.py +0 -0
  180. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/__init__.py +0 -0
  181. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/constants.py +0 -0
  182. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/discovery.py +0 -0
  183. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/metadata.py +0 -0
  184. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/models.py +0 -0
  185. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/__init__.py +0 -0
  186. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/clojure.py +0 -0
  187. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/dart.py +0 -0
  188. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/dotnet.py +0 -0
  189. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/elixir.py +0 -0
  190. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/generic.py +0 -0
  191. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/go.py +0 -0
  192. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/helpers.py +0 -0
  193. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/java.py +0 -0
  194. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/javascript.py +0 -0
  195. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/php.py +0 -0
  196. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/python.py +0 -0
  197. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/ruby.py +0 -0
  198. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/swift.py +0 -0
  199. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/parsers/toml_based.py +0 -0
  200. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/registry.py +0 -0
  201. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/dependency_scanner/scan.py +0 -0
  202. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/agent_scaffold.py +0 -0
  203. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/atomic_write.py +0 -0
  204. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/cursorignore.py +0 -0
  205. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/phases_output.py +0 -0
  206. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/snapshot_artifact.py +0 -0
  207. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/snapshot_policy.py +0 -0
  208. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/templates/MILESTONE_TEMPLATE.md +0 -0
  209. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_creation/templates/PLANS.md +0 -0
  210. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_system/__init__.py +0 -0
  211. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_system/file_retriever.py +0 -0
  212. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_system/gitignore.py +0 -0
  213. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/file_system/tree_generator.py +0 -0
  214. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/formatters/__init__.py +0 -0
  215. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/formatters/clean_agentrules.py +0 -0
  216. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/model_config_helper.py +0 -0
  217. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/offline.py +0 -0
  218. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/parsers/__init__.py +0 -0
  219. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/parsers/agent_parser.py +0 -0
  220. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/release_metadata.py +0 -0
  221. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/system_prompt.py +0 -0
  222. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/token_estimator.py +0 -0
  223. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules/core/utils/token_packer.py +0 -0
  224. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules.egg-info/dependency_links.txt +0 -0
  225. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules.egg-info/entry_points.txt +0 -0
  226. {agentrules-4.0.0 → agentrules-4.1.0}/src/agentrules.egg-info/top_level.txt +0 -0
  227. {agentrules-4.0.0 → agentrules-4.1.0}/tests/test_cli_services.py +0 -0
  228. {agentrules-4.0.0 → agentrules-4.1.0}/tests/test_env.py +0 -0
  229. {agentrules-4.0.0 → agentrules-4.1.0}/tests/test_openai_responses.py +0 -0
  230. {agentrules-4.0.0 → agentrules-4.1.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.0.0
3
+ Version: 4.1.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
@@ -27,6 +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.1.73
30
31
  Provides-Extra: dev
31
32
  Requires-Dist: pytest; extra == "dev"
32
33
  Requires-Dist: pytest-asyncio; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentrules"
7
- version = "4.0.0"
7
+ version = "4.1.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"}]
@@ -32,7 +32,8 @@ dependencies = [
32
32
  "PyYAML>=6.0",
33
33
  "tomli; python_version < '3.11'",
34
34
  "tomli-w",
35
- "tiktoken>=0.7.0"
35
+ "tiktoken>=0.7.0",
36
+ "claude-agent-sdk>=0.1.73",
36
37
  ]
37
38
 
38
39
  [project.optional-dependencies]
@@ -0,0 +1,89 @@
1
+ """Synchronous helpers for inspecting the local Claude Code runtime."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import subprocess
6
+ from dataclasses import dataclass
7
+
8
+ from agentrules.core.configuration import (
9
+ CLAUDE_CODE_API_KEY_ENV_VARS,
10
+ CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR,
11
+ ConfigManager,
12
+ get_config_manager,
13
+ )
14
+
15
+
16
+ @dataclass(frozen=True)
17
+ class ClaudeCodeRuntimeDiagnostics:
18
+ cli_path: str | None
19
+ executable_path: str | None
20
+ sdk_available: bool
21
+ auth_strategy: str
22
+ sanitize_api_key_env: bool
23
+ oauth_token_present: bool
24
+ api_key_env_present_after_sanitization: bool
25
+ version: str | None = None
26
+ runtime_error: str | None = None
27
+ version_error: str | None = None
28
+
29
+ @property
30
+ def is_available(self) -> bool:
31
+ return self.sdk_available and self.runtime_error is None
32
+
33
+
34
+ def get_claude_code_runtime_diagnostics(
35
+ *,
36
+ config_manager: ConfigManager | None = None,
37
+ timeout_seconds: float = 2.0,
38
+ ) -> ClaudeCodeRuntimeDiagnostics:
39
+ manager = config_manager or get_config_manager()
40
+ runtime_config = manager.get_claude_code_config()
41
+ executable_path = manager.resolve_claude_code_executable()
42
+ sdk_available = manager.is_claude_agent_sdk_available()
43
+ child_env = manager.build_claude_code_environment()
44
+
45
+ version: str | None = None
46
+ version_error: str | None = None
47
+ runtime_error: str | None = None
48
+
49
+ if not sdk_available:
50
+ runtime_error = "Claude Agent SDK package could not be imported in the AgentRules environment."
51
+ elif executable_path is None:
52
+ if runtime_config.cli_path is None:
53
+ runtime_error = "Claude Code executable could not be resolved from the SDK default runtime settings."
54
+ else:
55
+ runtime_error = "Configured Claude Code executable could not be resolved from the current settings."
56
+ else:
57
+ try:
58
+ completed = subprocess.run(
59
+ [executable_path, "--version"],
60
+ check=False,
61
+ capture_output=True,
62
+ env=child_env,
63
+ text=True,
64
+ timeout=timeout_seconds,
65
+ )
66
+ if completed.returncode == 0:
67
+ version = (completed.stdout or completed.stderr).strip() or None
68
+ else:
69
+ version_error = (completed.stderr or completed.stdout).strip() or (
70
+ f"`claude --version` exited with status {completed.returncode}."
71
+ )
72
+ except Exception as exc:
73
+ version_error = str(exc)
74
+
75
+ return ClaudeCodeRuntimeDiagnostics(
76
+ cli_path=runtime_config.cli_path,
77
+ executable_path=executable_path,
78
+ sdk_available=sdk_available,
79
+ auth_strategy=runtime_config.auth_strategy,
80
+ sanitize_api_key_env=runtime_config.sanitize_api_key_env,
81
+ oauth_token_present=CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR in child_env,
82
+ api_key_env_present_after_sanitization=any(env_var in child_env for env_var in CLAUDE_CODE_API_KEY_ENV_VARS),
83
+ version=version,
84
+ runtime_error=runtime_error,
85
+ version_error=version_error,
86
+ )
87
+
88
+
89
+ __all__ = ["ClaudeCodeRuntimeDiagnostics", "get_claude_code_runtime_diagnostics"]
@@ -6,8 +6,10 @@ from collections.abc import Mapping
6
6
  from dataclasses import dataclass
7
7
 
8
8
  from agentrules.core.configuration import (
9
+ CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR,
9
10
  CODEX_HOME_ENV_VAR,
10
11
  PROVIDER_ENV_MAP,
12
+ ClaudeCodeAuthStrategy,
11
13
  CodexHomeStrategy,
12
14
  OutputPreferences,
13
15
  get_config_manager,
@@ -37,6 +39,16 @@ class CodexRuntimeState:
37
39
  is_available: bool = False
38
40
 
39
41
 
42
+ @dataclass(frozen=True)
43
+ class ClaudeCodeRuntimeState:
44
+ cli_path: str | None
45
+ auth_strategy: ClaudeCodeAuthStrategy
46
+ sanitize_api_key_env: bool
47
+ executable_path: str | None = None
48
+ is_available: bool = False
49
+ oauth_token_env_var: str = CLAUDE_CODE_OAUTH_TOKEN_ENV_VAR
50
+
51
+
40
52
  def list_provider_states() -> list[ProviderState]:
41
53
  keys = CONFIG_MANAGER.get_current_provider_keys()
42
54
  return [
@@ -117,6 +129,25 @@ def save_codex_managed_home(managed_home: str | None) -> None:
117
129
  CONFIG_MANAGER.set_codex_managed_home(managed_home)
118
130
 
119
131
 
132
+ def get_claude_code_runtime_state() -> ClaudeCodeRuntimeState:
133
+ claude_code_config = CONFIG_MANAGER.get_claude_code_config()
134
+ return ClaudeCodeRuntimeState(
135
+ cli_path=claude_code_config.cli_path,
136
+ auth_strategy=claude_code_config.auth_strategy,
137
+ sanitize_api_key_env=claude_code_config.sanitize_api_key_env,
138
+ executable_path=CONFIG_MANAGER.resolve_claude_code_executable(),
139
+ is_available=CONFIG_MANAGER.is_claude_code_available(),
140
+ )
141
+
142
+
143
+ def save_claude_code_cli_path(cli_path: str | None) -> None:
144
+ CONFIG_MANAGER.set_claude_code_cli_path(cli_path)
145
+
146
+
147
+ def save_claude_code_sanitize_api_key_env(enabled: bool) -> None:
148
+ CONFIG_MANAGER.set_claude_code_sanitize_api_key_env(enabled)
149
+
150
+
120
151
  def get_logging_preference() -> str | None:
121
152
  return CONFIG_MANAGER.get_logging_verbosity()
122
153
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .claude_code import configure_claude_code_runtime
5
6
  from .codex import configure_codex_runtime
6
7
  from .exclusions import configure_exclusions
7
8
  from .logging import configure_logging
@@ -12,6 +13,7 @@ from .providers import configure_provider_keys, show_provider_summary
12
13
 
13
14
  __all__ = [
14
15
  "configure_settings",
16
+ "configure_claude_code_runtime",
15
17
  "configure_codex_runtime",
16
18
  "configure_logging",
17
19
  "configure_output_preferences",
@@ -0,0 +1,212 @@
1
+ """Claude Code runtime configuration flow."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import questionary
6
+ from rich.table import Table
7
+
8
+ from agentrules.cli.context import CliContext
9
+ from agentrules.cli.services import claude_code_runtime, configuration
10
+ from agentrules.cli.ui.styles import CLI_STYLE, navigation_choice, value_choice
11
+
12
+
13
+ def _format_status(diagnostics: claude_code_runtime.ClaudeCodeRuntimeDiagnostics) -> str:
14
+ if diagnostics.runtime_error:
15
+ return "[red]Unavailable[/]"
16
+ if diagnostics.version_error:
17
+ return "[yellow]Executable found[/]"
18
+ return "[green]Available[/]"
19
+
20
+
21
+ def _format_bool(value: bool) -> str:
22
+ return "[green]Yes[/]" if value else "[yellow]No[/]"
23
+
24
+
25
+ def _format_cli_path(cli_path: str | None) -> str:
26
+ return cli_path or "[dim]SDK default[/]"
27
+
28
+
29
+ def _format_cli_path_plain(cli_path: str | None) -> str:
30
+ return cli_path or "SDK default"
31
+
32
+
33
+ def _format_resolved_executable(state: configuration.ClaudeCodeRuntimeState) -> str:
34
+ if state.executable_path:
35
+ return state.executable_path
36
+ if state.cli_path is None:
37
+ return "[dim]SDK default[/]"
38
+ return "[red]Not found[/]"
39
+
40
+
41
+ def _render_runtime_summary(
42
+ context: CliContext,
43
+ state: configuration.ClaudeCodeRuntimeState,
44
+ diagnostics: claude_code_runtime.ClaudeCodeRuntimeDiagnostics,
45
+ ) -> None:
46
+ config_table = Table(title="[bold]Claude Code Runtime Configuration[/bold]", show_lines=False, pad_edge=False)
47
+ config_table.add_column("Setting", style="bold")
48
+ config_table.add_column("Value")
49
+ config_table.add_row("Configured executable", _format_cli_path(state.cli_path))
50
+ config_table.add_row("Resolved executable", _format_resolved_executable(state))
51
+ config_table.add_row("Claude Agent SDK", _format_bool(diagnostics.sdk_available))
52
+ config_table.add_row("Auth strategy", state.auth_strategy)
53
+ config_table.add_row("OAuth token env var", state.oauth_token_env_var)
54
+ config_table.add_row("Strip Anthropic API-key env", _format_bool(state.sanitize_api_key_env))
55
+
56
+ live_table = Table(title="[bold]Runtime Diagnostics[/bold]", show_lines=False, pad_edge=False)
57
+ live_table.add_column("Signal", style="bold")
58
+ live_table.add_column("Value")
59
+ live_table.add_row("Status", _format_status(diagnostics))
60
+ live_table.add_row("Version", diagnostics.version or "[dim]-[/]")
61
+ live_table.add_row("OAuth token present", _format_bool(diagnostics.oauth_token_present))
62
+ live_table.add_row(
63
+ "API-key env visible to child",
64
+ _format_bool(diagnostics.api_key_env_present_after_sanitization),
65
+ )
66
+
67
+ context.console.print("")
68
+ context.console.print(config_table)
69
+ context.console.print("")
70
+ context.console.print(live_table)
71
+ if diagnostics.runtime_error:
72
+ context.console.print(f"\n[red]Runtime error:[/] {diagnostics.runtime_error}")
73
+ if diagnostics.version_error:
74
+ context.console.print(f"\n[yellow]Version check:[/] {diagnostics.version_error}")
75
+ for note in build_runtime_guidance(state, diagnostics):
76
+ context.console.print(note)
77
+ context.console.print("")
78
+
79
+
80
+ def build_runtime_guidance(
81
+ state: configuration.ClaudeCodeRuntimeState,
82
+ diagnostics: claude_code_runtime.ClaudeCodeRuntimeDiagnostics,
83
+ ) -> list[str]:
84
+ """Render operator notes for the current Claude Code runtime state."""
85
+
86
+ notes: list[str] = [
87
+ "[dim]Claude Code uses the Claude Agent SDK and Claude.ai OAuth subscription auth. "
88
+ "AgentRules uses the SDK default runtime unless you configure an explicit executable path.[/]"
89
+ ]
90
+
91
+ if diagnostics.runtime_error:
92
+ if not diagnostics.sdk_available:
93
+ notes.append("[dim]Install AgentRules dependencies so `claude-agent-sdk` is importable.[/]")
94
+ elif state.cli_path:
95
+ notes.append(
96
+ "[dim]Set a valid Claude executable path, or clear the path to let the SDK use its default "
97
+ "runtime resolution.[/]"
98
+ )
99
+ else:
100
+ notes.append(
101
+ "[dim]Install Claude Code or configure a valid Claude executable path so the SDK default "
102
+ "runtime can be resolved.[/]"
103
+ )
104
+ else:
105
+ notes.append(
106
+ "[dim]Authenticate outside AgentRules with Claude Code's OAuth flow. When the `claude` command "
107
+ "is available, run `claude auth login`; for automated environments, run `claude setup-token` "
108
+ "and export CLAUDE_CODE_OAUTH_TOKEN.[/]"
109
+ )
110
+
111
+ if state.sanitize_api_key_env:
112
+ notes.append(
113
+ "[dim]Anthropic API-key environment variables are stripped from Claude Code child processes "
114
+ "so Claude.ai OAuth remains authoritative.[/]"
115
+ )
116
+ elif diagnostics.api_key_env_present_after_sanitization:
117
+ notes.append(
118
+ "[yellow]Anthropic API-key environment variables are visible to Claude Code. "
119
+ "Re-enable sanitization unless you intentionally want API-key precedence.[/]"
120
+ )
121
+
122
+ if diagnostics.is_available:
123
+ notes.append(
124
+ "[dim]Next step: choose a Claude Code preset under Settings -> Model presets per phase "
125
+ "to route analysis through this runtime.[/]"
126
+ )
127
+
128
+ return notes
129
+
130
+
131
+ def configure_claude_code_runtime(context: CliContext) -> None:
132
+ """Interactive prompts for configuring the local Claude Code runtime."""
133
+
134
+ console = context.console
135
+ console.print("\n[bold]Configure Claude Code Runtime[/bold]")
136
+ console.print(
137
+ "Claude Code uses the Claude Agent SDK and Claude.ai OAuth subscription auth. Leave the executable "
138
+ "path blank to use the SDK default runtime; set a path only when you need an explicit override. "
139
+ "AgentRules only stores runtime settings and never stores Anthropic API keys for this provider.\n"
140
+ )
141
+
142
+ while True:
143
+ state = configuration.get_claude_code_runtime_state()
144
+ diagnostics = claude_code_runtime.get_claude_code_runtime_diagnostics()
145
+ _render_runtime_summary(context, state, diagnostics)
146
+
147
+ selection = questionary.select(
148
+ "Select Claude Code runtime action:",
149
+ choices=[
150
+ value_choice("Claude executable path", _format_cli_path_plain(state.cli_path), value="__CLI_PATH__"),
151
+ value_choice(
152
+ "Strip Anthropic API-key env",
153
+ "Yes" if state.sanitize_api_key_env else "No",
154
+ value="__SANITIZE__",
155
+ ),
156
+ questionary.Choice(title="Show OAuth login instructions", value="__LOGIN_HELP__"),
157
+ value_choice(
158
+ "Refresh runtime status",
159
+ "Available" if diagnostics.is_available else "Retry",
160
+ value="__REFRESH__",
161
+ ),
162
+ navigation_choice("Back", value="__BACK__"),
163
+ ],
164
+ qmark="🧰",
165
+ style=CLI_STYLE,
166
+ ).ask()
167
+
168
+ if selection in (None, "__BACK__"):
169
+ console.print("[dim]Leaving Claude Code runtime settings.[/]")
170
+ return
171
+
172
+ if selection == "__CLI_PATH__":
173
+ answer = questionary.text(
174
+ "Enter the Claude executable path or command name (leave blank for SDK default):",
175
+ default=state.cli_path or "",
176
+ qmark="🧰",
177
+ style=CLI_STYLE,
178
+ ).ask()
179
+ if answer is None:
180
+ console.print("[yellow]No changes made to Claude executable path.[/]")
181
+ continue
182
+ configuration.save_claude_code_cli_path(answer)
183
+ console.print("[green]Claude executable path updated.[/]")
184
+ continue
185
+
186
+ if selection == "__SANITIZE__":
187
+ enabled = questionary.confirm(
188
+ "Strip Anthropic API-key environment variables from Claude Code child processes?",
189
+ default=state.sanitize_api_key_env,
190
+ qmark="🧰",
191
+ style=CLI_STYLE,
192
+ ).ask()
193
+ if enabled is None:
194
+ console.print("[yellow]No changes made to environment sanitization.[/]")
195
+ continue
196
+ configuration.save_claude_code_sanitize_api_key_env(bool(enabled))
197
+ console.print("[green]Claude Code environment sanitization updated.[/]")
198
+ continue
199
+
200
+ if selection == "__LOGIN_HELP__":
201
+ 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
+ )
205
+ console.print(
206
+ "[dim]Complete the Claude.ai OAuth flow in Claude Code, then return here and refresh status.[/]"
207
+ )
208
+ continue
209
+
210
+ if selection == "__REFRESH__":
211
+ console.print("[green]Claude Code runtime status refreshed.[/]")
212
+ continue
@@ -7,6 +7,7 @@ import questionary
7
7
  from agentrules.cli.context import CliContext
8
8
  from agentrules.cli.ui.styles import CLI_STYLE, navigation_choice
9
9
 
10
+ from .claude_code import configure_claude_code_runtime
10
11
  from .codex import configure_codex_runtime
11
12
  from .exclusions import configure_exclusions
12
13
  from .logging import configure_logging
@@ -17,6 +18,7 @@ from .providers import configure_provider_keys
17
18
  SETTINGS_CATEGORY_ENTRIES: tuple[tuple[str, str], ...] = (
18
19
  ("Provider API keys", "providers"),
19
20
  ("Codex runtime", "codex"),
21
+ ("Claude Code runtime", "claude_code"),
20
22
  ("Model presets per phase", "models"),
21
23
  ("Logging verbosity", "logging"),
22
24
  ("Output preferences", "outputs"),
@@ -35,7 +37,7 @@ def configure_settings(context: CliContext) -> None:
35
37
 
36
38
  console = context.console
37
39
  console.print("\n[bold]Settings[/bold]")
38
- console.print("[dim]Provider API keys and the local Codex runtime are configured separately.[/]")
40
+ console.print("[dim]Provider API keys and local CLI runtimes are configured separately.[/]")
39
41
 
40
42
  while True:
41
43
  selection = questionary.select(
@@ -55,6 +57,8 @@ def configure_settings(context: CliContext) -> None:
55
57
  configure_provider_keys(context)
56
58
  elif selection == "codex":
57
59
  configure_codex_runtime(context)
60
+ elif selection == "claude_code":
61
+ configure_claude_code_runtime(context)
58
62
  elif selection == "models":
59
63
  configure_models(context)
60
64
  elif selection == "logging":
@@ -177,10 +177,11 @@ def describe_researcher_phase_status(
177
177
  researcher_info = model_presets.get_preset_info(researcher_key) if researcher_key else None
178
178
  researcher_uses_native_search = uses_runtime_native_web_search(researcher_info)
179
179
  codex_available = bool(provider_availability.get(ModelProvider.CODEX.value, False))
180
+ claude_code_available = bool(provider_availability.get(ModelProvider.CLAUDE_CODE.value, False))
180
181
 
181
182
  if not tavily_available and not offline_mode and not researcher_uses_native_search:
182
- if codex_available:
183
- return "Needs Tavily or Codex preset", ""
183
+ if codex_available or claude_code_available:
184
+ return "Needs Tavily or runtime preset", ""
184
185
  return "Add Tavily API key to enable", ""
185
186
 
186
187
  status_label = "On" if researcher_mode == "on" else "Off"
@@ -188,5 +188,5 @@ def _render_researcher_requirements_notice(
188
188
 
189
189
  printer(
190
190
  "[yellow]This researcher preset still needs Tavily web search. "
191
- "Add a Tavily API key or choose a Codex preset to activate runtime-native research.[/]"
191
+ "Add a Tavily API key or choose a Codex or Claude Code preset to activate runtime-native research.[/]"
192
192
  )
@@ -231,6 +231,8 @@ def compact_model_label(label: str, provider_slug: str, provider_display: str) -
231
231
  normalized = normalized[: -len(f"[{provider_display}]")].rstrip()
232
232
  if provider_slug == "codex" and normalized.lower().startswith("codex:"):
233
233
  return normalized.split(":", 1)[1].strip()
234
+ if provider_slug == "claude_code" and normalized.lower().startswith("claude code "):
235
+ return normalized[len("claude code ") :].strip()
234
236
  if provider_slug == "openai" and normalized.lower().startswith("openai "):
235
237
  return normalized[len("openai ") :].strip()
236
238
  return normalized
@@ -8,6 +8,7 @@ import questionary
8
8
  from questionary import Style
9
9
 
10
10
  _PROVIDER_BADGES: dict[str, str] = {
11
+ "claude_code": "CC",
11
12
  "codex": "CX",
12
13
  "xai": "XA",
13
14
  "deepseek": "DS",
@@ -37,6 +38,7 @@ CLI_STYLE = Style(
37
38
  ("status.model", "fg:#00d1b2 bold"),
38
39
  ("status.provider", "fg:#888888"),
39
40
  ("status.variant", "fg:#00d1b2"),
41
+ ("provider.claude_code", "fg:#a855f7 bold"),
40
42
  ("provider.codex", "fg:#f97316 bold"),
41
43
  ("provider.xai", "fg:#ef4444 bold"),
42
44
  ("provider.deepseek", "fg:#14b8a6 bold"),
@@ -77,6 +77,7 @@ from agentrules.core.types.models import (
77
77
  O4_MINI_LOW,
78
78
  O4_MINI_MEDIUM,
79
79
  ModelConfig,
80
+ create_claude_code_config,
80
81
  create_codex_config,
81
82
  )
82
83
 
@@ -170,6 +171,22 @@ def _derive_codex_runtime_preset(
170
171
  )
171
172
 
172
173
 
174
+ def _derive_claude_code_runtime_preset(
175
+ base_preset: PresetDefinition,
176
+ *,
177
+ label: str | None = None,
178
+ description: str | None = None,
179
+ ) -> PresetDefinition:
180
+ base_label = base_preset["label"]
181
+ base_description = base_preset["description"]
182
+ return _preset(
183
+ config=create_claude_code_config(base_preset["config"]),
184
+ label=label or f"Claude Code {base_label}",
185
+ description=description or f"{base_description} Routed through the Claude Code Agent SDK runtime.",
186
+ provider=ModelProvider.CLAUDE_CODE,
187
+ )
188
+
189
+
173
190
  BASE_MODEL_PRESETS: dict[str, PresetDefinition] = {
174
191
  "gemini-3-pro-preview": _preset(
175
192
  config=GEMINI_3_PRO_PREVIEW,
@@ -612,9 +629,39 @@ def _build_codex_runtime_presets() -> dict[str, PresetDefinition]:
612
629
  }
613
630
 
614
631
 
632
+ def _build_claude_code_runtime_presets() -> dict[str, PresetDefinition]:
633
+ return {
634
+ "claude-code-sonnet-4.6": _derive_claude_code_runtime_preset(BASE_MODEL_PRESETS["claude-sonnet-4.6"]),
635
+ "claude-code-sonnet-4.6-reasoning-high": _derive_claude_code_runtime_preset(
636
+ BASE_MODEL_PRESETS["claude-sonnet-4.6-reasoning-high"]
637
+ ),
638
+ "claude-code-sonnet-4.6-reasoning-medium": _derive_claude_code_runtime_preset(
639
+ BASE_MODEL_PRESETS["claude-sonnet-4.6-reasoning-medium"]
640
+ ),
641
+ "claude-code-sonnet-4.6-reasoning-low": _derive_claude_code_runtime_preset(
642
+ BASE_MODEL_PRESETS["claude-sonnet-4.6-reasoning-low"]
643
+ ),
644
+ "claude-code-opus-4.6": _derive_claude_code_runtime_preset(BASE_MODEL_PRESETS["claude-opus-4.6"]),
645
+ "claude-code-opus-4.6-reasoning": _derive_claude_code_runtime_preset(
646
+ BASE_MODEL_PRESETS["claude-opus-4.6-reasoning"]
647
+ ),
648
+ "claude-code-opus-4.6-reasoning-medium": _derive_claude_code_runtime_preset(
649
+ BASE_MODEL_PRESETS["claude-opus-4.6-reasoning-medium"]
650
+ ),
651
+ "claude-code-opus-4.6-reasoning-low": _derive_claude_code_runtime_preset(
652
+ BASE_MODEL_PRESETS["claude-opus-4.6-reasoning-low"]
653
+ ),
654
+ "claude-code-opus-4.6-reasoning-max": _derive_claude_code_runtime_preset(
655
+ BASE_MODEL_PRESETS["claude-opus-4.6-reasoning-max"]
656
+ ),
657
+ "claude-code-haiku": _derive_claude_code_runtime_preset(BASE_MODEL_PRESETS["claude-haiku"]),
658
+ }
659
+
660
+
615
661
  MODEL_PRESETS: dict[str, PresetDefinition] = {
616
662
  **BASE_MODEL_PRESETS,
617
663
  **_build_codex_runtime_presets(),
664
+ **_build_claude_code_runtime_presets(),
618
665
  }
619
666
 
620
667
  MODEL_PRESET_DEFAULTS: dict[str, str] = {
@@ -49,6 +49,7 @@ class ReasoningMode(Enum):
49
49
  class ModelProvider(Enum):
50
50
  """Enum for specifying the model provider."""
51
51
  ANTHROPIC = "anthropic"
52
+ CLAUDE_CODE = "claude_code"
52
53
  OPENAI = "openai"
53
54
  CODEX = "codex"
54
55
  DEEPSEEK = "deepseek"
@@ -0,0 +1,11 @@
1
+ """Claude Code Agent SDK provider exports."""
2
+
3
+ from .architect import ClaudeCodeArchitect
4
+ from .errors import ClaudeCodeError, ClaudeCodeExecutionError, ClaudeCodeSDKImportError
5
+
6
+ __all__ = [
7
+ "ClaudeCodeArchitect",
8
+ "ClaudeCodeError",
9
+ "ClaudeCodeExecutionError",
10
+ "ClaudeCodeSDKImportError",
11
+ ]