janito 2.3.1__tar.gz → 2.4.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 (292) hide show
  1. janito-2.4.0/.codespellrc +2 -0
  2. janito-2.4.0/.github/workflows/python-app.yml +35 -0
  3. janito-2.4.0/.gitignore +66 -0
  4. janito-2.4.0/.pre-commit-config.yaml +17 -0
  5. janito-2.4.0/.secrets.baseline +11 -0
  6. janito-2.4.0/CHANGELOG.md +57 -0
  7. {janito-2.3.1 → janito-2.4.0}/PKG-INFO +51 -16
  8. janito-2.4.0/PROVIDERS.md +47 -0
  9. janito-2.4.0/README-dev.md +50 -0
  10. {janito-2.3.1 → janito-2.4.0}/README.md +394 -360
  11. janito-2.4.0/STRUCTURE.md +14 -0
  12. janito-2.4.0/TEST_STRATEGY.md +0 -0
  13. janito-2.4.0/benchmark/cli_basics.py +4 -0
  14. janito-2.4.0/docs/DIV.md +42 -0
  15. janito-2.4.0/docs/Interfaces.txt +24 -0
  16. janito-2.4.0/docs/TOOLBAR-STYLING.md +80 -0
  17. janito-2.4.0/docs/about/costs.md +30 -0
  18. janito-2.4.0/docs/about/vs-webchats.md +27 -0
  19. janito-2.4.0/docs/about/why.md +29 -0
  20. janito-2.4.0/docs/alternatives.md +24 -0
  21. janito-2.4.0/docs/code_intelligence/agentic-frameworks-comparison.md +43 -0
  22. janito-2.4.0/docs/code_intelligence/code-generation-challenges.md +59 -0
  23. janito-2.4.0/docs/code_intelligence/code-generation-observability.md +31 -0
  24. janito-2.4.0/docs/code_intelligence/our-approach.md +35 -0
  25. janito-2.4.0/docs/code_intelligence/why-string-replacement.md +41 -0
  26. janito-2.4.0/docs/concepts/analysis-style.md +41 -0
  27. janito-2.4.0/docs/concepts/index.md +12 -0
  28. janito-2.4.0/docs/concepts/language-model-clients.md +46 -0
  29. janito-2.4.0/docs/concepts/prompt-design-style.md +97 -0
  30. janito-2.4.0/docs/deepseek-setup.md +62 -0
  31. janito-2.4.0/docs/driver-flow.md +65 -0
  32. janito-2.4.0/docs/driver-request-cancellation.md +64 -0
  33. janito-2.4.0/docs/drivers/events.md +9 -0
  34. janito-2.4.0/docs/drivers.md +59 -0
  35. janito-2.4.0/docs/event-bus.md +94 -0
  36. janito-2.4.0/docs/guides/configuration.md +41 -0
  37. janito-2.4.0/docs/guides/developing.md +29 -0
  38. janito-2.4.0/docs/guides/installation.md +39 -0
  39. janito-2.4.0/docs/guides/profiles.md +80 -0
  40. janito-2.4.0/docs/guides/prompting/README.md +10 -0
  41. janito-2.4.0/docs/guides/single-shot-terminal.md +18 -0
  42. janito-2.4.0/docs/guides/terminal-shell.md +93 -0
  43. janito-2.4.0/docs/guides/tools-developer-guide.md +104 -0
  44. janito-2.4.0/docs/guides/using.md +33 -0
  45. janito-2.4.0/docs/guides/using_tools.md +19 -0
  46. janito-2.4.0/docs/imgs/code-generation-observability.png +0 -0
  47. janito-2.4.0/docs/imgs/code_generation_observability.png +0 -0
  48. janito-2.4.0/docs/imgs/happy-programmer.png +0 -0
  49. janito-2.4.0/docs/imgs/happy-programmer.svg +26 -0
  50. janito-2.4.0/docs/imgs/terminal-one-shot.png +0 -0
  51. janito-2.4.0/docs/imgs/terminal-shell.png +0 -0
  52. janito-2.4.0/docs/imgs/terminal_one_shot.png +0 -0
  53. janito-2.4.0/docs/imgs/terminal_shell.png +0 -0
  54. janito-2.4.0/docs/index.md +24 -0
  55. janito-2.4.0/docs/llm-drivers-required-config.md +43 -0
  56. janito-2.4.0/docs/llm-drivers.md +71 -0
  57. janito-2.4.0/docs/meta/developer-toolchain.md +40 -0
  58. janito-2.4.0/docs/meta/quality-checks.txt +3 -0
  59. janito-2.4.0/docs/reference/api.md +106 -0
  60. janito-2.4.0/docs/reference/azure-openai.md +37 -0
  61. janito-2.4.0/docs/reference/cli-options.md +74 -0
  62. janito-2.4.0/docs/reference/message-handler-model.md +69 -0
  63. janito-2.4.0/docs/reference/rich-message-handler.md +39 -0
  64. janito-2.4.0/docs/supported-providers-models.md +51 -0
  65. janito-2.4.0/docs/terms.md +44 -0
  66. janito-2.4.0/docs/tools-index.md +18 -0
  67. janito-2.4.0/docs/tools-natural-results.md +37 -0
  68. janito-2.4.0/docs/tools-precision.md +66 -0
  69. {janito-2.3.1 → janito-2.4.0}/janito/__init__.py +1 -1
  70. janito-2.4.0/janito/_version.py +57 -0
  71. janito-2.4.0/janito/agent/setup_agent.py +222 -0
  72. janito-2.4.0/janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +44 -0
  73. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/bindings.py +21 -2
  74. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/chat_entry.py +2 -3
  75. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/prompt_style.py +5 -0
  76. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/session.py +80 -94
  77. janito-2.4.0/janito/cli/chat_mode/session_profile_select.py +80 -0
  78. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/__init__.py +13 -7
  79. janito-2.4.0/janito/cli/chat_mode/shell/commands/_priv_check.py +5 -0
  80. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/conversation_restart.py +30 -0
  81. janito-2.4.0/janito/cli/chat_mode/shell/commands/execute.py +42 -0
  82. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/help.py +6 -3
  83. janito-2.4.0/janito/cli/chat_mode/shell/commands/model.py +28 -0
  84. janito-2.4.0/janito/cli/chat_mode/shell/commands/read.py +37 -0
  85. janito-2.4.0/janito/cli/chat_mode/shell/commands/tools.py +70 -0
  86. janito-2.4.0/janito/cli/chat_mode/shell/commands/write.py +37 -0
  87. janito-2.4.0/janito/cli/chat_mode/shell/commands.bak.zip +0 -0
  88. janito-2.4.0/janito/cli/chat_mode/shell/session.bak.zip +0 -0
  89. janito-2.4.0/janito/cli/chat_mode/toolbar.py +109 -0
  90. janito-2.4.0/janito/cli/cli_commands/list_tools.py +86 -0
  91. {janito-2.3.1 → janito-2.4.0}/janito/cli/cli_commands/model_utils.py +95 -95
  92. janito-2.4.0/janito/cli/cli_commands/show_system_prompt.py +105 -0
  93. {janito-2.3.1 → janito-2.4.0}/janito/cli/config.py +5 -6
  94. {janito-2.3.1 → janito-2.4.0}/janito/cli/core/getters.py +33 -33
  95. {janito-2.3.1 → janito-2.4.0}/janito/cli/core/runner.py +25 -18
  96. {janito-2.3.1 → janito-2.4.0}/janito/cli/core/setters.py +10 -1
  97. {janito-2.3.1 → janito-2.4.0}/janito/cli/main_cli.py +28 -5
  98. {janito-2.3.1 → janito-2.4.0}/janito/cli/prompt_core.py +18 -2
  99. janito-2.4.0/janito/cli/prompt_setup.py +56 -0
  100. janito-2.4.0/janito/cli/single_shot_mode/handler.py +88 -0
  101. {janito-2.3.1 → janito-2.4.0}/janito/cli/verbose_output.py +1 -1
  102. {janito-2.3.1 → janito-2.4.0}/janito/config_manager.py +125 -112
  103. janito-2.4.0/janito/drivers/dashscope.bak.zip +0 -0
  104. janito-2.4.0/janito/drivers/openai/README.md +20 -0
  105. janito-2.4.0/janito/drivers/openai_responses.bak.zip +0 -0
  106. {janito-2.3.1 → janito-2.4.0}/janito/event_bus/event.py +2 -2
  107. {janito-2.3.1 → janito-2.4.0}/janito/i18n/pt.py +0 -1
  108. janito-2.4.0/janito/llm/README.md +23 -0
  109. {janito-2.3.1 → janito-2.4.0}/janito/llm/agent.py +80 -16
  110. {janito-2.3.1 → janito-2.4.0}/janito/llm/auth.py +63 -63
  111. {janito-2.3.1 → janito-2.4.0}/janito/llm/driver.py +8 -0
  112. {janito-2.3.1 → janito-2.4.0}/janito/provider_registry.py +178 -176
  113. {janito-2.3.1 → janito-2.4.0}/janito/providers/azure_openai/model_info.py +16 -16
  114. janito-2.4.0/janito/providers/dashscope.bak.zip +0 -0
  115. {janito-2.3.1 → janito-2.4.0}/janito/providers/registry.py +26 -26
  116. janito-2.4.0/janito/shell.bak.zip +0 -0
  117. janito-2.4.0/janito/tools/DOCSTRING_STANDARD.txt +33 -0
  118. janito-2.4.0/janito/tools/README.md +3 -0
  119. janito-2.4.0/janito/tools/__init__.py +34 -0
  120. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/__init__.py +65 -62
  121. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/adapter.py +18 -35
  122. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/ask_user.py +3 -4
  123. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/copy_file.py +2 -2
  124. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/create_directory.py +2 -2
  125. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/create_file.py +2 -2
  126. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/delete_text_in_file.py +2 -2
  127. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/fetch_url.py +2 -2
  128. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/find_files.py +2 -1
  129. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/core.py +2 -2
  130. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/search_outline.py +2 -2
  131. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/move_file.py +2 -2
  132. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/open_html_in_browser.py +2 -1
  133. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/open_url.py +2 -2
  134. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/python_code_run.py +3 -3
  135. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/python_command_run.py +3 -3
  136. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/python_file_run.py +3 -3
  137. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/remove_directory.py +2 -2
  138. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/remove_file.py +2 -2
  139. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/replace_text_in_file.py +2 -2
  140. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/run_bash_command.py +3 -3
  141. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/run_powershell_command.py +3 -3
  142. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/search_text/core.py +2 -2
  143. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/core.py +2 -2
  144. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/view_file.py +2 -1
  145. janito-2.4.0/janito/tools/outline_file.bak.zip +0 -0
  146. janito-2.4.0/janito/tools/permissions.py +45 -0
  147. janito-2.4.0/janito/tools/permissions_parse.py +12 -0
  148. {janito-2.3.1 → janito-2.4.0}/janito/tools/tool_base.py +14 -1
  149. {janito-2.3.1 → janito-2.4.0}/janito/tools/tool_utils.py +4 -6
  150. {janito-2.3.1 → janito-2.4.0}/janito/tools/tools_adapter.py +25 -20
  151. {janito-2.3.1 → janito-2.4.0}/janito.egg-info/PKG-INFO +51 -16
  152. {janito-2.3.1 → janito-2.4.0}/janito.egg-info/SOURCES.txt +95 -9
  153. {janito-2.3.1 → janito-2.4.0}/janito.egg-info/requires.txt +3 -2
  154. janito-2.4.0/janito2.bak.zip +0 -0
  155. janito-2.4.0/mkdocs.yml +73 -0
  156. {janito-2.3.1 → janito-2.4.0}/pyproject.toml +6 -3
  157. janito-2.4.0/pytest.ini +2 -0
  158. {janito-2.3.1 → janito-2.4.0}/requirements-dev.txt +2 -1
  159. {janito-2.3.1 → janito-2.4.0}/requirements.txt +1 -1
  160. janito-2.4.0/tests/adapters/local/get_file_outline/test_core_outline.py +24 -0
  161. {janito-2.3.1 → janito-2.4.0}/tests/test_cli_list_models.py +26 -26
  162. {janito-2.3.1 → janito-2.4.0}/tests/test_cli_list_providers.py +22 -22
  163. janito-2.4.0/tools/release.py +154 -0
  164. janito-2.4.0/tox.ini +14 -0
  165. janito-2.3.1/janito/agent/setup_agent.py +0 -148
  166. janito-2.3.1/janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2 +0 -13
  167. janito-2.3.1/janito/agent/templates/profiles/system_prompt_template_main.txt.j2 +0 -37
  168. janito-2.3.1/janito/cli/chat_mode/shell/commands/edit.py +0 -25
  169. janito-2.3.1/janito/cli/chat_mode/shell/commands/exec.py +0 -27
  170. janito-2.3.1/janito/cli/chat_mode/shell/commands/termweb_log.py +0 -92
  171. janito-2.3.1/janito/cli/chat_mode/shell/commands/tools.py +0 -43
  172. janito-2.3.1/janito/cli/chat_mode/toolbar.py +0 -92
  173. janito-2.3.1/janito/cli/cli_commands/list_tools.py +0 -53
  174. janito-2.3.1/janito/cli/cli_commands/show_system_prompt.py +0 -62
  175. janito-2.3.1/janito/cli/single_shot_mode/handler.py +0 -147
  176. janito-2.3.1/janito/cli/termweb_starter.py +0 -122
  177. janito-2.3.1/janito/termweb/app.py +0 -95
  178. janito-2.3.1/janito/tools/__init__.py +0 -20
  179. janito-2.3.1/janito/version.py +0 -4
  180. {janito-2.3.1 → janito-2.4.0}/LICENSE +0 -0
  181. {janito-2.3.1 → janito-2.4.0}/janito/__main__.py +0 -0
  182. {janito-2.3.1 → janito-2.4.0}/janito/cli/__init__.py +0 -0
  183. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/autocomplete.py +0 -0
  184. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/base.py +0 -0
  185. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/clear.py +0 -0
  186. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/history_view.py +0 -0
  187. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/lang.py +0 -0
  188. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/livelogs.py +0 -0
  189. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/multi.py +0 -0
  190. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/prompt.py +0 -0
  191. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/role.py +0 -0
  192. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/session.py +0 -0
  193. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/session_control.py +0 -0
  194. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/utility.py +0 -0
  195. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/commands/verbose.py +0 -0
  196. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/input_history.py +0 -0
  197. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/session/__init__.py +0 -0
  198. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/session/history.py +0 -0
  199. {janito-2.3.1 → janito-2.4.0}/janito/cli/chat_mode/shell/session/manager.py +0 -0
  200. {janito-2.3.1 → janito-2.4.0}/janito/cli/cli_commands/list_models.py +0 -0
  201. {janito-2.3.1 → janito-2.4.0}/janito/cli/cli_commands/list_providers.py +0 -0
  202. {janito-2.3.1 → janito-2.4.0}/janito/cli/cli_commands/model_selection.py +0 -0
  203. {janito-2.3.1 → janito-2.4.0}/janito/cli/cli_commands/set_api_key.py +0 -0
  204. {janito-2.3.1 → janito-2.4.0}/janito/cli/cli_commands/show_config.py +0 -0
  205. {janito-2.3.1 → janito-2.4.0}/janito/cli/console.py +0 -0
  206. {janito-2.3.1 → janito-2.4.0}/janito/cli/core/__init__.py +0 -0
  207. {janito-2.3.1 → janito-2.4.0}/janito/cli/core/event_logger.py +0 -0
  208. {janito-2.3.1 → janito-2.4.0}/janito/cli/core/unsetters.py +0 -0
  209. {janito-2.3.1 → janito-2.4.0}/janito/cli/main.py +0 -0
  210. {janito-2.3.1 → janito-2.4.0}/janito/cli/prompt_handler.py +0 -0
  211. {janito-2.3.1 → janito-2.4.0}/janito/cli/rich_terminal_reporter.py +0 -0
  212. {janito-2.3.1 → janito-2.4.0}/janito/cli/single_shot_mode/__init__.py +0 -0
  213. {janito-2.3.1 → janito-2.4.0}/janito/cli/utils.py +0 -0
  214. {janito-2.3.1 → janito-2.4.0}/janito/config.py +0 -0
  215. {janito-2.3.1 → janito-2.4.0}/janito/conversation_history.py +0 -0
  216. {janito-2.3.1 → janito-2.4.0}/janito/dir_walk_utils.py +0 -0
  217. {janito-2.3.1 → janito-2.4.0}/janito/driver_events.py +0 -0
  218. {janito-2.3.1 → janito-2.4.0}/janito/drivers/anthropic/driver.py +0 -0
  219. {janito-2.3.1 → janito-2.4.0}/janito/drivers/azure_openai/driver.py +0 -0
  220. {janito-2.3.1 → janito-2.4.0}/janito/drivers/driver_registry.py +0 -0
  221. {janito-2.3.1 → janito-2.4.0}/janito/drivers/mistralai/driver.py +0 -0
  222. {janito-2.3.1 → janito-2.4.0}/janito/drivers/openai/driver.py +0 -0
  223. {janito-2.3.1 → janito-2.4.0}/janito/event_bus/__init__.py +0 -0
  224. {janito-2.3.1 → janito-2.4.0}/janito/event_bus/bus.py +0 -0
  225. {janito-2.3.1 → janito-2.4.0}/janito/event_bus/handler.py +0 -0
  226. {janito-2.3.1 → janito-2.4.0}/janito/event_bus/queue_bus.py +0 -0
  227. {janito-2.3.1 → janito-2.4.0}/janito/exceptions.py +0 -0
  228. {janito-2.3.1 → janito-2.4.0}/janito/formatting.py +0 -0
  229. {janito-2.3.1 → janito-2.4.0}/janito/formatting_token.py +0 -0
  230. {janito-2.3.1 → janito-2.4.0}/janito/gitignore_utils.py +0 -0
  231. {janito-2.3.1 → janito-2.4.0}/janito/i18n/__init__.py +0 -0
  232. {janito-2.3.1 → janito-2.4.0}/janito/i18n/messages.py +0 -0
  233. {janito-2.3.1 → janito-2.4.0}/janito/llm/__init__.py +0 -0
  234. {janito-2.3.1 → janito-2.4.0}/janito/llm/driver_config.py +0 -0
  235. {janito-2.3.1 → janito-2.4.0}/janito/llm/driver_config_builder.py +0 -0
  236. {janito-2.3.1 → janito-2.4.0}/janito/llm/driver_input.py +0 -0
  237. {janito-2.3.1 → janito-2.4.0}/janito/llm/message_parts.py +0 -0
  238. {janito-2.3.1 → janito-2.4.0}/janito/llm/model.py +0 -0
  239. {janito-2.3.1 → janito-2.4.0}/janito/llm/provider.py +0 -0
  240. {janito-2.3.1 → janito-2.4.0}/janito/perf_singleton.py +0 -0
  241. {janito-2.3.1 → janito-2.4.0}/janito/performance_collector.py +0 -0
  242. {janito-2.3.1 → janito-2.4.0}/janito/platform_discovery.py +0 -0
  243. {janito-2.3.1 → janito-2.4.0}/janito/provider_config.py +0 -0
  244. {janito-2.3.1 → janito-2.4.0}/janito/providers/__init__.py +0 -0
  245. {janito-2.3.1 → janito-2.4.0}/janito/providers/anthropic/model_info.py +0 -0
  246. {janito-2.3.1 → janito-2.4.0}/janito/providers/anthropic/provider.py +0 -0
  247. {janito-2.3.1 → janito-2.4.0}/janito/providers/azure_openai/provider.py +0 -0
  248. {janito-2.3.1 → janito-2.4.0}/janito/providers/deepseek/__init__.py +0 -0
  249. {janito-2.3.1 → janito-2.4.0}/janito/providers/deepseek/model_info.py +0 -0
  250. {janito-2.3.1 → janito-2.4.0}/janito/providers/deepseek/provider.py +0 -0
  251. {janito-2.3.1 → janito-2.4.0}/janito/providers/google/__init__.py +0 -0
  252. {janito-2.3.1 → janito-2.4.0}/janito/providers/google/model_info.py +0 -0
  253. {janito-2.3.1 → janito-2.4.0}/janito/providers/google/provider.py +0 -0
  254. {janito-2.3.1 → janito-2.4.0}/janito/providers/mistralai/model_info.py +0 -0
  255. {janito-2.3.1 → janito-2.4.0}/janito/providers/mistralai/provider.py +0 -0
  256. {janito-2.3.1 → janito-2.4.0}/janito/providers/openai/__init__.py +0 -0
  257. {janito-2.3.1 → janito-2.4.0}/janito/providers/openai/model_info.py +0 -0
  258. {janito-2.3.1 → janito-2.4.0}/janito/providers/openai/provider.py +0 -0
  259. {janito-2.3.1 → janito-2.4.0}/janito/providers/openai/schema_generator.py +0 -0
  260. {janito-2.3.1 → janito-2.4.0}/janito/providers/provider_static_info.py +0 -0
  261. {janito-2.3.1 → janito-2.4.0}/janito/report_events.py +0 -0
  262. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/__init__.py +0 -0
  263. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/__init__.py +0 -0
  264. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/java_outline.py +0 -0
  265. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/markdown_outline.py +0 -0
  266. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/python_outline.py +0 -0
  267. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/get_file_outline/python_outline_v2.py +0 -0
  268. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/search_text/__init__.py +0 -0
  269. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/search_text/match_lines.py +0 -0
  270. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/search_text/pattern_utils.py +0 -0
  271. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/search_text/traverse_directory.py +0 -0
  272. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/__init__.py +0 -0
  273. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/css_validator.py +0 -0
  274. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/html_validator.py +0 -0
  275. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/js_validator.py +0 -0
  276. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/json_validator.py +0 -0
  277. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +0 -0
  278. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +0 -0
  279. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/python_validator.py +0 -0
  280. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/xml_validator.py +0 -0
  281. {janito-2.3.1 → janito-2.4.0}/janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +0 -0
  282. {janito-2.3.1 → janito-2.4.0}/janito/tools/inspect_registry.py +0 -0
  283. {janito-2.3.1 → janito-2.4.0}/janito/tools/tool_events.py +0 -0
  284. {janito-2.3.1 → janito-2.4.0}/janito/tools/tool_run_exception.py +0 -0
  285. {janito-2.3.1 → janito-2.4.0}/janito/tools/tool_use_tracker.py +0 -0
  286. {janito-2.3.1 → janito-2.4.0}/janito/tools/tools_schema.py +0 -0
  287. {janito-2.3.1 → janito-2.4.0}/janito/utils.py +0 -0
  288. {janito-2.3.1 → janito-2.4.0}/janito.egg-info/dependency_links.txt +0 -0
  289. {janito-2.3.1 → janito-2.4.0}/janito.egg-info/entry_points.txt +0 -0
  290. {janito-2.3.1 → janito-2.4.0}/janito.egg-info/top_level.txt +0 -0
  291. {janito-2.3.1 → janito-2.4.0}/setup.cfg +0 -0
  292. {janito-2.3.1 → janito-2.4.0}/tests/test_cli_version.py +0 -0
