ara-cli 0.1.9.96__tar.gz → 0.1.10.1__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 (203) hide show
  1. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/PKG-INFO +3 -1
  2. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/__init__.py +1 -1
  3. ara_cli-0.1.10.1/ara_cli/__main__.py +165 -0
  4. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/ara_command_action.py +65 -7
  5. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/ara_config.py +118 -94
  6. ara_cli-0.1.10.1/ara_cli/ara_subcommands/autofix.py +26 -0
  7. ara_cli-0.1.10.1/ara_cli/ara_subcommands/chat.py +27 -0
  8. ara_cli-0.1.10.1/ara_cli/ara_subcommands/classifier_directory.py +16 -0
  9. ara_cli-0.1.10.1/ara_cli/ara_subcommands/common.py +100 -0
  10. ara_cli-0.1.10.1/ara_cli/ara_subcommands/create.py +75 -0
  11. ara_cli-0.1.10.1/ara_cli/ara_subcommands/delete.py +22 -0
  12. ara_cli-0.1.10.1/ara_cli/ara_subcommands/extract.py +22 -0
  13. ara_cli-0.1.10.1/ara_cli/ara_subcommands/fetch_templates.py +14 -0
  14. ara_cli-0.1.10.1/ara_cli/ara_subcommands/list.py +65 -0
  15. ara_cli-0.1.10.1/ara_cli/ara_subcommands/list_tags.py +25 -0
  16. ara_cli-0.1.10.1/ara_cli/ara_subcommands/load.py +48 -0
  17. ara_cli-0.1.10.1/ara_cli/ara_subcommands/prompt.py +136 -0
  18. ara_cli-0.1.10.1/ara_cli/ara_subcommands/read.py +47 -0
  19. ara_cli-0.1.10.1/ara_cli/ara_subcommands/read_status.py +20 -0
  20. ara_cli-0.1.10.1/ara_cli/ara_subcommands/read_user.py +20 -0
  21. ara_cli-0.1.10.1/ara_cli/ara_subcommands/reconnect.py +27 -0
  22. ara_cli-0.1.10.1/ara_cli/ara_subcommands/rename.py +22 -0
  23. ara_cli-0.1.10.1/ara_cli/ara_subcommands/scan.py +14 -0
  24. ara_cli-0.1.10.1/ara_cli/ara_subcommands/set_status.py +22 -0
  25. ara_cli-0.1.10.1/ara_cli/ara_subcommands/set_user.py +22 -0
  26. ara_cli-0.1.10.1/ara_cli/ara_subcommands/template.py +16 -0
  27. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/artefact_model.py +88 -19
  28. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/artefact_templates.py +18 -9
  29. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/userstory_artefact_model.py +2 -2
  30. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_scan.py +2 -2
  31. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/chat.py +204 -142
  32. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/commands/read_command.py +17 -4
  33. ara_cli-0.1.10.1/ara_cli/completers.py +144 -0
  34. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/prompt_handler.py +268 -127
  35. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/tag_extractor.py +33 -16
  36. ara_cli-0.1.10.1/ara_cli/template_loader.py +245 -0
  37. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/version.py +1 -1
  38. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli.egg-info/PKG-INFO +3 -1
  39. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli.egg-info/SOURCES.txt +25 -1
  40. ara_cli-0.1.9.96/docker/base/requirements.txt → ara_cli-0.1.10.1/ara_cli.egg-info/requires.txt +3 -1
  41. ara_cli-0.1.9.96/ara_cli.egg-info/requires.txt → ara_cli-0.1.10.1/docker/base/requirements.txt +2 -0
  42. ara_cli-0.1.10.1/tests/__init__.py +0 -0
  43. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_scan.py +1 -1
  44. ara_cli-0.1.10.1/tests/test_chat.py +2635 -0
  45. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_prompt_handler.py +40 -4
  46. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_tag_extractor.py +19 -13
  47. ara_cli-0.1.10.1/tests/test_template_loader.py +192 -0
  48. ara_cli-0.1.9.96/ara_cli/__main__.py +0 -127
  49. ara_cli-0.1.9.96/ara_cli/ara_command_parser.py +0 -565
  50. ara_cli-0.1.9.96/tests/test_chat.py +0 -1369
  51. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/MANIFEST.in +0 -0
  52. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/README.md +0 -0
  53. {ara_cli-0.1.9.96/ara_cli/artefact_models → ara_cli-0.1.10.1/ara_cli/ara_subcommands}/__init__.py +0 -0
  54. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_autofix.py +0 -0
  55. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_creator.py +0 -0
  56. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_deleter.py +0 -0
  57. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_fuzzy_search.py +0 -0
  58. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_link_updater.py +0 -0
  59. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_lister.py +0 -0
  60. {ara_cli-0.1.9.96/ara_cli/commands → ara_cli-0.1.10.1/ara_cli/artefact_models}/__init__.py +0 -0
  61. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/artefact_data_retrieval.py +0 -0
  62. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/artefact_load.py +0 -0
  63. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/artefact_mapping.py +0 -0
  64. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/businessgoal_artefact_model.py +0 -0
  65. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/capability_artefact_model.py +0 -0
  66. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/epic_artefact_model.py +0 -0
  67. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/example_artefact_model.py +0 -0
  68. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/feature_artefact_model.py +0 -0
  69. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/issue_artefact_model.py +0 -0
  70. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/keyfeature_artefact_model.py +0 -0
  71. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/serialize_helper.py +0 -0
  72. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/task_artefact_model.py +0 -0
  73. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_models/vision_artefact_model.py +0 -0
  74. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_reader.py +0 -0
  75. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/artefact_renamer.py +0 -0
  76. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/classifier.py +0 -0
  77. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/codefusionretriever.py +0 -0
  78. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/codehierachieretriever.py +0 -0
  79. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/commandline_completer.py +0 -0
  80. {ara_cli-0.1.9.96/ara_cli/file_loaders → ara_cli-0.1.10.1/ara_cli/commands}/__init__.py +0 -0
  81. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/commands/command.py +0 -0
  82. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/commands/extract_command.py +0 -0
  83. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/commands/load_command.py +0 -0
  84. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/commands/load_image_command.py +0 -0
  85. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/directory_navigator.py +0 -0
  86. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/error_handler.py +0 -0
  87. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_classifier.py +0 -0
  88. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_lister.py +0 -0
  89. {ara_cli-0.1.9.96/tests → ara_cli-0.1.10.1/ara_cli/file_loaders}/__init__.py +0 -0
  90. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/binary_file_loader.py +0 -0
  91. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/document_file_loader.py +0 -0
  92. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/document_reader.py +0 -0
  93. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/document_readers.py +0 -0
  94. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/file_loader.py +0 -0
  95. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/file_loaders.py +0 -0
  96. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/image_processor.py +0 -0
  97. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/markdown_reader.py +0 -0
  98. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/file_loaders/text_file_loader.py +0 -0
  99. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/filename_validator.py +0 -0
  100. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/global_file_lister.py +0 -0
  101. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/list_filter.py +0 -0
  102. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/output_suppressor.py +0 -0
  103. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/prompt_chat.py +0 -0
  104. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/prompt_extractor.py +0 -0
  105. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/prompt_rag.py +0 -0
  106. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/run_file_lister.py +0 -0
  107. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/template_manager.py +0 -0
  108. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/agile.artefacts +0 -0
  109. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -0
  110. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/blueprints/empty.blueprint.md +0 -0
  111. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_C4_architecture_analysis.blueprint.md +0 -0
  112. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -0
  113. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/architecture_C4_analysis.commands.md +0 -0
  114. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/architecture_radon_cc_score.commands.md +0 -0
  115. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/architecture_radon_halstead_v.commands.md +0 -0
  116. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/architecture_radon_maintainability_score.commands.md +0 -0
  117. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -0
  118. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -0
  119. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -0
  120. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -0
  121. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -0
  122. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -0
  123. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/empty.commands.md +0 -0
  124. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -0
  125. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -0
  126. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -0
  127. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -0
  128. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -0
  129. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -0
  130. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -0
  131. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -0
  132. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/classify_task.intention.md +0 -0
  133. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/empty.intention.md +0 -0
  134. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/error_fixing.intention.md +0 -0
  135. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_fix_steps_for_scenario.intention.md +0 -0
  136. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_formulation.intention.md +0 -0
  137. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_reverse_formulation_from_code.intention.md +0 -0
  138. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation.intention.md +0 -0
  139. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation_update.intention.md +0 -0
  140. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_scenario_outline_extension.intention.md +0 -0
  141. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/feature_update_formulation.intention.md +0 -0
  142. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/fibonacci_example_implementation.intention.md +0 -0
  143. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/js_implementation_from_task_description.intention.md +0 -0
  144. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/js_steps_implementation.intention.md +0 -0
  145. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/python_cli_implementation_with_test.intention.md +0 -0
  146. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/python_code_understanding.intention.md +0 -0
  147. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/task_implementation.intention.md +0 -0
  148. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/task_prompt_control_by_status.intention.md +0 -0
  149. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_number.intention.md +0 -0
  150. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_status.intention.md +0 -0
  151. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/architecture_analyst.rules.md +0 -0
  152. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/code_analyst.rules.md +0 -0
  153. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/empty.rules.md +0 -0
  154. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/error_analyst.rules.md +0 -0
  155. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/gherkin_expert.rules.md +0 -0
  156. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/js_expert_developer.rules.md +0 -0
  157. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/product_owner.rules.md +0 -0
  158. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/python_behave.rules.md +0 -0
  159. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/prompt-modules/rules/python_developer.rules.md +0 -0
  160. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.concept.exploration.md +0 -0
  161. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.concept.md +0 -0
  162. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.customer.exploration.md +0 -0
  163. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.customer.md +0 -0
  164. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.persona.exploration.md +0 -0
  165. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.persona.md +0 -0
  166. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.step.exploration.md +0 -0
  167. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.step.md +0 -0
  168. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.technology.exploration.md +0 -0
  169. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/specification_breakdown_files/template.technology.md +0 -0
  170. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.businessgoal.prompt_log.md +0 -0
  171. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.capability.prompt_log.md +0 -0
  172. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.epic.prompt_log.md +0 -0
  173. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.example.prompt_log.md +0 -0
  174. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.feature.prompt_log.md +0 -0
  175. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.issue.prompt_log.md +0 -0
  176. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.keyfeature.prompt_log.md +0 -0
  177. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.steps.prompt_log.md +0 -0
  178. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.task.prompt_log.md +0 -0
  179. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.userstory.prompt_log.md +0 -0
  180. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/templates/template.vision.prompt_log.md +0 -0
  181. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli/update_config_prompt.py +0 -0
  182. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli.egg-info/dependency_links.txt +0 -0
  183. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli.egg-info/entry_points.txt +0 -0
  184. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/ara_cli.egg-info/top_level.txt +0 -0
  185. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/setup.cfg +0 -0
  186. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/setup.py +0 -0
  187. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_ara_command_action.py +0 -0
  188. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_ara_config.py +0 -0
  189. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_autofix.py +0 -0
  190. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_fuzzy_search.py +0 -0
  191. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_link_updater.py +0 -0
  192. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_lister.py +0 -0
  193. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_reader.py +0 -0
  194. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_artefact_renamer.py +0 -0
  195. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_classifier.py +0 -0
  196. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_directory_navigator.py +0 -0
  197. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_file_classifier.py +0 -0
  198. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_file_creator.py +0 -0
  199. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_file_lister.py +0 -0
  200. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_global_file_lister.py +0 -0
  201. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_list_filter.py +0 -0
  202. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_template_manager.py +0 -0
  203. {ara_cli-0.1.9.96 → ara_cli-0.1.10.1}/tests/test_update_config_prompt.py +0 -0
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ara_cli
3
- Version: 0.1.9.96
3
+ Version: 0.1.10.1
4
4
  Summary: Powerful, open source command-line tool for managing, structuring and automating software development artifacts in line with Business-Driven Development (BDD) and AI-assisted processes
