janito 1.14.3__py3-none-any.whl → 2.0.1__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 (283) hide show
  1. janito/__init__.py +6 -1
  2. janito/__main__.py +1 -1
  3. janito/agent/setup_agent.py +139 -0
  4. janito/agent/templates/profiles/{system_prompt_template_base.txt.j2 → system_prompt_template_main.txt.j2} +1 -1
  5. janito/cli/__init__.py +9 -0
  6. janito/cli/chat_mode/bindings.py +37 -0
  7. janito/cli/chat_mode/chat_entry.py +23 -0
  8. janito/cli/chat_mode/prompt_style.py +19 -0
  9. janito/cli/chat_mode/session.py +272 -0
  10. janito/{shell/prompt/completer.py → cli/chat_mode/shell/autocomplete.py} +7 -6
  11. janito/cli/chat_mode/shell/commands/__init__.py +55 -0
  12. janito/cli/chat_mode/shell/commands/base.py +9 -0
  13. janito/cli/chat_mode/shell/commands/clear.py +12 -0
  14. janito/{shell → cli/chat_mode/shell}/commands/conversation_restart.py +34 -30
  15. janito/cli/chat_mode/shell/commands/edit.py +25 -0
  16. janito/cli/chat_mode/shell/commands/help.py +16 -0
  17. janito/cli/chat_mode/shell/commands/history_view.py +93 -0
  18. janito/cli/chat_mode/shell/commands/lang.py +25 -0
  19. janito/cli/chat_mode/shell/commands/last.py +137 -0
  20. janito/cli/chat_mode/shell/commands/livelogs.py +49 -0
  21. janito/cli/chat_mode/shell/commands/multi.py +51 -0
  22. janito/cli/chat_mode/shell/commands/prompt.py +64 -0
  23. janito/cli/chat_mode/shell/commands/role.py +36 -0
  24. janito/cli/chat_mode/shell/commands/session.py +40 -0
  25. janito/{shell → cli/chat_mode/shell}/commands/session_control.py +2 -2
  26. janito/cli/chat_mode/shell/commands/termweb_log.py +92 -0
  27. janito/cli/chat_mode/shell/commands/tools.py +32 -0
  28. janito/{shell → cli/chat_mode/shell}/commands/utility.py +4 -7
  29. janito/{shell → cli/chat_mode/shell}/commands/verbose.py +5 -5
  30. janito/cli/chat_mode/shell/session/__init__.py +1 -0
  31. janito/{shell → cli/chat_mode/shell}/session/manager.py +9 -1
  32. janito/cli/chat_mode/toolbar.py +90 -0
  33. janito/cli/cli_commands/list_models.py +35 -0
  34. janito/cli/cli_commands/list_providers.py +9 -0
  35. janito/cli/cli_commands/list_tools.py +53 -0
  36. janito/cli/cli_commands/model_selection.py +50 -0
  37. janito/cli/cli_commands/model_utils.py +84 -0
  38. janito/cli/cli_commands/set_api_key.py +19 -0
  39. janito/cli/cli_commands/show_config.py +51 -0
  40. janito/cli/cli_commands/show_system_prompt.py +62 -0
  41. janito/cli/config.py +28 -0
  42. janito/cli/console.py +3 -0
  43. janito/cli/core/__init__.py +4 -0
  44. janito/cli/core/event_logger.py +59 -0
  45. janito/cli/core/getters.py +31 -0
  46. janito/cli/core/runner.py +141 -0
  47. janito/cli/core/setters.py +174 -0
  48. janito/cli/core/unsetters.py +54 -0
  49. janito/cli/main.py +8 -196
  50. janito/cli/main_cli.py +312 -0
  51. janito/cli/prompt_core.py +230 -0
  52. janito/cli/prompt_handler.py +6 -0
  53. janito/cli/rich_terminal_reporter.py +101 -0
  54. janito/cli/single_shot_mode/__init__.py +6 -0
  55. janito/cli/single_shot_mode/handler.py +137 -0
  56. janito/cli/termweb_starter.py +73 -24
  57. janito/cli/utils.py +25 -0
  58. janito/cli/verbose_output.py +196 -0
  59. janito/config.py +5 -0
  60. janito/config_manager.py +110 -0
  61. janito/conversation_history.py +30 -0
  62. janito/{agent/tools_utils/dir_walk_utils.py → dir_walk_utils.py} +3 -2
  63. janito/driver_events.py +98 -0
  64. janito/drivers/anthropic/driver.py +113 -0
  65. janito/drivers/azure_openai/driver.py +36 -0
  66. janito/drivers/driver_registry.py +33 -0
  67. janito/drivers/google_genai/driver.py +54 -0
  68. janito/drivers/google_genai/schema_generator.py +67 -0
  69. janito/drivers/mistralai/driver.py +41 -0
  70. janito/drivers/openai/driver.py +334 -0
  71. janito/event_bus/__init__.py +2 -0
  72. janito/event_bus/bus.py +68 -0
  73. janito/event_bus/event.py +15 -0
  74. janito/event_bus/handler.py +31 -0
  75. janito/event_bus/queue_bus.py +57 -0
  76. janito/exceptions.py +23 -0
  77. janito/formatting_token.py +54 -0
  78. janito/i18n/pt.py +1 -0
  79. janito/llm/__init__.py +5 -0
  80. janito/llm/agent.py +443 -0
  81. janito/llm/auth.py +62 -0
  82. janito/llm/driver.py +239 -0
  83. janito/llm/driver_config.py +34 -0
  84. janito/llm/driver_config_builder.py +34 -0
  85. janito/llm/driver_input.py +12 -0
  86. janito/llm/message_parts.py +60 -0
  87. janito/llm/model.py +38 -0
  88. janito/llm/provider.py +187 -0
  89. janito/perf_singleton.py +3 -0
  90. janito/performance_collector.py +167 -0
  91. janito/provider_config.py +98 -0
  92. janito/provider_registry.py +152 -0
  93. janito/providers/__init__.py +7 -0
  94. janito/providers/anthropic/model_info.py +22 -0
  95. janito/providers/anthropic/provider.py +65 -0
  96. janito/providers/azure_openai/model_info.py +15 -0
  97. janito/providers/azure_openai/provider.py +72 -0
  98. janito/providers/deepseek/__init__.py +1 -0
  99. janito/providers/deepseek/model_info.py +16 -0
  100. janito/providers/deepseek/provider.py +91 -0
  101. janito/providers/google/__init__.py +1 -0
  102. janito/providers/google/model_info.py +40 -0
  103. janito/providers/google/provider.py +69 -0
  104. janito/providers/mistralai/model_info.py +37 -0
  105. janito/providers/mistralai/provider.py +69 -0
  106. janito/providers/openai/__init__.py +1 -0
  107. janito/providers/openai/model_info.py +137 -0
  108. janito/providers/openai/provider.py +107 -0
  109. janito/providers/openai/schema_generator.py +63 -0
  110. janito/providers/provider_static_info.py +21 -0
  111. janito/providers/registry.py +26 -0
  112. janito/report_events.py +38 -0
  113. janito/termweb/app.py +1 -1
  114. janito/tools/__init__.py +16 -0
  115. janito/tools/adapters/__init__.py +1 -0
  116. janito/tools/adapters/local/__init__.py +54 -0
  117. janito/tools/adapters/local/adapter.py +92 -0
  118. janito/{agent/tools → tools/adapters/local}/ask_user.py +30 -13
  119. janito/tools/adapters/local/copy_file.py +84 -0
  120. janito/{agent/tools → tools/adapters/local}/create_directory.py +11 -10
  121. janito/tools/adapters/local/create_file.py +82 -0
  122. janito/tools/adapters/local/delete_text_in_file.py +136 -0
  123. janito/{agent/tools → tools/adapters/local}/fetch_url.py +18 -19
  124. janito/tools/adapters/local/find_files.py +140 -0
  125. janito/tools/adapters/local/get_file_outline/core.py +151 -0
  126. janito/{agent/tools → tools/adapters/local}/get_file_outline/python_outline.py +125 -0
  127. janito/tools/adapters/local/get_file_outline/python_outline_v2.py +156 -0
  128. janito/{agent/tools → tools/adapters/local}/get_file_outline/search_outline.py +12 -7
  129. janito/{agent/tools → tools/adapters/local}/move_file.py +13 -9
  130. janito/tools/adapters/local/open_html_in_browser.py +34 -0
  131. janito/{agent/tools → tools/adapters/local}/open_url.py +7 -5
  132. janito/tools/adapters/local/python_code_run.py +165 -0
  133. janito/tools/adapters/local/python_command_run.py +163 -0
  134. janito/tools/adapters/local/python_file_run.py +162 -0
  135. janito/{agent/tools → tools/adapters/local}/remove_directory.py +15 -9
  136. janito/{agent/tools → tools/adapters/local}/remove_file.py +17 -14
  137. janito/{agent/tools → tools/adapters/local}/replace_text_in_file.py +27 -22
  138. janito/tools/adapters/local/run_bash_command.py +176 -0
  139. janito/tools/adapters/local/run_powershell_command.py +219 -0
  140. janito/{agent/tools → tools/adapters/local}/search_text/core.py +32 -12
  141. janito/{agent/tools → tools/adapters/local}/search_text/match_lines.py +13 -4
  142. janito/{agent/tools → tools/adapters/local}/search_text/pattern_utils.py +12 -4
  143. janito/{agent/tools → tools/adapters/local}/search_text/traverse_directory.py +15 -2
  144. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/core.py +12 -11
  145. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/css_validator.py +1 -1
  146. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/html_validator.py +1 -1
  147. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/js_validator.py +1 -1
  148. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/json_validator.py +1 -1
  149. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/markdown_validator.py +1 -1
  150. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/ps1_validator.py +1 -1
  151. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/python_validator.py +1 -1
  152. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/xml_validator.py +1 -1
  153. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/yaml_validator.py +1 -1
  154. janito/{agent/tools/get_lines.py → tools/adapters/local/view_file.py} +45 -27
  155. janito/tools/inspect_registry.py +17 -0
  156. janito/tools/tool_base.py +105 -0
  157. janito/tools/tool_events.py +58 -0
  158. janito/tools/tool_run_exception.py +12 -0
  159. janito/{agent → tools}/tool_use_tracker.py +2 -4
  160. janito/{agent/tools_utils/utils.py → tools/tool_utils.py} +18 -9
  161. janito/tools/tools_adapter.py +207 -0
  162. janito/tools/tools_schema.py +104 -0
  163. janito/utils.py +11 -0
  164. janito/version.py +4 -0
  165. janito-2.0.1.dist-info/METADATA +232 -0
  166. janito-2.0.1.dist-info/RECORD +181 -0
  167. janito/agent/__init__.py +0 -0
  168. janito/agent/api_exceptions.py +0 -4
  169. janito/agent/config.py +0 -147
  170. janito/agent/config_defaults.py +0 -12
  171. janito/agent/config_utils.py +0 -0
  172. janito/agent/content_handler.py +0 -0
  173. janito/agent/conversation.py +0 -238
  174. janito/agent/conversation_api.py +0 -306
  175. janito/agent/conversation_exceptions.py +0 -18
  176. janito/agent/conversation_tool_calls.py +0 -39
  177. janito/agent/conversation_ui.py +0 -17
  178. janito/agent/event.py +0 -24
  179. janito/agent/event_dispatcher.py +0 -24
  180. janito/agent/event_handler_protocol.py +0 -5
  181. janito/agent/event_system.py +0 -15
  182. janito/agent/llm_conversation_history.py +0 -82
  183. janito/agent/message_handler.py +0 -20
  184. janito/agent/message_handler_protocol.py +0 -5
  185. janito/agent/openai_client.py +0 -149
  186. janito/agent/openai_schema_generator.py +0 -187
  187. janito/agent/profile_manager.py +0 -96
  188. janito/agent/queued_message_handler.py +0 -50
  189. janito/agent/rich_live.py +0 -32
  190. janito/agent/rich_message_handler.py +0 -115
  191. janito/agent/runtime_config.py +0 -36
  192. janito/agent/test_handler_protocols.py +0 -47
  193. janito/agent/test_openai_schema_generator.py +0 -93
  194. janito/agent/tests/__init__.py +0 -1
  195. janito/agent/tool_base.py +0 -63
  196. janito/agent/tool_executor.py +0 -122
  197. janito/agent/tool_registry.py +0 -49
  198. janito/agent/tools/__init__.py +0 -47
  199. janito/agent/tools/create_file.py +0 -59
  200. janito/agent/tools/delete_text_in_file.py +0 -97
  201. janito/agent/tools/find_files.py +0 -106
  202. janito/agent/tools/get_file_outline/core.py +0 -81
  203. janito/agent/tools/present_choices.py +0 -64
  204. janito/agent/tools/python_command_runner.py +0 -201
  205. janito/agent/tools/python_file_runner.py +0 -199
  206. janito/agent/tools/python_stdin_runner.py +0 -208
  207. janito/agent/tools/replace_file.py +0 -72
  208. janito/agent/tools/run_bash_command.py +0 -218
  209. janito/agent/tools/run_powershell_command.py +0 -251
  210. janito/agent/tools_utils/__init__.py +0 -1
  211. janito/agent/tools_utils/action_type.py +0 -7
  212. janito/agent/tools_utils/test_gitignore_utils.py +0 -46
  213. janito/cli/_livereload_log_utils.py +0 -13
  214. janito/cli/_print_config.py +0 -96
  215. janito/cli/_termweb_log_utils.py +0 -17
  216. janito/cli/_utils.py +0 -9
  217. janito/cli/arg_parser.py +0 -272
  218. janito/cli/cli_main.py +0 -281
  219. janito/cli/config_commands.py +0 -211
  220. janito/cli/config_runner.py +0 -35
  221. janito/cli/formatting_runner.py +0 -12
  222. janito/cli/livereload_starter.py +0 -60
  223. janito/cli/logging_setup.py +0 -38
  224. janito/cli/one_shot.py +0 -80
  225. janito/livereload/app.py +0 -25
  226. janito/rich_utils.py +0 -59
  227. janito/shell/__init__.py +0 -0
  228. janito/shell/commands/__init__.py +0 -61
  229. janito/shell/commands/config.py +0 -22
  230. janito/shell/commands/edit.py +0 -24
  231. janito/shell/commands/history_view.py +0 -18
  232. janito/shell/commands/lang.py +0 -19
  233. janito/shell/commands/livelogs.py +0 -42
  234. janito/shell/commands/prompt.py +0 -62
  235. janito/shell/commands/termweb_log.py +0 -94
  236. janito/shell/commands/tools.py +0 -26
  237. janito/shell/commands/track.py +0 -36
  238. janito/shell/main.py +0 -326
  239. janito/shell/prompt/load_prompt.py +0 -57
  240. janito/shell/prompt/session_setup.py +0 -57
  241. janito/shell/session/config.py +0 -109
  242. janito/shell/session/history.py +0 -0
  243. janito/shell/ui/interactive.py +0 -226
  244. janito/termweb/static/editor.css +0 -158
  245. janito/termweb/static/editor.css.bak +0 -145
  246. janito/termweb/static/editor.html +0 -46
  247. janito/termweb/static/editor.html.bak +0 -46
  248. janito/termweb/static/editor.js +0 -265
  249. janito/termweb/static/editor.js.bak +0 -259
  250. janito/termweb/static/explorer.html.bak +0 -59
  251. janito/termweb/static/favicon.ico +0 -0
  252. janito/termweb/static/favicon.ico.bak +0 -0
  253. janito/termweb/static/index.html +0 -53
  254. janito/termweb/static/index.html.bak +0 -54
  255. janito/termweb/static/index.html.bak.bak +0 -175
  256. janito/termweb/static/landing.html.bak +0 -36
  257. janito/termweb/static/termicon.svg +0 -1
  258. janito/termweb/static/termweb.css +0 -214
  259. janito/termweb/static/termweb.css.bak +0 -237
  260. janito/termweb/static/termweb.js +0 -162
  261. janito/termweb/static/termweb.js.bak +0 -168
  262. janito/termweb/static/termweb.js.bak.bak +0 -157
  263. janito/termweb/static/termweb_quickopen.js +0 -135
  264. janito/termweb/static/termweb_quickopen.js.bak +0 -125
  265. janito/tests/test_rich_utils.py +0 -44
  266. janito/web/__init__.py +0 -0
  267. janito/web/__main__.py +0 -25
  268. janito/web/app.py +0 -145
  269. janito-1.14.3.dist-info/METADATA +0 -313
  270. janito-1.14.3.dist-info/RECORD +0 -162
  271. janito-1.14.3.dist-info/licenses/LICENSE +0 -21
  272. /janito/{shell → cli/chat_mode/shell}/input_history.py +0 -0
  273. /janito/{shell/commands/session.py → cli/chat_mode/shell/session/history.py} +0 -0
  274. /janito/{agent/tools_utils/formatting.py → formatting.py} +0 -0
  275. /janito/{agent/tools_utils/gitignore_utils.py → gitignore_utils.py} +0 -0
  276. /janito/{agent/platform_discovery.py → platform_discovery.py} +0 -0
  277. /janito/{agent/tools → tools/adapters/local}/get_file_outline/__init__.py +0 -0
  278. /janito/{agent/tools → tools/adapters/local}/get_file_outline/markdown_outline.py +0 -0
  279. /janito/{agent/tools → tools/adapters/local}/search_text/__init__.py +0 -0
  280. /janito/{agent/tools → tools/adapters/local}/validate_file_syntax/__init__.py +0 -0
  281. {janito-1.14.3.dist-info → janito-2.0.1.dist-info}/WHEEL +0 -0
  282. {janito-1.14.3.dist-info → janito-2.0.1.dist-info}/entry_points.txt +0 -0
  283. {janito-1.14.3.dist-info → janito-2.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,232 @@
1
+ Metadata-Version: 2.4
2
+ Name: janito
3
+ Version: 2.0.1
4
+ Summary: A new Python package called janito.
5
+ Author-email: Your Name <your.email@example.com>
6
+ Project-URL: Homepage, https://github.com/janito-dev/janito
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+
10
+ # Janito
11
+
12
+ Janito is a command-line interface (CLI) tool for managing and interacting with Large Language Model (LLM) providers. It enables you to configure API keys, select providers and models, and submit prompts to various LLMs from your terminal. Janito is designed for extensibility, supporting multiple providers and a wide range of tools for automation and productivity.
13
+
14
+ ## Features
15
+
16
+ - 🔑 Manage API keys and provider configurations
17
+ - 🤖 Interact with multiple LLM providers (OpenAI, Google, Mistral, , and more)
18
+ - 🛠️ List and use a variety of registered tools
19
+ - 📝 Submit prompts and receive responses directly from the CLI
20
+ - 📋 List available models for each provider
21
+ - 🧩 Extensible architecture for adding new providers and tools
22
+ - 🎛️ Rich terminal output and event logging
23
+
24
+ ### Advanced and Architectural Features
25
+
26
+ - ⚡ **Event-driven architecture**: Modular, decoupled system using a custom EventBus for extensibility and integration.
27
+ - 🧑‍💻 **Tool registry & dynamic tool execution**: Register new tools easily, execute them by name or call from automation pipelines.
28
+ - 🤖 **LLM Agent automation**: Supports agent-like workflows with the ability to chain tools or make decisions during LLM conversations.
29
+ - 🏗️ **Extensible provider management**: Add, configure, or switch between LLM providers and their models on the fly.
30
+ - 🧰 **Rich tool ecosystem**: Includes file operations, local/remote script and command execution, text processing, and internet access (fetching URLs), all reusable by LLM or user.
31
+ - 📝 **Comprehensive event & history reporting**: Detailed logs of prompts, events, tool usage, and responses for traceability and audit.
32
+ - 🖥️ **Enhanced terminal UI**: Colorful, informative real-time outputs and logs to improve productivity and insight during LLM usage.
33
+
34
+ ## Installation
35
+
36
+ Janito is a Python package. Since this is a development version, install it directly from GitHub:
37
+
38
+ ```bash
39
+ pip install git+https://github.com/janito-dev/janito.git
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ After installation, use the `janito` command in your terminal.
45
+
46
+ ### Basic Commands
47
+
48
+ - **Set API Key for a Provider (requires -p PROVIDER)**
49
+ ```bash
50
+ janito --set-api-key API_KEY -p PROVIDER
51
+ ```
52
+ > **Note:** The `-p PROVIDER` argument is required when setting an API key. For example:
53
+ > ```bash
54
+ > janito --set-api-key sk-xxxxxxx -p openai
55
+ > ```
56
+
57
+ - **Set the Provider**
58
+ ```bash
59
+ janito --set provider=provider_name
60
+ ```
61
+
62
+ - **List Supported Providers**
63
+ ```bash
64
+ janito --list-providers
65
+ ```
66
+
67
+ - **List Registered Tools**
68
+ ```bash
69
+ janito --list-tools
70
+ ```
71
+
72
+ - **List Models for a Provider**
73
+ ```bash
74
+ janito -p PROVIDER --list-models
75
+ ```
76
+
77
+ - **Submit a Prompt**
78
+ ```bash
79
+ janito "What is the capital of France?"
80
+ ```
81
+
82
+ - **Start Interactive Chat Shell**
83
+ ```bash
84
+ janito
85
+ ```
86
+
87
+ ### Advanced Options
88
+
89
+ - **Enable Inline Web File Viewer for Clickable Links**
90
+
91
+ By default, Janito can open referenced files in a browser-based viewer when you click on file links in supported terminals. To enable this feature for your session, use the `-w` or `--web` flag:
92
+
93
+ ```bash
94
+ janito -w
95
+ ```
96
+ This starts the lightweight web file viewer (termweb) in the background, allowing you to inspect files referenced in responses directly in your browser. Combine with interactive mode or prompts as needed.
97
+
98
+ > **Tip:** Use with the interactive shell for the best experience with clickable file links.
99
+
100
+
101
+ - **Enable Execution Tools (Code/Shell Execution)**
102
+
103
+ By default, tools that can execute code or shell commands are **disabled** for safety. To enable these tools (such as code execution, shell commands, etc.), use the `--exec` or `-x` flag:
104
+
105
+ ```bash
106
+ janito -x "Run this code: print('Hello, world!')"
107
+ ```
108
+ > **Warning:** Enabling execution tools allows running arbitrary code or shell commands. Only use `--exec` if you trust your prompt and environment.
109
+
110
+ - **Set a System Prompt**
111
+ ```bash
112
+ janito -s path/to/system_prompt.txt "Your prompt here"
113
+ ```
114
+
115
+ - **Select Model and Provider Temporarily**
116
+ ```bash
117
+ janito -p openai -m gpt-3.5-turbo "Your prompt here"
118
+ ```
119
+
120
+ - **Set Provider-Specific Config (for the selected provider)**
121
+ ```bash
122
+ # syntax: janito --set PROVIDER.KEY=VALUE
123
+ # example: set the default model for openai provider
124
+ janito --set openai.model=gpt-4o
125
+
126
+ ```
127
+ > **Note:** Use `--set PROVIDER.key=value` for provider-specific settings (e.g., `openai.max_tokens`, `openai.base_url`).
128
+
129
+ - **Enable Event Logging**
130
+ ```bash
131
+ janito -e "Your prompt here"
132
+ ```
133
+
134
+ ## 🌟 CLI Options Reference
135
+
136
+ ### Core CLI Options
137
+ | Option | Description |
138
+ |------------------------|-----------------------------------------------------------------------------|
139
+ | `-w`, `--web` | Enable the builtin lightweight web file viewer for clickable file links (termweb). |
140
+
141
+ |------------------------|-----------------------------------------------------------------------------|
142
+ | `--version` | Show program version |
143
+ | `--list-tools` | List all registered tools |
144
+ | `--list-providers` | List all supported LLM providers |
145
+ | `-l`, `--list-models` | List models for current/selected provider |
146
+ | `--set-api-key` | Set API key for a provider. **Requires** `-p PROVIDER` to specify the provider. |
147
+ | `--set provider=name` | Set the current LLM provider (e.g., `janito --set provider=openai`) |
148
+ | `--set PROVIDER.model=MODEL` or `--set model=MODEL` | Set the default model for the current/selected provider, or globally. (e.g., `janito --set openai.model=gpt-3.5-turbo`) |
149
+ | `-s`, `--system` | Set a system prompt (e.g., `janito -s path/to/system_prompt.txt "Your prompt here"`) |
150
+ | `-r`, `--role` | Set the role for the agent (overrides config) (e.g., `janito -r "assistant" "Your prompt here"`) |
151
+ | `-p`, `--provider` | Select LLM provider (overrides config) (e.g., `janito -p openai "Your prompt here"`) |
152
+ | `-m`, `--model` | Select model for the provider (e.g., `janito -m gpt-3.5-turbo "Your prompt here"`) |
153
+ | `-v`, `--verbose` | Print extra information before answering |
154
+ | `-R`, `--raw` | Print raw JSON response from API |
155
+ | `-e`, `--event-log` | Log events to console as they occur |
156
+ | `["user_prompt"]...` | Prompt to submit (if no other command is used) (e.g., `janito "What is the capital of France?"`) |
157
+
158
+ ### 🧩 Extended Chat Mode Commands
159
+ Once inside the interactive chat mode, you can use these slash commands:
160
+
161
+ #### 📲 Basic Interaction
162
+ | Command | Description |
163
+ |-------------------|----------------------------------------------|
164
+ | `/exit` or `exit` | Exit chat mode |
165
+ | `/help` | Show available commands |
166
+ | `/multi` | Activate multiline input mode |
167
+ | `/clear` | Clear the terminal screen |
168
+ | `/history` | Show input history |
169
+ | `/view` | Print current conversation history |
170
+ | `/track` | Show tool usage history |
171
+
172
+ #### 💬 Conversation Management
173
+ | Command | Description |
174
+ |---------------------|----------------------------------------------|
175
+ | `/restart` or `/start` | Start a new conversation (reset context) |
176
+ | `/prompt` | Show the current system prompt |
177
+ | `/role <description>` | Change the system role |
178
+ | `/lang [code]` | Change interface language (e.g., `/lang en`) |
179
+
180
+ #### 🛠️ Tool & Provider Interaction
181
+ | Command | Description |
182
+ |----------------------|----------------------------------------------|
183
+ | `/tools` | List available tools |
184
+ | `/termweb-status` | Show status of termweb server |
185
+ | `/termweb-logs` | Show last lines of termweb logs |
186
+ | `/livelogs` | Show live updates from server log file |
187
+ | `/edit <filename>` | Open file in browser-based editor |
188
+
189
+ #### 📊 Output Control
190
+ | Command | Description |
191
+ |---------------------|----------------------------------------------|
192
+ | `/verbose` | Show current verbose mode status |
193
+ | `/verbose [on|off]` | Set verbose mode |
194
+
195
+ ## Extending Janito
196
+
197
+ Janito is built to be extensible. You can add new LLM providers or tools by implementing new modules in the `janito/providers` or `janito/tools` directories, respectively. See the source code and developer documentation for more details.
198
+
199
+ ## Supported Providers
200
+
201
+ - OpenAI
202
+ - DeepSeek
203
+
204
+ ## Contributing
205
+
206
+ Contributions are welcome! Please see the `CONTRIBUTING.md` (if available) or open an issue to get started.
207
+
208
+ ## License
209
+
210
+ This project is licensed under the terms of the MIT license.
211
+
212
+ For more information, see the documentation in the `docs/` directory or run `janito --help`.
213
+
214
+ ---
215
+
216
+ ## 📖 Detailed Documentation
217
+
218
+ Full and up-to-date documentation is available at: https://janito-dev.github.io/janito/
219
+
220
+ ---
221
+
222
+ ## FAQ: Setting API Keys
223
+
224
+ To set an API key for a provider, you **must** specify both the API key and the provider name:
225
+
226
+ ```bash
227
+ janito --set-api-key YOUR_API_KEY -p PROVIDER_NAME
228
+ ```
229
+
230
+ Replace `YOUR_API_KEY` with your actual key and `PROVIDER_NAME` with the provider (e.g., `openai`, `google`, etc.).
231
+
232
+ If you omit the `-p PROVIDER_NAME` argument, Janito will show an error and not set the key.
@@ -0,0 +1,181 @@
1
+ janito/__init__.py,sha256=Paiw3iaN7CdfA6fcBbBRvDysz6F16K5cEHEtpD8MWhw,232
2
+ janito/__main__.py,sha256=lPQ8kAyYfyeS1KopmJ8EVY5g1YswlIqCS615mM_B_rM,70
3
+ janito/config.py,sha256=HJh0CmZEx7AbMQOmFkiYHFNzc-fO7fqpZ9rh6RenxK8,201
4
+ janito/config_manager.py,sha256=bbviXlbrSyQSVsYjcNo--ZLr_jFuAVL6ntuuWrvHbjs,4297
5
+ janito/conversation_history.py,sha256=GqqEJElTVONzOMRe-9g25WCMcDi0PF7DOnqGWLTrY_8,897
6
+ janito/dir_walk_utils.py,sha256=ON9EyVH7Aaik8WtCH5z8DQis9ycdoNVkjNvU16HH498,1193
7
+ janito/driver_events.py,sha256=bDsrPd69kfcN0pQHA3w3RxEystFQhylUqLBEQLvB8VI,2759
8
+ janito/exceptions.py,sha256=l4AepRdWwAuLp5fUygrBBgO9rpwgfV6JvY1afOdq2pw,913
9
+ janito/formatting.py,sha256=SMvOmL6bst3KGcI7OLa5D4DE127fQYuHZS3oY8OPsn8,2031
10
+ janito/formatting_token.py,sha256=J810eUoXhtM73fIAkgAcl_oN2WhdUs6A06lDX75mnmg,1965
11
+ janito/gitignore_utils.py,sha256=P3iF9fMWAomqULq2xsoqHtI9uNIFSPcagljrxZshmLw,4110
12
+ janito/perf_singleton.py,sha256=g1h0Sdf4ydzegeEpJlMhQt4H0GQZ2hryXrdYOTL-b30,113
13
+ janito/performance_collector.py,sha256=RYu4av16Trj3RljJZ8-2Gbn1KlGdJUosrcVFYtwviNI,6285
14
+ janito/platform_discovery.py,sha256=JN3kC7hkxdvuj-AyrJTlbbDJjtNHke3fdlZDqGi_uz0,4621
15
+ janito/provider_config.py,sha256=dzYvxWg3Smjt9Jbkw0CNdXmBMwSTgoFTOAajdPL2w5w,3048
16
+ janito/provider_registry.py,sha256=Heg6Kq59ObBLcTHvQc8VrTn6I0glzRmELjdsT5Y69mk,6411
17
+ janito/report_events.py,sha256=q4OR_jTZNfcqaQF_fzTjgqo6_VlUIxSGWfhpT4nJWcw,938
18
+ janito/utils.py,sha256=eXSsMgM69YyzahgCNrJQLcEbB8ssLI1MQqaa20ONxbE,376
19
+ janito/version.py,sha256=ChQLkZ0LA3_BuBG8dvtkUit-Y1vd1NJBpuqITTrYxy8,108
20
+ janito/agent/setup_agent.py,sha256=4TdZeutRKsjjWx5qIqEId4VY1rUUXED8XiWKdY1n4ac,4940
21
+ janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2,sha256=FX8piXbR9XNOEKkOSMt4ieZ2wn5fzQlffeQFf8d7gIc,723
22
+ janito/agent/templates/profiles/system_prompt_template_main.txt.j2,sha256=1MRFx_NRXAoBWFq_2c-CXGUCuWwmlGGcnbdpWv9x0pQ,2497
23
+ janito/cli/__init__.py,sha256=xaPDOrWphBbCR63Xpcx_yfpXSJIlCaaICc4j2qpWqrM,194
24
+ janito/cli/config.py,sha256=OkjcGqM_I2pjuKJm9LmvEqqOGTAP23Zuk_JZyNsoZSU,1140
25
+ janito/cli/console.py,sha256=gJolqzWL7jEPLxeuH-CwBDRFpXt976KdZOEAB2tdBDs,64
26
+ janito/cli/main.py,sha256=s5odou0txf8pzTf1ADk2yV7T5m8B6cejJ81e7iu776U,312
27
+ janito/cli/main_cli.py,sha256=3uf-bq9yks1k8bEfyfn7RDkrXsrYwC4ASxDujmqjmdQ,10602
28
+ janito/cli/prompt_core.py,sha256=hss97xsNhx3YSrvgU0p9RanNRgRGZeomHEzOOXdrmew,10423
29
+ janito/cli/prompt_handler.py,sha256=SnPTlL64noeAMGlI08VBDD5IDD8jlVMIYA4-fS8zVLg,215
30
+ janito/cli/rich_terminal_reporter.py,sha256=cMi_e6uBMMk9DqGHeMEbWdqiuIoPn-5f1abB3WLWIts,4265
31
+ janito/cli/termweb_starter.py,sha256=2Gr3yqSVydMWhoHUgNCtd7yviRi8uaatDtcGTpJL1Qc,5033
32
+ janito/cli/utils.py,sha256=plCQiDKIf3V8mFhhX5H9-MF2W86i-xRdWf8Xi117Z0w,677
33
+ janito/cli/verbose_output.py,sha256=NvQCCEEEiTNiat_eJbcK1SFHl7Fc1P01KuZNmvljIMo,7398
34
+ janito/cli/chat_mode/bindings.py,sha256=hj6KXw81-Dt80lu4MR-l5h6Olui29E20fEmiktw_c-Y,906
35
+ janito/cli/chat_mode/chat_entry.py,sha256=Rdaq7-3OHtro2ncUOPHXZOLpOoKPRJnoz7Jqr8_fuDQ,604
36
+ janito/cli/chat_mode/prompt_style.py,sha256=-viZYJgjGID6kR9toz6HtzIkIxGOCG28xNqiiD2MwX0,640
37
+ janito/cli/chat_mode/session.py,sha256=C8016U66s_cQKw6ueNlhOeMAkLVcGOO6GkwCvzxyvVg,11528
38
+ janito/cli/chat_mode/toolbar.py,sha256=jH0sFpOegBzc6ggtcHZjfafv8v7NTDCjIZTgQhpKGL0,3567
39
+ janito/cli/chat_mode/shell/autocomplete.py,sha256=lE68MaVaodbA2VfUM0_YLqQVLBJAE_BJsd5cMtwuD-g,793
40
+ janito/cli/chat_mode/shell/input_history.py,sha256=JedB9TQoRf31l2XGadeQtyx1qAAFPLRyXSvMLltRwZE,2542
41
+ janito/cli/chat_mode/shell/commands/__init__.py,sha256=VuAGBsh0o9WYhhHa_GhmHioCLFBjVDNPQZTEvQ9UmZU,2023
42
+ janito/cli/chat_mode/shell/commands/base.py,sha256=I6-SVOcRd7q4PpoutLdrbhbqeUpJic2oyPhOSMgMihA,288
43
+ janito/cli/chat_mode/shell/commands/clear.py,sha256=wYEHGYcAohUoCJlbEhiXKfDbJvuzAVK4e9uirskIllw,422
44
+ janito/cli/chat_mode/shell/commands/conversation_restart.py,sha256=2YH_BkU0200liuZAKO6YZULrzB0i15wWWahuA_QODgw,2905
45
+ janito/cli/chat_mode/shell/commands/edit.py,sha256=OU3BmJEgslTmazCYo23XCIT99hhzscinjoqVMg_VH3E,892
46
+ janito/cli/chat_mode/shell/commands/help.py,sha256=Oa1oJ-Ea9uR6b57gwv7dVKKNRTFHyupahhOVh-P4rk8,633
47
+ janito/cli/chat_mode/shell/commands/history_view.py,sha256=9dyxYpDHjT77LEIikjBQA03Ep3P2AmKXUwUnVsG0OQc,3584
48
+ janito/cli/chat_mode/shell/commands/lang.py,sha256=uIelDs3gPYDZ9X9gw7iDMmiwefT7TiBo32420pq2tW8,837
49
+ janito/cli/chat_mode/shell/commands/last.py,sha256=UU7VIH7NCO-Vbm8Z5vIYm8PyizKKBAY6VJok_SZXxgU,3904
50
+ janito/cli/chat_mode/shell/commands/livelogs.py,sha256=uJI14qyubXEz8m0Cajd-vURPYxC__7p_CNCq6PVOHN0,2142
51
+ janito/cli/chat_mode/shell/commands/multi.py,sha256=HAAk0fAO3n8KFta3I4hT_scOAlz4SxWDyaNBUJBQ4nc,1985
52
+ janito/cli/chat_mode/shell/commands/prompt.py,sha256=x9S3mOpplpR5aiy5b8LSIsZEEFGenQtPGK6HxYdwx1Y,2448
53
+ janito/cli/chat_mode/shell/commands/role.py,sha256=7A2S2wzE6lcv1rg4iLGH8vVy-TnzRE0Tn_wPRhBHLpY,1474
54
+ janito/cli/chat_mode/shell/commands/session.py,sha256=9wsw5U24-KJgTT70KAwnGuS8MVPyvpxCJfAt_Io76O0,1574
55
+ janito/cli/chat_mode/shell/commands/session_control.py,sha256=tmMGJ8IvWoBwSIJu7T6GPnFYFrmXWIG2Gr9tTni4y3U,1307
56
+ janito/cli/chat_mode/shell/commands/termweb_log.py,sha256=W2586JMBwMKNlsgdgACQYIy_1oTOxjjckzRQwJBreXM,3853
57
+ janito/cli/chat_mode/shell/commands/tools.py,sha256=lnIm5RhvI7wzPjm_GcgXIzmPg6o-6ovT-wT6ISGFN80,1546
58
+ janito/cli/chat_mode/shell/commands/utility.py,sha256=K982P-UwgPLzpEvSuSBGwiQ3zC34S_6T2ork_djweQw,847
59
+ janito/cli/chat_mode/shell/commands/verbose.py,sha256=HDTe0NhdcjBuhh-eJSW8iLPDeeBO95K5iSDAMAljxa4,953
60
+ janito/cli/chat_mode/shell/session/__init__.py,sha256=uTYE_QpZFEn7v9QE5o1LdulpCWa9vmk0OsefbBGWg_c,37
61
+ janito/cli/chat_mode/shell/session/history.py,sha256=tYav6GgjAZkvWhlI_rfG6OArNqW6Wn2DTv39Hb20QYc,1262
62
+ janito/cli/chat_mode/shell/session/manager.py,sha256=uJD9RKsfMCMm3HRuiuetQ9Y-ki21lFSt68pJikSYA-o,3310
63
+ janito/cli/cli_commands/list_models.py,sha256=VN7_DG6aTxaHPrc6_H-OftRXRT1urhf5ze_qJ_SO35U,1116
64
+ janito/cli/cli_commands/list_providers.py,sha256=AMAVdoS7KN7WA3gaKhZZdfio_zvknu21OLDc6CTFZ34,173
65
+ janito/cli/cli_commands/list_tools.py,sha256=NEmaCqEpfEpWU9Z_RNyJ3WAjFDf7xlGSLZnZLnBrZeM,2186
66
+ janito/cli/cli_commands/model_selection.py,sha256=ANWtwC5glZkGMdaNtARDbEG3QmuBUcDLVxzzC5jeBNo,1643
67
+ janito/cli/cli_commands/model_utils.py,sha256=d1rENGb34_YgIRTvVaWm3BixGjKsXnoOXoXipT9pins,2377
68
+ janito/cli/cli_commands/set_api_key.py,sha256=iPtWPhS5VeyIlwVX43TGg7OYUwXCcGzugvwoa3KB8A8,605
69
+ janito/cli/cli_commands/show_config.py,sha256=6j4P2mK1Q7KZGPF9EXV3ascuWRQtpbgAQgRAnNszBJI,2024
70
+ janito/cli/cli_commands/show_system_prompt.py,sha256=OtcIsmI9au7JE7hxEuJPw118Vaq53UyqqyP67u2sV5Y,2446
71
+ janito/cli/core/__init__.py,sha256=YH95fhgY9yBX8RgqX9dSrEkl4exjV0T4rbmJ6xUpG-Y,196
72
+ janito/cli/core/event_logger.py,sha256=1X6lR0Ax7AgF8HlPWFoY5Ystuu7Bh4ooTo78vXzeGB0,2008
73
+ janito/cli/core/getters.py,sha256=IfweIK5uZZz9y-p8lyHHmXaqjWk6BkzY6ImJxxh7ATc,1426
74
+ janito/cli/core/runner.py,sha256=8pucRrKHexsjj3rUxQQpNSFkYiABbAOJggWlI8xRtdY,5657
75
+ janito/cli/core/setters.py,sha256=c_JAlaEPpwR514Y7lQHgnZC9X2PpsjWia2fRzKmSFV8,6633
76
+ janito/cli/core/unsetters.py,sha256=FEw9gCt0vRvoCt0kRSNfVB2tzi_TqppJIx2nHPP59-k,2012
77
+ janito/cli/single_shot_mode/__init__.py,sha256=Ct99pKe9tINzVW6oedZJfzfZQKWpXz-weSSCn0hrwHY,115
78
+ janito/cli/single_shot_mode/handler.py,sha256=2VTGiYOHIZE5z_S0pic9-rBcyL_nb5NgldNZKKZtibM,5600
79
+ janito/drivers/driver_registry.py,sha256=zEvCJwaKhmGFGTIpSoZOncNwmJhrRTbaDz7yVF-1ZTk,1133
80
+ janito/drivers/anthropic/driver.py,sha256=4yLaf2T0g2zr-MSwXOx32s7ETut9FOl0uXyJGYiJzZU,3937
81
+ janito/drivers/azure_openai/driver.py,sha256=NHpPygG0_NdOioyhZsLpx_PS4N48QsXLeoMkMvSLEhc,1101
82
+ janito/drivers/google_genai/driver.py,sha256=qg3bApr954LexMlnsL3MLaHAS8X4aacmRKsyEPj6KKo,1680
83
+ janito/drivers/google_genai/schema_generator.py,sha256=p5hWxzcjeTlLAQZAt6kTXjxnHnBYyDAkKi4KkZctAJQ,2565
84
+ janito/drivers/mistralai/driver.py,sha256=r7iMMAG5V7OmzrtQhVCuK3ueAEzgbgS1qcPDKHTNKoo,1208
85
+ janito/drivers/openai/driver.py,sha256=FAxZMscioXRKKZWDWlZ6aEbTbwAyVGlam6sLl1y8G0I,13560
86
+ janito/event_bus/__init__.py,sha256=VG6GOhKMBh0O_92D-zW8a3YitJPKDajGgPiFezTXlNE,77
87
+ janito/event_bus/bus.py,sha256=LokZbAdwcWhWOyKSp7H3Ism57x4EZhxlRPjl3NE4UKU,2847
88
+ janito/event_bus/event.py,sha256=TMWZ4ccv1vGIsBQpeKDsDOBGgw9Pk_ltYWd6dMUJp6Q,398
89
+ janito/event_bus/handler.py,sha256=RhBtT1E48VEM2-k8u3HYsESw7VX5qAgiB8ZTJeKXhHc,1322
90
+ janito/event_bus/queue_bus.py,sha256=l4phun3pxXxi8ZlIq8ChYaiYDVO1PZeXoOzyi3vyu20,1558
91
+ janito/i18n/__init__.py,sha256=6zCIu6pSQpoMJvIRK9oOD3pkzbNeJik3lFDXse0X6ag,994
92
+ janito/i18n/messages.py,sha256=fBuwOTFoygyHPkYphm6Y0r1iE8497Z4iryVAmPhMEkg,1851
93
+ janito/i18n/pt.py,sha256=MPK8URu3BY2RPwhw2nU8j6ssMl3AyyFmVkP-1L2YkcM,4288
94
+ janito/llm/__init__.py,sha256=dpyVH51qVRCw-PDyAFLAxq0zd4jl5MDcuV6Cri0D-dQ,134
95
+ janito/llm/agent.py,sha256=qTUHphpzYiPC9m9DHC6rKH4-W9ZCBS6Aqnzer4V5tb4,18407
96
+ janito/llm/auth.py,sha256=OxqaKS-lOf9-nX0SPxY3GxYd2pFBnpxbkYOM1DyL9O4,2259
97
+ janito/llm/driver.py,sha256=u1dO4T6juuUdtBmUpx-Y3LTGCcMypOaFT7MeVHGn-Rw,9460
98
+ janito/llm/driver_config.py,sha256=d_TG8VvczXmObItdMFLRoVo3pIu9ig9YWodJVF4Qgoo,1362
99
+ janito/llm/driver_config_builder.py,sha256=BvWGx7vaBR5NyvPY1XNAP3lAgo1uf-T25CSsIo2kkCU,1401
100
+ janito/llm/driver_input.py,sha256=Zq7IO4KdQPUraeIo6XoOaRy1IdQAyYY15RQw4JU30uA,389
101
+ janito/llm/message_parts.py,sha256=QY_0kDjaxdoErDgKPRPv1dNkkYJuXIBmHWNLiOEKAH4,1365
102
+ janito/llm/model.py,sha256=42hjcffZDTuzjAJoVhDcDqwIXm6rUmmi5UwTOYopf5w,1131
103
+ janito/llm/provider.py,sha256=un_bFwcVPPvunI8OZCrNG8IGwt8bUJINxst0C3sDfFE,7627
104
+ janito/providers/__init__.py,sha256=j11MccCveqDTiZTicJH00eZ3qVDEL1KDbihGZhEvGYg,326
105
+ janito/providers/provider_static_info.py,sha256=f0g2UbyLdHFBPb45x19t6Lx_FoIXp0mJLboH4Jqn1L0,611
106
+ janito/providers/registry.py,sha256=wd9fFafXeMOnqk4mvVsY9HYYGNa5ipG9LbieDuTHves,774
107
+ janito/providers/anthropic/model_info.py,sha256=saofXNs73WhlAhm58AcIkSem7C8FMUgHP19BvkoLV5Y,641
108
+ janito/providers/anthropic/provider.py,sha256=nTMTroXCffU9JIEpMtMlY7a4FZS1J90gr9cAVRwrCJE,2371
109
+ janito/providers/azure_openai/model_info.py,sha256=v4zHgPDBCZkQUE40i-BseDnYzvjPd8c8NaspIor3l10,396
110
+ janito/providers/azure_openai/provider.py,sha256=AJtU159v7sSvjquJNoPEaB2Tvf5s9tbJsJkEih58iEQ,2879
111
+ janito/providers/deepseek/__init__.py,sha256=4sISEpq4bJO29vxFK9cfnO-SRUmKoD7oSdeCvz0hVno,36
112
+ janito/providers/deepseek/model_info.py,sha256=AxkdLHfdAX66ihnlEucv4V8VfUFxnWZo_VHHvZYXTcs,459
113
+ janito/providers/deepseek/provider.py,sha256=jxuQ131Qda0f0jDHedJsARwLHvHAEISab0KcVxZQnk8,3656
114
+ janito/providers/google/__init__.py,sha256=hE3OGJvLEhvNLhIK_XmCGIdrIj8MKlyGgdOLJ4mdess,38
115
+ janito/providers/google/model_info.py,sha256=tw0_o8Z3Zhcl5BtcShgE-a0Sinz2gsiiiSWWOIjm5us,1220
116
+ janito/providers/google/provider.py,sha256=O60BJXhjmwfmI-FqHUAAO022H7CUbhVU_Qj-FIrPnp4,2626
117
+ janito/providers/mistralai/model_info.py,sha256=Kh0S_3O76fcPGYW-ywmsF4Hhd8011wLpORPLRu3zdlQ,1026
118
+ janito/providers/mistralai/provider.py,sha256=hYb4VMJE9PUJjwM2hxKpJwU-TK7xf-Cx_f-0wIbGzc8,2537
119
+ janito/providers/openai/__init__.py,sha256=f0m16-sIqScjL9Mp4A0CQBZx6H3PTEy0cnE08jeaB5U,38
120
+ janito/providers/openai/model_info.py,sha256=eqlkKswDcZKDLrR1qL_uSYw5KRarx8JTSUN4wn_u8VE,3685
121
+ janito/providers/openai/provider.py,sha256=DnFhq1H9_fX-KjcIkeMk9duxAU3OIPzaiM188-gXNhU,4493
122
+ janito/providers/openai/schema_generator.py,sha256=hTqeLcPTR8jeKn5DUUpo7b-EZ-V-g1WwXiX7MbHnFzE,2234
123
+ janito/termweb/app.py,sha256=lOZqNf5TEvijryLXaa2CDx722PqBR_DH32A44V1Lfz0,3305
124
+ janito/tools/__init__.py,sha256=XsoXOdy2P71UnTBF5dfWoEveF614dXgR6EgMyGjVO6U,367
125
+ janito/tools/inspect_registry.py,sha256=Jo7PrMPRKLuR-j_mBAk9PBcTzeJf1eQrS1ChGofgQk0,538
126
+ janito/tools/tool_base.py,sha256=223MKZFYE8DMcSXfPofj6fro7YAvT7HaXmAUUUAv_AU,3370
127
+ janito/tools/tool_events.py,sha256=czRtC2TYakAySBZvfHS_Q6_NY_7_krxzAzAL1ggRFWA,1527
128
+ janito/tools/tool_run_exception.py,sha256=43yWgTaGBGEtRteo6FvTrane6fEVGo9FU1uOdjMRWJE,525
129
+ janito/tools/tool_use_tracker.py,sha256=koXi1h-si8IpRFUdMaj6h6buxeYsuEDC4geP_f2xPms,2805
130
+ janito/tools/tool_utils.py,sha256=57nfiq0XKTxzSy7ZqgmR_ItMt0-Ri3sENQzCiLWDR_M,1363
131
+ janito/tools/tools_adapter.py,sha256=5UXiL0F1oADFDaV2UQRviMYpylfZPl8AKrGVW0RkdAw,8410
132
+ janito/tools/tools_schema.py,sha256=rGrKrmpPNR07VXHAJ_haGBRRO-YGLOF51BlYRep9AAQ,4415
133
+ janito/tools/adapters/__init__.py,sha256=XKixOKtUJs1R-rGwGDXSLVLg5-Kp090gvWbsseWT4LI,92
134
+ janito/tools/adapters/local/__init__.py,sha256=qH8JYR37QZePQJd5wC19-pMPVH3p8noaDZMbpi9m1m4,1763
135
+ janito/tools/adapters/local/adapter.py,sha256=O7xWMeLrPzjPk4j-06EMKZWRVuiubl8Buyz7NmLh_xc,3434
136
+ janito/tools/adapters/local/ask_user.py,sha256=ZX4MD-Tgz8FDVZBvFYOKzJaQ2s5xejteE-JNcy8UlsE,3894
137
+ janito/tools/adapters/local/copy_file.py,sha256=wNr6mQBxYxGMGZFJmDnWXm5ogJ8iskpA6izBJH4cQvk,3507
138
+ janito/tools/adapters/local/create_directory.py,sha256=4PpSKETzqdUPmSk5vX2ikatHcobRK7vZEgV1quMsTVs,2551
139
+ janito/tools/adapters/local/create_file.py,sha256=a-Wrx4sN0YAxiTKow2EfFvQHLO3hyfS2kV2Zq1aG4fs,3463
140
+ janito/tools/adapters/local/delete_text_in_file.py,sha256=ZPCBMDPHlxi5eUuILyAJQ1TzRPX_USvjwAfQBJ9CfNM,5417
141
+ janito/tools/adapters/local/fetch_url.py,sha256=b5eRFRTG2L5rVIQAGXrPNm4j0kSUszhuG9pRVwnl_L0,3806
142
+ janito/tools/adapters/local/find_files.py,sha256=5_7YxzxPWigNEvIG9kKwzaPB1n-Gt0TkWEHY3ynJUd4,6137
143
+ janito/tools/adapters/local/move_file.py,sha256=_Pn34fYbRq7Ax2kSv0LeTHKRn0LnNScxaM7jA_QTjR8,5213
144
+ janito/tools/adapters/local/open_html_in_browser.py,sha256=swXRY1V7sFP7AULyloYd1Hd76gULebRX3biByN9d5Eo,1183
145
+ janito/tools/adapters/local/open_url.py,sha256=gzueNkGLNWikWzbB32X4VQUGyBq31xuZ11t-qKioHAk,1221
146
+ janito/tools/adapters/local/python_code_run.py,sha256=sUKZcXcdNyGD9XL5Ydk3q_Mu7uf7MRTLYtrnuQqhwi0,6616
147
+ janito/tools/adapters/local/python_command_run.py,sha256=PgPa68GQMbwfiH2Lxg1bXOiFJDtXi1bbKT7c9gIAYxc,6556
148
+ janito/tools/adapters/local/python_file_run.py,sha256=q7QEZfPspJ36hyjnIySm10Bm4L4NzW3hga3V8_ZoGBc,6431
149
+ janito/tools/adapters/local/remove_directory.py,sha256=A0qriZkcf85t3bwX52G9O6PYQFdUxWqVqbwRpjCzp1Q,2628
150
+ janito/tools/adapters/local/remove_file.py,sha256=dSAbP1NvuJT9NaReD_1TIKcJSp3psGW_d_pzWHk3GWE,2479
151
+ janito/tools/adapters/local/replace_text_in_file.py,sha256=V4v3Z_BwxdwBb_zuIUnDQBrcNoCORFdaih4DFsx1NDU,11108
152
+ janito/tools/adapters/local/run_bash_command.py,sha256=mfYeZMlvEIdPVQaeGeeMc7gBMQ2k0GbBGFHaFP_l3BA,7591
153
+ janito/tools/adapters/local/run_powershell_command.py,sha256=Gaz--9vkKfST09fiMNuWhdZvD2-wd-GDqhxVudec8IM,9229
154
+ janito/tools/adapters/local/view_file.py,sha256=MzGUjnOM-eMBANisAkNSvANn2UpA-GDqlE96KuCOkC4,7134
155
+ janito/tools/adapters/local/get_file_outline/__init__.py,sha256=OKV_BHnoD9h-vkcVoW6AHmsuDjjauHPCKNK0nVFl4sU,37
156
+ janito/tools/adapters/local/get_file_outline/core.py,sha256=9fhPok7uMKz38pUHDDdza7pySXdtGvM-4MS5hKk_boU,6013
157
+ janito/tools/adapters/local/get_file_outline/markdown_outline.py,sha256=bXEBg0D93tEBDNy8t-wh4i7WxsxfpQ2C3dX1_rmtj08,434
158
+ janito/tools/adapters/local/get_file_outline/python_outline.py,sha256=RAcf9Vxec08lA06drYaNre5HCJ2lTzrRAskZ3rlyE-U,10326
159
+ janito/tools/adapters/local/get_file_outline/python_outline_v2.py,sha256=OOHKDGbOwxiCtr3i5m5ZAnELvoF12fKdzO2RCDuTsCs,5453
160
+ janito/tools/adapters/local/get_file_outline/search_outline.py,sha256=YtroO9K9h9_-UbHHArJbx_AU1F0ahvm19K_PPlSuljk,1164
161
+ janito/tools/adapters/local/search_text/__init__.py,sha256=FEYpF5tTtf0fiAyRGIGSn-kV-MJDkhdFIbus16mYW8Y,34
162
+ janito/tools/adapters/local/search_text/core.py,sha256=nDhwXe0IhFx_1zXAp9ubIn_-eaXihaXlHVb7X50JeYA,7640
163
+ janito/tools/adapters/local/search_text/match_lines.py,sha256=XENsofkHGIRgFcAiS_O4J-esKgr7G5ZkpJHsYMglyEg,2133
164
+ janito/tools/adapters/local/search_text/pattern_utils.py,sha256=Cytwl7M9tNY-IsAmvoMgvlQMPswbCHTVrX8aZQ6IBJc,2374
165
+ janito/tools/adapters/local/search_text/traverse_directory.py,sha256=TrsAlFXcG7WdtZS6pg3_6vlL3h-afps5u7kkBDhA65c,4064
166
+ janito/tools/adapters/local/validate_file_syntax/__init__.py,sha256=P53RHmas4BbHL90cMxH9m-RpMCJI8JquoJb0rpkPVVk,29
167
+ janito/tools/adapters/local/validate_file_syntax/core.py,sha256=vgPQDKMjAyWdgni3sBLJ9XfDkUBg2i1JKkeJmnItaEA,3337
168
+ janito/tools/adapters/local/validate_file_syntax/css_validator.py,sha256=2yUMNxVIQy3AhuiahyZZbci0azMHkSWlGBbYIxJNJ-U,1361
169
+ janito/tools/adapters/local/validate_file_syntax/html_validator.py,sha256=sCIGBx-b-xz-vbz6pQM0rYYuzrt93_9ApC5zQ9Rwadk,3064
170
+ janito/tools/adapters/local/validate_file_syntax/js_validator.py,sha256=Km-wUrG0YZJ7kzxxyVPN_vXqOWIdfD12GkhQHPRVrC8,1008
171
+ janito/tools/adapters/local/validate_file_syntax/json_validator.py,sha256=eXFiuR-4-pqlrQIddxDoBmP7-loV4F6S3sJNh-nmOys,160
172
+ janito/tools/adapters/local/validate_file_syntax/markdown_validator.py,sha256=RKZFacTwWq56sJ6KoQzeAPLttC6sV-DsIec4_xN6CJQ,3521
173
+ janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=cP1jsMhtdOVfC6-sjxlsHbQWklHPq2FAGRJ5LFG7nqY,1162
174
+ janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=lHzjlA4g9nCF9hXkGx3izWF0b0vJH3yV7Pu3buLyBbI,140
175
+ janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=3CK7BEGO7gKI3bpeTtCFe0kJ5aKDZVh3Kh67bGIhcuc,294
176
+ janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=XLmOp7Ef6pLd97ICVnF3PxNKL1Yo5tLZsasvxPY478Y,165
177
+ janito-2.0.1.dist-info/METADATA,sha256=je6Js6Dh1ijqnMFEEoS195uCldZ8A7iOVelSVeqOC4c,10494
178
+ janito-2.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
179
+ janito-2.0.1.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
180
+ janito-2.0.1.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
181
+ janito-2.0.1.dist-info/RECORD,,
janito/agent/__init__.py DELETED
File without changes
@@ -1,4 +0,0 @@
1
- class ApiError(Exception):
2
- """Custom exception for API errors."""
3
-
4
- pass
janito/agent/config.py DELETED
@@ -1,147 +0,0 @@
1
- import json
2
- from pathlib import Path
3
- from threading import Lock
4
- from .config_defaults import CONFIG_DEFAULTS
5
-
6
-
7
- class SingletonMeta(type):
8
- _instances = {}
9
- _lock: Lock = Lock()
10
-
11
- def __call__(cls, *args, **kwargs):
12
- with cls._lock:
13
- if cls not in cls._instances:
14
- instance = super().__call__(*args, **kwargs)
15
- cls._instances[cls] = instance
16
- return cls._instances[cls]
17
-
18
-
19
- class BaseConfig:
20
- def __init__(self):
21
- self._data = {}
22
-
23
- def get(self, key, default=None):
24
- return self._data.get(key, default)
25
-
26
- def set(self, key, value):
27
- self._data[key] = value
28
-
29
- def all(self):
30
- return self._data
31
-
32
-
33
- class FileConfig(BaseConfig):
34
- def __init__(self, path):
35
- super().__init__()
36
- self.path = Path(path).expanduser()
37
- self.load()
38
-
39
- def load(self):
40
- if self.path.exists():
41
- with open(self.path, "r", encoding="utf-8") as f:
42
- try:
43
- self._data = json.load(f)
44
- # Remove keys with value None (null in JSON)
45
- self._data = {k: v for k, v in self._data.items() if v is not None}
46
- except json.JSONDecodeError as e:
47
- print(
48
- f"⚠️ Warning: The config file '{self.path}' is corrupted (invalid JSON): {e}. Using empty config."
49
- )
50
- self._data = {}
51
-
52
- else:
53
- self._data = {}
54
-
55
- def save(self):
56
- self.path.parent.mkdir(parents=True, exist_ok=True)
57
- with open(self.path, "w", encoding="utf-8") as f:
58
- json.dump(self._data, f, indent=2)
59
-
60
-
61
- CONFIG_OPTIONS = {
62
- "api_key": "API key for OpenAI-compatible service (required)",
63
- "trust": "Trust mode: suppress all console output (bool, default: False)",
64
- "model": "Model name to use (e.g., 'gpt-4.1')",
65
- "base_url": "API base URL (OpenAI-compatible endpoint)",
66
- "role": "Role description for the Agent Profile (e.g., 'software engineer')",
67
- "system_prompt_template": "Override the entire Agent Profile prompt text",
68
- "temperature": "Sampling temperature (float, e.g., 0.0 - 2.0)",
69
- "max_tokens": "Maximum tokens for model response (int)",
70
- "use_azure_openai": "Whether to use Azure OpenAI client (default: False)",
71
- # Accept template.* keys as valid config keys (for CLI validation, etc.)
72
- "template": "Template context dictionary for Agent Profile prompt rendering (nested)",
73
- "profile": "Agent Profile name (only 'base' is supported)",
74
- # Note: template.* keys are validated dynamically, not statically here
75
- }
76
-
77
-
78
- class BaseConfig:
79
- def __init__(self):
80
- self._data = {}
81
-
82
- def get(self, key, default=None):
83
- return self._data.get(key, default)
84
-
85
- def set(self, key, value):
86
- self._data[key] = value
87
-
88
- def all(self):
89
- return self._data
90
-
91
- """
92
- Returns a dictionary suitable for passing as Jinja2 template variables.
93
- Merges the nested 'template' dict (if present) and all flat 'template.*' keys.
94
- Flat keys override nested dict keys if there is a conflict.
95
- """
96
- template_vars = dict(self._data.get("template", {}))
97
- for k, v in self._data.items():
98
- if k.startswith("template.") and k != "template":
99
- template_vars[k[9:]] = v
100
- return template_vars
101
-
102
-
103
- # Import defaults for reference
104
-
105
-
106
- class EffectiveConfig:
107
- """Read-only merged view of local and global configs"""
108
-
109
- def __init__(self, local_cfg, global_cfg):
110
- self.local_cfg = local_cfg
111
- self.global_cfg = global_cfg
112
-
113
- def get(self, key, default=None):
114
- for cfg in (self.local_cfg, self.global_cfg):
115
- val = cfg.get(key)
116
- if val is not None:
117
- # Treat explicit None/null as not set
118
- if val is None:
119
- continue
120
- return val
121
- # Use centralized defaults if no config found
122
- if default is None and key in CONFIG_DEFAULTS:
123
- return CONFIG_DEFAULTS[key]
124
- return default
125
-
126
- def all(self):
127
- merged = {}
128
- # Start with global, override with local
129
- for cfg in (self.global_cfg, self.local_cfg):
130
- merged.update(cfg.all())
131
- return merged
132
-
133
-
134
- # Singleton instances
135
-
136
- local_config = FileConfig(Path(".janito/config.json"))
137
- global_config = FileConfig(Path.home() / ".janito/config.json")
138
-
139
- effective_config = EffectiveConfig(local_config, global_config)
140
-
141
-
142
- def get_api_key():
143
- """Retrieve API key from config files (local, then global)."""
144
- api_key = effective_config.get("api_key")
145
- if api_key:
146
- return api_key
147
- raise ValueError("API key not found. Please configure 'api_key' in your config.")
@@ -1,12 +0,0 @@
1
- # Centralized config defaults for Janito
2
- CONFIG_DEFAULTS = {
3
- "api_key": None, # Must be set by user
4
- "model": "gpt-4.1", # Default model
5
- "role": "software developer", # Part of the Agent Profile
6
- "system_prompt_template": None, # None means auto-generate from Agent Profile role
7
- "temperature": 0.2,
8
- "max_tokens": 32000,
9
- "use_azure_openai": False,
10
- "azure_openai_api_version": "2023-05-15",
11
- "profile": "base",
12
- }
File without changes
File without changes