@@ -0,0 +1,2 @@
1
+ [codespell]
2
+ skip = janito/i18n/pt.py
@@ -0,0 +1,35 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Python application
5
+
6
+ on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
+ branches: [ "main" ]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ python-version: ["pypy3.10", "3.10", "3.11", "3.12", "3.13"]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ - name: Install dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install tox
33
+ - name: Test with tox
34
+ run: |
35
+ tox -e py
@@ -0,0 +1,66 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ .Python
8
+ build/
9
+ develop-eggs/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ lib/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+ # Wheel files
24
+ *.whl
25
+
26
+ # Installer logs
27
+ pip-log.txt
28
+ pip-delete-this-directory.txt
29
+
30
+ # Unit test / coverage reports
31
+ htmlcov/
32
+ .tox/
33
+ .nox/
34
+ .coverage
35
+ .coverage.*
36
+ .cache
37
+ nosetests.xml
38
+ coverage.xml
39
+ *.cover
40
+ .hypothesis/
41
+ .pytest_cache/
42
+
43
+ # Jupyter Notebook
44
+ .ipynb_checkpoints
45
+
46
+ # pyenv
47
+ .python-version
48
+
49
+ # mypy
50
+ .mypy_cache/
51
+ .dmypy.json
52
+
53
+ # Pyre type checker
54
+ .pyre/
55
+
56
+ # Backup files
57
+ *.bak
58
+
59
+ # Ruff cache
60
+ .ruff_cache/
61
+
62
+ # Janito logs/history (if not needed in VCS)
63
+ .janito/
64
+
65
+ # MkDocs build output
66
+ site/
@@ -0,0 +1,17 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.11.9 # Updated to latest version after autoupdate
4
+ hooks:
5
+ - id: ruff
6
+ args: ["--fix"] # Optional: auto-fix issues if possible
7
+
8
+ - repo: https://github.com/Yelp/detect-secrets
9
+ rev: v1.4.0 # Use the latest stable version or specify as needed
10
+ hooks:
11
+ - id: detect-secrets
12
+ args: ["--baseline", ".secrets.baseline", "--exclude-files", "janito/i18n/pt.py"]
13
+
14
+ - repo: https://github.com/codespell-project/codespell
15
+ rev: v2.4.1
16
+ hooks:
17
+ - id: codespell
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "plugins_used": [],
4
+ "results": {},
5
+ "generated_at": "2024-06-08T00:00:00Z",
6
+ "allowlist": {
7
+ "values": [
8
+ "YOUR_AZURE_OPENAI_KEY"
9
+ ]
10
+ }
11
+ }
@@ -0,0 +1,57 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [2.3.1] - 2025-06-25
6
+ ### Changed
7
+ - Bumped version to 2.3.1 in `version.py`, `pyproject.toml`, and `__init__.py`.
8
+
9
+ ## [2.3.0] - 2025-06-25
10
+ ### Added
11
+ - requirements-dev.txt with development dependencies (pytest, pre-commit, ruff, detect-secrets, codespell, black) for code quality and testing
12
+ - Java outline support to get_file_outline tool, including package-private methods
13
+ - create_driver method to AzureOpenAIProvider for driver instantiation
14
+ - CLI --version test and suppress pytest-asyncio deprecation warning
15
+ - New dependencies: prompt_toolkit, lxml, requests, bs4 to requirements.txt
16
+
17
+ ### Changed
18
+ - Improved error messages and documentation
19
+ - Refined error handling in open_html_in_browser.py and open_url.py
20
+ - Refactor remove_file tool: use ReportAction.DELETE for all file removal actions
21
+ - Remove redundant _prepare_api_kwargs override in AzureOpenAIModelDriver
22
+ - Refactor(azure_openai): use 'model' directly in API kwargs, remove deployment_name remapping
23
+ - Add public read-only driver_config property to AzureOpenAIProvider
24
+ - Add _prepare_api_kwargs to support deployment_name for Azure OpenAI API compatibility
25
+ - Update toolbar bindings: add CTRL-C for interrupt/exit, clarify F1 usage
26
+ - Update pyproject.toml optional-dependencies section for setuptools compatibility
27
+ - Remove references to max_results in FindFilesTool docstring
28
+ - Refactor: use .jsonl extension for input history files instead of .log
29
+ - Refactor get_file_outline core logic to remove duplication and add tests
30
+ - Test CLI: Ensure error on missing provider and validate supported models output for each provider
31
+ - Configure dynamic dependencies in pyproject.toml
32
+ - Define dependencies in requirements.txt: attrs, rich, pathspec, setuptools, pyyaml, jinja2
33
+ - Add workdir support to LocalToolsAdapter and CLI; improve Python tool adapters
34
+ - Friendly error message when the provider is not present from the available ones
35
+
36
+ ### Fixed
37
+ - Ensure error on missing provider and validate supported models output for each provider
38
+ - Update supported models table; remove o4-mini-high model from code and docs
39
+
40
+ ## [2.1.1] - 2024-06-23
41
+ ### Changed
42
+ - Bumped version to 2.1.1 in `version.py`, `pyproject.toml`, and `__init__.py`.
43
+ - docs: add DeepSeek setup guide, update navigation and references
44
+ - Add docs/deepseek-setup.md with setup instructions for DeepSeek provider
45
+ - Link DeepSeek setup in docs/index.md and mkdocs.yml navigation
46
+ - Fix model name: change 'deepseek-coder' to 'deepseek-reasoner' in DeepSeek provider and model_info
47
+ - Update DeepSeek provider docstrings and options to match supported models
48
+
49
+ ## [2.1.0] - 2024-06-09
50
+ ### Added
51
+
52
+ ### Changed
53
+ - Bumped version to 2.1.0 in `version.py`, `pyproject.toml`, and `__init__.py`.
54
+
55
+ ---
56
+
57
+ *Older changes may not be listed.*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.3.1
3
+ Version: 2.4.0
4
4
  Summary: A new Python package called janito.