5
5
  Description-Content-Type: text/markdown
6
+ Requires-Dist: langfuse
6
7
  Requires-Dist: litellm
7
8
  Requires-Dist: llama-index
8
9
  Requires-Dist: llama-index-llms-openai
@@ -18,6 +19,7 @@ Requires-Dist: pydantic
18
19
  Requires-Dist: pydantic_ai
19
20
  Requires-Dist: python-docx
20
21
  Requires-Dist: pymupdf4llm
22
+ Requires-Dist: typer
21
23
  Dynamic: description
22
24
  Dynamic: description-content-type
23
25
  Dynamic: requires-dist
@@ -14,7 +14,7 @@ RESET = '\033[0m'
14
14
 
15
15
 
16
16
  def format_warning(message, category, *args, **kwargs):
17
- return f'{YELLOW}{category.__name__}: {message}{RESET}\n'
17
+ return f'{YELLOW}[WARNING] {category.__name__}: {message}{RESET}\n'
18
18
 
19
19
 
20
20
  warnings.formatwarning = format_warning
@@ -0,0 +1,165 @@
1
+ import typer
2
+ import sys
3
+ from typing import Optional
4
+ from os import getenv
5
+ from ara_cli.error_handler import AraError
6
+ from ara_cli.version import __version__
7
+ from ara_cli import error_handler
8
+ from ara_cli.ara_subcommands.create import register as register_create_cli
9
+ from ara_cli.ara_subcommands.delete import register as register_delete_cli
10
+ from ara_cli.ara_subcommands.rename import register as register_rename_cli
11
+ from ara_cli.ara_subcommands.list import register as register_list_cli
12
+ from ara_cli.ara_subcommands.list_tags import register as register_list_tags_cli
13
+ from ara_cli.ara_subcommands.prompt import register as register_prompt_cli
14
+ from ara_cli.ara_subcommands.chat import register as register_chat_cli
15
+ from ara_cli.ara_subcommands.template import register as register_template_cli
16
+ from ara_cli.ara_subcommands.fetch_templates import register as register_fetch_templates_cli
17
+ from ara_cli.ara_subcommands.read import register as register_read_cli
18
+ from ara_cli.ara_subcommands.reconnect import register as register_reconnect_cli
19
+ from ara_cli.ara_subcommands.read_status import register as register_read_status_cli
20
+ from ara_cli.ara_subcommands.read_user import register as register_read_user_cli
21
+ from ara_cli.ara_subcommands.set_status import register as register_set_status_cli
22
+ from ara_cli.ara_subcommands.set_user import register as register_set_user_cli
23
+ from ara_cli.ara_subcommands.classifier_directory import register as register_classifier_directory_cli
24
+ from ara_cli.ara_subcommands.scan import register as register_scan_cli
25
+ from ara_cli.ara_subcommands.autofix import register as register_autofix_cli
26
+ from ara_cli.ara_subcommands.extract import register as register_extract_cli
27
+ from ara_cli.ara_subcommands.load import register as register_load_cli
28
+
29
+
30
+ def version_callback(value: bool):
31
+ if value:
32
+ typer.echo(f"ara {__version__}")
33
+ raise typer.Exit()
34
+
35
+
36
+ def is_debug_mode_enabled():
37
+ """Check if debug mode is enabled via environment variable."""
38
+ return getenv('ARA_DEBUG', '').lower() in ('1', 'true', 'yes')
39
+
40
+
41
+ def configure_debug_mode(debug: bool, env_debug_mode: bool):
42
+ """Configure debug mode based on arguments and environment."""
43
+ if debug or env_debug_mode:
44
+ error_handler.debug_mode = True
45
+
46
+
47
+ def create_app():
48
+ app = typer.Typer(
49
+ help="""The ara cli terminal tool is a management tool for classified ara artefacts.
50
+
51
+ Valid classified artefacts are: businessgoal, vision, capability, keyfeature, feature, epic, userstory, example, feature, task.
52
+
53
+ The default ara directory structure of classified artefact of the ara cli tool is:
54
+ .
55
+ └── ara
56
+ ├── businessgoals
57
+ ├── capabilities
58
+ ├── epics
59
+ ├── examples
60
+ ├── features
61
+ ├── keyfeatures
62
+ ├── tasks
63
+ ├── userstories
64
+ └── vision
65
+
66
+ ara artefact handling examples:
67
+ > create a new artefact for e.g. a feature: ara create feature {feature_name}
68
+ > create a new artefact for e.g. a feature that contributes to an userstory: ara create feature {feature_name} contributes-to userstory {story_name}
69
+ > read an artefact and return the content as terminal output, for eg. of a task: ara read task {task_name}
70
+ > read an artefact and its full chain of contributions to its parents and return
71
+ the content as terminal output, for eg. of a task: ara read task {task_name} --branch
72
+ > delete an artefact for e.g. feature: ara delete feature {feature_name}
73
+ > rename artefact and artefact data directory for e.g. a feature: ara rename feature {initial_feature_name} {new_feature_name}
74
+ > create additional templates for a specific aspect (valid aspects are: customer,
75
+ persona, concept, technology) related to an existing artefact like a feature: ara create feature {feature_name} aspect {aspect_name}
76
+ > list artefact data with .md file extension ara list --data {classifier} {artefact_name} --include-extension .md
77
+ > list artefact data with .md and .json file extensions ara list --data {classifier} {artefact_name} --include-extension .md .json
78
+ > list everything but userstories ara list --exclude-extension .userstory
79
+ > list all existing features: ara list --include-extension .feature
80
+ > list all child artefacts contributing value to a parent artefact: ara list --include-content "Contributes to {name_of_parent_artefact} {ara classifier_of_parent_artefact}"
81
+ > list tasks which contain 'example content' ara list --include-extension .task --include-content "example content"
82
+ > list children artefacts of a userstory ara list --children userstory {name_of_userstory}
83
+ > list parent artefacts of a userstory ara list --branch userstory {name_of_userstory}
84
+ > list parent businessgoal artefact of a userstory ara list --branch userstory {name_of_userstory} --include-extension .businessgoal
85
+ > print any artefact template for e.g. a feature file template in the terminal: ara template feature
86
+
87
+ ara prompt templates examples:
88
+ > get and copy all prompt templates (blueprints, rules, intentions, commands
89
+ in the ara/.araconfig/global-prompt-modules directory: ara fetch-templates
90
+
91
+ ara chat examples:
92
+ > chat with ara and save the default chat.md file in the working directory: ara chat
93
+ > chat with ara and save the default task_chat.md file in the task.data directory: ara prompt chat task {task_name}
94
+
95
+ > initialize a macro prompt for a task: ara prompt init task {task_name}
96
+ > load selected templates in config_prompt_templates.md for the task {task_name}: ara prompt load task {task_name}
97
+ > create and send configured prompt of the task {task_name} to the configured LLM: ara prompt send task {task_name}
98
+ > extract the selected LLM response in task.exploration.md and save to disk: ara prompt extract task {task_name}
99
+ """,
100
+ no_args_is_help=True,
101
+ add_completion=True,
102
+ rich_markup_mode="rich"
103
+ )
104
+
105
+ @app.callback(invoke_without_command=True)
106
+ def main(
107
+ ctx: typer.Context,
108
+ version: Optional[bool] = typer.Option(
109
+ None, "--version", "-v",
110
+ callback=version_callback,
111
+ is_eager=True,
112
+ help="Show version and exit"
113
+ ),
114
+ debug: bool = typer.Option(
115
+ False, "--debug",
116
+ help="Enable debug mode for detailed error output"
117
+ )
118
+ ):
119
+ """The ara cli terminal tool is a management tool for classified ara artefacts."""
120
+ debug_mode = is_debug_mode_enabled()
121
+ configure_debug_mode(debug, debug_mode)
122
+
123
+ # Only show help if no subcommand is invoked
124
+ if ctx.invoked_subcommand is None:
125
+ ctx.get_help()
126
+ ctx.exit()
127
+
128
+ # Register all commands
129
+ register_create_cli(app)
130
+ register_delete_cli(app)
131
+ register_rename_cli(app)
132
+ register_list_cli(app)
133
+ register_list_tags_cli(app)
134
+ register_prompt_cli(app)
135
+ register_chat_cli(app)
136
+ register_template_cli(app)
137
+ register_fetch_templates_cli(app)
138
+ register_read_cli(app)
139
+ register_reconnect_cli(app)
140
+ register_read_status_cli(app)
141
+ register_read_user_cli(app)
142
+ register_set_status_cli(app)
143
+ register_set_user_cli(app)
144
+ register_classifier_directory_cli(app)
145
+ register_scan_cli(app)
146
+ register_autofix_cli(app)
147
+ register_extract_cli(app)
148
+ register_load_cli(app)
149
+
150
+ return app
151
+
152
+
153
+ def cli():
154
+ app = create_app()
155
+ try:
156
+ app()
157
+ except KeyboardInterrupt:
158
+ typer.echo("\n[INFO] Operation cancelled by user", err=True)
159
+ raise typer.Exit(130) # Standard exit code for Ctrl+C
160
+ except Exception as e:
161
+ error_handler.handle_error(e, context="cli")
162
+
163
+
164
+ if __name__ == "__main__":
165
+ cli()
@@ -130,9 +130,6 @@ def list_action(args):
130
130
  )
