janito 3.8.0__py3-none-any.whl → 3.10.0__py3-none-any.whl

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 (77) hide show
  1. janito/agent_events.py +75 -0
  2. janito/cli/chat_mode/session.py +1 -0
  3. janito/cli/chat_mode/shell/commands/__init__.py +2 -0
  4. janito/cli/chat_mode/shell/commands/interactive.py +33 -0
  5. janito/cli/chat_mode/toolbar.py +16 -1
  6. janito/cli/cli_commands/list_tools.py +1 -1
  7. janito/cli/core/runner.py +33 -0
  8. janito/cli/main_cli.py +9 -0
  9. janito/cli/prompt_core.py +301 -257
  10. janito/cli/rich_terminal_reporter.py +170 -171
  11. janito/cli/single_shot_mode/handler.py +19 -0
  12. janito/llm/agent.py +65 -0
  13. janito/{tools/adapters/local → plugins/core/filemanager/tools}/validate_file_syntax/core.py +7 -2
  14. janito/plugins/core/filemanager/tools/validate_file_syntax/txt_validator.py +28 -0
  15. janito/plugins/manager.py +1 -1
  16. janito/{tools/adapters → plugins/tools}/local/__init__.py +7 -0
  17. janito/{tools/adapters → plugins/tools}/local/adapter.py +1 -1
  18. janito/{tools/adapters → plugins/tools}/local/ask_user.py +1 -1
  19. janito/{tools/adapters → plugins/tools}/local/copy_file.py +1 -1
  20. janito/{tools/adapters → plugins/tools}/local/create_directory.py +45 -2
  21. janito/{tools/adapters → plugins/tools}/local/create_file.py +10 -6
  22. janito/{tools/adapters → plugins/tools}/local/delete_text_in_file.py +2 -2
  23. janito/{tools/adapters → plugins/tools}/local/fetch_url.py +3 -3
  24. janito/{tools/adapters → plugins/tools}/local/find_files.py +1 -1
  25. janito/{tools/adapters → plugins/tools}/local/get_file_outline/core.py +2 -2
  26. janito/{tools/adapters → plugins/tools}/local/move_file.py +1 -1
  27. janito/{tools/adapters → plugins/tools}/local/open_html_in_browser.py +1 -1
  28. janito/{tools/adapters → plugins/tools}/local/open_url.py +1 -1
  29. janito/{tools/adapters → plugins/tools}/local/python_code_run.py +1 -1
  30. janito/{tools/adapters → plugins/tools}/local/python_command_run.py +1 -1
  31. janito/{tools/adapters → plugins/tools}/local/python_file_run.py +1 -1
  32. janito/{tools/adapters → plugins/tools}/local/read_chart.py +1 -1
  33. janito/{tools/adapters → plugins/tools}/local/read_files.py +1 -1
  34. janito/{tools/adapters → plugins/tools}/local/remove_directory.py +1 -1
  35. janito/{tools/adapters → plugins/tools}/local/remove_file.py +1 -1
  36. janito/{tools/adapters → plugins/tools}/local/replace_text_in_file.py +2 -2
  37. janito/{tools/adapters → plugins/tools}/local/run_bash_command.py +1 -1
  38. janito/{tools/adapters → plugins/tools}/local/run_powershell_command.py +1 -1
  39. janito/{tools/adapters → plugins/tools}/local/search_text/core.py +2 -2
  40. janito/{tools/adapters → plugins/tools}/local/show_image.py +1 -1
  41. janito/{tools/adapters → plugins/tools}/local/show_image_grid.py +1 -1
  42. janito/plugins/tools/local/validate_file_syntax/__init__.py +1 -0
  43. janito/plugins/tools/local/validate_file_syntax/core.py +119 -0
  44. janito/plugins/tools/local/validate_file_syntax/txt_validator.py +28 -0
  45. janito/{tools/adapters → plugins/tools}/local/view_file.py +1 -1
  46. janito/tests/test_tool_adapter_case_insensitive.py +112 -0
  47. janito/tools/__init__.py +2 -2
  48. janito/tools/inspect_registry.py +1 -1
  49. janito/tools/tool_base.py +8 -1
  50. janito/tools/tools_adapter.py +514 -510
  51. {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/METADATA +84 -84
  52. {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/RECORD +77 -70
  53. /janito/{tools/adapters/local → plugins/core/filemanager/tools}/validate_file_syntax/__init__.py +0 -0
  54. /janito/{tools/adapters → plugins/tools}/__init__.py +0 -0
  55. /janito/{tools/adapters → plugins/tools}/local/get_file_outline/__init__.py +0 -0
  56. /janito/{tools/adapters → plugins/tools}/local/get_file_outline/java_outline.py +0 -0
  57. /janito/{tools/adapters → plugins/tools}/local/get_file_outline/markdown_outline.py +0 -0
  58. /janito/{tools/adapters → plugins/tools}/local/get_file_outline/python_outline.py +0 -0
  59. /janito/{tools/adapters → plugins/tools}/local/get_file_outline/search_outline.py +0 -0
  60. /janito/{tools/adapters → plugins/tools}/local/search_text/__init__.py +0 -0
  61. /janito/{tools/adapters → plugins/tools}/local/search_text/match_lines.py +0 -0
  62. /janito/{tools/adapters → plugins/tools}/local/search_text/pattern_utils.py +0 -0
  63. /janito/{tools/adapters → plugins/tools}/local/search_text/traverse_directory.py +0 -0
  64. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/css_validator.py +0 -0
  65. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/html_validator.py +0 -0
  66. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/jinja2_validator.py +0 -0
  67. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/js_validator.py +0 -0
  68. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/json_validator.py +0 -0
  69. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/markdown_validator.py +0 -0
  70. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/ps1_validator.py +0 -0
  71. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/python_validator.py +0 -0
  72. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/xml_validator.py +0 -0
  73. /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/yaml_validator.py +0 -0
  74. {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/WHEEL +0 -0
  75. {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/entry_points.txt +0 -0
  76. {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/licenses/LICENSE +0 -0
  77. {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/top_level.txt +0 -0
janito/tools/tool_base.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from janito.report_events import ReportEvent, ReportSubtype, ReportAction
2
2
  from janito.event_bus.bus import event_bus as default_event_bus
3
3
 
4
-
4
+ import inspect
5
5
  from collections import namedtuple
6
6
 
7
7
 
@@ -112,3 +112,10 @@ class ToolBase:
112
112
 
113
113
  def run(self, *args, **kwargs):
114
114
  raise NotImplementedError("Subclasses must implement the run method.")
115
+
116
+ def get_signature(self):
117
+ """
118
+ Return the function signature for this tool's run method.
119
+ This is used for introspection and validation.
120
+ """
121
+ return inspect.signature(self.run)