5
5
  Author-email: João Pinto <lamego.pinto@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/janito-dev/janito
@@ -17,7 +17,7 @@ Requires-Dist: prompt_toolkit>=3.0.51
17
17
  Requires-Dist: lxml>=5.4.0
18
18
  Requires-Dist: requests>=2.32.4
19
19
  Requires-Dist: bs4>=0.0.2
20
- Requires-Dist: openai
20
+ Requires-Dist: questionary>=2.0.1
21
21
  Provides-Extra: dev
22
22
  Requires-Dist: pytest; extra == "dev"
23
23
  Requires-Dist: pre-commit; extra == "dev"
@@ -25,7 +25,8 @@ Requires-Dist: ruff==0.11.9; extra == "dev"
25
25
  Requires-Dist: detect-secrets==1.4.0; extra == "dev"
26
26
  Requires-Dist: codespell==2.4.1; extra == "dev"
27
27
  Requires-Dist: black; extra == "dev"
28
- Requires-Dist: openai; extra == "dev"
28
+ Requires-Dist: questionary>=2.0.1; extra == "dev"
29
+ Requires-Dist: setuptools_scm>=8.0; extra == "dev"
29
30
  Dynamic: license-file
30
31
 
31
32
  # Janito
@@ -106,6 +107,21 @@ janito -set provider=PROVIDER
106
107
 
