jarvis-ai-assistant 0.1.199__py3-none-any.whl → 0.1.201__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.
@@ -96,92 +96,4 @@ code_plan工具将:
96
96
  """,
97
97
  "description": "执行静态代码检查",
98
98
  },
99
- "ToolHelp": {
100
- "append": False,
101
- "template": """
102
- <tool_system_guide>
103
- <introduction>
104
- # 🛠️ 工具使用系统
105
- 您正在使用一个需要精确格式和严格规则的工具执行系统。
106
- </introduction>
107
-
108
- <format>
109
- # 📋 工具调用格式
110
- {ot("TOOL_CALL")}
111
- want: 想要从执行结果中获取到的信息,如果工具输出内容过长,会根据此字段尝试提取有效信息
112
- name: 工具名称
113
- arguments:
114
- param1: 值1
115
- param2: 值2
116
- {ct("TOOL_CALL")}
117
- </format>
118
-
119
- <rules>
120
- # ❗ 关键规则
121
- <rule>
122
- ### 1. 每次只使用一个工具
123
- - 一次只执行一个工具
124
- - 等待结果后再进行下一步
125
- </rule>
126
-
127
- <rule>
128
- ### 2. 严格遵守格式
129
- - 完全按照上述格式
130
- - 使用正确的YAML格式,2个空格作为缩进
131
- - 包含所有必需参数
132
- </rule>
133
-
134
- <rule>
135
- ### 3. 结果处理
136
- - 等待执行结果
137
- - 不要假设结果
138
- - 不要创建虚假响应
139
- - 不要想象对话
140
- </rule>
141
-
142
- <rule>
143
- ### 4. 信息管理
144
- - 如果信息不足,询问用户
145
- - 跳过不必要的步骤
146
- - 如果卡住,请求指导
147
- - 不要在没有完整信息的情况下继续
148
- </rule>
149
- </rules>
150
-
151
- <string_format>
152
- # 📝 字符串参数格式
153
- 始终使用 |2 语法表示字符串参数,防止多行字符串行首空格引起歧义:
154
-
155
- {ot("TOOL_CALL")}
156
- want: 当前的git状态,期望获取xxx的提交记录
157
- name: execute_script
158
- arguments:
159
- interpreter: bash
160
- script_cotent: |2
161
- git status --porcelain
162
- {ct("TOOL_CALL")}
163
- </string_format>
164
-
165
- <best_practices>
166
- # 💡 最佳实践
167
- - 准备好后立即开始执行
168
- - 无需请求许可即可开始
169
- - 使用正确的字符串格式
170
- - 监控进度并调整
171
- - 遇到困难时请求帮助
172
- </best_practices>
173
-
174
- <common_errors>
175
- # ⚠️ 常见错误
176
- - 同时调用多个工具
177
- - 字符串参数缺少 |2
178
- - 假设工具结果
179
- - 创建虚构对话
180
- - 在没有所需信息的情况下继续
181
- - yaml 格式错误
182
- </common_errors>
183
- </tool_system_guide>
184
- """,
185
- "description": "工具使用系统",
186
- },
187
99
  }
@@ -3,12 +3,14 @@ import hashlib
3
3
  import os
4
4
  import signal
5
5
  import subprocess
6
+ import sys
6
7
  import tarfile
7
8
  import time
8
9
  from pathlib import Path
9
10
  from typing import Any, Callable, Dict, Optional
10
11
 
11
12
  import yaml
13
+
12
14
  from jarvis import __version__
13
15
  from jarvis.jarvis_utils.config import (get_data_dir, get_max_big_content_size,
14
16
  set_global_env_data)
@@ -89,7 +91,11 @@ def init_env(welcome_str: str, config_file: Optional[str] = None) -> None:
89
91
  # 检查是否是git仓库并更新
90
92
  from jarvis.jarvis_utils.git_utils import check_and_update_git_repo
91
93
 
92
- check_and_update_git_repo(str(script_dir))
94
+ if check_and_update_git_repo(str(script_dir)):
95
+ # 更新成功,用当前命令行参数启动新进程
96
+ os.execv(sys.executable, [sys.executable] + sys.argv)
97
+ # 如果execv失败,退出当前进程
98
+ sys.exit(0)
93
99
 
94
100
 
95
101
  def load_config():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.1.199
3
+ Version: 0.1.201
4
4
  Summary: Jarvis: An AI assistant that uses tools to interact with the system
5
5
  Home-page: https://github.com/skyfireitdiy/Jarvis
6
6
  Author: skyfire
@@ -1,12 +1,13 @@
1
- jarvis/__init__.py,sha256=tXkivau40d78Z7nHzkRcchadVpBr5PZG5ETLDQcLXio,75
2
- jarvis/jarvis_agent/__init__.py,sha256=3CfmmDU9ccEtJmRAtY86cdBm6NUYWatAsbgQFjs0t6M,33880
3
- jarvis/jarvis_agent/builtin_input_handler.py,sha256=4CCEtVLRBIpkhDUKd54VcX1JFCIWCvDqDh4B1H-eSn0,2187
1
+ jarvis/__init__.py,sha256=XoMsxsLPrhfMd065rmFmYUdR1fphq5QSppiLCyiyHnU,75
2
+ jarvis/jarvis_agent/__init__.py,sha256=X5BWIOzxXUWtCbpDkTFfUYskf6sbNzb1qQu8nQ4NN1k,34371
3
+ jarvis/jarvis_agent/builtin_input_handler.py,sha256=1V7kV5Zhw2HE3Xgjs1R-43RZ2huq3Kg-32NCdNnyZmA,2216
4
+ jarvis/jarvis_agent/edit_file_handler.py,sha256=Su25_idE9UCXn3uB2pJV4VisYcUTpeBtmkX9OI3tIIo,15336
4
5
  jarvis/jarvis_agent/jarvis.py,sha256=GH2zi8eXNpW8twiY3LKDEZgGmFC5geB0jlkwFrm7hOQ,6279
5
6
  jarvis/jarvis_agent/main.py,sha256=c6bQe-8LXvW2-NBn9Rn_yPYdrwnkJ8KQaSFY2cPvkxw,2775
6
7
  jarvis/jarvis_agent/output_handler.py,sha256=P7oWpXBGFfOsWq7cIhS_z9crkQ19ES7qU5pM92KKjAs,1172
7
8
  jarvis/jarvis_agent/shell_input_handler.py,sha256=zVaKNthIHJh1j4g8_-d3w5ahNH9aH-ZNRSOourQpHR4,1328
8
9
  jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- jarvis/jarvis_code_agent/code_agent.py,sha256=aNAjj7EqabaMQg8Ngf26TMLpQJpBVceE-_FPTpXbRs8,15389
10
+ jarvis/jarvis_code_agent/code_agent.py,sha256=fr2_hqFuTyLqVB_huLgbz-UB0GIJM4YIQoi6s_X-WzE,15466
10
11
  jarvis/jarvis_code_agent/lint.py,sha256=j1kS-wFYigmkXyxOuUiaJ9cknYkraikQSSf51VWturE,4038
11
12
  jarvis/jarvis_code_analysis/code_review.py,sha256=jwvGYwwTM7UG6cESw6I7vCp6FimESKvowCbz6u28ikE,31439
12
13
  jarvis/jarvis_code_analysis/checklists/__init__.py,sha256=LIXAYa1sW3l7foP6kohLWnE98I_EQ0T7z5bYKHq6rJA,78
@@ -45,13 +46,13 @@ jarvis/jarvis_methodology/main.py,sha256=NMtd6DRn-Q8NcYtQ3qgTKUp9RW0cDGJod8ZXebl
45
46
  jarvis/jarvis_multi_agent/__init__.py,sha256=sDd3sK88dS7_qAz2ywIAaEWdQ4iRVCiuBu2rQQmrKbU,4512
46
47
  jarvis/jarvis_multi_agent/main.py,sha256=h7VUSwoPrES0XTK8z5kt3XLX1mmcm8UEuFEHQOUWPH4,1696
47
48
  jarvis/jarvis_platform/__init__.py,sha256=WLQHSiE87PPket2M50_hHzjdMIgPIBx2VF8JfB_NNRk,105
48
- jarvis/jarvis_platform/base.py,sha256=HsqEtgVF_ZUdXUgeod6IRDWPRggKkovkGCJxOwEtRe8,7759
49
+ jarvis/jarvis_platform/base.py,sha256=69DFeYZjtyvOF12YReLZHQINcW-w-LseogwAYQRff7k,7880
49
50
  jarvis/jarvis_platform/human.py,sha256=r8Vlltp_LirJZeZh1Mmi30iJr9tl1JaNFoqthSRHF6o,2826
50
51
  jarvis/jarvis_platform/kimi.py,sha256=uIpSWQ3MqDBYYMROeXin_YqM2LFrovMICKpwLWO1ODo,12784
51
52
  jarvis/jarvis_platform/openai.py,sha256=uEjBikfFj7kp5wondLvOx4WdkmTX0aqF6kixxAufcHg,4806
52
53
  jarvis/jarvis_platform/registry.py,sha256=Sz4ADAaxuufpAQG0KSQZuL1yALzH-aF3FDapkNn5foE,8107
53
54
  jarvis/jarvis_platform/tongyi.py,sha256=zu1bE-LdF_Sohwb5FxoIkDOTI0Lv5G_XhuSOPI20Gf8,21190
54
- jarvis/jarvis_platform/yuanbao.py,sha256=1PagfRWvGylUaeUe7yiBnGjYZ1HQk3uruogfKem84ss,21394
55
+ jarvis/jarvis_platform/yuanbao.py,sha256=_lJFnxu5ZK3ihtG8JW4bWDu2VGVCZPm19CdmU4vqAS8,21446
55
56
  jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
57
  jarvis/jarvis_platform_manager/main.py,sha256=BdBH2tPzq7p9Mvii7abu6M7uj4lfG05gwjYfMqU5HUA,29567
57
58
  jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -63,7 +64,7 @@ jarvis/jarvis_tools/chdir.py,sha256=BlRvggcOeBM7UwHGL8U8hjuNm_WGkH5BdhxmPVJXejw,
63
64
  jarvis/jarvis_tools/code_plan.py,sha256=XRXHdkN4O1A4qbShLa4VBHFdRl6YdyMgZxbPPotrqNs,7358
64
65
  jarvis/jarvis_tools/create_code_agent.py,sha256=wls2B2iLrIEeG9kSWnJHv1wQ4TNqdD9T5OPoAyN53N0,3384
65
66
  jarvis/jarvis_tools/create_sub_agent.py,sha256=ilnApbz7ptNz5o3IrhBTTiNMJGtdeUmkpYL2BFqyI6c,2874
66
- jarvis/jarvis_tools/edit_file.py,sha256=Awe_2zZxRl_2u81pu4VKb9Rom4xzbYpZV07_s7BEhLM,18747
67
+ jarvis/jarvis_tools/edit_file.py,sha256=lXF4fetuXtIoLfxQyxHR3QqxvNOVN4oEFbafxUvyZDw,11517
67
68
  jarvis/jarvis_tools/execute_script.py,sha256=gMarE5yCCSPU6Dp6HlcL2KT-2xCzR-1p-oQNlYOJK58,6157
68
69
  jarvis/jarvis_tools/file_analyzer.py,sha256=SvNLve5AL2d3oQsWSoHouIsAsYanksBnl5RCCsrw2PQ,4604
69
70
  jarvis/jarvis_tools/file_operation.py,sha256=b488jf0_l7aP0RkntaNE9WqZXtbdrQTJdmWawJbfC-A,9529
@@ -71,14 +72,14 @@ jarvis/jarvis_tools/generate_new_tool.py,sha256=2YAs8DC7fJnxOkjSmhmSAwqSpBlicVhY
71
72
  jarvis/jarvis_tools/methodology.py,sha256=_K4GIDUodGEma3SvNRo7Qs5rliijgNespVLyAPN35JU,5233
72
73
  jarvis/jarvis_tools/read_code.py,sha256=6mQ3KNGc43FTiLFxMbAN28FTSVhVfkFJ6mob4heXBNM,6663
73
74
  jarvis/jarvis_tools/read_webpage.py,sha256=NmDUboVZd4CGHBPRFK6dp3uqVhuGopW1bOi3TcaLDF4,2092
74
- jarvis/jarvis_tools/registry.py,sha256=ZuD6x4znAGwB-Z7-43f-SAlrFPIVaLiHqzpZp6zc5r4,25729
75
+ jarvis/jarvis_tools/registry.py,sha256=0SdgBi-b1qnd3QX0VvQy7UVU7Pq9BZGYLiAe7t0DjpQ,25690
75
76
  jarvis/jarvis_tools/rewrite_file.py,sha256=eG_WKg6cVAXmuGwUqlWkcuyay5S8DOzEi8vZCmX3O8w,7255
76
77
  jarvis/jarvis_tools/search_web.py,sha256=C-TuBFy25WOSiwRCe7YiL0hnMx0DuHj6upHO5OtkHTA,925
77
78
  jarvis/jarvis_tools/virtual_tty.py,sha256=KKr3jpvQWWMPr2o40hlmN6fuXJCN8H4_ma5QU40Citc,16089
78
79
  jarvis/jarvis_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
80
  jarvis/jarvis_tools/cli/main.py,sha256=Mg6TQDxMdzB1Ua1UrZ2EE-uQWsbaeojWaEGHJp2HimA,6375
80
81
  jarvis/jarvis_utils/__init__.py,sha256=67h0ldisGlh3oK4DAeNEL2Bl_VsI3tSmfclasyVlueM,850
81
- jarvis/jarvis_utils/builtin_replace_map.py,sha256=s7C5wKhoKkv-O4ltMcDzNpv5oGPC1EbXgiohPHAqksw,4892
82
+ jarvis/jarvis_utils/builtin_replace_map.py,sha256=9QKElsyIoZaq4ssZRlCfJPf2i92WuKIHlqOfyBZQmLs,2939
82
83
  jarvis/jarvis_utils/config.py,sha256=OomZRIeRHiBntKXdqYP1ArI8aqRFqtMlLkd9-VSd5dA,7364
83
84
  jarvis/jarvis_utils/embedding.py,sha256=suqKOgH4cq2HYj4xvNpqDPN9pyc3hTCl934xYonF6qk,3922
84
85
  jarvis/jarvis_utils/file_processors.py,sha256=XiM248SHS7lLgQDCbORVFWqinbVDUawYxWDOsLXDxP8,3043
@@ -89,10 +90,10 @@ jarvis/jarvis_utils/jarvis_history.py,sha256=Td6cmze9Oc5-Ewz0l9RKYeSg_-fbEu9ZhyE
89
90
  jarvis/jarvis_utils/methodology.py,sha256=MhPrMxMqElyAn54BDfpQdUqrRr7IbSlrLvAI39LCgTM,8487
90
91
  jarvis/jarvis_utils/output.py,sha256=PRCgudPOB8gMEP3u-g0FGD2c6tBgJhLXUMqNPglfjV8,10813
91
92
  jarvis/jarvis_utils/tag.py,sha256=f211opbbbTcSyzCDwuIK_oCnKhXPNK-RknYyGzY1yD0,431
92
- jarvis/jarvis_utils/utils.py,sha256=ZtI7UoZxTA2i5koO0GUKZvj8K6RlOmL8dGT4wnm20kE,11966
93
- jarvis_ai_assistant-0.1.199.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
94
- jarvis_ai_assistant-0.1.199.dist-info/METADATA,sha256=66SM4uj6AbqzkyeICMhTL-FAJ_4U1ptY_CqN7MwGjNg,20215
95
- jarvis_ai_assistant-0.1.199.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
96
- jarvis_ai_assistant-0.1.199.dist-info/entry_points.txt,sha256=Gy3DOP1PYLMK0GCj4rrP_9lkOyBQ39EK_lKGUSwn41E,869
97
- jarvis_ai_assistant-0.1.199.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
98
- jarvis_ai_assistant-0.1.199.dist-info/RECORD,,
93
+ jarvis/jarvis_utils/utils.py,sha256=RYFQx7OkOu3fe_QhS-5jx7O06k_58X14S-9PFJgwOa4,12178
94
+ jarvis_ai_assistant-0.1.201.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
95
+ jarvis_ai_assistant-0.1.201.dist-info/METADATA,sha256=EbsPZQI2mPfbeRv6WsJen2ky8nuzILlVZboR0ZaVWBU,20215
96
+ jarvis_ai_assistant-0.1.201.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
97
+ jarvis_ai_assistant-0.1.201.dist-info/entry_points.txt,sha256=Gy3DOP1PYLMK0GCj4rrP_9lkOyBQ39EK_lKGUSwn41E,869
98
+ jarvis_ai_assistant-0.1.201.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
99
+ jarvis_ai_assistant-0.1.201.dist-info/RECORD,,