jarvis-ai-assistant 0.1.207__py3-none-any.whl → 0.1.209__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.
- jarvis/__init__.py +1 -1
- jarvis/jarvis_agent/__init__.py +63 -103
- jarvis/jarvis_agent/edit_file_handler.py +43 -47
- jarvis/jarvis_agent/jarvis.py +33 -39
- jarvis/jarvis_code_agent/code_agent.py +74 -30
- jarvis/jarvis_code_agent/lint.py +6 -6
- jarvis/jarvis_code_analysis/code_review.py +164 -175
- jarvis/jarvis_data/config_schema.json +0 -25
- jarvis/jarvis_git_utils/git_commiter.py +148 -153
- jarvis/jarvis_methodology/main.py +70 -81
- jarvis/jarvis_platform/base.py +21 -17
- jarvis/jarvis_platform/kimi.py +59 -64
- jarvis/jarvis_platform/tongyi.py +118 -131
- jarvis/jarvis_platform/yuanbao.py +117 -122
- jarvis/jarvis_platform_manager/main.py +102 -502
- jarvis/jarvis_platform_manager/service.py +432 -0
- jarvis/jarvis_smart_shell/main.py +99 -33
- jarvis/jarvis_tools/ask_user.py +0 -1
- jarvis/jarvis_tools/edit_file.py +64 -55
- jarvis/jarvis_tools/file_analyzer.py +17 -28
- jarvis/jarvis_tools/read_code.py +80 -81
- jarvis/jarvis_utils/builtin_replace_map.py +1 -36
- jarvis/jarvis_utils/config.py +13 -48
- jarvis/jarvis_utils/embedding.py +6 -51
- jarvis/jarvis_utils/git_utils.py +93 -43
- jarvis/jarvis_utils/http.py +104 -0
- jarvis/jarvis_utils/methodology.py +12 -17
- jarvis/jarvis_utils/utils.py +186 -63
- {jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/METADATA +4 -19
- {jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/RECORD +34 -40
- {jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/entry_points.txt +1 -1
- jarvis/jarvis_data/huggingface.tar.gz +0 -0
- jarvis/jarvis_dev/main.py +0 -1247
- jarvis/jarvis_tools/chdir.py +0 -72
- jarvis/jarvis_tools/code_plan.py +0 -218
- jarvis/jarvis_tools/create_code_agent.py +0 -95
- jarvis/jarvis_tools/create_sub_agent.py +0 -82
- jarvis/jarvis_tools/file_operation.py +0 -238
- jarvis/jarvis_utils/jarvis_history.py +0 -98
- {jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/top_level.txt +0 -0
jarvis/jarvis_utils/utils.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
import hashlib
|
3
|
+
import json
|
3
4
|
import os
|
4
5
|
import signal
|
5
6
|
import subprocess
|
@@ -9,35 +10,24 @@ import time
|
|
9
10
|
from pathlib import Path
|
10
11
|
from typing import Any, Callable, Dict, Optional
|
11
12
|
|
12
|
-
import yaml
|
13
|
+
import yaml # type: ignore
|
13
14
|
|
14
15
|
from jarvis import __version__
|
15
|
-
from jarvis.jarvis_utils.config import (
|
16
|
-
|
16
|
+
from jarvis.jarvis_utils.config import (
|
17
|
+
get_data_dir,
|
18
|
+
get_max_big_content_size,
|
19
|
+
set_global_env_data,
|
20
|
+
)
|
17
21
|
from jarvis.jarvis_utils.embedding import get_context_token_count
|
18
|
-
from jarvis.jarvis_utils.globals import
|
19
|
-
set_interrupt)
|
22
|
+
from jarvis.jarvis_utils.globals import get_in_chat, get_interrupt, set_interrupt
|
20
23
|
from jarvis.jarvis_utils.input import get_single_line_input
|
21
24
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
22
25
|
|
23
26
|
g_config_file = None
|
24
27
|
|
25
28
|
|
26
|
-
def
|
27
|
-
"""
|
28
|
-
功能:
|
29
|
-
1. 创建不存在的jarvis_data目录
|
30
|
-
2. 加载环境变量到os.environ
|
31
|
-
3. 处理文件读取异常
|
32
|
-
4. 检查git仓库状态并在落后时更新
|
33
|
-
5. 统计当前命令使用次数
|
34
|
-
6. 注册SIGINT信号处理函数
|
35
|
-
|
36
|
-
参数:
|
37
|
-
welcome_str: 欢迎信息字符串
|
38
|
-
config_file: 配置文件路径,默认为None(使用~/.jarvis/config.yaml)
|
39
|
-
"""
|
40
|
-
# 保存原始信号处理函数
|
29
|
+
def _setup_signal_handler() -> None:
|
30
|
+
"""设置SIGINT信号处理函数"""
|
41
31
|
original_sigint = signal.getsignal(signal.SIGINT)
|
42
32
|
|
43
33
|
def sigint_handler(signum, frame):
|
@@ -50,7 +40,16 @@ def init_env(welcome_str: str, config_file: Optional[str] = None) -> None:
|
|
50
40
|
original_sigint(signum, frame)
|
51
41
|
|
52
42
|
signal.signal(signal.SIGINT, sigint_handler)
|
53
|
-
|
43
|
+
|
44
|
+
|
45
|
+
def _show_welcome_message(welcome_str: str) -> None:
|
46
|
+
"""显示欢迎信息
|
47
|
+
|
48
|
+
参数:
|
49
|
+
welcome_str: 欢迎信息字符串
|
50
|
+
"""
|
51
|
+
if not welcome_str:
|
52
|
+
return
|
54
53
|
|
55
54
|
jarvis_ascii_art = f"""
|
56
55
|
██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗
|
@@ -64,21 +63,16 @@ def init_env(welcome_str: str, config_file: Optional[str] = None) -> None:
|
|
64
63
|
https://github.com/skyfireitdiy/Jarvis
|
65
64
|
v{__version__}
|
66
65
|
"""
|
67
|
-
|
68
|
-
PrettyOutput.print_gradient_text(jarvis_ascii_art, (0, 120, 255), (0, 255, 200))
|
66
|
+
PrettyOutput.print_gradient_text(jarvis_ascii_art, (0, 120, 255), (0, 255, 200))
|
69
67
|
|
70
|
-
global g_config_file
|
71
|
-
g_config_file = config_file
|
72
68
|
|
73
|
-
|
74
|
-
|
75
|
-
# 现在获取最终的数据目录(可能被配置文件修改)
|
69
|
+
def _extract_huggingface_models() -> None:
|
70
|
+
"""解压HuggingFace模型"""
|
76
71
|
data_dir = Path(get_data_dir())
|
77
72
|
script_dir = Path(os.path.dirname(os.path.dirname(__file__)))
|
78
73
|
hf_archive = script_dir / "jarvis_data" / "huggingface.tar.gz"
|
79
|
-
|
80
|
-
# 检查并解压huggingface模型
|
81
74
|
hf_dir = data_dir / "huggingface" / "hub"
|
75
|
+
|
82
76
|
if not hf_dir.exists() and hf_archive.exists():
|
83
77
|
try:
|
84
78
|
PrettyOutput.print("正在解压HuggingFace模型...", OutputType.INFO)
|
@@ -88,13 +82,47 @@ def init_env(welcome_str: str, config_file: Optional[str] = None) -> None:
|
|
88
82
|
except Exception as e:
|
89
83
|
PrettyOutput.print(f"解压HuggingFace模型失败: {e}", OutputType.ERROR)
|
90
84
|
|
91
|
-
|
85
|
+
|
86
|
+
def _check_git_updates() -> bool:
|
87
|
+
"""检查并更新git仓库
|
88
|
+
|
89
|
+
返回:
|
90
|
+
bool: 是否需要重启进程
|
91
|
+
"""
|
92
|
+
script_dir = Path(os.path.dirname(os.path.dirname(__file__)))
|
92
93
|
from jarvis.jarvis_utils.git_utils import check_and_update_git_repo
|
93
94
|
|
94
|
-
|
95
|
-
|
95
|
+
return check_and_update_git_repo(str(script_dir))
|
96
|
+
|
97
|
+
|
98
|
+
def init_env(welcome_str: str, config_file: Optional[str] = None) -> None:
|
99
|
+
"""初始化Jarvis环境
|
100
|
+
|
101
|
+
参数:
|
102
|
+
welcome_str: 欢迎信息字符串
|
103
|
+
config_file: 配置文件路径,默认为None(使用~/.jarvis/config.yaml)
|
104
|
+
"""
|
105
|
+
# 1. 设置信号处理
|
106
|
+
_setup_signal_handler()
|
107
|
+
|
108
|
+
# 2. 统计命令使用
|
109
|
+
count_cmd_usage()
|
110
|
+
|
111
|
+
# 3. 显示欢迎信息
|
112
|
+
if welcome_str:
|
113
|
+
_show_welcome_message(welcome_str)
|
114
|
+
|
115
|
+
# 4. 设置配置文件
|
116
|
+
global g_config_file
|
117
|
+
g_config_file = config_file
|
118
|
+
load_config()
|
119
|
+
|
120
|
+
# 5. 解压模型
|
121
|
+
_extract_huggingface_models()
|
122
|
+
|
123
|
+
# 6. 检查git更新
|
124
|
+
if _check_git_updates():
|
96
125
|
os.execv(sys.executable, [sys.executable] + sys.argv)
|
97
|
-
# 如果execv失败,退出当前进程
|
98
126
|
sys.exit(0)
|
99
127
|
|
100
128
|
|
@@ -111,47 +139,142 @@ def load_config():
|
|
111
139
|
old_config_file = config_file_path.parent / "env"
|
112
140
|
if old_config_file.exists(): # 旧的配置文件存在
|
113
141
|
_read_old_config_file(old_config_file)
|
142
|
+
else:
|
143
|
+
# 生成默认配置文件
|
144
|
+
schema_path = (
|
145
|
+
Path(__file__).parent.parent / "jarvis_data" / "config_schema.json"
|
146
|
+
)
|
147
|
+
if schema_path.exists():
|
148
|
+
try:
|
149
|
+
config_file_path.parent.mkdir(parents=True, exist_ok=True)
|
150
|
+
generate_default_config(str(schema_path), str(config_file_path))
|
151
|
+
PrettyOutput.print(
|
152
|
+
f"已生成默认配置文件: {config_file_path}", OutputType.INFO
|
153
|
+
)
|
154
|
+
except Exception as e:
|
155
|
+
PrettyOutput.print(f"生成默认配置文件失败: {e}", OutputType.ERROR)
|
114
156
|
else:
|
115
|
-
|
157
|
+
_load_and_process_config(str(config_file_path.parent), str(config_file_path))
|
116
158
|
|
117
159
|
|
118
|
-
|
119
|
-
"""读取并解析YAML格式的配置文件
|
160
|
+
from typing import Tuple
|
120
161
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
3. 将配置数据保存到全局变量
|
125
|
-
4. 设置环境变量(如果配置中有ENV字段)
|
162
|
+
|
163
|
+
def _load_config_file(config_file: str) -> Tuple[str, dict]:
|
164
|
+
"""读取并解析YAML格式的配置文件
|
126
165
|
|
127
166
|
参数:
|
128
|
-
jarvis_dir: Jarvis数据目录路径
|
129
167
|
config_file: 配置文件路径
|
168
|
+
|
169
|
+
返回:
|
170
|
+
Tuple[str, dict]: (文件原始内容, 解析后的配置字典)
|
130
171
|
"""
|
131
172
|
with open(config_file, "r", encoding="utf-8") as f:
|
132
173
|
content = f.read()
|
133
174
|
config_data = yaml.safe_load(content) or {}
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
#
|
151
|
-
|
152
|
-
|
153
|
-
|
175
|
+
return content, config_data
|
176
|
+
|
177
|
+
|
178
|
+
def _ensure_schema_declaration(
|
179
|
+
jarvis_dir: str, config_file: str, content: str, config_data: dict
|
180
|
+
) -> None:
|
181
|
+
"""确保配置文件包含schema声明
|
182
|
+
|
183
|
+
参数:
|
184
|
+
jarvis_dir: Jarvis数据目录路径
|
185
|
+
config_file: 配置文件路径
|
186
|
+
content: 配置文件原始内容
|
187
|
+
config_data: 解析后的配置字典
|
188
|
+
"""
|
189
|
+
if (
|
190
|
+
isinstance(config_data, dict)
|
191
|
+
and "# yaml-language-server: $schema=" not in content
|
192
|
+
):
|
193
|
+
schema_path = Path(
|
194
|
+
os.path.relpath(
|
195
|
+
Path(__file__).parent.parent / "jarvis_data" / "config_schema.json",
|
196
|
+
start=jarvis_dir,
|
154
197
|
)
|
198
|
+
)
|
199
|
+
with open(config_file, "w", encoding="utf-8") as f:
|
200
|
+
f.write(f"# yaml-language-server: $schema={schema_path}\n")
|
201
|
+
f.write(content)
|
202
|
+
|
203
|
+
|
204
|
+
def _process_env_variables(config_data: dict) -> None:
|
205
|
+
"""处理配置中的环境变量
|
206
|
+
|
207
|
+
参数:
|
208
|
+
config_data: 解析后的配置字典
|
209
|
+
"""
|
210
|
+
if "ENV" in config_data and isinstance(config_data["ENV"], dict):
|
211
|
+
os.environ.update(
|
212
|
+
{str(k): str(v) for k, v in config_data["ENV"].items() if v is not None}
|
213
|
+
)
|
214
|
+
|
215
|
+
|
216
|
+
def _load_and_process_config(jarvis_dir: str, config_file: str) -> None:
|
217
|
+
"""加载并处理配置文件
|
218
|
+
|
219
|
+
功能:
|
220
|
+
1. 读取配置文件
|
221
|
+
2. 确保schema声明存在
|
222
|
+
3. 保存配置到全局变量
|
223
|
+
4. 处理环境变量
|
224
|
+
|
225
|
+
参数:
|
226
|
+
jarvis_dir: Jarvis数据目录路径
|
227
|
+
config_file: 配置文件路径
|
228
|
+
"""
|
229
|
+
content, config_data = _load_config_file(config_file)
|
230
|
+
_ensure_schema_declaration(jarvis_dir, config_file, content, config_data)
|
231
|
+
set_global_env_data(config_data)
|
232
|
+
_process_env_variables(config_data)
|
233
|
+
|
234
|
+
|
235
|
+
def generate_default_config(schema_path: str, output_path: str) -> None:
|
236
|
+
"""从schema文件生成默认的YAML格式配置文件
|
237
|
+
|
238
|
+
功能:
|
239
|
+
1. 从schema文件读取配置结构
|
240
|
+
2. 根据schema中的default值生成默认配置
|
241
|
+
3. 自动添加schema声明
|
242
|
+
4. 处理嵌套的schema结构
|
243
|
+
5. 保留注释和格式
|
244
|
+
|
245
|
+
参数:
|
246
|
+
schema_path: schema文件路径
|
247
|
+
output_path: 生成的配置文件路径
|
248
|
+
"""
|
249
|
+
with open(schema_path, "r", encoding="utf-8") as f:
|
250
|
+
schema = json.load(f)
|
251
|
+
|
252
|
+
def _generate_from_schema(schema_dict: Dict[str, Any]) -> Dict[str, Any]:
|
253
|
+
config = {}
|
254
|
+
if "properties" in schema_dict:
|
255
|
+
for key, value in schema_dict["properties"].items():
|
256
|
+
if "default" in value:
|
257
|
+
config[key] = value["default"]
|
258
|
+
elif "properties" in value: # 处理嵌套对象
|
259
|
+
config[key] = _generate_from_schema(value)
|
260
|
+
elif value.get("type") == "array": # 处理列表类型
|
261
|
+
config[key] = []
|
262
|
+
return config
|
263
|
+
|
264
|
+
default_config = _generate_from_schema(schema)
|
265
|
+
|
266
|
+
# 添加schema声明
|
267
|
+
rel_schema_path = Path(
|
268
|
+
os.path.relpath(
|
269
|
+
Path(schema_path),
|
270
|
+
start=Path(output_path).parent,
|
271
|
+
)
|
272
|
+
)
|
273
|
+
content = f"# yaml-language-server: $schema={rel_schema_path}\n"
|
274
|
+
content += yaml.dump(default_config, allow_unicode=True, sort_keys=False)
|
275
|
+
|
276
|
+
with open(output_path, "w", encoding="utf-8") as f:
|
277
|
+
f.write(content)
|
155
278
|
|
156
279
|
|
157
280
|
def _read_old_config_file(config_file):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: jarvis-ai-assistant
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.209
|
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
|
@@ -43,19 +43,18 @@ License-File: LICENSE
|
|
43
43
|
Requires-Dist: requests==2.32.3
|
44
44
|
Requires-Dist: colorama==0.4.6
|
45
45
|
Requires-Dist: prompt_toolkit==3.0.50
|
46
|
-
Requires-Dist: yaspin==2.4.0
|
47
46
|
Requires-Dist: pygments==2.19.1
|
48
47
|
Requires-Dist: fuzzywuzzy==0.18.0
|
49
48
|
Requires-Dist: fastapi==0.115.12
|
50
49
|
Requires-Dist: uvicorn==0.33.0
|
51
50
|
Requires-Dist: rich==14.0.0
|
52
|
-
Requires-Dist: transformers==4.46.3
|
53
|
-
Requires-Dist: torch==2.4.1
|
54
51
|
Requires-Dist: python-Levenshtein==0.25.1
|
52
|
+
Requires-Dist: tiktoken==0.7.0
|
55
53
|
Requires-Dist: pillow==10.2.0
|
56
54
|
Requires-Dist: openai==1.78.1
|
57
55
|
Requires-Dist: tabulate==0.9.0
|
58
56
|
Requires-Dist: pyte==0.8.2
|
57
|
+
Requires-Dist: pyyaml>=6.0.2
|
59
58
|
Provides-Extra: dev
|
60
59
|
Requires-Dist: pytest; extra == "dev"
|
61
60
|
Requires-Dist: black; extra == "dev"
|
@@ -106,10 +105,9 @@ pip3 install jarvis-ai-assistant
|
|
106
105
|
| `jarvis` | - | 使用通用代理 |
|
107
106
|
| `jarvis-code-agent` | `jca` | 使用代码代理 |
|
108
107
|
| `jarvis-smart-shell` | `jss` | 使用智能shell功能 |
|
109
|
-
| `jarvis-platform-manager` |
|
108
|
+
| `jarvis-platform-manager` | `jpm` | 使用平台管理功能 |
|
110
109
|
| `jarvis-code-review` | - | 使用代码审查功能 |
|
111
110
|
| `jarvis-git-commit` | `jgc` | 使用自动化git commit功能 |
|
112
|
-
| `jarvis-dev` | - | 使用dev功能(开发中) |
|
113
111
|
| `jarvis-git-squash` | - | 使用git squash功能 |
|
114
112
|
| `jarvis-multi-agent` | - | 使用多代理功能 |
|
115
113
|
| `jarvis-agent` | - | 使用agent功能 |
|
@@ -483,7 +481,6 @@ JARVIS_THINKING_PLATFORM: yuanbao
|
|
483
481
|
JARVIS_THINKING_MODEL: deep_seek
|
484
482
|
ENV:
|
485
483
|
YUANBAO_COOKIES: <元宝cookies>
|
486
|
-
YUANBAO_AGENT_ID: <元宝AgentID>
|
487
484
|
```
|
488
485
|
|
489
486
|
#### Kimi
|
@@ -522,23 +519,18 @@ OPENAI_API_BASE: https://api.openai.com/v1
|
|
522
519
|
| `ENV` | {} | 环境变量配置 |
|
523
520
|
| `JARVIS_MAX_TOKEN_COUNT` | 960000 | 上下文窗口的最大token数量 |
|
524
521
|
| `JARVIS_MAX_INPUT_TOKEN_COUNT` | 32000 | 输入的最大token数量 |
|
525
|
-
| `JARVIS_AUTO_COMPLETE` | false | 是否启用自动完成功能 |
|
526
|
-
| `JARVIS_SHELL_NAME` | bash | 系统shell名称 |
|
527
522
|
| `JARVIS_PLATFORM` | yuanbao | 默认AI平台 |
|
528
523
|
| `JARVIS_MODEL` | deep_seek_v3 | 默认模型 |
|
529
524
|
| `JARVIS_THINKING_PLATFORM` | JARVIS_PLATFORM | 推理任务使用的平台 |
|
530
525
|
| `JARVIS_THINKING_MODEL` | JARVIS_MODEL | 推理任务使用的模型 |
|
531
526
|
| `JARVIS_EXECUTE_TOOL_CONFIRM` | false | 执行工具前是否需要确认 |
|
532
527
|
| `JARVIS_CONFIRM_BEFORE_APPLY_PATCH` | false | 应用补丁前是否需要确认 |
|
533
|
-
| `JARVIS_MAX_TOOL_CALL_COUNT` | 20 | 最大连续工具调用次数 |
|
534
|
-
| `JARVIS_AUTO_UPDATE` | true | 是否自动更新Jarvis |
|
535
528
|
| `JARVIS_MAX_BIG_CONTENT_SIZE` | 160000 | 最大大内容大小 |
|
536
529
|
| `JARVIS_PRETTY_OUTPUT` | false | 是否启用PrettyOutput |
|
537
530
|
| `JARVIS_GIT_COMMIT_PROMPT` | "" | 自定义git提交信息生成提示模板 |
|
538
531
|
| `JARVIS_PRINT_PROMPT` | false | 是否打印提示 |
|
539
532
|
| `JARVIS_USE_METHODOLOGY` | true | 是否启用方法论功能 |
|
540
533
|
| `JARVIS_USE_ANALYSIS` | true | 是否启用任务分析功能 |
|
541
|
-
| `JARVIS_USE_HISTORY_COUNT` | 0 | 使用N次历史记录作为上下文记忆 |
|
542
534
|
| `JARVIS_DATA_PATH` | ~/.jarvis | Jarvis数据存储目录路径 |
|
543
535
|
|
544
536
|
## 🛠️ 工具说明 <a id="tools"></a>
|
@@ -547,15 +539,10 @@ OPENAI_API_BASE: https://api.openai.com/v1
|
|
547
539
|
| 工具名称 | 描述 |
|
548
540
|
|----------|------|
|
549
541
|
| ask_user | 交互式用户输入收集 |
|
550
|
-
| chdir | 更改当前工作目录 |
|
551
542
|
| rewrite_file | 文件重写工具 |
|
552
543
|
| edit_file | 代码编辑工具 |
|
553
|
-
| code_plan | 理解需求并制定代码修改计划 |
|
554
|
-
| create_code_agent | 代码开发工具 |
|
555
|
-
| create_sub_agent | 创建子代理处理特定任务 |
|
556
544
|
| execute_script | 执行脚本并返回结果 |
|
557
545
|
| file_analyzer | 分析文件内容并提取关键信息 |
|
558
|
-
| file_operation | 文件批量操作工具 |
|
559
546
|
| methodology | 方法论管理工具 |
|
560
547
|
| read_code | 代码阅读与分析工具 |
|
561
548
|
| read_webpage | 读取网页内容并分析 |
|
@@ -572,9 +559,7 @@ OPENAI_API_BASE: https://api.openai.com/v1
|
|
572
559
|
| `'ToolUsage'` | 显示可用工具列表及使用方法 |
|
573
560
|
| `'ReloadConfig'` | 重新加载配置文件 |
|
574
561
|
| `'Web'` | 网页搜索,支持多种提问格式 |
|
575
|
-
| `'Plan'` | 生成代码修改计划,提供详细需求描述 |
|
576
562
|
| `'FindRelatedFiles'` | 查找与功能相关的文件 |
|
577
|
-
| `'Dev'` | 调用create_code_agent开发需求 |
|
578
563
|
| `'Fix'` | 修复问题 |
|
579
564
|
| `'Check'` | 执行静态代码检查,包括错误和风格问题 |
|
580
565
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
jarvis/__init__.py,sha256=
|
2
|
-
jarvis/jarvis_agent/__init__.py,sha256=
|
1
|
+
jarvis/__init__.py,sha256=yUlynCkPny2V_9ul8_tYp1Mbse_jgWi-BYgoIA0o6Vs,75
|
2
|
+
jarvis/jarvis_agent/__init__.py,sha256=QbI5vkourPJZ2OR63RBZAtFptTYrZz_si8bIkc9EB2o,31709
|
3
3
|
jarvis/jarvis_agent/builtin_input_handler.py,sha256=1V7kV5Zhw2HE3Xgjs1R-43RZ2huq3Kg-32NCdNnyZmA,2216
|
4
|
-
jarvis/jarvis_agent/edit_file_handler.py,sha256=
|
5
|
-
jarvis/jarvis_agent/jarvis.py,sha256=
|
4
|
+
jarvis/jarvis_agent/edit_file_handler.py,sha256=bIciBghx5maDz09x0XNTxdNsyrBbTND95GupVdJIVVg,16762
|
5
|
+
jarvis/jarvis_agent/jarvis.py,sha256=tTv9X1oSRDGRmNkM1F3RNN6ikFbc_PkRBIbZIffbA_8,5802
|
6
6
|
jarvis/jarvis_agent/main.py,sha256=c6bQe-8LXvW2-NBn9Rn_yPYdrwnkJ8KQaSFY2cPvkxw,2775
|
7
7
|
jarvis/jarvis_agent/output_handler.py,sha256=P7oWpXBGFfOsWq7cIhS_z9crkQ19ES7qU5pM92KKjAs,1172
|
8
8
|
jarvis/jarvis_agent/shell_input_handler.py,sha256=zVaKNthIHJh1j4g8_-d3w5ahNH9aH-ZNRSOourQpHR4,1328
|
9
9
|
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
jarvis/jarvis_code_agent/code_agent.py,sha256=
|
11
|
-
jarvis/jarvis_code_agent/lint.py,sha256=
|
12
|
-
jarvis/jarvis_code_analysis/code_review.py,sha256=
|
10
|
+
jarvis/jarvis_code_agent/code_agent.py,sha256=u0R2TWdmpiHu7pjh65kKpIK4dgDEuZpBdZyrSkE32wg,17846
|
11
|
+
jarvis/jarvis_code_agent/lint.py,sha256=LZPsfyZPMo7Wm7LN4osZocuNJwZx1ojacO3MlF870x8,4009
|
12
|
+
jarvis/jarvis_code_analysis/code_review.py,sha256=uCCbGd4Y1RjDzhZoVE8JdN2avlwOfqimSDIrcM-KMew,30456
|
13
13
|
jarvis/jarvis_code_analysis/checklists/__init__.py,sha256=LIXAYa1sW3l7foP6kohLWnE98I_EQ0T7z5bYKHq6rJA,78
|
14
14
|
jarvis/jarvis_code_analysis/checklists/c_cpp.py,sha256=9t62bMqs6qTkFSio4SKkj88qyb5ZubWrw3MxJBQ4X1A,1317
|
15
15
|
jarvis/jarvis_code_analysis/checklists/csharp.py,sha256=ShPXrl2_UPAnGaCHAG2wLl90COG3HK2XCSr1UK2dxN4,2420
|
@@ -30,47 +30,41 @@ jarvis/jarvis_code_analysis/checklists/shell.py,sha256=aRFYhQQvTgbYd-uY5pc8UHIUA
|
|
30
30
|
jarvis/jarvis_code_analysis/checklists/sql.py,sha256=vR0T6qC7b4dURjJVAd7kSVxyvZEQXPG1Jqc2sNTGp5c,2355
|
31
31
|
jarvis/jarvis_code_analysis/checklists/swift.py,sha256=TPx4I6Gupvs6tSerRKmTSKEPQpOLEbH2Y7LXg1uBgxc,2566
|
32
32
|
jarvis/jarvis_code_analysis/checklists/web.py,sha256=25gGD7pDadZQybNFvALYxWvK0VRjGQb1NVJQElwjyk0,3943
|
33
|
-
jarvis/jarvis_data/config_schema.json,sha256=
|
34
|
-
jarvis/jarvis_data/huggingface.tar.gz,sha256=dWKnc_tvyx-I_ZkXo91O0b38KxDmLW1ZbmJ3E6fCl_k,1120205
|
35
|
-
jarvis/jarvis_dev/main.py,sha256=1elwLV0uKX0CjjlAEKG5uTYHJz5K3qEki49Pv7KMLFw,40919
|
33
|
+
jarvis/jarvis_data/config_schema.json,sha256=BeaihTD2eYRZq65-tbmCIx7lBdS5U0V1FOQGIc6XCq0,5849
|
36
34
|
jarvis/jarvis_git_details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
35
|
jarvis/jarvis_git_details/main.py,sha256=MjpUHB4ErR_SKPBx1TLLK_XLkH427RTtsyVn6EUd88Y,8907
|
38
36
|
jarvis/jarvis_git_squash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
37
|
jarvis/jarvis_git_squash/main.py,sha256=lx0WVOiaydYgwzWBDG7C8wJxYJwSb1SIxyoD-rgzgvA,2274
|
40
|
-
jarvis/jarvis_git_utils/git_commiter.py,sha256=
|
38
|
+
jarvis/jarvis_git_utils/git_commiter.py,sha256=erZ3wNJuaEgHlKTaYv0UKargG_Yl9OnssTIcErEAdtw,12472
|
41
39
|
jarvis/jarvis_mcp/__init__.py,sha256=OPMtjD-uq9xAaKCRIDyKIosaFfBe1GBPu1az-mQ0rVM,2048
|
42
40
|
jarvis/jarvis_mcp/sse_mcp_client.py,sha256=-3Qy1LyqgHswoc6YbadVRG3ias2op7lUp7Ne2-QUKBM,22474
|
43
41
|
jarvis/jarvis_mcp/stdio_mcp_client.py,sha256=armvgyHAv-AxF5lqiK-TbVLzg3XgSCwmTdWmxBSTLRk,11248
|
44
42
|
jarvis/jarvis_mcp/streamable_mcp_client.py,sha256=1OZpsG82U2MLbGuojllJAblFUAMmp1N0i5fsKM4n5Ts,14453
|
45
|
-
jarvis/jarvis_methodology/main.py,sha256
|
43
|
+
jarvis/jarvis_methodology/main.py,sha256=-PqsWvtpUJkkhiGgV-1JegEnEZBmv8SHnNMNNm_-QQc,11720
|
46
44
|
jarvis/jarvis_multi_agent/__init__.py,sha256=sDd3sK88dS7_qAz2ywIAaEWdQ4iRVCiuBu2rQQmrKbU,4512
|
47
45
|
jarvis/jarvis_multi_agent/main.py,sha256=h7VUSwoPrES0XTK8z5kt3XLX1mmcm8UEuFEHQOUWPH4,1696
|
48
46
|
jarvis/jarvis_platform/__init__.py,sha256=WLQHSiE87PPket2M50_hHzjdMIgPIBx2VF8JfB_NNRk,105
|
49
|
-
jarvis/jarvis_platform/base.py,sha256=
|
47
|
+
jarvis/jarvis_platform/base.py,sha256=xN0DGYs03eS-wSQk4JgBOzFl0kvDAmqnssUU59EOXU8,7775
|
50
48
|
jarvis/jarvis_platform/human.py,sha256=r8Vlltp_LirJZeZh1Mmi30iJr9tl1JaNFoqthSRHF6o,2826
|
51
|
-
jarvis/jarvis_platform/kimi.py,sha256=
|
49
|
+
jarvis/jarvis_platform/kimi.py,sha256=W5MKkH6rxS5JeNY3VZY0EOT9ugeZJqr_eHO9wd9cEW4,12444
|
52
50
|
jarvis/jarvis_platform/openai.py,sha256=uEjBikfFj7kp5wondLvOx4WdkmTX0aqF6kixxAufcHg,4806
|
53
51
|
jarvis/jarvis_platform/registry.py,sha256=Sz4ADAaxuufpAQG0KSQZuL1yALzH-aF3FDapkNn5foE,8107
|
54
|
-
jarvis/jarvis_platform/tongyi.py,sha256=
|
55
|
-
jarvis/jarvis_platform/yuanbao.py,sha256=
|
52
|
+
jarvis/jarvis_platform/tongyi.py,sha256=0pKBVAxBAGXHFLRG7C7gSTU7RQuK6IyElOjrhjCxRM8,20238
|
53
|
+
jarvis/jarvis_platform/yuanbao.py,sha256=0RojrUwoQBLR9a_yOGmzY7pHqe032dMBQqdbMLpakvc,20688
|
56
54
|
jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
|
-
jarvis/jarvis_platform_manager/main.py,sha256=
|
55
|
+
jarvis/jarvis_platform_manager/main.py,sha256=Jm1ijKGZrSYo1HrgJ1R4JQZwPwiOIfDFYSVJXKPklPU,15585
|
56
|
+
jarvis/jarvis_platform_manager/service.py,sha256=rY1FmNl-tmbkkke_3SlH9h6ckyPIgmSwbaRorURp9Cc,14916
|
58
57
|
jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
|
-
jarvis/jarvis_smart_shell/main.py,sha256=
|
58
|
+
jarvis/jarvis_smart_shell/main.py,sha256=DbhRSP1sZfSIaTltP1YWVDSQOTYEsbiOnfO9kSYwcNs,6959
|
60
59
|
jarvis/jarvis_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
61
|
-
jarvis/jarvis_tools/ask_user.py,sha256=
|
60
|
+
jarvis/jarvis_tools/ask_user.py,sha256=iz2PTGx66IRL8e4DOpj3XhEGHFWeKQl0ggEOl_zOwQ0,1972
|
62
61
|
jarvis/jarvis_tools/base.py,sha256=tFVmK6ppsImW2BzHZmrNmMRiOJdW-4aZP6Me3VxdYcA,1194
|
63
|
-
jarvis/jarvis_tools/
|
64
|
-
jarvis/jarvis_tools/code_plan.py,sha256=XRXHdkN4O1A4qbShLa4VBHFdRl6YdyMgZxbPPotrqNs,7358
|
65
|
-
jarvis/jarvis_tools/create_code_agent.py,sha256=wls2B2iLrIEeG9kSWnJHv1wQ4TNqdD9T5OPoAyN53N0,3384
|
66
|
-
jarvis/jarvis_tools/create_sub_agent.py,sha256=ilnApbz7ptNz5o3IrhBTTiNMJGtdeUmkpYL2BFqyI6c,2874
|
67
|
-
jarvis/jarvis_tools/edit_file.py,sha256=lXF4fetuXtIoLfxQyxHR3QqxvNOVN4oEFbafxUvyZDw,11517
|
62
|
+
jarvis/jarvis_tools/edit_file.py,sha256=Hvqc5YyrwzlEbUT1CsarlKKaPj852970jszKjS5YMPE,11757
|
68
63
|
jarvis/jarvis_tools/execute_script.py,sha256=gMarE5yCCSPU6Dp6HlcL2KT-2xCzR-1p-oQNlYOJK58,6157
|
69
|
-
jarvis/jarvis_tools/file_analyzer.py,sha256=
|
70
|
-
jarvis/jarvis_tools/file_operation.py,sha256=b488jf0_l7aP0RkntaNE9WqZXtbdrQTJdmWawJbfC-A,9529
|
64
|
+
jarvis/jarvis_tools/file_analyzer.py,sha256=aVe1jBSp0YmlypihxrGADJpYrU_7CxDETxGUNySuSlI,4044
|
71
65
|
jarvis/jarvis_tools/generate_new_tool.py,sha256=2YAs8DC7fJnxOkjSmhmSAwqSpBlicVhYc06WZ8YVBls,7679
|
72
66
|
jarvis/jarvis_tools/methodology.py,sha256=_K4GIDUodGEma3SvNRo7Qs5rliijgNespVLyAPN35JU,5233
|
73
|
-
jarvis/jarvis_tools/read_code.py,sha256=
|
67
|
+
jarvis/jarvis_tools/read_code.py,sha256=EnI-R-5HyIQYhMD391nZWXHIuHHBF-OJIRE0QpLcPX4,6417
|
74
68
|
jarvis/jarvis_tools/read_webpage.py,sha256=NmDUboVZd4CGHBPRFK6dp3uqVhuGopW1bOi3TcaLDF4,2092
|
75
69
|
jarvis/jarvis_tools/registry.py,sha256=0SdgBi-b1qnd3QX0VvQy7UVU7Pq9BZGYLiAe7t0DjpQ,25690
|
76
70
|
jarvis/jarvis_tools/rewrite_file.py,sha256=eG_WKg6cVAXmuGwUqlWkcuyay5S8DOzEi8vZCmX3O8w,7255
|
@@ -79,21 +73,21 @@ jarvis/jarvis_tools/virtual_tty.py,sha256=KKr3jpvQWWMPr2o40hlmN6fuXJCN8H4_ma5QU4
|
|
79
73
|
jarvis/jarvis_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
80
74
|
jarvis/jarvis_tools/cli/main.py,sha256=Mg6TQDxMdzB1Ua1UrZ2EE-uQWsbaeojWaEGHJp2HimA,6375
|
81
75
|
jarvis/jarvis_utils/__init__.py,sha256=67h0ldisGlh3oK4DAeNEL2Bl_VsI3tSmfclasyVlueM,850
|
82
|
-
jarvis/jarvis_utils/builtin_replace_map.py,sha256=
|
83
|
-
jarvis/jarvis_utils/config.py,sha256=
|
84
|
-
jarvis/jarvis_utils/embedding.py,sha256=
|
76
|
+
jarvis/jarvis_utils/builtin_replace_map.py,sha256=EI8JnHqr-ZpAhpwocTu48DhHUMHNd8tNUpDNYI47OLE,1717
|
77
|
+
jarvis/jarvis_utils/config.py,sha256=MO2-1z_7f3KkSrv7heGK1650Zb0SjnljO2hzLE2jA5c,6598
|
78
|
+
jarvis/jarvis_utils/embedding.py,sha256=nOe_jvn8pr4env83D9gNCBcId8LaUsvQxa8awLP1_2Y,2437
|
85
79
|
jarvis/jarvis_utils/file_processors.py,sha256=XiM248SHS7lLgQDCbORVFWqinbVDUawYxWDOsLXDxP8,3043
|
86
|
-
jarvis/jarvis_utils/git_utils.py,sha256=
|
80
|
+
jarvis/jarvis_utils/git_utils.py,sha256=7cxvg1qATFwRVtgzivdvc31KfZ38n_nl9_z35iXUYQU,20891
|
87
81
|
jarvis/jarvis_utils/globals.py,sha256=9NTMfCVd0jvtloOv14-KE6clhcVStFmyN9jWxLmQ5so,3369
|
82
|
+
jarvis/jarvis_utils/http.py,sha256=8N9MvoRhIFsRBIMf2lKzp2BStdAhSFoKFc6q4NwQDZw,2930
|
88
83
|
jarvis/jarvis_utils/input.py,sha256=ehvHkIgwqnBOHkwOeRCBFRggqOgOZuUdGQXn2ATUFwU,8049
|
89
|
-
jarvis/jarvis_utils/
|
90
|
-
jarvis/jarvis_utils/methodology.py,sha256=MhPrMxMqElyAn54BDfpQdUqrRr7IbSlrLvAI39LCgTM,8487
|
84
|
+
jarvis/jarvis_utils/methodology.py,sha256=-cvM6pwgJK7BXCYg2uVjIId_j3v5RUh2z2PBcK_2vj4,8155
|
91
85
|
jarvis/jarvis_utils/output.py,sha256=PRCgudPOB8gMEP3u-g0FGD2c6tBgJhLXUMqNPglfjV8,10813
|
92
86
|
jarvis/jarvis_utils/tag.py,sha256=f211opbbbTcSyzCDwuIK_oCnKhXPNK-RknYyGzY1yD0,431
|
93
|
-
jarvis/jarvis_utils/utils.py,sha256=
|
94
|
-
jarvis_ai_assistant-0.1.
|
95
|
-
jarvis_ai_assistant-0.1.
|
96
|
-
jarvis_ai_assistant-0.1.
|
97
|
-
jarvis_ai_assistant-0.1.
|
98
|
-
jarvis_ai_assistant-0.1.
|
99
|
-
jarvis_ai_assistant-0.1.
|
87
|
+
jarvis/jarvis_utils/utils.py,sha256=zgkdtpQ6kN86pzYi0iBBa3IUJp_GMrm31RKh5V_6Vzg,15306
|
88
|
+
jarvis_ai_assistant-0.1.209.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
89
|
+
jarvis_ai_assistant-0.1.209.dist-info/METADATA,sha256=ozb5hyQCDJzR9_SFioQqoT-G5oTpRcyw2dUF_Au_gU8,19535
|
90
|
+
jarvis_ai_assistant-0.1.209.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
91
|
+
jarvis_ai_assistant-0.1.209.dist-info/entry_points.txt,sha256=SF46ViTZcQVZEfbqzJDKKVc9TrN1x-P1mQ6wup7u2HY,875
|
92
|
+
jarvis_ai_assistant-0.1.209.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
93
|
+
jarvis_ai_assistant-0.1.209.dist-info/RECORD,,
|
{jarvis_ai_assistant-0.1.207.dist-info → jarvis_ai_assistant-0.1.209.dist-info}/entry_points.txt
RENAMED
@@ -3,7 +3,6 @@ jarvis = jarvis.jarvis_agent.jarvis:main
|
|
3
3
|
jarvis-agent = jarvis.jarvis_agent.main:main
|
4
4
|
jarvis-code-agent = jarvis.jarvis_code_agent.code_agent:main
|
5
5
|
jarvis-code-review = jarvis.jarvis_code_analysis.code_review:main
|
6
|
-
jarvis-dev = jarvis.jarvis_dev.main:main
|
7
6
|
jarvis-git-commit = jarvis.jarvis_git_utils.git_commiter:main
|
8
7
|
jarvis-git-details = jarvis.jarvis_git_details.main:main
|
9
8
|
jarvis-git-squash = jarvis.jarvis_git_squash.main:main
|
@@ -14,4 +13,5 @@ jarvis-smart-shell = jarvis.jarvis_smart_shell.main:main
|
|
14
13
|
jarvis-tool = jarvis.jarvis_tools.cli.main:main
|
15
14
|
jca = jarvis.jarvis_code_agent.code_agent:main
|
16
15
|
jgc = jarvis.jarvis_git_utils.git_commiter:main
|
16
|
+
jpm = jarvis.jarvis_platform_manager.main:main
|
17
17
|
jss = jarvis.jarvis_smart_shell.main:main
|
Binary file
|