107
108
  After installation, use the `janito` command in your terminal.
108
109
 
110
+ Janito supports both general-purpose and specialized assistance through the use of **profiles**. Profiles allow you to select a specific system prompt template and behavior for the agent, enabling workflows tailored to different roles or tasks (e.g., developer, writer, data analyst), or to use Janito as a generic AI assistant.
111
+
112
+ ### Profiles: General-Purpose and Specialized Assistance
113
+
114
+ - By default, Janito acts as a general-purpose assistant.
115
+ - You can select a specialized profile using the `--profile` option:
116
+ ```bash
117
+ janito --profile developer "Refactor this code for better readability."
118
+ janito --profile writer "Draft a blog post about AI in healthcare."
119
+ ```
120
+ - Profiles change the system prompt and agent behavior to suit the selected role or workflow.
121
+ - To see available profiles or customize them, refer to the documentation or the `agent/templates/profiles/` directory.
122
+
123
+ > **Tip:** Use `--profile` for targeted workflows, or omit it for a general-purpose assistant.
124
+
109
125
  Janito has configuration options, like `--set api-key API_KEY` and `--set provider=PROVIDER`, that create durable configurations and single shoot options, like `-p PROVIDER` and `-m MODEL`, that are active for the single run of the command or session.
110
126
 