131
131
  return
132
132
 
133
- if (args.tags):
134
- artefact_lister.list_files(tags=args.tags, list_filter=list_filter)
135
- return
136
133
  artefact_lister.list_files(list_filter=list_filter)
137
134
 
138
135
 
@@ -147,17 +144,25 @@ def list_tags_action(args):
147
144
  )
148
145
 
149
146
  tag_extractor = TagExtractor()
150
- tags = tag_extractor.extract_tags(
147
+ tag_groups = tag_extractor.extract_tags(
151
148
  filtered_extra_column=getattr(args, "filtered_extra_column", False),
152
149
  list_filter=list_filter
153
150
  )
154
151
 
155
152
  if args.json:
156
- output = json.dumps({"tags": tags})
153
+ all_tags = []
154
+ for group in tag_groups.values():
155
+ all_tags.extend(group)
156
+ output = json.dumps({"tags": sorted(all_tags)})
157
157
  print(output)
158
158
  return
159
159
 
160
- output = "\n".join(f"- {tag}" for tag in tags)
160
+ output_lines = []
161
+ for key in sorted(tag_groups.keys()):
162
+ line = " ".join(sorted(list(tag_groups[key])))
163
+ output_lines.append(line)
164
+
165
+ output = "\n".join(f"- {tag}" for tag in output_lines)
161
166
  print(output)
162
167
 
163
168
 
@@ -261,6 +266,59 @@ def chat_action(args):
261
266
  chat.start()
262
267
 
263
268
 
269
+ def _find_chat_file(chat_name: str) -> str | None:
270
+ """Resolves the chat file path based on common naming conventions."""
271
+ # Logic from setup_chat for finding existing files.
272
+ if os.path.exists(chat_name) and os.path.isfile(chat_name):
273
+ return chat_name
274
+
275
+ chat_name_md = f"{chat_name}.md"
276
+ if os.path.exists(chat_name_md) and os.path.isfile(chat_name_md):
277
+ return chat_name_md
278
+
279
+ chat_name_chat_md = f"{chat_name}_chat.md"
280
+ if os.path.exists(chat_name_chat_md) and os.path.isfile(chat_name_chat_md):
281
+ return chat_name_chat_md
282
+
283
+ return None
284
+
285
+
286
+ @handle_errors(context="load action", error_handler=error_handler)
287
+ def load_action(args):
288
+ from ara_cli.template_loader import TemplateLoader
289
+
290
+ chat_name = args.chat_name
291
+ template_type = args.template_type
292
+ template_name = args.template_name
293
+
294
+ chat_file_path = _find_chat_file(chat_name)
295
+
296
+ if not chat_file_path:
297
+ raise AraError(f"Chat file for '{chat_name}' not found.")
298
+
299
+ default_patterns = {
300
+ "rules": "*.rules.md",
301
+ "intention": "*.intention.md",
302
+ "commands": "*.commands.md"
303
+ }
304
+
305
+ default_pattern = default_patterns.get(template_type)
306
+
307
+ if not template_name and not default_pattern:
308
+ raise AraError(f"A template name is required for template type '{template_type}'.")
309
+
310
+ loader = TemplateLoader() # No chat instance for CLI context
311
+ success = loader.load_template(
312
+ template_name=template_name,
313
+ template_type=template_type,
314
+ chat_file_path=chat_file_path,
315
+ default_pattern=default_pattern
316
+ )
317
+
318
+ if not success:
319
+ sys.exit(1)
320
+
321
+
264
322
  @handle_errors(context="template action", error_handler=error_handler)
265
323
  def template_action(args):
266
324
  from ara_cli.classifier import Classifier
@@ -615,4 +673,4 @@ def extract_action(args):
615
673
  write=write,
616
674
  output=lambda msg: print(msg, file=sys.stdout)
617
675
  )
