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.
- janito/agent_events.py +75 -0
- janito/cli/chat_mode/session.py +1 -0
- janito/cli/chat_mode/shell/commands/__init__.py +2 -0
- janito/cli/chat_mode/shell/commands/interactive.py +33 -0
- janito/cli/chat_mode/toolbar.py +16 -1
- janito/cli/cli_commands/list_tools.py +1 -1
- janito/cli/core/runner.py +33 -0
- janito/cli/main_cli.py +9 -0
- janito/cli/prompt_core.py +301 -257
- janito/cli/rich_terminal_reporter.py +170 -171
- janito/cli/single_shot_mode/handler.py +19 -0
- janito/llm/agent.py +65 -0
- janito/{tools/adapters/local → plugins/core/filemanager/tools}/validate_file_syntax/core.py +7 -2
- janito/plugins/core/filemanager/tools/validate_file_syntax/txt_validator.py +28 -0
- janito/plugins/manager.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/__init__.py +7 -0
- janito/{tools/adapters → plugins/tools}/local/adapter.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/ask_user.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/copy_file.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/create_directory.py +45 -2
- janito/{tools/adapters → plugins/tools}/local/create_file.py +10 -6
- janito/{tools/adapters → plugins/tools}/local/delete_text_in_file.py +2 -2
- janito/{tools/adapters → plugins/tools}/local/fetch_url.py +3 -3
- janito/{tools/adapters → plugins/tools}/local/find_files.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/get_file_outline/core.py +2 -2
- janito/{tools/adapters → plugins/tools}/local/move_file.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/open_html_in_browser.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/open_url.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/python_code_run.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/python_command_run.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/python_file_run.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/read_chart.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/read_files.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/remove_directory.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/remove_file.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/replace_text_in_file.py +2 -2
- janito/{tools/adapters → plugins/tools}/local/run_bash_command.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/run_powershell_command.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/search_text/core.py +2 -2
- janito/{tools/adapters → plugins/tools}/local/show_image.py +1 -1
- janito/{tools/adapters → plugins/tools}/local/show_image_grid.py +1 -1
- janito/plugins/tools/local/validate_file_syntax/__init__.py +1 -0
- janito/plugins/tools/local/validate_file_syntax/core.py +119 -0
- janito/plugins/tools/local/validate_file_syntax/txt_validator.py +28 -0
- janito/{tools/adapters → plugins/tools}/local/view_file.py +1 -1
- janito/tests/test_tool_adapter_case_insensitive.py +112 -0
- janito/tools/__init__.py +2 -2
- janito/tools/inspect_registry.py +1 -1
- janito/tools/tool_base.py +8 -1
- janito/tools/tools_adapter.py +514 -510
- {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/METADATA +84 -84
- {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/RECORD +77 -70
- /janito/{tools/adapters/local → plugins/core/filemanager/tools}/validate_file_syntax/__init__.py +0 -0
- /janito/{tools/adapters → plugins/tools}/__init__.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/get_file_outline/__init__.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/get_file_outline/java_outline.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/get_file_outline/markdown_outline.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/get_file_outline/python_outline.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/get_file_outline/search_outline.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/search_text/__init__.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/search_text/match_lines.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/search_text/pattern_utils.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/search_text/traverse_directory.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/css_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/html_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/jinja2_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/js_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/json_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/markdown_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/ps1_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/python_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/xml_validator.py +0 -0
- /janito/{tools/adapters → plugins/tools}/local/validate_file_syntax/yaml_validator.py +0 -0
- {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/WHEEL +0 -0
- {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/entry_points.txt +0 -0
- {janito-3.8.0.dist-info → janito-3.10.0.dist-info}/licenses/LICENSE +0 -0
- {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)
|