111
127
  ### Basic Commands
@@ -153,25 +169,38 @@ Janito has configuration options, like `--set api-key API_KEY` and `--set provid
153
169
 
154
170
  - **Enable Inline Web File Viewer for Clickable Links**
155
171
 
156
- 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:
172
+ 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 `--web` flag:
157
173
 
158
174
  ```bash
159
- janito -w
175
+ janito --web
160
176
  ```
161
177
 
162
- 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.
178
+ This starts the lightweight web file viewer () in the background, allowing you to inspect files referenced in responses directly in your browser. Combine with interactive mode or prompts as needed.
163
179
 
164
180
  > **Tip:** Use with the interactive shell for the best experience with clickable file links.
165
181
 
166
182
 
167
183
  - **Enable Execution Tools (Code/Shell Execution)**
168
184
 
169
- 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:
170
-
171
- ```bash
172
- janito -x "Run this code: print('Hello, world!')"
173
- ```
174
- > **Warning:** Enabling execution tools allows running arbitrary code or shell commands. Only use `--exec` if you trust your prompt and environment.
185
+ By default, **all tool privileges (read, write, execute)** are disabled for safety. This means Janito starts with no permissions to run tools that read, write, or execute code/shell commands unless you explicitly enable them.
186
+
187
+ - To enable **read** tools (e.g., file reading, searching): add `-r` or `--read`
188
+ - To enable **write** tools (e.g., file editing): add `-w` or `--write`
189
+ - To enable **execution** tools (code/shell execution): add `-x` or `--exec`
190
+
191
+ You can combine these flags as needed. For example, to enable both read and write tools:
192
+
193
+ ```bash
194
+ janito -r -w "Read and update this file: ..."
195
+ ```
196
+
197
+ To enable all permissions (read, write, execute):
198
+
199
+ ```bash
200
+ janito -r -w -x "Run this code: print('Hello, world!')"
201
+ ```
202
+
203
+ > **Warning:** Enabling execution tools allows running arbitrary code or shell commands. Only use `--exec` if you trust your prompt and environment.
175
204
 
176
205
  - **Set a System Prompt**
177
206
  ```bash
