janito 2.25.0__py3-none-any.whl → 2.26.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ """Unrestricted mode command for chat mode."""
2
+
3
+ from janito.cli.chat_mode.shell.commands.base import ShellCmdHandler
4
+ from janito.cli.console import shared_console
5
+
6
+
7
+ class UnrestrictedShellHandler(ShellCmdHandler):
8
+ """Toggle unrestricted mode (equivalent to -u CLI flag)."""
9
+
10
+ help_text = "Toggle unrestricted mode (disable path security and URL whitelist)"
11
+
12
+ def run(self):
13
+ """Execute the unrestricted command."""
14
+ if not self.shell_state:
15
+ shared_console.print("[red]Error: Shell state not available[/red]")
16
+ return
17
+
18
+ # Toggle unrestricted mode
19
+ current_unrestricted = getattr(self.shell_state, 'unrestricted_mode', False)
20
+ new_unrestricted = not current_unrestricted
21
+
22
+ # Update shell state
23
+ self.shell_state.unrestricted_mode = new_unrestricted
24
+
25
+ # Update tools adapter
26
+ if hasattr(self.shell_state, 'tools_adapter'):
27
+ setattr(self.shell_state.tools_adapter, 'unrestricted_paths', new_unrestricted)
28
+
29
+ # Update URL whitelist manager
30
+ from janito.tools.url_whitelist import get_url_whitelist_manager
31
+ whitelist_manager = get_url_whitelist_manager()
32
+ whitelist_manager.set_unrestricted_mode(new_unrestricted)
33
+
34
+ status = "enabled" if new_unrestricted else "disabled"
35
+ warning = " (DANGEROUS - no path or URL restrictions)" if new_unrestricted else ""
36
+
37
+ shared_console.print(
38
+ f"[bold {'red' if new_unrestricted else 'green'}]"
39
+ f"Unrestricted mode {status}{warning}[/bold {'red' if new_unrestricted else 'green'}]"
40
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.25.0
3
+ Version: 2.26.0
4
4
  Summary: A new Python package called janito.
5
5
  Author-email: João Pinto <janito@ikignosis.org>
6
6
  Project-URL: Homepage, https://github.com/ikignosis/janito
@@ -68,6 +68,7 @@ janito/cli/chat_mode/shell/commands/security_command.py,sha256=7Xgjb8Gunk9CjKxz1
68
68
  janito/cli/chat_mode/shell/commands/session.py,sha256=9wsw5U24-KJgTT70KAwnGuS8MVPyvpxCJfAt_Io76O0,1574
69
69
  janito/cli/chat_mode/shell/commands/session_control.py,sha256=tmMGJ8IvWoBwSIJu7T6GPnFYFrmXWIG2Gr9tTni4y3U,1307
70
70
  janito/cli/chat_mode/shell/commands/tools.py,sha256=8BWgqB0j5sp7mYupxoAjYvLWjb_wODOfCk-I8yNfk-U,3473
71
+ janito/cli/chat_mode/shell/commands/unrestricted.py,sha256=cVlQ0o-Zq0ll1ZMCq5TLm52fAee44TwwiRen0kN6hWU,1699
71
72
  janito/cli/chat_mode/shell/commands/utility.py,sha256=K982P-UwgPLzpEvSuSBGwiQ3zC34S_6T2ork_djweQw,847
72
73
  janito/cli/chat_mode/shell/commands/verbose.py,sha256=HDTe0NhdcjBuhh-eJSW8iLPDeeBO95K5iSDAMAljxa4,953
73
74
  janito/cli/chat_mode/shell/commands/write.py,sha256=bpvJzHY7wlpgsB-cpslzfQQl7h6n-NLqj2gFCuJfjVk,2309
@@ -242,14 +243,14 @@ janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=TeIkPt0
242
243
  janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=BfCO_K18qy92m-2ZVvHsbEU5e11OPo1pO9Vz4G4616E,130
243
244
  janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=AijlsP_PgNuC8ZbGsC5vOTt3Jur76otQzkd_7qR0QFY,284
244
245
  janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=TgyI0HRL6ug_gBcWEm5TGJJuA4E34ZXcIzMpAbv3oJs,155
245
- janito-2.25.0.dist-info/licenses/LICENSE,sha256=GSAKapQH5ZIGWlpQTA7v5YrfECyaxaohUb1vJX-qepw,1090
246
+ janito-2.26.0.dist-info/licenses/LICENSE,sha256=GSAKapQH5ZIGWlpQTA7v5YrfECyaxaohUb1vJX-qepw,1090
246
247
  janito-coder/pyproject.toml,sha256=HPJgGe6YJ4CV93YxD8DYw_A18F51MW-iqweCXLVFko4,12990
247
248
  janito-coder/janito_coder/__init__.py,sha256=QbCJXOHgiXXohtJeUc8frav8mee12ve-eUifpACndrY,198
248
249
  janito-coder/janito_coder/plugins/__init__.py,sha256=NdjMhAEu8FEnVxEkYAN-Cz17Cx2qbMq8dMZMOQwBc-k,844
249
250
  janito-coder/janito_coder/plugins/code_navigator.py,sha256=9f8mt713yXVjuM4RFXrR2Y1ibznOYOaLyeTqfnt2wvE,22101
250
251
  janito-coder/janito_coder/plugins/git_analyzer.py,sha256=DEF_6J8z1-_Fshl1RAesz5b-aYC2nhf7COla44FdntE,8398
251
- janito-2.25.0.dist-info/METADATA,sha256=X_UylJzTNb0sGEqnrrdksiRtfT_mmfzLN-Vru8Sq4VY,16365
252
- janito-2.25.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
253
- janito-2.25.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
254
- janito-2.25.0.dist-info/top_level.txt,sha256=rL2_EzEekHIjO_EteQ1nOywm0B9Ywb0ZeqSKtzZMGUc,20
255
- janito-2.25.0.dist-info/RECORD,,
252
+ janito-2.26.0.dist-info/METADATA,sha256=Oonv_g1pinVq5NUzHGZgAtKgiEOKs1a96ByKNZ1Y9jw,16365
253
+ janito-2.26.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
254
+ janito-2.26.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
255
+ janito-2.26.0.dist-info/top_level.txt,sha256=rL2_EzEekHIjO_EteQ1nOywm0B9Ywb0ZeqSKtzZMGUc,20
256
+ janito-2.26.0.dist-info/RECORD,,