janito 1.7.0__tar.gz → 1.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. janito-1.8.0/MANIFEST.in +6 -0
  2. {janito-1.7.0/janito.egg-info → janito-1.8.0}/PKG-INFO +58 -25
  3. {janito-1.7.0 → janito-1.8.0}/README.md +58 -25
  4. janito-1.8.0/janito/__init__.py +1 -0
  5. {janito-1.7.0 → janito-1.8.0}/janito/agent/config.py +1 -1
  6. {janito-1.7.0 → janito-1.8.0}/janito/agent/config_defaults.py +2 -2
  7. {janito-1.7.0 → janito-1.8.0}/janito/agent/conversation.py +70 -27
  8. janito-1.8.0/janito/agent/conversation_api.py +198 -0
  9. {janito-1.7.0 → janito-1.8.0}/janito/agent/conversation_exceptions.py +6 -0
  10. janito-1.8.0/janito/agent/conversation_tool_calls.py +36 -0
  11. janito-1.8.0/janito/agent/event.py +24 -0
  12. janito-1.8.0/janito/agent/event_dispatcher.py +24 -0
  13. janito-1.8.0/janito/agent/event_handler_protocol.py +5 -0
  14. janito-1.8.0/janito/agent/event_system.py +15 -0
  15. {janito-1.7.0 → janito-1.8.0}/janito/agent/message_handler.py +4 -1
  16. janito-1.8.0/janito/agent/message_handler_protocol.py +5 -0
  17. {janito-1.7.0 → janito-1.8.0}/janito/agent/openai_client.py +5 -8
  18. {janito-1.7.0 → janito-1.8.0}/janito/agent/openai_schema_generator.py +23 -4
  19. janito-1.8.0/janito/agent/profile_manager.py +96 -0
  20. {janito-1.7.0 → janito-1.8.0}/janito/agent/queued_message_handler.py +22 -3
  21. {janito-1.7.0 → janito-1.8.0}/janito/agent/rich_message_handler.py +66 -72
  22. janito-1.8.0/janito/agent/templates/profiles/system_prompt_template_base.txt.j2 +14 -0
  23. janito-1.8.0/janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2 +13 -0
  24. janito-1.8.0/janito/agent/test_handler_protocols.py +47 -0
  25. janito-1.8.0/janito/agent/tests/__init__.py +1 -0
  26. {janito-1.7.0 → janito-1.8.0}/janito/agent/tool_base.py +1 -1
  27. janito-1.8.0/janito/agent/tool_executor.py +109 -0
  28. janito-1.8.0/janito/agent/tool_registry.py +46 -0
  29. janito-1.8.0/janito/agent/tool_use_tracker.py +46 -0
  30. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/__init__.py +8 -9
  31. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/ask_user.py +19 -11
  32. janito-1.8.0/janito/agent/tools/create_directory.py +65 -0
  33. janito-1.8.0/janito/agent/tools/create_file.py +78 -0
  34. janito-1.8.0/janito/agent/tools/dir_walk_utils.py +16 -0
  35. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/fetch_url.py +10 -11
  36. janito-1.8.0/janito/agent/tools/find_files.py +69 -0
  37. janito-1.8.0/janito/agent/tools/get_lines.py +111 -0
  38. janito-1.8.0/janito/agent/tools/memory.py +48 -0
  39. janito-1.8.0/janito/agent/tools/move_file.py +108 -0
  40. janito-1.8.0/janito/agent/tools/outline_file/__init__.py +85 -0
  41. janito-1.8.0/janito/agent/tools/outline_file/formatting.py +20 -0
  42. janito-1.8.0/janito/agent/tools/outline_file/markdown_outline.py +14 -0
  43. janito-1.8.0/janito/agent/tools/outline_file/python_outline.py +71 -0
  44. janito-1.8.0/janito/agent/tools/present_choices.py +62 -0
  45. janito-1.8.0/janito/agent/tools/present_choices_test.py +18 -0
  46. janito-1.8.0/janito/agent/tools/remove_directory.py +55 -0
  47. janito-1.8.0/janito/agent/tools/remove_file.py +58 -0
  48. janito-1.8.0/janito/agent/tools/replace_text_in_file.py +216 -0
  49. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/run_bash_command.py +47 -50
  50. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/run_powershell_command.py +52 -36
  51. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/run_python_command.py +49 -29
  52. janito-1.8.0/janito/agent/tools/search_outline.py +17 -0
  53. janito-1.8.0/janito/agent/tools/search_text.py +208 -0
  54. janito-1.8.0/janito/agent/tools/tools_utils.py +56 -0
  55. janito-1.8.0/janito/agent/tools/utils.py +33 -0
  56. janito-1.8.0/janito/agent/tools/validate_file_syntax.py +163 -0
  57. {janito-1.7.0 → janito-1.8.0}/janito/cli/arg_parser.py +36 -4
  58. {janito-1.7.0 → janito-1.8.0}/janito/cli/logging_setup.py +7 -2
  59. janito-1.8.0/janito/cli/main.py +135 -0
  60. janito-1.8.0/janito/cli/runner/_termweb_log_utils.py +17 -0
  61. janito-1.8.0/janito/cli/runner/cli_main.py +180 -0
  62. {janito-1.7.0 → janito-1.8.0}/janito/cli/runner/config.py +2 -2
  63. janito-1.8.0/janito/cli/termweb_starter.py +73 -0
  64. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/chat_loop.py +42 -7
  65. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/chat_state.py +1 -1
  66. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/chat_ui.py +0 -1
  67. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/commands/__init__.py +15 -6
  68. janito-1.7.0/janito/cli_chat_shell/commands/history_reset.py → janito-1.8.0/janito/cli_chat_shell/commands/history_start.py +13 -5
  69. janito-1.8.0/janito/cli_chat_shell/commands/lang.py +16 -0
  70. janito-1.8.0/janito/cli_chat_shell/commands/prompt.py +42 -0
  71. janito-1.8.0/janito/cli_chat_shell/commands/session_control.py +47 -0
  72. janito-1.8.0/janito/cli_chat_shell/commands/termweb_log.py +86 -0
  73. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/commands/utility.py +5 -2
  74. janito-1.8.0/janito/cli_chat_shell/commands/verbose.py +29 -0
  75. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/session_manager.py +9 -1
  76. janito-1.8.0/janito/cli_chat_shell/shell_command_completer.py +20 -0
  77. janito-1.8.0/janito/cli_chat_shell/ui.py +189 -0
  78. janito-1.8.0/janito/i18n/__init__.py +35 -0
  79. janito-1.8.0/janito/i18n/messages.py +23 -0
  80. janito-1.8.0/janito/i18n/pt.py +46 -0
  81. {janito-1.7.0 → janito-1.8.0}/janito/rich_utils.py +43 -43
  82. janito-1.8.0/janito/termweb/app.py +95 -0
  83. janito-1.8.0/janito/termweb/static/editor.html +238 -0
  84. janito-1.8.0/janito/termweb/static/editor.html.bak +238 -0
  85. janito-1.8.0/janito/termweb/static/explorer.html.bak +59 -0
  86. janito-1.8.0/janito/termweb/static/favicon.ico.bak +0 -0
  87. janito-1.8.0/janito/termweb/static/index.html +55 -0
  88. janito-1.8.0/janito/termweb/static/index.html.bak +55 -0
  89. janito-1.8.0/janito/termweb/static/index.html.bak.bak +175 -0
  90. janito-1.8.0/janito/termweb/static/landing.html.bak +36 -0
  91. janito-1.8.0/janito/termweb/static/termicon.svg +1 -0
  92. janito-1.8.0/janito/termweb/static/termweb.css +235 -0
  93. janito-1.8.0/janito/termweb/static/termweb.css.bak +286 -0
  94. janito-1.8.0/janito/termweb/static/termweb.js +187 -0
  95. janito-1.8.0/janito/termweb/static/termweb.js.bak +187 -0
  96. janito-1.8.0/janito/termweb/static/termweb.js.bak.bak +157 -0
  97. janito-1.8.0/janito/termweb/static/termweb_quickopen.js +135 -0
  98. janito-1.8.0/janito/termweb/static/termweb_quickopen.js.bak +125 -0
  99. janito-1.8.0/janito/web/__init__.py +0 -0
  100. {janito-1.7.0 → janito-1.8.0}/janito/web/app.py +4 -4
  101. {janito-1.7.0 → janito-1.8.0/janito.egg-info}/PKG-INFO +58 -25
  102. {janito-1.7.0 → janito-1.8.0}/janito.egg-info/SOURCES.txt +55 -15
  103. {janito-1.7.0 → janito-1.8.0}/pyproject.toml +6 -3
  104. {janito-1.7.0 → janito-1.8.0}/tests/test_memory_tool.py +8 -3
  105. {janito-1.7.0 → janito-1.8.0}/tests/test_run_powershell_command.py +1 -1
  106. {janito-1.7.0 → janito-1.8.0}/tests/test_set_role.py +1 -1
  107. {janito-1.7.0 → janito-1.8.0}/tests/test_tool_registry_docstring_formats.py +4 -4
  108. {janito-1.7.0 → janito-1.8.0}/tests/test_tool_registry_manual_sim.py +19 -10
  109. {janito-1.7.0 → janito-1.8.0}/tests/test_tool_registry_validation.py +7 -3
  110. janito-1.8.0/tests/test_tool_use_tracker.py +38 -0
  111. janito-1.8.0/tests/test_validate_file_syntax.py +66 -0
  112. janito-1.8.0/tests/test_validate_file_syntax_xml_html.py +42 -0
  113. janito-1.8.0/tests/test_validate_markdown_syntax.py +64 -0
  114. janito-1.7.0/MANIFEST.in +0 -3
  115. janito-1.7.0/janito/__init__.py +0 -1
  116. janito-1.7.0/janito/agent/conversation_api.py +0 -98
  117. janito-1.7.0/janito/agent/conversation_tool_calls.py +0 -22
  118. janito-1.7.0/janito/agent/profile_manager.py +0 -164
  119. janito-1.7.0/janito/agent/templates/profiles/system_prompt_template_base.toml +0 -76
  120. janito-1.7.0/janito/agent/templates/profiles/system_prompt_template_default.toml +0 -3
  121. janito-1.7.0/janito/agent/templates/profiles/system_prompt_template_technical.toml +0 -13
  122. janito-1.7.0/janito/agent/tests/test_prompt_toml.py +0 -61
  123. janito-1.7.0/janito/agent/tool_registry.py +0 -118
  124. janito-1.7.0/janito/agent/tool_registry_core.py +0 -2
  125. janito-1.7.0/janito/agent/tools/create_directory.py +0 -50
  126. janito-1.7.0/janito/agent/tools/create_file.py +0 -47
  127. janito-1.7.0/janito/agent/tools/find_files.py +0 -52
  128. janito-1.7.0/janito/agent/tools/get_file_outline.py +0 -146
  129. janito-1.7.0/janito/agent/tools/get_lines.py +0 -75
  130. janito-1.7.0/janito/agent/tools/memory.py +0 -68
  131. janito-1.7.0/janito/agent/tools/move_file.py +0 -59
  132. janito-1.7.0/janito/agent/tools/py_compile_file.py +0 -40
  133. janito-1.7.0/janito/agent/tools/remove_directory.py +0 -50
  134. janito-1.7.0/janito/agent/tools/remove_file.py +0 -40
  135. janito-1.7.0/janito/agent/tools/replace_file.py +0 -51
  136. janito-1.7.0/janito/agent/tools/replace_text_in_file.py +0 -117
  137. janito-1.7.0/janito/agent/tools/search_files.py +0 -65
  138. janito-1.7.0/janito/agent/tools/tools_utils.py +0 -13
  139. janito-1.7.0/janito/agent/tools/utils.py +0 -34
  140. janito-1.7.0/janito/cli/main.py +0 -41
  141. janito-1.7.0/janito/cli/runner/cli_main.py +0 -138
  142. janito-1.7.0/janito/cli/runner/scan.py +0 -57
  143. janito-1.7.0/janito/cli_chat_shell/commands/session_control.py +0 -12
  144. janito-1.7.0/janito/cli_chat_shell/commands/system.py +0 -73
  145. janito-1.7.0/janito/cli_chat_shell/ui.py +0 -178
  146. janito-1.7.0/tests/test_detect_windows_shell.py +0 -12
  147. janito-1.7.0/tests/test_markdown_outline.py +0 -11
  148. {janito-1.7.0 → janito-1.8.0}/LICENSE +0 -0
  149. {janito-1.7.0 → janito-1.8.0}/janito/__main__.py +0 -0
  150. {janito-1.7.0 → janito-1.8.0}/janito/agent/__init__.py +0 -0
  151. {janito-1.7.0 → janito-1.8.0}/janito/agent/config_utils.py +0 -0
  152. {janito-1.7.0 → janito-1.8.0}/janito/agent/content_handler.py +0 -0
  153. {janito-1.7.0 → janito-1.8.0}/janito/agent/conversation_ui.py +0 -0
  154. {janito-1.7.0 → janito-1.8.0}/janito/agent/platform_discovery.py +0 -0
  155. {janito-1.7.0 → janito-1.8.0}/janito/agent/rich_live.py +0 -0
  156. {janito-1.7.0 → janito-1.8.0}/janito/agent/runtime_config.py +0 -0
  157. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/gitignore_utils.py +0 -0
  158. {janito-1.7.0 → janito-1.8.0}/janito/agent/tools/rich_live.py +0 -0
  159. {janito-1.7.0 → janito-1.8.0}/janito/cli/__init__.py +0 -0
  160. {janito-1.7.0 → janito-1.8.0}/janito/cli/_print_config.py +0 -0
  161. {janito-1.7.0 → janito-1.8.0}/janito/cli/_utils.py +0 -0
  162. {janito-1.7.0 → janito-1.8.0}/janito/cli/config_commands.py +0 -0
  163. {janito-1.7.0 → janito-1.8.0}/janito/cli/runner/__init__.py +0 -0
  164. {janito-1.7.0 → janito-1.8.0}/janito/cli/runner/formatting.py +0 -0
  165. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/__init__.py +0 -0
  166. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/commands/config.py +0 -0
  167. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/commands/session.py +0 -0
  168. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/commands/sum.py +0 -0
  169. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/config_shell.py +0 -0
  170. {janito-1.7.0 → janito-1.8.0}/janito/cli_chat_shell/load_prompt.py +0 -0
  171. /janito-1.7.0/janito/web/__init__.py → /janito-1.8.0/janito/termweb/static/favicon.ico +0 -0
  172. {janito-1.7.0 → janito-1.8.0}/janito/web/__main__.py +0 -0
  173. {janito-1.7.0 → janito-1.8.0}/janito.egg-info/dependency_links.txt +0 -0
  174. {janito-1.7.0 → janito-1.8.0}/janito.egg-info/entry_points.txt +0 -0
  175. {janito-1.7.0 → janito-1.8.0}/janito.egg-info/requires.txt +0 -0
  176. {janito-1.7.0 → janito-1.8.0}/janito.egg-info/top_level.txt +0 -0
  177. {janito-1.7.0 → janito-1.8.0}/setup.cfg +0 -0
  178. {janito-1.7.0 → janito-1.8.0}/tests/test_basic.py +0 -0
  179. {janito-1.7.0 → janito-1.8.0}/tests/test_sum_command.py +0 -0
  180. {janito-1.7.0 → janito-1.8.0}/tests/test_tools.py +0 -0