@@ -203,7 +232,7 @@ Janito has configuration options, like `--set api-key API_KEY` and `--set provid
203
232
  ### Core CLI Options
204
233
  | Option | Description |
205
234
  |------------------------|-----------------------------------------------------------------------------|
206
- | `-w`, `--web` | Enable the builtin lightweight web file viewer for clickable file links (termweb). |
235
+ | `--web` | Enable the builtin lightweight web file viewer for clickable file links (). |
207
236
  | `--version` | Show program version |
208
237
  | `--list-tools` | List all registered tools |
209
238
  | `--list-providers` | List all supported LLM providers |
@@ -212,7 +241,7 @@ Janito has configuration options, like `--set api-key API_KEY` and `--set provid
212
241
  | `--set provider=name` | Set the current LLM provider (e.g., `janito --set provider=openai`) |
213
242
  | `--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`) |
214
243
  | `-s`, `--system` | Set a system prompt (e.g., `janito -s path/to/system_prompt.txt "Your prompt here"`) |
215
- | `-r`, `--role` | Set the role for the agent (overrides config) (e.g., `janito -r "assistant" "Your prompt here"`) |
244
+
216
245
  | `-p`, `--provider` | Select LLM provider (overrides config) (e.g., `janito -p openai "Your prompt here"`) |