618
- command.execute()
676
+ command.execute()
@@ -10,6 +10,7 @@ import warnings
10
10
 
11
11
  DEFAULT_CONFIG_LOCATION = "./ara/.araconfig/ara_config.json"
12
12
 
13
+
13
14
  class LLMConfigItem(BaseModel):
14
15
  provider: str
15
16
  model: str
@@ -17,6 +18,7 @@ class LLMConfigItem(BaseModel):
17
18
  max_tokens: Optional[int] = None
18
19
  max_completion_tokens: Optional[int] = None
19
20
 
21
+
20
22
  class ARAconfig(BaseModel):
21
23
  ext_code_dirs: List[Dict[str, str]] = Field(default_factory=lambda: [
22
24
  {"source_dir": "./src"},
@@ -28,98 +30,104 @@ class ARAconfig(BaseModel):
28
30
  local_prompt_templates_dir: str = "./ara/.araconfig"
29
31
  custom_prompt_templates_subdir: Optional[str] = "custom-prompt-modules"
30
32
  local_ara_templates_dir: str = "./ara/.araconfig/templates/"
31
- ara_prompt_given_list_includes: List[str] = Field(default_factory=lambda: [
32
- "*.businessgoal",
33
- "*.vision",
34
- "*.capability",
35
- "*.keyfeature",
36
- "*.epic",
37
- "*.userstory",
38
- "*.example",
39
- "*.feature",
40
- "*.task",
41
- "*.py",
42
- "*.md",
43
- "*.png",
44
- "*.jpg",
45
- "*.jpeg",
46
- ])
47
- llm_config: Dict[str, LLMConfigItem] = Field(default_factory=lambda: {
48
- "gpt-5": LLMConfigItem(
49
- provider="openai",
50
- model="openai/gpt-5",
51
- temperature=1,
52
- max_completion_tokens=16000
53
- ),
54
- "gpt-5-mini": LLMConfigItem(
55
- provider="openai",
56
- model="openai/gpt-5-mini-2025-08-07",
57
- temperature=1
58
- ),
59
- "gpt-4o": LLMConfigItem(
60
- provider="openai",
61
- model="openai/gpt-4o",
62
- temperature=0.8,
63
- max_tokens=16000
64
- ),
65
- "gpt-4.1": LLMConfigItem(
66
- provider="openai",
67
- model="openai/gpt-4.1",
68
- temperature=0.8,
69
- max_tokens=16000
70
- ),
71
- "o3-mini": LLMConfigItem(
72
- provider="openai",
73
- model="openai/o3-mini",
74
- temperature=1.0,
75
- max_tokens=8000
76
- ),
77
- "opus-4": LLMConfigItem(
78
- provider="anthropic",
79
- model="anthropic/claude-opus-4-20250514",
80
- temperature=0.5,
81
- max_tokens=32000
82
- ),
83
- "sonnet-4": LLMConfigItem(
84
- provider="anthropic",
85
- model="anthropic/claude-sonnet-4-20250514",
86
- temperature=0.5,
87
- max_tokens=32000
88
- ),
89
- "together-ai-llama-2": LLMConfigItem(
90
- provider="together_ai",
91
- model="together_ai/togethercomputer/llama-2-70b",
92
- temperature=0.8,
93
- max_tokens=4000
94
- ),
95
- "groq-llama-3": LLMConfigItem(
96
- provider="groq",
97
- model="groq/llama3-70b-8192",
98
- temperature=0.8,
99
- max_tokens=4000
100
- )
101
- })
33
+ ara_prompt_given_list_includes: List[str] = Field(
34
+ default_factory=lambda: [
35
+ "*.businessgoal",
36
+ "*.vision",
37
+ "*.capability",
38
+ "*.keyfeature",
39
+ "*.epic",
40
+ "*.userstory",
41
+ "*.example",
42
+ "*.feature",
43
+ "*.task",
44
+ "*.py",
45
+ "*.md",
46
+ "*.png",
47
+ "*.jpg",
48
+ "*.jpeg",
49
+ ]
50
+ )
51
+ llm_config: Dict[str, LLMConfigItem] = Field(
52
+ default_factory=lambda: {
53
+ "gpt-5": LLMConfigItem(
54
+ provider="openai",
55
+ model="openai/gpt-5",
56
+ temperature=1,
57
+ max_completion_tokens=16000,
58
+ ),
59
+ "gpt-5-mini": LLMConfigItem(
60
+ provider="openai", model="openai/gpt-5-mini-2025-08-07", temperature=1
61
+ ),
62
+ "gpt-4o": LLMConfigItem(
63
+ provider="openai",
64
+ model="openai/gpt-4o",
65
+ temperature=0.8,
66
+ max_tokens=16000,
67
+ ),
68
+ "gpt-4.1": LLMConfigItem(
69
+ provider="openai",
70
+ model="openai/gpt-4.1",
71
+ temperature=0.8,
72
+ max_tokens=16000,
73
+ ),
74
+ "o3-mini": LLMConfigItem(
75
+ provider="openai",
76
+ model="openai/o3-mini",
77
+ temperature=1.0,
78
+ max_tokens=8000,
79
+ ),
80
+ "opus-4": LLMConfigItem(
81
+ provider="anthropic",
82
+ model="anthropic/claude-opus-4-20250514",
83
+ temperature=0.5,
84
+ max_tokens=32000,
85
+ ),
86
+ "sonnet-4": LLMConfigItem(
87
+ provider="anthropic",
88
+ model="anthropic/claude-sonnet-4-20250514",
89
+ temperature=0.5,
90
+ max_tokens=32000,
91
+ ),
92
+ "together-ai-llama-2": LLMConfigItem(
93
+ provider="together_ai",
94
+ model="together_ai/togethercomputer/llama-2-70b",
95
+ temperature=0.8,
96
+ max_tokens=4000,
97
+ ),
98
+ "groq-llama-3": LLMConfigItem(
99
+ provider="groq",
100
+ model="groq/llama3-70b-8192",
101
+ temperature=0.8,
102
+ max_tokens=4000,
103
+ ),
104
+ }
105
+ )
102
106
  default_llm: Optional[str] = None
103
107
  extraction_llm: Optional[str] = None
104
108
 
105
- @model_validator(mode='after')
106
- def check_critical_fields(self) -> 'ARAconfig':
109
+ @model_validator(mode="after")
110
+ def check_critical_fields(self) -> "ARAconfig":
107
111
  """Check for empty critical fields and validate default_llm and extraction_llm."""
108
112
  critical_fields = {
109
- 'ext_code_dirs': [{"source_dir": "./src"}, {"source_dir": "./tests"}],
110
- 'local_ara_templates_dir': "./ara/.araconfig/templates/",
111
- 'local_prompt_templates_dir': "./ara/.araconfig",
112
- 'glossary_dir': "./glossary"
113
+ "ext_code_dirs": [{"source_dir": "./src"}, {"source_dir": "./tests"}],
114
+ "local_ara_templates_dir": "./ara/.araconfig/templates/",
115
+ "local_prompt_templates_dir": "./ara/.araconfig",
116
+ "glossary_dir": "./glossary",
113
117
  }
114
118
 
115
119
  for field, default_value in critical_fields.items():
116
120
  current_value = getattr(self, field)
117
121
  if not current_value:
118
- print(f"Warning: Value for '{field}' is missing or empty. Using default.")
122
+ print(
123
+ f"Warning: Value for '{field}' is missing or empty. Using default."
124
+ )
119
125
  setattr(self, field, default_value)
120
-
126
+
121
127
  if not self.llm_config:
122
- print("Warning: 'llm_config' is empty. 'default_llm' and 'extraction_llm' cannot be set.")
128
+ print(
129
+ "Warning: 'llm_config' is empty. 'default_llm' and 'extraction_llm' cannot be set."
130
+ )
123
131
  self.default_llm = None
124
132
  self.extraction_llm = None
125
133
  return self
@@ -127,23 +135,34 @@ class ARAconfig(BaseModel):
127
135
  first_available_llm = next(iter(self.llm_config))
128
136
 
129
137
  if not self.default_llm:
130
- print(f"Warning: 'default_llm' is not set. Defaulting to the first available model: '{first_available_llm}'.")
138
+ print(
139
+ f"Warning: 'default_llm' is not set. Defaulting to the first available model: '{first_available_llm}'."
140
+ )
131
141
  self.default_llm = first_available_llm
132
142
  elif self.default_llm not in self.llm_config:
133
- print(f"Warning: The configured 'default_llm' ('{self.default_llm}') does not exist in 'llm_config'.")
134
- print(f"-> Reverting to the first available model: '{first_available_llm}'.")
143
+ print(
144
+ f"Warning: The configured 'default_llm' ('{self.default_llm}') does not exist in 'llm_config'."
145
+ )
146
+ print(
147
+ f"-> Reverting to the first available model: '{first_available_llm}'."
148
+ )
135
149
  self.default_llm = first_available_llm
136
150
 
137
151
  if not self.extraction_llm:
138
- print(f"Warning: 'extraction_llm' is not set. Setting it to the same as 'default_llm': '{self.default_llm}'.")
152
+ print(
153
+ f"Warning: 'extraction_llm' is not set. Setting it to the same as 'default_llm': '{self.default_llm}'."
154
+ )
139
155
  self.extraction_llm = self.default_llm
140
156
  elif self.extraction_llm not in self.llm_config:
141
- print(f"Warning: The configured 'extraction_llm' ('{self.extraction_llm}') does not exist in 'llm_config'.")
157
+ print(
158
+ f"Warning: The configured 'extraction_llm' ('{self.extraction_llm}') does not exist in 'llm_config'."
159
+ )
142
160
  print(f"-> Reverting to the 'default_llm' value: '{self.default_llm}'.")
143
161
  self.extraction_llm = self.default_llm
144
-
162
+
145
163
  return self
146
164
 
165
+
147
166
  # Function to ensure the necessary directories exist
148
167
  @lru_cache(maxsize=None)
149
168
  def ensure_directory_exists(directory: str):
@@ -153,6 +172,7 @@ def ensure_directory_exists(directory: str):
153
172
  print(f"New directory created at {directory}")
154
173
  return directory
155
174
 
175
+
156
176
  def handle_unrecognized_keys(data: dict) -> dict:
157
177
  """Removes unrecognized keys from the data and warns the user."""
158
178
  known_fields = set(ARAconfig.model_fields.keys())
@@ -211,13 +231,15 @@ def read_data(filepath: str) -> ARAconfig:
211
231
  return config
212
232
  except ValidationError as e:
213
233
  print("--- Configuration Error Detected ---")
214
- print("Some settings in your configuration file are invalid. Attempting to fix them.")
215
-
234
+ print(
235
+ "Some settings in your configuration file are invalid. Attempting to fix them."
236
+ )
237
+
216
238
  corrected_data = data.copy()
217
239
  defaults = ARAconfig().model_dump()
218
-
219
- error_fields = {err['loc'][0] for err in e.errors() if err['loc']}
220
-
240
+
241
+ error_fields = {err["loc"][0] for err in e.errors() if err["loc"]}
242
+
221
243
  for field_name in error_fields:
222
244
  print(f"-> Field '{field_name}' is invalid and will be reverted to its default value.")
223
245
  if field_name in corrected_data:
@@ -228,15 +250,17 @@ def read_data(filepath: str) -> ARAconfig:
228
250
  final_config = ARAconfig(**corrected_data)
229
251
  save_data(filepath, final_config)
230
252
  print(f"Configuration has been corrected and saved to '{filepath}'.")
231
-
253
+
232
254
  return final_config
233
255
 
256
+
234
257
  # Function to save the modified configuration back to the JSON file
235
258
  def save_data(filepath: str, config: ARAconfig):
236
259
  """Saves the Pydantic config model to a JSON file."""
237
260
  with open(filepath, "w", encoding="utf-8") as file:
238
261
  json.dump(config.model_dump(), file, indent=4)
239
262
 
263
+
240
264
  # Singleton for configuration management
241
265
  class ConfigManager:
242
266
  _config_instance = None
@@ -246,9 +270,9 @@ class ConfigManager:
246
270
  if cls._config_instance is None:
247
271
  cls._config_instance = read_data(filepath)
248
272
  return cls._config_instance
249
-
273
+
250
274
  @classmethod
251
275
  def reset(cls):
252
276
  """Reset the configuration instance (useful for testing)."""
253
277
  cls._config_instance = None
254
- read_data.cache_clear()
278
+ read_data.cache_clear()
@@ -0,0 +1,26 @@
1
+ import typer
2
+ from .common import MockArgs
3
+ from ara_cli.ara_command_action import autofix_action
4
+
5
+
6
+ def autofix_main(
7
+ single_pass: bool = typer.Option(False, "--single-pass", help="Run the autofix once for every scanned file"),
8
+ deterministic: bool = typer.Option(False, "-d", "--deterministic", help="Run only deterministic fixes e.g Title-FileName Mismatch fix"),
9
+ non_deterministic: bool = typer.Option(False, "-nd", "--non-deterministic", help="Run only non-deterministic fixes")
10
+ ):
11
+ """Fix ARA tree with llm models for scanned artefacts with ara scan command."""
12
+ if deterministic and non_deterministic:
13
+ typer.echo("Error: --deterministic and --non-deterministic are mutually exclusive", err=True)
14
+ raise typer.Exit(1)
15
+
16
+ args = MockArgs(
17
+ single_pass=single_pass,
18
+ deterministic=deterministic,
19
+ non_deterministic=non_deterministic
20
+ )
21
+ autofix_action(args)
22
+
23
+
24
+ def register(parent: typer.Typer):
25
+ help_text = "Fix ARA tree with llm models for scanned artefacts"
26
+ parent.command(name="autofix", help=help_text)(autofix_main)
@@ -0,0 +1,27 @@
1
+ import typer
2
+ from typing import Optional, List
3
+ from .common import MockArgs, ChatNameArgument
4
+ from ara_cli.ara_command_action import chat_action
5
+
6
+
7
+ def chat_main(
8
+ chat_name: Optional[str] = ChatNameArgument("Optional name for a specific chat. Pass the .md file to continue an existing chat", None),
9
+ reset: Optional[bool] = typer.Option(None, "-r", "--reset/--no-reset", help="Reset the chat file if it exists"),
10
+ output_mode: bool = typer.Option(False, "--out", help="Output the contents of the chat file instead of entering interactive chat mode"),
11
+ append: Optional[List[str]] = typer.Option(None, "--append", help="Append strings to the chat file"),
12
+ restricted: Optional[bool] = typer.Option(None, "--restricted/--no-restricted", help="Start with a limited set of commands")
13
+ ):
14
+ """Command line chatbot. Chat control with SEND/s | RERUN/r | QUIT/q"""
15
+ args = MockArgs(
16
+ chat_name=chat_name,
17
+ reset=reset,
18
+ output_mode=output_mode,
19
+ append=append,
20
+ restricted=restricted
21
+ )
22
+ chat_action(args)
23
+
24
+
25
+ def register(parent: typer.Typer):
26
+ help_text = "Command line chatbot. Chat control with SEND/s | RERUN/r | QUIT/q"
27
+ parent.command(name="chat", help=help_text)(chat_main)