@@ -0,0 +1,6 @@
1
+ # Exclude all .bak files from the package
2
+ exclude *.bak
3
+ recursive-exclude * *.bak
4
+
5
+ # Include static files for termweb
6
+ recursive-include janito/termweb/static *.*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 1.7.0
3
+ Version: 1.8.0
4
4
  Summary: Natural Language Coding Agent,
5
5
  Author-email: João Pinto <joao.pinto@gmail.com>
6
6
  License-Expression: MIT
@@ -36,12 +36,45 @@ Janito is an AI-powered assistant for the command line and web that interprets n
36
36
 
37
37
  For a technical overview, see the [Architecture Guide](docs/reference/architecture.md).
38
38
 
39
+ ## 🧪 Experimental Feature: Liteweb File Viewer
40
+
41
+ Janito now includes an experimental lightweight web file viewer for use with the CLI chat shell. This feature allows you to click on file paths in the terminal (when using a Rich-compatible terminal) and instantly preview file contents in your browser—no full IDE required!
42
+
43
+ ### How to Use
44
+
45
+ - Start the CLI chat shell with the `--termweb` flag:
46
+ ```bash
47
+ janito --termweb
48
+ ```
49
+ - By default, the viewer runs at http://localhost:8088 (or the next available port up to 8100).
50
+ - To specify a port, use `--termweb-port 8090`.
51
+ - File paths in CLI output become clickable links that open the file in your browser.
52
+
53
+ **Note:** This feature is experimental. It is intended for quick file previews and review, not for editing or production use. Feedback is welcome!
54
+
55
+ ### Why is this useful?
56
+ - Enables instant file previews from the CLI without a full IDE.
57
+ - Works with all Janito file tools and outputs that display file paths.
58
+ - Uses the Rich library’s link markup for clickable terminal links.
59
+
60
+ ---
61
+
39
62
  ## 📖 Full Documentation & Overview