217
246
  | `-m`, `--model` | Select model for the provider (e.g., `janito -m gpt-3.5-turbo "Your prompt here"`) |
218
247
  | `-v`, `--verbose` | Print extra information before answering |
@@ -246,8 +275,8 @@ Once inside the interactive chat mode, you can use these slash commands:
246
275
  | Command | Description |
247
276
  |----------------------|----------------------------------------------|
248
277
  | `/tools` | List available tools |
249
- | `/termweb-status` | Show status of termweb server |
250
- | `/termweb-logs` | Show last lines of termweb logs |
278
+ | `/-status` | Show status of server |
279
+ | `/-logs` | Show last lines of logs |
251
280
  | `/livelogs` | Show live updates from server log file |
252
281
  | `/edit <filename>` | Open file in browser-based editor |
253
282
 
@@ -274,6 +303,12 @@ See [docs/supported-providers-models.md](docs/supported-providers-models.md) for
274
303
 
275
304
  Contributions are welcome! Please see the `CONTRIBUTING.md` (if available) or open an issue to get started.
276
305
 
306
+ ---
307
+
308
+ ## Developer Documentation
309
+
310
+ For developer-specific setup, versioning, and contribution guidelines, see [README-dev.md](./README-dev.md).
311
+
277
312
  ## License
