janito 2.28.0__py3-none-any.whl → 2.30.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- janito/README.md +3 -3
- janito/agent/setup_agent.py +21 -35
- janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2 +6 -0
- janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +6 -0
- janito/agent/templates/profiles/system_prompt_template_market_analyst.txt.j2 +7 -1
- janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2 +7 -1
- janito/cli/chat_mode/session.py +154 -96
- janito/cli/cli_commands/list_plugins.py +99 -75
- janito/cli/cli_commands/show_system_prompt.py +8 -3
- janito/cli/core/runner.py +2 -2
- janito/cli/main_cli.py +9 -15
- janito/cli/prompt_core.py +0 -2
- janito/cli/rich_terminal_reporter.py +2 -1
- janito/cli/single_shot_mode/handler.py +0 -2
- janito/llm/agent.py +6 -1
- janito/provider_registry.py +1 -1
- janito/providers/openai/provider.py +1 -1
- janito/tools/adapters/local/ask_user.py +3 -1
- janito/tools/adapters/local/fetch_url.py +20 -28
- janito/tools/adapters/local/replace_text_in_file.py +9 -3
- janito/tools/adapters/local/search_text/core.py +2 -2
- janito/tools/loop_protection_decorator.py +12 -16
- janito/tools/tools_adapter.py +18 -4
- janito-2.30.0.dist-info/METADATA +83 -0
- {janito-2.28.0.dist-info → janito-2.30.0.dist-info}/RECORD +29 -30
- janito-2.30.0.dist-info/licenses/LICENSE +201 -0
- janito/cli/chat_mode/session_profile_select.py +0 -182
- janito-2.28.0.dist-info/METADATA +0 -431
- janito-2.28.0.dist-info/licenses/LICENSE +0 -21
- {janito-2.28.0.dist-info → janito-2.30.0.dist-info}/WHEEL +0 -0
- {janito-2.28.0.dist-info → janito-2.30.0.dist-info}/entry_points.txt +0 -0
- {janito-2.28.0.dist-info → janito-2.30.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
janito/README.md,sha256=
|
1
|
+
janito/README.md,sha256=Kd4GcEYIt04520J2AIMCZbp1enAGRzlLswCfyi1g5AY,4737
|
2
2
|
janito/__init__.py,sha256=a0pFui3A_AfWJiUfg93yE-Vf4868bqG3y9yg2fkTIuY,244
|
3
3
|
janito/__main__.py,sha256=lPQ8kAyYfyeS1KopmJ8EVY5g1YswlIqCS615mM_B_rM,70
|
4
4
|
janito/_version.py,sha256=PtAVr2K9fOS5sv6aXzmcb7UaR5NLGMFOofL7Ndjh75o,2344
|
@@ -16,32 +16,31 @@ janito/perf_singleton.py,sha256=g1h0Sdf4ydzegeEpJlMhQt4H0GQZ2hryXrdYOTL-b30,113
|
|
16
16
|
janito/performance_collector.py,sha256=RYu4av16Trj3RljJZ8-2Gbn1KlGdJUosrcVFYtwviNI,6285
|
17
17
|
janito/platform_discovery.py,sha256=JN3kC7hkxdvuj-AyrJTlbbDJjtNHke3fdlZDqGi_uz0,4621
|
18
18
|
janito/provider_config.py,sha256=acn2FEgWsEIyi2AxZiuCLoP2rXDd-nXcP5VB4CZHaeE,3189
|
19
|
-
janito/provider_registry.py,sha256=
|
19
|
+
janito/provider_registry.py,sha256=IRNB35Cjn4PSXMWOxKBjPg0DfUEOoL4vh63OSPxhMtk,6925
|
20
20
|
janito/report_events.py,sha256=q4OR_jTZNfcqaQF_fzTjgqo6_VlUIxSGWfhpT4nJWcw,938
|
21
21
|
janito/shell.bak.zip,sha256=hznHbmgfkAkjuQDJ3w73XPQh05yrtUZQxLmtGbanbYU,22
|
22
22
|
janito/utils.py,sha256=eXSsMgM69YyzahgCNrJQLcEbB8ssLI1MQqaa20ONxbE,376
|
23
|
-
janito/agent/setup_agent.py,sha256=
|
24
|
-
janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2,sha256=
|
25
|
-
janito/agent/templates/profiles/system_prompt_template_developer.txt.j2,sha256=
|
26
|
-
janito/agent/templates/profiles/system_prompt_template_market_analyst.txt.j2,sha256=
|
27
|
-
janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2,sha256=
|
23
|
+
janito/agent/setup_agent.py,sha256=Qo9fm9O5IUd65ao4KODOMd6f7baw_mEiluj1pBNxrIg,12228
|
24
|
+
janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2,sha256=Q6p57GakGJv4damUITO0iq8rwfhPxVlek6y3I7nnkK8,3931
|
25
|
+
janito/agent/templates/profiles/system_prompt_template_developer.txt.j2,sha256=lG6ihPRoGqJ0ho2jb1sgBPs9itwpSYpy9CrLjXwZxB0,3614
|
26
|
+
janito/agent/templates/profiles/system_prompt_template_market_analyst.txt.j2,sha256=TCoZITPBOMvN3zA6QXg6UCNrHWj_iDKRxAREwYev5Ks,4123
|
27
|
+
janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2,sha256=ynhuZESiVvmwHW0pKNUCu9wXexYkFxs6vf4AcC_r24g,1589
|
28
28
|
janito/cli/__init__.py,sha256=xaPDOrWphBbCR63Xpcx_yfpXSJIlCaaICc4j2qpWqrM,194
|
29
29
|
janito/cli/config.py,sha256=HkZ14701HzIqrvaNyDcDhGlVHfpX_uHlLp2rHmhRm_k,872
|
30
30
|
janito/cli/console.py,sha256=gJolqzWL7jEPLxeuH-CwBDRFpXt976KdZOEAB2tdBDs,64
|
31
31
|
janito/cli/main.py,sha256=s5odou0txf8pzTf1ADk2yV7T5m8B6cejJ81e7iu776U,312
|
32
|
-
janito/cli/main_cli.py,sha256=
|
33
|
-
janito/cli/prompt_core.py,sha256=
|
32
|
+
janito/cli/main_cli.py,sha256=FXpoybaEbDRlK5-oMOMlcdM7TpVfnOdr6-mOkgJHeTo,16648
|
33
|
+
janito/cli/prompt_core.py,sha256=F68J4Xl6jZMYFN4oBBYZFj15Jp-HTYoLub4bw2XpNRU,11648
|
34
34
|
janito/cli/prompt_handler.py,sha256=SnPTlL64noeAMGlI08VBDD5IDD8jlVMIYA4-fS8zVLg,215
|
35
35
|
janito/cli/prompt_setup.py,sha256=s48gvNfZhKjsEhf4EzL1tKIGm4wDidPMDvlM6TAPYes,2116
|
36
|
-
janito/cli/rich_terminal_reporter.py,sha256=
|
36
|
+
janito/cli/rich_terminal_reporter.py,sha256=K48Ywwj6xz_NikuezzBmYJM1PANmQD-G48sE4NjQhn0,6835
|
37
37
|
janito/cli/utils.py,sha256=plCQiDKIf3V8mFhhX5H9-MF2W86i-xRdWf8Xi117Z0w,677
|
38
38
|
janito/cli/verbose_output.py,sha256=wY_B4of5e8Vv7w1fRwOZzNGU2JqbMdcFnGjtEr4hLus,7686
|
39
39
|
janito/cli/chat_mode/bindings.py,sha256=odjc5_-YW1t2FRhBUNRNoBMoQIg5sMz3ktV7xG0ADFU,975
|
40
40
|
janito/cli/chat_mode/chat_entry.py,sha256=RFdPd23jsA2DMHRacpjAdwI_1dFBaWrtnwyQEgb2fHA,475
|
41
41
|
janito/cli/chat_mode/prompt_style.py,sha256=vsqQ9xxmrYjj1pWuVe9CayQf39fo2EIXrkKPkflSVn4,805
|
42
42
|
janito/cli/chat_mode/script_runner.py,sha256=WFTFVWzg_VQrD2Ujj02XWjscfGgHwmjBeRxaEjWw9ps,6505
|
43
|
-
janito/cli/chat_mode/session.py,sha256=
|
44
|
-
janito/cli/chat_mode/session_profile_select.py,sha256=bEM8Q41c6taxxMCalXlLMUO18y6WRB84zaVEb-j6Wj4,6441
|
43
|
+
janito/cli/chat_mode/session.py,sha256=1mCET4V9u1FGEMnr8HJGOc6X8lhTNkhAYlZ3cvIvefw,18540
|
45
44
|
janito/cli/chat_mode/toolbar.py,sha256=SzdWAJdcY1g2rTPZCPL6G5X8jO6ZQYjwko2-nw54_nU,3397
|
46
45
|
janito/cli/chat_mode/shell/autocomplete.py,sha256=lE68MaVaodbA2VfUM0_YLqQVLBJAE_BJsd5cMtwuD-g,793
|
47
46
|
janito/cli/chat_mode/shell/commands.bak.zip,sha256=I7GFjXg2ORT5NzFpicH1vQ3kchhduQsZinzqo0xO8wU,74238
|
@@ -82,7 +81,7 @@ janito/cli/cli_commands/enable_disable_plugin.py,sha256=IIEg5Gz2aAW_7BKrMQTXSGF0
|
|
82
81
|
janito/cli/cli_commands/list_config.py,sha256=oiQEGaGPjwjG-PrOcakpNMbbqISTsBEs7rkGH3ceQsI,1179
|
83
82
|
janito/cli/cli_commands/list_drivers.py,sha256=r2ENykUcvf_9XYp6LHd3RvLXGXyVUA6oe_Pr0dyv92I,5124
|
84
83
|
janito/cli/cli_commands/list_models.py,sha256=QF3Wa7OhNcJFKeBxaw0C_rDfsvJFNb-siz5uorajBvo,1595
|
85
|
-
janito/cli/cli_commands/list_plugins.py,sha256=
|
84
|
+
janito/cli/cli_commands/list_plugins.py,sha256=lha2XX7AKIGtFattATpJgsEKRSxRULPHXI1vNSQiQcg,3846
|
86
85
|
janito/cli/cli_commands/list_profiles.py,sha256=O4k6U9iCEeNH3lM-NP_XX_E9W0h__hheLSn23241dkA,3538
|
87
86
|
janito/cli/cli_commands/list_providers.py,sha256=oilrBjNL5mot1nz45XQQY6oeiSxoNvphhQYspNcEJpw,391
|
88
87
|
janito/cli/cli_commands/list_providers_region.py,sha256=qrMj_gtgEMty8UH0P_O5SgWCVJ9ZKxGUp_GdsE4_EH4,2548
|
@@ -92,16 +91,16 @@ janito/cli/cli_commands/model_utils.py,sha256=4t2ZN8DYA8jxluXHiiliV8gMbF_90nKGtg
|
|
92
91
|
janito/cli/cli_commands/ping_providers.py,sha256=hetZAKKZzQYRpRDT5OvRTOe4jYUVNZGjo8gFoyeRA3I,1921
|
93
92
|
janito/cli/cli_commands/set_api_key.py,sha256=IR_hUcLjK-2oJmiIVdjc8epPsQAzqEN9MS7lSTVqmKM,1060
|
94
93
|
janito/cli/cli_commands/show_config.py,sha256=ammzVEqJQCAdWFRrhI1zjjmzgTCH2l38REoT4gYJPP0,3467
|
95
|
-
janito/cli/cli_commands/show_system_prompt.py,sha256=
|
94
|
+
janito/cli/cli_commands/show_system_prompt.py,sha256=WQclY_bmJrHbIBRU1qx1WV4VyooyXVx_XQyX_4Rb1hs,6335
|
96
95
|
janito/cli/core/__init__.py,sha256=YH95fhgY9yBX8RgqX9dSrEkl4exjV0T4rbmJ6xUpG-Y,196
|
97
96
|
janito/cli/core/event_logger.py,sha256=1X6lR0Ax7AgF8HlPWFoY5Ystuu7Bh4ooTo78vXzeGB0,2008
|
98
97
|
janito/cli/core/getters.py,sha256=opmcSz86J-I95Klsh0c4y6lsYvNakrvRqvuA0o5ARWI,2869
|
99
98
|
janito/cli/core/model_guesser.py,sha256=V7LBkIllSp_tP9-2B1gcl5b4b-La7mrOvE3AZQQm8lk,1716
|
100
|
-
janito/cli/core/runner.py,sha256=
|
99
|
+
janito/cli/core/runner.py,sha256=gi8xke6re9AoHHNCivV50i0eUAliw8QTUdXyqMkMplM,9044
|
101
100
|
janito/cli/core/setters.py,sha256=zjSUxy6iUzcrmEunFk7dA90KqbMaq2O7LTGP8wn2HxA,5378
|
102
101
|
janito/cli/core/unsetters.py,sha256=FEw9gCt0vRvoCt0kRSNfVB2tzi_TqppJIx2nHPP59-k,2012
|
103
102
|
janito/cli/single_shot_mode/__init__.py,sha256=Ct99pKe9tINzVW6oedZJfzfZQKWpXz-weSSCn0hrwHY,115
|
104
|
-
janito/cli/single_shot_mode/handler.py,sha256=
|
103
|
+
janito/cli/single_shot_mode/handler.py,sha256=d251ObY-5bkUyccV9NYkKDF0VCKrQTrGEnwt3mtj61w,5529
|
105
104
|
janito/docs/GETTING_STARTED.md,sha256=Yx3vi1LQWyDWlE_JYuz4V9EL-Gh4WU6cOBqCr8XidF4,4960
|
106
105
|
janito/drivers/dashscope.bak.zip,sha256=9Pv4Xyciju8jO1lEMFVgYXexoZkxmDO3Ig6vw3ODfL8,4936
|
107
106
|
janito/drivers/openai_responses.bak.zip,sha256=E43eDCHGa2tCtdjzj_pMnWDdnsOZzj8BJTR5tJp8wcM,13352
|
@@ -122,7 +121,7 @@ janito/i18n/messages.py,sha256=fBuwOTFoygyHPkYphm6Y0r1iE8497Z4iryVAmPhMEkg,1851
|
|
122
121
|
janito/i18n/pt.py,sha256=NlTgpDSftUfFG7FGbs7TK54vQlJVMyaZDHGcWjelwMc,4168
|
123
122
|
janito/llm/README.md,sha256=6GRqCu_a9va5HCB1YqNqbshyWKFyAGlnXugrjom-xj8,1213
|
124
123
|
janito/llm/__init__.py,sha256=dpyVH51qVRCw-PDyAFLAxq0zd4jl5MDcuV6Cri0D-dQ,134
|
125
|
-
janito/llm/agent.py,sha256=
|
124
|
+
janito/llm/agent.py,sha256=T0JfeMoOudTWsHwWCcaocrHyq9k0TvkL4_YePlXvZfo,21269
|
126
125
|
janito/llm/auth.py,sha256=8Dl_orUEPhn2X6XjkO2Nr-j1HFT2YDxk1qJl9hSFI88,2286
|
127
126
|
janito/llm/auth_utils.py,sha256=7GH7bIScKhVWJW6ugcDrJLcYRamj5dl_l8N1rrvR4Ws,663
|
128
127
|
janito/llm/driver.py,sha256=stiicPe_MXTuWW4q6MSwK7PCj8UZcA_30pGACu6xYUQ,10039
|
@@ -169,7 +168,7 @@ janito/providers/moonshot/model_info.py,sha256=PpdUkmuR7g6SyiEzS9nePskPjn5xI1ZM2
|
|
169
168
|
janito/providers/moonshot/provider.py,sha256=LJxNoC7Oo-ZoFKs2ulK2lXzUEx7kV-79HJ8JG4J-UWU,3856
|
170
169
|
janito/providers/openai/__init__.py,sha256=f0m16-sIqScjL9Mp4A0CQBZx6H3PTEy0cnE08jeaB5U,38
|
171
170
|
janito/providers/openai/model_info.py,sha256=VTkq3xcx2vk0tXlFVHQxKeFzl-DL1T1J2elVOEwCdHI,4265
|
172
|
-
janito/providers/openai/provider.py,sha256=
|
171
|
+
janito/providers/openai/provider.py,sha256=PPr_qmSe5GyysnZCxhjeUVhE2LWKjKOSRel-8aaxq_U,4761
|
173
172
|
janito/providers/openai/schema_generator.py,sha256=hTqeLcPTR8jeKn5DUUpo7b-EZ-V-g1WwXiX7MbHnFzE,2234
|
174
173
|
janito/providers/zai/__init__.py,sha256=qtIr9_QBFaXG8xB6cRDGhS7se6ir11CWseI9azLMRBo,24
|
175
174
|
janito/providers/zai/model_info.py,sha256=ldwD8enpxXv1G-YsDw4YJn31YsVueQ4vj5HgoYvnPxo,1183
|
@@ -186,7 +185,7 @@ janito/tools/base.py,sha256=R38A9xWYh3JRYZMDSom2d1taNDy9J7HpLbZo9X2wH_o,316
|
|
186
185
|
janito/tools/disabled_tools.py,sha256=Tx__16wtMWZ9z34cYLdH1gukwot5MCL-9kLjd5MPX6Y,2110
|
187
186
|
janito/tools/inspect_registry.py,sha256=Jo7PrMPRKLuR-j_mBAk9PBcTzeJf1eQrS1ChGofgQk0,538
|
188
187
|
janito/tools/loop_protection.py,sha256=WQ2Cqt459vXvrO0T1EqkEHynHlRkPzfaC83RSmXzjkM,4718
|
189
|
-
janito/tools/loop_protection_decorator.py,sha256=
|
188
|
+
janito/tools/loop_protection_decorator.py,sha256=R1j2ouscKbVcDm2wlxRZ6zQuKExgj633ijeDq4j0oO0,6457
|
190
189
|
janito/tools/outline_file.bak.zip,sha256=EeI2cBXCwTdWVgJDNiroxKeYlkjwo6NLKeXz3J-2iZI,15607
|
191
190
|
janito/tools/path_security.py,sha256=40b0hV0X3449Dht93A04Q3c9AYSsBQsBFy2BjzM83lA,8214
|
192
191
|
janito/tools/path_utils.py,sha256=Rg5GE4kiu7rky6I2KTtivW6wPXzc9Qmq0_lOjwkPYlI,832
|
@@ -197,18 +196,18 @@ janito/tools/tool_events.py,sha256=czRtC2TYakAySBZvfHS_Q6_NY_7_krxzAzAL1ggRFWA,1
|
|
197
196
|
janito/tools/tool_run_exception.py,sha256=43yWgTaGBGEtRteo6FvTrane6fEVGo9FU1uOdjMRWJE,525
|
198
197
|
janito/tools/tool_use_tracker.py,sha256=IaEmA22D6RuL1xMUCScOMGv0crLPwEJVGmj49cydIaM,2662
|
199
198
|
janito/tools/tool_utils.py,sha256=alPm9DvtXSw_zPRKvP5GjbebPRf_nfvmWk2TNlL5Cws,1219
|
200
|
-
janito/tools/tools_adapter.py,sha256=
|
199
|
+
janito/tools/tools_adapter.py,sha256=F1Wkji222dY53HMaZWf3vqVas1Bimm3UXERKvxF54Ew,21687
|
201
200
|
janito/tools/tools_schema.py,sha256=rGrKrmpPNR07VXHAJ_haGBRRO-YGLOF51BlYRep9AAQ,4415
|
202
201
|
janito/tools/url_whitelist.py,sha256=0CPLkHTp5HgnwgjxwgXnJmwPeZQ30q4j3YjW59hiUUE,4295
|
203
202
|
janito/tools/adapters/__init__.py,sha256=XKixOKtUJs1R-rGwGDXSLVLg5-Kp090gvWbsseWT4LI,92
|
204
203
|
janito/tools/adapters/local/__init__.py,sha256=8xJw8Qv3T_wwkiGBVVgs9p7pH1ONIAipccEUqY2II8A,2231
|
205
204
|
janito/tools/adapters/local/adapter.py,sha256=u4nLHTaYdwZXMi1J8lsKvlG6rOmdq9xjey_3zeyCG4k,8707
|
206
|
-
janito/tools/adapters/local/ask_user.py,sha256
|
205
|
+
janito/tools/adapters/local/ask_user.py,sha256=-shjMRKrRe7HNHM2w_6YAl7eEgl8QXaIV6LKrUDEBxU,4060
|
207
206
|
janito/tools/adapters/local/copy_file.py,sha256=SBJm19Ipe5dqRE1Mxl6JSrn4bNmfObVnDr5b1mcEu6c,3682
|
208
207
|
janito/tools/adapters/local/create_directory.py,sha256=LxwqQEsnOrEphCIoaMRRx9P9bu0MzidP3Fc5q6letxc,2584
|
209
208
|
janito/tools/adapters/local/create_file.py,sha256=nZf8iPScO9_nrvmHwXqOcqpLZkLABTh9uLVNddC4PCk,3760
|
210
209
|
janito/tools/adapters/local/delete_text_in_file.py,sha256=uEeedRxXAR7_CqUc_qhbEdM0OzRi_pgnP-iDjs2Zvjk,5087
|
211
|
-
janito/tools/adapters/local/fetch_url.py,sha256=
|
210
|
+
janito/tools/adapters/local/fetch_url.py,sha256=bkrFFE41h8pWepqnFpmsJ1gF0oDDd5htBsEwFniSKMQ,16064
|
212
211
|
janito/tools/adapters/local/find_files.py,sha256=Zbag3aP34vc7ffJh8bOqAwXj3KiZhV--uzTVHtNb-fI,6250
|
213
212
|
janito/tools/adapters/local/move_file.py,sha256=LMGm8bn3NNyIPJG4vrlO09smXQcgzA09EwoooZxkIA8,4695
|
214
213
|
janito/tools/adapters/local/open_html_in_browser.py,sha256=XqICIwVx5vEE77gHkaNAC-bAeEEy0DBmDksATiL-sRY,2101
|
@@ -220,7 +219,7 @@ janito/tools/adapters/local/read_chart.py,sha256=qQebp_MEE_x2AL_pl85uA58A4lbhLQs
|
|
220
219
|
janito/tools/adapters/local/read_files.py,sha256=LzlNrQEadYF8dF97Wm8AHde2nuqbMkN5vVskQLhvFdA,2329
|
221
220
|
janito/tools/adapters/local/remove_directory.py,sha256=DEhHdmwJRl5Yp9eEukIIooMrpATCtXcv5HmaDRn8vH8,1913
|
222
221
|
janito/tools/adapters/local/remove_file.py,sha256=Imra4jGkBfAd6pnUAmbUsjN0exj2vzZWuNRXq_GOMsI,2093
|
223
|
-
janito/tools/adapters/local/replace_text_in_file.py,sha256=
|
222
|
+
janito/tools/adapters/local/replace_text_in_file.py,sha256=zJIDecviF2YRpWxbvhtka4Iaje-QYhcaqQX1PxWolzE,10966
|
224
223
|
janito/tools/adapters/local/run_bash_command.py,sha256=7fABqAeAu7WJwzzwHmT54_m5OSwPMcgpQ74lQhPG7TA,7955
|
225
224
|
janito/tools/adapters/local/run_powershell_command.py,sha256=uQSJVQe40wSGbesyvZxDmIKJthAbDJFaxXm1dEN3gBs,9313
|
226
225
|
janito/tools/adapters/local/view_file.py,sha256=cBKcbwbfH-UMyvQ7PmYTgsshcFmorjWtyH1kaYi7oNY,7379
|
@@ -231,7 +230,7 @@ janito/tools/adapters/local/get_file_outline/markdown_outline.py,sha256=bXEBg0D9
|
|
231
230
|
janito/tools/adapters/local/get_file_outline/python_outline.py,sha256=RAcf9Vxec08lA06drYaNre5HCJ2lTzrRAskZ3rlyE-U,10326
|
232
231
|
janito/tools/adapters/local/get_file_outline/search_outline.py,sha256=bski24TpnJVf3L0TNzkx3HfvaXwttQl4EVkwk2POQOw,1348
|
233
232
|
janito/tools/adapters/local/search_text/__init__.py,sha256=FEYpF5tTtf0fiAyRGIGSn-kV-MJDkhdFIbus16mYW8Y,34
|
234
|
-
janito/tools/adapters/local/search_text/core.py,sha256=
|
233
|
+
janito/tools/adapters/local/search_text/core.py,sha256=Qoid7FESJGVIsFm5oasgv9vZDy0aSzqeJPBWAF2_Edo,7877
|
235
234
|
janito/tools/adapters/local/search_text/match_lines.py,sha256=RLR8fZFP-Q57rY0fTENbMItmt3dJZiYX0otmGHVRjfw,2131
|
236
235
|
janito/tools/adapters/local/search_text/pattern_utils.py,sha256=D7vtAr8oT0tGV0C_UUarAXS9XQtP-MTYmmc8Yg8iVTg,2362
|
237
236
|
janito/tools/adapters/local/search_text/traverse_directory.py,sha256=EpL1qywAV0H29pm8-QsHrjKchKP4i4sRUOENVuNptCo,4000
|
@@ -247,9 +246,9 @@ janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=TeIkPt0
|
|
247
246
|
janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=BfCO_K18qy92m-2ZVvHsbEU5e11OPo1pO9Vz4G4616E,130
|
248
247
|
janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=AijlsP_PgNuC8ZbGsC5vOTt3Jur76otQzkd_7qR0QFY,284
|
249
248
|
janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=TgyI0HRL6ug_gBcWEm5TGJJuA4E34ZXcIzMpAbv3oJs,155
|
250
|
-
janito-2.
|
251
|
-
janito-2.
|
252
|
-
janito-2.
|
253
|
-
janito-2.
|
254
|
-
janito-2.
|
255
|
-
janito-2.
|
249
|
+
janito-2.30.0.dist-info/licenses/LICENSE,sha256=dXV4fOF2ZErugtN8l_Nrj5tsRTYgtjE3cgiya0UfBio,11356
|
250
|
+
janito-2.30.0.dist-info/METADATA,sha256=j6bJNIIHZWxOkwjq2a_7ChXefB2RRskuGazhxMByAvI,2282
|
251
|
+
janito-2.30.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
252
|
+
janito-2.30.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
|
253
|
+
janito-2.30.0.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
|
254
|
+
janito-2.30.0.dist-info/RECORD,,
|
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright 2023 Nine Internet Solutions AG
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
@@ -1,182 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
from pathlib import Path
|
3
|
-
import questionary
|
4
|
-
from questionary import Style
|
5
|
-
import os
|
6
|
-
from pathlib import Path
|
7
|
-
from prompt_toolkit.formatted_text import HTML
|
8
|
-
from prompt_toolkit import PromptSession
|
9
|
-
from prompt_toolkit.key_binding import KeyBindings
|
10
|
-
from prompt_toolkit.enums import EditingMode
|
11
|
-
from prompt_toolkit.formatted_text import HTML
|
12
|
-
from .prompt_style import chat_shell_style
|
13
|
-
|
14
|
-
|
15
|
-
"""
|
16
|
-
Profile selection logic for Janito Chat CLI using questionary.
|
17
|
-
"""
|
18
|
-
|
19
|
-
|
20
|
-
def _handle_raw_model_session_no_tools():
|
21
|
-
return {
|
22
|
-
"profile": "model_conversation_without_tools_or_context",
|
23
|
-
"profile_system_prompt": None,
|
24
|
-
"no_tools_mode": True,
|
25
|
-
} # Raw Model Session (no tools, no context)
|
26
|
-
|
27
|
-
|
28
|
-
def _handle_using_role():
|
29
|
-
role_name = questionary.text("Enter the role name:").ask()
|
30
|
-
return f"role:{role_name}"
|
31
|
-
|
32
|
-
|
33
|
-
def _get_toolbar(mode):
|
34
|
-
if mode["multiline"]:
|
35
|
-
return HTML(
|
36
|
-
"<b>Multiline mode (Esc+Enter to submit). Type /single to switch.</b>"
|
37
|
-
)
|
38
|
-
else:
|
39
|
-
return HTML(
|
40
|
-
"<b>Single-line mode (Enter to submit). Type /multi for multiline.</b>"
|
41
|
-
)
|
42
|
-
|
43
|
-
|
44
|
-
def _handle_custom_system_prompt():
|
45
|
-
print(
|
46
|
-
"\n[Custom System Prompt]\nPlease enter the message that will be used as the model system prompt. This will define how the AI behaves for this session.\nYou can use /multi for multiline mode, and /single to return to single-line mode.\n"
|
47
|
-
)
|
48
|
-
mode = {"multiline": False}
|
49
|
-
bindings = KeyBindings()
|
50
|
-
|
51
|
-
@bindings.add("c-r")
|
52
|
-
def _(event):
|
53
|
-
pass
|
54
|
-
|
55
|
-
@bindings.add("f12")
|
56
|
-
def _(event):
|
57
|
-
buf = event.app.current_buffer
|
58
|
-
buf.text = "Do It"
|
59
|
-
buf.validate_and_handle()
|
60
|
-
|
61
|
-
session = PromptSession(
|
62
|
-
multiline=False,
|
63
|
-
key_bindings=bindings,
|
64
|
-
editing_mode=EditingMode.EMACS,
|
65
|
-
bottom_toolbar=lambda: _get_toolbar(mode),
|
66
|
-
style=chat_shell_style,
|
67
|
-
)
|
68
|
-
prompt_icon = HTML("<inputline>📝 </inputline>")
|
69
|
-
while True:
|
70
|
-
try:
|
71
|
-
response = session.prompt(prompt_icon)
|
72
|
-
except KeyboardInterrupt:
|
73
|
-
print("[Custom System Prompt] Exited by the user.")
|
74
|
-
import sys
|
75
|
-
|
76
|
-
sys.exit(0)
|
77
|
-
if not mode["multiline"] and response.strip() == "/multi":
|
78
|
-
mode["multiline"] = True
|
79
|
-
session.multiline = True
|
80
|
-
continue
|
81
|
-
elif mode["multiline"] and response.strip() == "/single":
|
82
|
-
mode["multiline"] = False
|
83
|
-
session.multiline = False
|
84
|
-
continue
|
85
|
-
else:
|
86
|
-
sanitized = response.strip()
|
87
|
-
try:
|
88
|
-
sanitized.encode("utf-8")
|
89
|
-
except UnicodeEncodeError:
|
90
|
-
sanitized = sanitized.encode("utf-8", errors="replace").decode("utf-8")
|
91
|
-
return {"profile": None, "profile_system_prompt": sanitized}
|
92
|
-
|
93
|
-
|
94
|
-
def _load_user_profiles():
|
95
|
-
user_profiles_dir = Path.home() / ".janito" / "profiles"
|
96
|
-
profiles = {}
|
97
|
-
if user_profiles_dir.exists() and user_profiles_dir.is_dir():
|
98
|
-
for profile_file in user_profiles_dir.glob("*"):
|
99
|
-
if profile_file.is_file():
|
100
|
-
try:
|
101
|
-
with open(profile_file, "r", encoding="utf-8") as f:
|
102
|
-
profiles[profile_file.stem] = f.read().strip()
|
103
|
-
except Exception:
|
104
|
-
# Ignore unreadable files
|
105
|
-
pass
|
106
|
-
return profiles
|
107
|
-
|
108
|
-
|
109
|
-
def select_profile():
|
110
|
-
user_profiles = _load_user_profiles()
|
111
|
-
choices = [
|
112
|
-
"Developer with Python Tools",
|
113
|
-
"Developer",
|
114
|
-
"Market Analyst",
|
115
|
-
"Custom system prompt...",
|
116
|
-
"Raw Model Session (no tools, no context)",
|
117
|
-
]
|
118
|
-
# Add user profiles to choices
|
119
|
-
if user_profiles:
|
120
|
-
choices.extend(user_profiles.keys())
|
121
|
-
|
122
|
-
custom_style = Style(
|
123
|
-
[
|
124
|
-
("highlighted", "bg:#00aaff #ffffff"), # background for item under cursor
|
125
|
-
("question", "fg:#00aaff bold"),
|
126
|
-
]
|
127
|
-
)
|
128
|
-
answer = questionary.select(
|
129
|
-
"Select a profile to use:", choices=choices, default=None, style=custom_style
|
130
|
-
).ask()
|
131
|
-
|
132
|
-
if not answer:
|
133
|
-
import sys
|
134
|
-
|
135
|
-
sys.exit(0)
|
136
|
-
|
137
|
-
if answer == "Raw Model Session (no tools, no context)":
|
138
|
-
return _handle_raw_model_session_no_tools()
|
139
|
-
elif answer == "Custom system prompt...":
|
140
|
-
return _handle_custom_system_prompt()
|
141
|
-
elif answer in user_profiles:
|
142
|
-
# Return the content of the user profile as a custom system prompt
|
143
|
-
return {"profile": None, "profile_system_prompt": user_profiles[answer]}
|
144
|
-
elif answer == "Developer":
|
145
|
-
# Return the content of the built-in Developer profile prompt
|
146
|
-
from pathlib import Path
|
147
|
-
from jinja2 import Template
|
148
|
-
from janito.agent.setup_agent import _prepare_template_context
|
149
|
-
|
150
|
-
# Get the absolute path relative to the current script location
|
151
|
-
current_dir = Path(__file__).parent
|
152
|
-
template_path = (
|
153
|
-
current_dir
|
154
|
-
/ "../../agent/templates/profiles/system_prompt_template_developer.txt.j2"
|
155
|
-
)
|
156
|
-
with open(template_path, "r", encoding="utf-8") as f:
|
157
|
-
template_content = f.read()
|
158
|
-
|
159
|
-
template = Template(template_content)
|
160
|
-
context = _prepare_template_context("developer", "Developer", None)
|
161
|
-
prompt = template.render(**context)
|
162
|
-
return {"profile": "Developer", "profile_system_prompt": prompt}
|
163
|
-
elif answer == "Market Analyst":
|
164
|
-
# Return the content of the built-in Market Analyst profile prompt
|
165
|
-
from pathlib import Path
|
166
|
-
from jinja2 import Template
|
167
|
-
from janito.agent.setup_agent import _prepare_template_context
|
168
|
-
|
169
|
-
# Get the absolute path relative to the current script location
|
170
|
-
current_dir = Path(__file__).parent
|
171
|
-
template_path = (
|
172
|
-
current_dir
|
173
|
-
/ "../../agent/templates/profiles/system_prompt_template_market_analyst.txt.j2"
|
174
|
-
)
|
175
|
-
with open(template_path, "r", encoding="utf-8") as f:
|
176
|
-
template_content = f.read()
|
177
|
-
|
178
|
-
template = Template(template_content)
|
179
|
-
context = _prepare_template_context("market_analyst", "Market Analyst", None)
|
180
|
-
prompt = template.render(**context)
|
181
|
-
return {"profile": "Market Analyst", "profile_system_prompt": prompt}
|
182
|
-
return answer
|