40
63
  - For structured and in-depth guides, visit the [Janito Documentation Site](https://docs.janito.dev).
41
64
  - For a high-level, user-friendly overview, see [janito.dev](https://janito.dev).
42
65
 
43
66
  ---
44
67
 
68
+ ## Listing Available Tools
69
+
70
+ To list all registered tools on the command line, use the option:
71
+
72
+ ```sh
73
+ janito --list-tools
74
+ ```
75
+
76
+ This will display a colorful table with the name, description, and parameters of each available tool.
77
+
45
78
  ## ⚡ Quick Start
46
79
 
47
80
  ## 🖥️ Supported Human Interfaces
@@ -89,7 +122,7 @@ janito --web
89
122
  - 📁 **File & Directory Management:** Navigate, create, move, or remove files and folders.
90
123
  - 🧠 **Context-Aware:** Understands your project structure for precise edits.
91
124
  - 💬 **Interactive User Prompts:** Asks for clarification when needed.
92
- - 🧩 **Extensible Tooling:** Built-in tools for file operations, shell commands, directory and file management, Python code execution and validation, text replacement, and more.
125
+ - 🛠️ **Extensible Tooling:** Built-in tools for file operations, shell commands, directory and file management, Python code execution and validation, text replacement, and more.
93
126
  - See [janito/agent/tools/README.md](janito/agent/tools/README.md) for the full list of built-in tools and their usage details. For the message handler model, see [docs/MESSAGE_HANDLER_MODEL.md](docs/MESSAGE_HANDLER_MODEL.md).
94
127
  - 🌐 **Web Interface (In Development):** Simple web UI for streaming responses and tool progress.
95
128
 
@@ -101,7 +134,7 @@ janito --web
101
134
 
102
135
  ### Contributing & Developer Guide
103
136
 
104
- If you want to extend Janito or add new tools, see the [Developer Guide](docs/README_DEV.md) for system_prompt_template, tool registration requirements, and code style guidelines. For the full list of built-in tools and their usage, see the [Tools Reference](janito/agent/tools/README.md).
137
+ If you want to extend Janito or add new tools, see the [Developer Guide](docs/README_DEV.md) for system_prompt_template, tool registration requirements, and code profile guidelines. For the full list of built-in tools and their usage, see the [Tools Reference](janito/agent/tools/README.md).
105
138
 
106
139
 
107
140
 
@@ -138,12 +171,12 @@ For details on using models hosted on Azure OpenAI, see [docs/AZURE_OPENAI.md](d
138
171
 
139
172
  ---
140
173
 
141
- ## 🧩 System Prompt & Role
174
+ ## 🧑‍💻 System Prompt & Role
142
175
 
143
- Janito operates using a system prompt template that defines its behavior, communication style, and capabilities. By default, Janito assumes the role of a "software engineer"—this means its responses and actions are tailored to the expectations and best practices of professional software engineering.
176
+ Janito operates using a system prompt template that defines its behavior, communication profile, and capabilities. By default, Janito assumes the role of a "software engineer"—this means its responses and actions are tailored to the expectations and best practices of professional software engineering.
144
177
 
145
178
  - **Role:** You can customize the agent's role (e.g., "data scientist", "DevOps engineer") using the `--role` flag or config. The default is `software engineer`.
146
- - **System Prompt Template:** The system prompt is rendered from a Jinja2 template (see `janito/agent/templates/system_prompt_template.j2`). This template governs how the agent interprets system_prompt_template, interacts with files, and communicates with users.
179
+ - **System Prompt Template:** The system prompt is rendered from a Jinja2 template (see `janito/agent/templates/prompt_prompt_template.j2`). This template governs how the agent interprets system_prompt_template, interacts with files, and communicates with users.
147
180
  - **Customization & Precedence:** Advanced users can override the system prompt with the `--system` flag (raw string), or point to a custom file using `--system-file`. The precedence is: `--system-file` > `--system`/config > default template.
148
181
 
149
182
  The default template ensures the agent:
@@ -152,7 +185,7 @@ The default template ensures the agent:
152
185
  - Provides concise plans before taking action
153
186
  - Documents any changes made
154
187
 
155
- For more details or to customize the prompt, see the template file at `janito/agent/templates/system_prompt_template.j2` and the architecture overview in [docs/reference/architecture.md](docs/reference/architecture.md).
188
+ For more details or to customize the prompt, see the template file at `janito/agent/templates/prompt_prompt_template.j2` and the architecture overview in [docs/reference/architecture.md](docs/reference/architecture.md).
156
189
 
157
190
  ---
158
191
 
@@ -184,18 +217,18 @@ Vanilla mode is ideal for:
184
217
 
185
218
  > Note: Vanilla mode is a runtime switch and does not change the Agent API or class signatures. It is controlled via CLI/config only.
186
219
 
187
- ## 🧑‍💻 AgentProfileManager: Profile, Role, and Prompt Management
220
+ ## 👨‍💻 AgentProfileManager: Profile, Role, and Prompt Management
188
221
 
189
- Janito now uses a dedicated `AgentProfileManager` class to manage user profiles, roles, interaction styles, and system prompt selection. This manager:
190
- - Stores the current role (e.g., "software engineer") and interaction style (e.g., "default", "technical").
191
- - Renders the system prompt from the appropriate template based on interaction style.
222
+ Janito now uses a dedicated `AgentProfileManager` class to manage user profiles, roles, interaction profiles, and system prompt selection. This manager:
223
+ - Stores the current role (e.g., "software engineer") and interaction profile (e.g., "default", "technical").
224
+ - Renders the system prompt from the appropriate template based on interaction profile.
192
225
  - Instantiates and manages the low-level LLM Agent, passing the correct prompt.
193
- - Provides methods to update the role, interaction style, and refresh the prompt at runtime.
226
+ - Provides methods to update the role, interaction profile, and refresh the prompt at runtime.
194
227
 
195
228
  ### Multiple System Prompt Templates
196
- - The system prompt template is now selected based on the interaction style (e.g., `default` or `technical`).
229
+ - The system prompt template is now selected based on the interaction profile (e.g., `default` or `technical`).
197
230
  - Templates are located in `janito/agent/templates/` (see `system_prompt_template.j2` and `system_prompt_template_technical.j2`).
198
- - You can switch interaction styles at runtime using the profile manager, enabling different agent behaviors for different user needs.
231
+ - You can switch interaction profiles at runtime using the profile manager, enabling different agent behaviors for different user needs.
199
232
 
200
233
  This separation ensures that the LLM Agent remains focused on language model interaction and tool execution, while all profile, role, and prompt logic is managed at a higher level.
201
234
 
@@ -203,45 +236,45 @@ See `janito/agent/profile_manager.py` for implementation details.
203
236
 
204
237
  ### Agent Interaction Style
205
238
 
206
- You can control the agent's behavior and prompt style globally or per-project using the `interaction_style` config key. Supported values:
239
+ You can control the agent's behavior and prompt profile globally or per-project using the `profile` config key. See [Prompt Profiles Guide](docs/guides/prompt_profiles.md) for all available styles and combinations.
207
240
  - `default`: Concise, general-purpose agent (default)
208
241
  - `technical`: Strict, workflow-oriented for technical/developer use
209
242
 
210
243
  Set globally:
211
244
  ```bash
212
- janito --set-global-config interaction_style=technical
245
+ janito --set-global-config profile=technical
213
246
  ```
214
247
  Or per-project (in your project root):
215
248
  ```bash
216
- janito --set-local-config interaction_style=technical
249
+ janito --set-local-config profile=technical
217
250
  ```
218
251
 
219
252
  You can also override for a session with the CLI flag:
220
253
  ```bash
221
- janito --style technical
254
+ janito --profile technical
222
255
  ```
223
256
 
224
257
  See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for full details.
225
258
 
226
- ## 🧩 Combinatorial Style System
259
+ ## 🧑‍💻 Combinatorial Style System
227
260
 
228
- Janito now supports combinatorial styles for system prompts, allowing you to combine a main style (such as `default` or `technical`) with one or more feature extensions (such as `commit_all`).
261
+ Janito now supports combinatorial profiles for system prompts, allowing you to combine a main profile (such as `default` or `technical`) with one or more feature extensions (such as `commit_all`).
229
262
 
230
- - **Main style:** The base agent behavior and workflow (e.g., `default`, `technical`).
231
- - **Feature extensions:** Optional features that override or extend the main style (e.g., `commit_all`).
263
+ - **Main profile:** The base agent behavior and workflow (e.g., `default`, `technical`).
264
+ - **Feature extensions:** Optional features that override or extend the main profile (e.g., `commit_all`).
232
265
  - **Syntax:** Use a hyphen to combine, e.g., `technical-commit_all`.
233
266
 
234
267
  **How it works:**
235
- - The main style template is loaded first.
268
+ - The main profile template is loaded first.
236
269
  - Each feature extension template is layered on top, overriding or extending specific blocks in the main template.
237
270
  - Feature templates must use `{% extends parent_template %}` for dynamic inheritance.
238
271
 
239
272
  **Example usage:**
240
273
  ```bash
241
- janito --style technical-commit_all
274
+ janito --profile technical-commit_all
242
275
  ```
243
276
 
244
- This will apply the `technical` style with the `commit_all` feature enabled in the agent's system prompt.
277
+ This will apply the `technical` profile with the `commit_all` feature enabled in the agent's system prompt.
245
278
 
246
279
  See `janito/render_prompt.py` and `janito/agent/templates/` for implementation details and to create your own feature extensions.
247
280
 
@@ -7,12 +7,45 @@ Janito is an AI-powered assistant for the command line and web that interprets n
7
7
 
8
8
  For a technical overview, see the [Architecture Guide](docs/reference/architecture.md).
9
9
 
10
+ ## 🧪 Experimental Feature: Liteweb File Viewer
11
+
12
+ Janito now includes an experimental lightweight web file viewer for use with the CLI chat shell. This feature allows you to click on file paths in the terminal (when using a Rich-compatible terminal) and instantly preview file contents in your browser—no full IDE required!
13
+
14
+ ### How to Use
15
+
16
+ - Start the CLI chat shell with the `--termweb` flag:
17
+ ```bash
18
+ janito --termweb
19
+ ```
20
+ - By default, the viewer runs at http://localhost:8088 (or the next available port up to 8100).
21
+ - To specify a port, use `--termweb-port 8090`.
22
+ - File paths in CLI output become clickable links that open the file in your browser.
23
+
24
+ **Note:** This feature is experimental. It is intended for quick file previews and review, not for editing or production use. Feedback is welcome!
25
+
26
+ ### Why is this useful?
27
+ - Enables instant file previews from the CLI without a full IDE.
28
+ - Works with all Janito file tools and outputs that display file paths.
29
+ - Uses the Rich library’s link markup for clickable terminal links.
30
+
31
+ ---
32
+
10
33
  ## 📖 Full Documentation & Overview
11
34
  - For structured and in-depth guides, visit the [Janito Documentation Site](https://docs.janito.dev).
12
35
  - For a high-level, user-friendly overview, see [janito.dev](https://janito.dev).
13
36
 
14
37
  ---
15
38
 
39
+ ## Listing Available Tools
40
+
41
+ To list all registered tools on the command line, use the option:
42
+
43
+ ```sh
44
+ janito --list-tools
45
+ ```
46
+
47
+ This will display a colorful table with the name, description, and parameters of each available tool.
48
+
16
49
  ## ⚡ Quick Start
17
50
 
18
51
  ## 🖥️ Supported Human Interfaces
@@ -60,7 +93,7 @@ janito --web
60
93
  - 📁 **File & Directory Management:** Navigate, create, move, or remove files and folders.
61
94
  - 🧠 **Context-Aware:** Understands your project structure for precise edits.
62
95
  - 💬 **Interactive User Prompts:** Asks for clarification when needed.
63
- - 🧩 **Extensible Tooling:** Built-in tools for file operations, shell commands, directory and file management, Python code execution and validation, text replacement, and more.
96
+ - 🛠️ **Extensible Tooling:** Built-in tools for file operations, shell commands, directory and file management, Python code execution and validation, text replacement, and more.
64
97
  - See [janito/agent/tools/README.md](janito/agent/tools/README.md) for the full list of built-in tools and their usage details. For the message handler model, see [docs/MESSAGE_HANDLER_MODEL.md](docs/MESSAGE_HANDLER_MODEL.md).
65
98
  - 🌐 **Web Interface (In Development):** Simple web UI for streaming responses and tool progress.
66
99
 
@@ -72,7 +105,7 @@ janito --web
72
105
 
73
106
  ### Contributing & Developer Guide
74
107
 
75
- If you want to extend Janito or add new tools, see the [Developer Guide](docs/README_DEV.md) for system_prompt_template, tool registration requirements, and code style guidelines. For the full list of built-in tools and their usage, see the [Tools Reference](janito/agent/tools/README.md).
108
+ If you want to extend Janito or add new tools, see the [Developer Guide](docs/README_DEV.md) for system_prompt_template, tool registration requirements, and code profile guidelines. For the full list of built-in tools and their usage, see the [Tools Reference](janito/agent/tools/README.md).
76
109
 
77
110
 
78
111
 
@@ -109,12 +142,12 @@ For details on using models hosted on Azure OpenAI, see [docs/AZURE_OPENAI.md](d
109
142
 
110
143
  ---
111
144
 
112
- ## 🧩 System Prompt & Role
145
+ ## 🧑‍💻 System Prompt & Role
113
146
 
114
- Janito operates using a system prompt template that defines its behavior, communication style, and capabilities. By default, Janito assumes the role of a "software engineer"—this means its responses and actions are tailored to the expectations and best practices of professional software engineering.
147
+ Janito operates using a system prompt template that defines its behavior, communication profile, and capabilities. By default, Janito assumes the role of a "software engineer"—this means its responses and actions are tailored to the expectations and best practices of professional software engineering.
115
148
 
116
149
  - **Role:** You can customize the agent's role (e.g., "data scientist", "DevOps engineer") using the `--role` flag or config. The default is `software engineer`.
117
- - **System Prompt Template:** The system prompt is rendered from a Jinja2 template (see `janito/agent/templates/system_prompt_template.j2`). This template governs how the agent interprets system_prompt_template, interacts with files, and communicates with users.
150
+ - **System Prompt Template:** The system prompt is rendered from a Jinja2 template (see `janito/agent/templates/prompt_prompt_template.j2`). This template governs how the agent interprets system_prompt_template, interacts with files, and communicates with users.
118
151
  - **Customization & Precedence:** Advanced users can override the system prompt with the `--system` flag (raw string), or point to a custom file using `--system-file`. The precedence is: `--system-file` > `--system`/config > default template.
119
152
 
120
153
  The default template ensures the agent:
@@ -123,7 +156,7 @@ The default template ensures the agent:
123
156
  - Provides concise plans before taking action
124
157
  - Documents any changes made
125
158
 
126
- For more details or to customize the prompt, see the template file at `janito/agent/templates/system_prompt_template.j2` and the architecture overview in [docs/reference/architecture.md](docs/reference/architecture.md).
159
+ For more details or to customize the prompt, see the template file at `janito/agent/templates/prompt_prompt_template.j2` and the architecture overview in [docs/reference/architecture.md](docs/reference/architecture.md).
127
160
 
128
161
  ---
129
162
 
@@ -155,18 +188,18 @@ Vanilla mode is ideal for:
155
188
 
156
189
  > Note: Vanilla mode is a runtime switch and does not change the Agent API or class signatures. It is controlled via CLI/config only.
157
190
 
158
- ## 🧑‍💻 AgentProfileManager: Profile, Role, and Prompt Management
191
+ ## 👨‍💻 AgentProfileManager: Profile, Role, and Prompt Management
159
192
 
160
- Janito now uses a dedicated `AgentProfileManager` class to manage user profiles, roles, interaction styles, and system prompt selection. This manager:
161
- - Stores the current role (e.g., "software engineer") and interaction style (e.g., "default", "technical").
162
- - Renders the system prompt from the appropriate template based on interaction style.
193
+ Janito now uses a dedicated `AgentProfileManager` class to manage user profiles, roles, interaction profiles, and system prompt selection. This manager:
194
+ - Stores the current role (e.g., "software engineer") and interaction profile (e.g., "default", "technical").
195
+ - Renders the system prompt from the appropriate template based on interaction profile.
163
196
  - Instantiates and manages the low-level LLM Agent, passing the correct prompt.
164
- - Provides methods to update the role, interaction style, and refresh the prompt at runtime.
197
+ - Provides methods to update the role, interaction profile, and refresh the prompt at runtime.
165
198
 
166
199
  ### Multiple System Prompt Templates
167
- - The system prompt template is now selected based on the interaction style (e.g., `default` or `technical`).
200
+ - The system prompt template is now selected based on the interaction profile (e.g., `default` or `technical`).
168
201
  - Templates are located in `janito/agent/templates/` (see `system_prompt_template.j2` and `system_prompt_template_technical.j2`).
169
- - You can switch interaction styles at runtime using the profile manager, enabling different agent behaviors for different user needs.
202
+ - You can switch interaction profiles at runtime using the profile manager, enabling different agent behaviors for different user needs.
170
203
 
171
204
  This separation ensures that the LLM Agent remains focused on language model interaction and tool execution, while all profile, role, and prompt logic is managed at a higher level.
172
205
 
@@ -174,47 +207,47 @@ See `janito/agent/profile_manager.py` for implementation details.
174
207
 
175
208
  ### Agent Interaction Style
176
209
 
177
- You can control the agent's behavior and prompt style globally or per-project using the `interaction_style` config key. Supported values:
210
+ You can control the agent's behavior and prompt profile globally or per-project using the `profile` config key. See [Prompt Profiles Guide](docs/guides/prompt_profiles.md) for all available styles and combinations.
178
211
  - `default`: Concise, general-purpose agent (default)
179
212
  - `technical`: Strict, workflow-oriented for technical/developer use
180
213
 
181
214
  Set globally:
182
215
  ```bash
183
- janito --set-global-config interaction_style=technical
216
+ janito --set-global-config profile=technical
184
217
  ```
185
218
  Or per-project (in your project root):
186
219
  ```bash
187
- janito --set-local-config interaction_style=technical
220
+ janito --set-local-config profile=technical
188
221
  ```
189
222
 
190
223
  You can also override for a session with the CLI flag:
191
224
  ```bash
192
- janito --style technical
225
+ janito --profile technical
193
226
  ```
194
227
 
195
228
  See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for full details.
196
229
 
197
- ## 🧩 Combinatorial Style System
230
+ ## 🧑‍💻 Combinatorial Style System
198
231
 
199
- Janito now supports combinatorial styles for system prompts, allowing you to combine a main style (such as `default` or `technical`) with one or more feature extensions (such as `commit_all`).
232
+ Janito now supports combinatorial profiles for system prompts, allowing you to combine a main profile (such as `default` or `technical`) with one or more feature extensions (such as `commit_all`).
200
233
 
201
- - **Main style:** The base agent behavior and workflow (e.g., `default`, `technical`).
202
- - **Feature extensions:** Optional features that override or extend the main style (e.g., `commit_all`).
234
+ - **Main profile:** The base agent behavior and workflow (e.g., `default`, `technical`).
235
+ - **Feature extensions:** Optional features that override or extend the main profile (e.g., `commit_all`).
203
236
  - **Syntax:** Use a hyphen to combine, e.g., `technical-commit_all`.
204
237
 
205
238
  **How it works:**
206
- - The main style template is loaded first.
239
+ - The main profile template is loaded first.
207
240
  - Each feature extension template is layered on top, overriding or extending specific blocks in the main template.
208
241
  - Feature templates must use `{% extends parent_template %}` for dynamic inheritance.
209
242
 
210
243
  **Example usage:**
211
244
  ```bash
212
- janito --style technical-commit_all
245
+ janito --profile technical-commit_all
213
246
  ```
214
247
 
215
- This will apply the `technical` style with the `commit_all` feature enabled in the agent's system prompt.
248
+ This will apply the `technical` profile with the `commit_all` feature enabled in the agent's system prompt.
216
249
 
217
250
  See `janito/render_prompt.py` and `janito/agent/templates/` for implementation details and to create your own feature extensions.
218
251
 
219
252
  ---
220
- _generated by janito.dev_
253
+ _generated by janito.dev_
@@ -0,0 +1 @@
1
+ __version__ = "1.8.0"
@@ -64,7 +64,7 @@ CONFIG_OPTIONS = {
64
64
  "use_azure_openai": "Whether to use Azure OpenAI client (default: False)",
65
65
  # Accept template.* keys as valid config keys (for CLI validation, etc.)
66
66
  "template": "Template context dictionary for Agent Profile prompt rendering (nested)",
67
- "interaction_style": "Interaction style for the Agent Profile (e.g., 'default' or 'technical')",
67
+ "profile": "Agent Profile name (only 'base' is supported)",
68
68
  # Note: template.* keys are validated dynamically, not statically here
69
69
  }
70
70
 
@@ -3,11 +3,11 @@ CONFIG_DEFAULTS = {
3
3
  "api_key": None, # Must be set by user
4
4
  "model": "openai/gpt-4.1", # Default model
5
5
  "base_url": "https://openrouter.ai/api/v1",
6
- "role": "software engineer", # Part of the Agent Profile
6
+ "role": "software developer", # Part of the Agent Profile
7
7
  "system_prompt_template": None, # None means auto-generate from Agent Profile role
8
8
  "temperature": 0.2,
9
9
  "max_tokens": 200000,
10
10
  "use_azure_openai": False,
11
11
  "azure_openai_api_version": "2023-05-15",
12
- "interaction_style": "default",
12
+ "profile": "base",
13
13
  }
@@ -8,8 +8,9 @@ from janito.agent.conversation_ui import show_spinner, print_verbose_event
8
8
  from janito.agent.conversation_exceptions import (
9
9
  MaxRoundsExceededError,
10
10
  EmptyResponseError,
11
+ NoToolSupportError,
11
12
  )
12
- from janito.agent.runtime_config import unified_config
13
+ from janito.agent.runtime_config import unified_config, runtime_config
13
14
  import pprint
14
15
 
15
16
 
@@ -19,6 +20,13 @@ class ConversationHandler:
19
20
  self.model = model
20
21
  self.usage_history = []
21
22
 
23
+ @staticmethod
24
+ def remove_system_prompt(messages):
25
+ """
26
+ Return a new messages list with all system prompts removed.
27
+ """
28
+ return [msg for msg in messages if msg.get("role") != "system"]
29
+
22
30
  def handle_conversation(
23
31
  self,
24
32
  messages,
@@ -41,40 +49,75 @@ class ConversationHandler:
41
49
  resolved_max_tokens = int(resolved_max_tokens)
42
50
  except (TypeError, ValueError):
43
51
  raise ValueError(
44
- f"max_tokens must be an integer, got: {resolved_max_tokens!r}"
52
+ "max_tokens must be an integer, got: {resolved_max_tokens!r}".format(
53
+ resolved_max_tokens=resolved_max_tokens
54
+ )
45
55
  )
46
56
 
57
+ # If vanilla mode is set and max_tokens was not provided, default to 8000
58
+ if runtime_config.get("vanilla_mode", False) and max_tokens is None:
59
+ resolved_max_tokens = 8000
60
+
47
61
  for _ in range(max_rounds):
48
- if stream:
49
- # Streaming mode
50
- def get_stream():
51
- return get_openai_stream_response(
52
- self.client,
53
- self.model,
54
- messages,
55
- resolved_max_tokens,
56
- verbose_stream=verbose_stream,
57
- message_handler=message_handler,
58
- )
62
+ try:
63
+ if stream:
64
+ # Streaming mode
65
+ def get_stream():
66
+ return get_openai_stream_response(
67
+ self.client,
68
+ self.model,
69
+ messages,
70
+ resolved_max_tokens,
71
+ verbose_stream=runtime_config.get("verbose_stream", False),
72
+ message_handler=message_handler,
73
+ )
74
+
75
+ retry_api_call(get_stream)
76
+ return None
77
+ else:
78
+ # Non-streaming mode
79
+ def api_call():
80
+ return get_openai_response(
81
+ self.client, self.model, messages, resolved_max_tokens
82
+ )
83
+
84
+ if spinner:
85
+ response = show_spinner(
86
+ "Waiting for AI response...", retry_api_call, api_call
87
+ )
88
+ else:
89
+ response = retry_api_call(api_call)
90
+ print("[DEBUG] OpenAI API raw response:", repr(response))
91
+ except NoToolSupportError:
92
+ print(
93
+ "⚠️ Endpoint does not support tool use. Proceeding in vanilla mode (tools disabled)."
94
+ )
95
+ runtime_config.set("vanilla_mode", True)
96
+ if max_tokens is None:
97
+ runtime_config.set("max_tokens", 8000)
98
+ resolved_max_tokens = 8000
59
99
 
60
- retry_api_call(get_stream)
61
- return None
62
- else:
63
- # Non-streaming mode
64
- def api_call():
100
+ # Remove system prompt for vanilla mode if needed (call this externally when appropriate)
101
+ # messages = ConversationHandler.remove_system_prompt(messages)
102
+ # Retry once with tools disabled
103
+ def api_call_vanilla():
65
104
  return get_openai_response(
66
105
  self.client, self.model, messages, resolved_max_tokens
67
106
  )
68
107
 
69
108
  if spinner:
70
109
  response = show_spinner(
71
- "Waiting for AI response...", retry_api_call, api_call
110
+ "Waiting for AI response (tools disabled)...",
111
+ retry_api_call,
112
+ api_call_vanilla,
72
113
  )
73
114
  else:
74
- response = retry_api_call(api_call)
75
- print("[DEBUG] OpenAI API raw response:", repr(response))
76
-
77
- if verbose_response:
115
+ response = retry_api_call(api_call_vanilla)
116
+ print(
117
+ "[DEBUG] OpenAI API raw response (tools disabled):",
118
+ repr(response),
119
+ )
120
+ if runtime_config.get("verbose_response", False):
78
121
  pprint.pprint(response)
79
122
  if response is None or not getattr(response, "choices", None):
80
123
  raise EmptyResponseError(
@@ -94,7 +137,7 @@ class ConversationHandler:
94
137
  else None
95
138
  )
96
139
  event = {"type": "content", "message": choice.message.content}
97
- if verbose_events:
140
+ if runtime_config.get("verbose_events", False):
98
141
  print_verbose_event(event)
99
142
  if message_handler is not None and choice.message.content:
100
143
  message_handler.handle_message(event)
@@ -121,12 +164,12 @@ class ConversationHandler:
121
164
  "tool_calls": [tc.to_dict() for tc in choice.message.tool_calls],
122
165
  }
123
166
  )
124
- for tr in tool_responses:
167
+ for tool_response in tool_responses:
125
168
  messages.append(
126
169
  {
127
170
  "role": "tool",
128
- "tool_call_id": tr["tool_call_id"],
129
- "content": tr["content"],
171
+ "tool_call_id": tool_response["tool_call_id"],
172
+ "content": tool_response["content"],
130
173
  }
131
174
  )
132
175
  raise MaxRoundsExceededError(f"Max conversation rounds exceeded ({max_rounds})")