278
313
 
279
314
  This project is licensed under the terms of the MIT license.
@@ -0,0 +1,47 @@
1
+ ## Providers
2
+
3
+ ### Provider Parameters (`config`)
4
+
5
+ All LLM providers support an optional `config` dictionary for provider-specific settings. You can pass this dictionary to the provider constructor:
6
+
7
+ ```python
8
+ provider = OpenAIProvider(model_name="gpt-4o", config={"base_url": "https://api.example.com/v1"})
9
+ ```
10
+
11
+ - For `openai` and compatible providers, you can set `base_url` to use a custom endpoint.
12
+ - For Azure, additional options like `endpoint` and `api_version` may be supported as keys within `config`.
13
+
14
+ ---
15
+
16
+ ### anthropic
17
+
18
+ **Description:** Anthropic Claude v3 (Opus, Sonnet, Haiku), via official Anthropic API.
19
+
20
+ **Models:**
21
+ - claude-3-opus-20240229: Most advanced, very high context and reasoning.
22
+ - claude-3-sonnet-20240229: Fast, large-context, good for chat.
23
+ - claude-3-haiku-20240307: Fastest, cheap, smaller context.
24
+
25
+ **Auth:**
26
+ - Expects official Claude API key via credential system only (environment variables are not supported).
27
+
28
+ **Usage:**
29
+ - Use provider name `anthropic` in CLI/config. Model selection applies as above.
30
+
31
+ ---
32
+
33
+ ### azure_openai
34
+
35
+ **Description:** Azure-hosted OpenAI models (API-compatible, may require endpoint and version)
36
+
37
+ **Models:**
38
+ - azure-gpt-35-turbo: GPT-3.5 family turbo, hosted via Azure.
39
+ - azure-gpt-4: GPT-4 model, hosted via Azure.
40
+
41
+ **Auth:**
42
+ - Expects API key and Azure endpoint via credential manager only (environment variables are not supported).
43
+
44
+ **Usage:**
45
+ - Use provider name `azure_openai` in CLI/config. Model selection as shown above.
46
+
47
+ ---
@@ -0,0 +1,50 @@
1
+ # Developer README for janito
2
+
3
+ This document provides guidelines and instructions for developers contributing to the `janito` project.
4
+
5
+ ## Version Management
6
+
7
+ - The project uses [setuptools_scm](https://github.com/pypa/setuptools_scm) for automatic version management.
8
+ - Do **not** manually set the version in any Python file or in `pyproject.toml`.
9
+ - The version is derived from your latest Git tag. To update the version, create a new tag:
10
+ ```sh
11
+ git tag vX.Y.Z
12
+ git push --tags
13
+ ```
14
+ - The `__version__` attribute is available via `janito.__version__`.
15
+
16
+ ## Project Structure
17
+
18
+ - Source code is in the `janito/` directory.
19
+ - Entry points and CLI are defined in `janito/__main__.py`.
20
+ - Tests should be placed in a `tests/` directory (create if missing).
21
+
22
+ ## Dependencies
23
+
24
+ - Runtime dependencies are listed in `requirements.txt`.
25
+ - Development dependencies are in `requirements-dev.txt`.
26
+ - Dependencies are dynamically loaded via `pyproject.toml`.
27
+
28
+ ## Building and Installing
29
+
30
+ - To build the project:
31
+ ```sh
32
+ python -m build
33
+ ```
34
+ - To install in editable mode:
35
+ ```sh
36
+ pip install -e .
37
+ ```
38
+
39
+ ## Running Tests
40
+
41
+ - (Add test instructions here if/when tests are present)
42
+
43
+ ## Contributing
44
+
45
+ - Follow PEP8 and use [ruff](https://github.com/charliermarsh/ruff) for linting.
46
+ - Document all public functions and classes.
47
+ - Update this README-dev.md as needed for developer-facing changes.
48
+
49
+ ---
50
+ For more information, see the main `README.md` or contact the maintainers.