jarvis-ai-assistant 0.1.194__py3-none-any.whl → 0.1.196__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 -31
- jarvis/jarvis_agent/jarvis.py +3 -8
- jarvis/jarvis_code_agent/code_agent.py +8 -12
- jarvis/jarvis_code_analysis/checklists/loader.py +6 -20
- jarvis/jarvis_code_analysis/code_review.py +2 -1
- jarvis/jarvis_data/config_schema.json +5 -0
- jarvis/jarvis_git_utils/git_commiter.py +3 -2
- jarvis/jarvis_methodology/main.py +2 -4
- jarvis/jarvis_platform/base.py +4 -6
- jarvis/jarvis_platform/human.py +10 -0
- jarvis/jarvis_platform/kimi.py +21 -9
- jarvis/jarvis_platform/registry.py +4 -7
- jarvis/jarvis_smart_shell/main.py +0 -1
- jarvis/jarvis_tools/create_code_agent.py +2 -4
- jarvis/jarvis_utils/config.py +11 -5
- jarvis/jarvis_utils/embedding.py +7 -5
- jarvis/jarvis_utils/git_utils.py +30 -21
- jarvis/jarvis_utils/input.py +2 -1
- jarvis/jarvis_utils/jarvis_history.py +96 -0
- jarvis/jarvis_utils/methodology.py +3 -3
- jarvis/jarvis_utils/output.py +5 -2
- jarvis/jarvis_utils/utils.py +4 -6
- {jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/METADATA +62 -13
- {jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/RECORD +29 -28
- {jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/top_level.txt +0 -0
jarvis/__init__.py
CHANGED
jarvis/jarvis_agent/__init__.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# 标准库导入
|
3
3
|
import datetime
|
4
|
+
import os
|
5
|
+
from pathlib import Path
|
4
6
|
import platform
|
5
7
|
from typing import Any, Callable, Dict, List, Optional, Protocol, Tuple, Union
|
6
8
|
|
@@ -12,26 +14,20 @@ from yaspin import yaspin # type: ignore
|
|
12
14
|
# jarvis_platform 相关
|
13
15
|
from jarvis.jarvis_platform.base import BasePlatform
|
14
16
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
15
|
-
|
16
17
|
# jarvis_utils 相关
|
17
|
-
from jarvis.jarvis_utils.config import (
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
is_use_analysis,
|
23
|
-
is_use_methodology,
|
24
|
-
)
|
18
|
+
from jarvis.jarvis_utils.config import (get_data_dir, get_max_token_count,
|
19
|
+
get_max_tool_call_count,
|
20
|
+
is_auto_complete,
|
21
|
+
is_execute_tool_confirm,
|
22
|
+
is_use_analysis, get_history_count, is_use_methodology)
|
25
23
|
from jarvis.jarvis_utils.embedding import get_context_token_count
|
26
|
-
from jarvis.jarvis_utils.globals import (
|
27
|
-
|
28
|
-
|
29
|
-
make_agent_name,
|
30
|
-
set_agent,
|
31
|
-
set_interrupt,
|
32
|
-
)
|
24
|
+
from jarvis.jarvis_utils.globals import (delete_agent, get_interrupt,
|
25
|
+
make_agent_name, set_agent,
|
26
|
+
set_interrupt)
|
33
27
|
from jarvis.jarvis_utils.input import get_multiline_input
|
34
|
-
from jarvis.jarvis_utils.
|
28
|
+
from jarvis.jarvis_utils.jarvis_history import JarvisHistory
|
29
|
+
from jarvis.jarvis_utils.methodology import (load_methodology,
|
30
|
+
upload_methodology)
|
35
31
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
36
32
|
from jarvis.jarvis_utils.tag import ct, ot
|
37
33
|
from jarvis.jarvis_utils.utils import user_confirm
|
@@ -143,6 +139,7 @@ class Agent:
|
|
143
139
|
self.prompt = ""
|
144
140
|
|
145
141
|
def __del__(self):
|
142
|
+
self.history.stop_record()
|
146
143
|
delete_agent(self.name)
|
147
144
|
|
148
145
|
def __init__(
|
@@ -163,6 +160,7 @@ class Agent:
|
|
163
160
|
use_methodology: Optional[bool] = None,
|
164
161
|
use_analysis: Optional[bool] = None,
|
165
162
|
files: List[str] = [],
|
163
|
+
history_count: Optional[int] = None,
|
166
164
|
):
|
167
165
|
self.files = files
|
168
166
|
"""初始化Jarvis Agent实例
|
@@ -241,6 +239,13 @@ class Agent:
|
|
241
239
|
self.max_tool_call_count = get_max_tool_call_count()
|
242
240
|
self.after_tool_call_cb: Optional[Callable[[Agent], None]] = None
|
243
241
|
|
242
|
+
self.history = JarvisHistory()
|
243
|
+
self.history_dir = str(Path(get_data_dir())/"history")
|
244
|
+
self.history.start_record(self.history_dir)
|
245
|
+
|
246
|
+
self.history_count = history_count if history_count is not None else get_history_count()
|
247
|
+
|
248
|
+
|
244
249
|
self.execute_tool_confirm = (
|
245
250
|
execute_tool_confirm
|
246
251
|
if execute_tool_confirm is not None
|
@@ -402,8 +407,10 @@ class Agent:
|
|
402
407
|
if self.conversation_length > self.max_token_count:
|
403
408
|
message = self._summarize_and_clear_history() + "\n\n" + message
|
404
409
|
self.conversation_length += get_context_token_count(message)
|
410
|
+
self.history.append_msg("user", message)
|
405
411
|
response = self.model.chat_until_success(message) # type: ignore
|
406
412
|
self.conversation_length += get_context_token_count(response)
|
413
|
+
self.history.append_msg("assistant", response)
|
407
414
|
return response
|
408
415
|
|
409
416
|
def generate_summary(self) -> str:
|
@@ -781,21 +788,9 @@ arguments:
|
|
781
788
|
set_agent(self.name, self)
|
782
789
|
|
783
790
|
while True:
|
791
|
+
history_md = ""
|
784
792
|
if self.first:
|
785
|
-
|
786
|
-
if self.files and self.model and self.model.support_upload_files():
|
787
|
-
self.model.upload_files(self.files)
|
788
|
-
|
789
|
-
# 如果启用方法论且没有上传文件,上传方法论
|
790
|
-
elif self.use_methodology:
|
791
|
-
if not self.model or not upload_methodology(self.model):
|
792
|
-
# 上传失败则回退到本地加载
|
793
|
-
msg = self.prompt
|
794
|
-
for handler in self.input_handler:
|
795
|
-
msg, _ = handler(msg, self)
|
796
|
-
self.prompt = f"{self.prompt}\n\n以下是历史类似问题的执行经验,可参考:\n{load_methodology(msg, self.get_tool_registry())}"
|
797
|
-
|
798
|
-
self.first = False
|
793
|
+
history_md = self._first_run()
|
799
794
|
try:
|
800
795
|
current_response = self._call_model(self.prompt, True)
|
801
796
|
self.prompt = ""
|
@@ -838,6 +833,8 @@ arguments:
|
|
838
833
|
return self._complete_task()
|
839
834
|
|
840
835
|
except Exception as e:
|
836
|
+
if history_md:
|
837
|
+
os.remove(history_md)
|
841
838
|
PrettyOutput.print(f"任务失败: {str(e)}", OutputType.ERROR)
|
842
839
|
return f"Task failed: {str(e)}"
|
843
840
|
|
@@ -845,6 +842,41 @@ arguments:
|
|
845
842
|
PrettyOutput.print(f"任务失败: {str(e)}", OutputType.ERROR)
|
846
843
|
return f"Task failed: {str(e)}"
|
847
844
|
|
845
|
+
def _first_run(self):
|
846
|
+
history_md = ""
|
847
|
+
if self.history_count > 0 and self.model and self.model.support_upload_files():
|
848
|
+
import tempfile
|
849
|
+
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
850
|
+
history_md = str(Path(tempfile.gettempdir())/f"{self.name}_history_{timestamp}.md")
|
851
|
+
self.history.export_history_to_markdown(tempfile.gettempdir(), history_md, max_files=self.history_count)
|
852
|
+
self.files.append(history_md)
|
853
|
+
|
854
|
+
# 如果有上传文件,先上传文件
|
855
|
+
if self.model and self.model.support_upload_files():
|
856
|
+
if self.use_methodology:
|
857
|
+
if not upload_methodology(self.model, other_files=self.files):
|
858
|
+
if self.files:
|
859
|
+
PrettyOutput.print("文件上传失败,将忽略文件列表", OutputType.WARNING)
|
860
|
+
# 上传失败则回退到本地加载
|
861
|
+
msg = self.prompt
|
862
|
+
for handler in self.input_handler:
|
863
|
+
msg, _ = handler(msg, self)
|
864
|
+
self.prompt = f"{self.prompt}\n\n以下是历史类似问题的执行经验,可参考:\n{load_methodology(msg, self.get_tool_registry())}"
|
865
|
+
elif self.files:
|
866
|
+
if not self.model.upload_files(self.files):
|
867
|
+
PrettyOutput.print("文件上传失败,将忽略文件列表", OutputType.WARNING)
|
868
|
+
else:
|
869
|
+
if self.files:
|
870
|
+
PrettyOutput.print("不支持上传文件,将忽略文件列表", OutputType.WARNING)
|
871
|
+
if self.use_methodology:
|
872
|
+
msg = self.prompt
|
873
|
+
for handler in self.input_handler:
|
874
|
+
msg, _ = handler(msg, self)
|
875
|
+
self.prompt = f"{self.prompt}\n\n以下是历史类似问题的执行经验,可参考:\n{load_methodology(msg, self.get_tool_registry())}"
|
876
|
+
|
877
|
+
self.first = False
|
878
|
+
return history_md
|
879
|
+
|
848
880
|
def clear_history(self):
|
849
881
|
"""清空对话历史但保留系统提示
|
850
882
|
|
jarvis/jarvis_agent/jarvis.py
CHANGED
@@ -8,14 +8,9 @@ import yaml
|
|
8
8
|
from prompt_toolkit import prompt
|
9
9
|
from yaspin import yaspin
|
10
10
|
|
11
|
-
from jarvis.jarvis_agent import (
|
12
|
-
|
13
|
-
|
14
|
-
PrettyOutput,
|
15
|
-
get_multiline_input,
|
16
|
-
origin_agent_system_prompt,
|
17
|
-
user_confirm,
|
18
|
-
)
|
11
|
+
from jarvis.jarvis_agent import (Agent, OutputType, PrettyOutput,
|
12
|
+
get_multiline_input,
|
13
|
+
origin_agent_system_prompt, user_confirm)
|
19
14
|
from jarvis.jarvis_agent.builtin_input_handler import builtin_input_handler
|
20
15
|
from jarvis.jarvis_agent.shell_input_handler import shell_input_handler
|
21
16
|
from jarvis.jarvis_tools.registry import ToolRegistry
|
@@ -10,30 +10,26 @@ import subprocess
|
|
10
10
|
import sys
|
11
11
|
from typing import List, Optional, Tuple
|
12
12
|
|
13
|
+
from yaspin import yaspin # type: ignore
|
14
|
+
|
13
15
|
from jarvis.jarvis_agent import Agent
|
14
16
|
from jarvis.jarvis_agent.builtin_input_handler import builtin_input_handler
|
15
17
|
from jarvis.jarvis_agent.shell_input_handler import shell_input_handler
|
16
|
-
|
17
18
|
# 忽略yaspin的类型检查
|
18
19
|
from jarvis.jarvis_code_agent.lint import get_lint_tools
|
19
20
|
from jarvis.jarvis_git_utils.git_commiter import GitCommitTool
|
20
21
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
21
22
|
from jarvis.jarvis_tools.registry import ToolRegistry
|
22
23
|
from jarvis.jarvis_utils.config import is_confirm_before_apply_patch
|
23
|
-
from jarvis.jarvis_utils.git_utils import (
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
get_recent_commits_with_files,
|
30
|
-
handle_commit_workflow,
|
31
|
-
has_uncommitted_changes,
|
32
|
-
)
|
24
|
+
from jarvis.jarvis_utils.git_utils import (find_git_root, get_commits_between,
|
25
|
+
get_diff, get_diff_file_list,
|
26
|
+
get_latest_commit_hash,
|
27
|
+
get_recent_commits_with_files,
|
28
|
+
handle_commit_workflow,
|
29
|
+
has_uncommitted_changes)
|
33
30
|
from jarvis.jarvis_utils.input import get_multiline_input
|
34
31
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
35
32
|
from jarvis.jarvis_utils.utils import get_loc_stats, init_env, user_confirm
|
36
|
-
from yaspin import yaspin # type: ignore
|
37
33
|
|
38
34
|
|
39
35
|
class CodeAgent:
|
@@ -5,26 +5,12 @@ Utility module for loading language-specific code review checklists.
|
|
5
5
|
from typing import Dict, Optional
|
6
6
|
|
7
7
|
# Import checklist modules
|
8
|
-
from jarvis.jarvis_code_analysis.checklists import (
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
go,
|
15
|
-
infrastructure,
|
16
|
-
java,
|
17
|
-
javascript,
|
18
|
-
kotlin,
|
19
|
-
php,
|
20
|
-
python,
|
21
|
-
ruby,
|
22
|
-
rust,
|
23
|
-
shell,
|
24
|
-
sql,
|
25
|
-
swift,
|
26
|
-
web,
|
27
|
-
)
|
8
|
+
from jarvis.jarvis_code_analysis.checklists import (c_cpp, csharp, data_format,
|
9
|
+
devops, docs, go,
|
10
|
+
infrastructure, java,
|
11
|
+
javascript, kotlin, php,
|
12
|
+
python, ruby, rust, shell,
|
13
|
+
sql, swift, web)
|
28
14
|
|
29
15
|
# Map of language identifiers to their checklist content
|
30
16
|
CHECKLIST_MAP = {
|
@@ -8,7 +8,8 @@ from typing import Any, Dict, List
|
|
8
8
|
from yaspin import yaspin
|
9
9
|
|
10
10
|
from jarvis.jarvis_agent import Agent
|
11
|
-
from jarvis.jarvis_code_analysis.checklists.loader import
|
11
|
+
from jarvis.jarvis_code_analysis.checklists.loader import \
|
12
|
+
get_language_checklist
|
12
13
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
13
14
|
from jarvis.jarvis_tools.read_code import ReadCodeTool
|
14
15
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
@@ -201,6 +201,11 @@
|
|
201
201
|
"description": "是否打印提示",
|
202
202
|
"default": false
|
203
203
|
},
|
204
|
+
"JARVIS_USE_HISTORY_COUNT": {
|
205
|
+
"type": "number",
|
206
|
+
"description": "使用的历史记录数量",
|
207
|
+
"default": 0
|
208
|
+
},
|
204
209
|
"JARVIS_REPLACE_MAP": {
|
205
210
|
"type": "object",
|
206
211
|
"description": "自定义替换映射表配置",
|
@@ -12,7 +12,8 @@ from yaspin import yaspin
|
|
12
12
|
|
13
13
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
14
14
|
from jarvis.jarvis_utils.config import get_git_commit_prompt
|
15
|
-
from jarvis.jarvis_utils.git_utils import find_git_root,
|
15
|
+
from jarvis.jarvis_utils.git_utils import (find_git_root,
|
16
|
+
has_uncommitted_changes)
|
16
17
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
17
18
|
from jarvis.jarvis_utils.tag import ct, ot
|
18
19
|
from jarvis.jarvis_utils.utils import init_env, is_context_overflow
|
@@ -117,7 +118,7 @@ class GitCommitTool:
|
|
117
118
|
stdout=subprocess.PIPE,
|
118
119
|
stderr=subprocess.PIPE,
|
119
120
|
)
|
120
|
-
diff = process.communicate()[0].decode()
|
121
|
+
diff = process.communicate()[0].decode(errors="ignore")
|
121
122
|
spinner.write(f"✅ 获取差异 ({file_count} 个文件)")
|
122
123
|
try:
|
123
124
|
temp_diff_file_path = None
|
@@ -17,10 +17,8 @@ import yaml # type: ignore
|
|
17
17
|
from yaspin import yaspin # type: ignore
|
18
18
|
|
19
19
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
20
|
-
from jarvis.jarvis_utils.methodology import (
|
21
|
-
|
22
|
-
_load_all_methodologies,
|
23
|
-
)
|
20
|
+
from jarvis.jarvis_utils.methodology import (_get_methodology_directory,
|
21
|
+
_load_all_methodologies)
|
24
22
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
25
23
|
|
26
24
|
|
jarvis/jarvis_platform/base.py
CHANGED
@@ -9,16 +9,14 @@ from rich.panel import Panel
|
|
9
9
|
from rich.text import Text
|
10
10
|
from yaspin import yaspin
|
11
11
|
|
12
|
-
from jarvis.jarvis_utils.config import (
|
13
|
-
|
14
|
-
get_pretty_output,
|
15
|
-
is_print_prompt,
|
16
|
-
)
|
12
|
+
from jarvis.jarvis_utils.config import (get_max_input_token_count,
|
13
|
+
get_pretty_output, is_print_prompt)
|
17
14
|
from jarvis.jarvis_utils.embedding import split_text_into_chunks
|
18
15
|
from jarvis.jarvis_utils.globals import set_in_chat
|
19
16
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
20
17
|
from jarvis.jarvis_utils.tag import ct, ot
|
21
|
-
from jarvis.jarvis_utils.utils import get_context_token_count, while_success,
|
18
|
+
from jarvis.jarvis_utils.utils import (get_context_token_count, while_success,
|
19
|
+
while_true)
|
22
20
|
|
23
21
|
|
24
22
|
class BasePlatform(ABC):
|
jarvis/jarvis_platform/human.py
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
# 人类交互平台实现模块
|
4
|
+
|
5
|
+
# 提供与真实人类交互的模拟接口
|
6
|
+
|
2
7
|
import random
|
3
8
|
import string
|
4
9
|
from typing import Generator, List, Tuple
|
@@ -72,4 +77,9 @@ class HumanPlatform(BasePlatform):
|
|
72
77
|
return self.model_name
|
73
78
|
|
74
79
|
def support_web(self) -> bool:
|
80
|
+
"""是否支持网页浏览功能"""
|
81
|
+
return False
|
82
|
+
|
83
|
+
def support_upload_files(self) -> bool:
|
84
|
+
"""是否支持文件上传功能"""
|
75
85
|
return False
|
jarvis/jarvis_platform/kimi.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
# Kimi 平台实现模块
|
3
|
+
# 提供与 Moonshot AI 的 Kimi 大模型交互功能
|
2
4
|
import json
|
3
5
|
import mimetypes
|
4
6
|
import os
|
@@ -13,7 +15,12 @@ from jarvis.jarvis_utils.utils import while_success
|
|
13
15
|
|
14
16
|
|
15
17
|
class KimiModel(BasePlatform):
|
16
|
-
"""Kimi
|
18
|
+
"""Kimi 大模型平台实现类
|
19
|
+
封装了与 Kimi 大模型交互的所有功能,包括:
|
20
|
+
- 会话管理
|
21
|
+
- 文件上传
|
22
|
+
- 消息收发
|
23
|
+
"""
|
17
24
|
|
18
25
|
platform_name = "kimi"
|
19
26
|
|
@@ -29,16 +36,16 @@ class KimiModel(BasePlatform):
|
|
29
36
|
Initialize Kimi model
|
30
37
|
"""
|
31
38
|
super().__init__()
|
32
|
-
self.chat_id = ""
|
33
|
-
self.api_key = os.getenv("KIMI_API_KEY")
|
39
|
+
self.chat_id = "" # 当前会话ID
|
40
|
+
self.api_key = os.getenv("KIMI_API_KEY") # 从环境变量获取API密钥
|
34
41
|
if not self.api_key:
|
35
42
|
PrettyOutput.print("KIMI_API_KEY 未设置", OutputType.WARNING)
|
36
|
-
self.auth_header = f"Bearer {self.api_key}"
|
43
|
+
self.auth_header = f"Bearer {self.api_key}" # 认证头信息
|
37
44
|
self.uploaded_files = [] # 存储已上传文件的信息
|
38
|
-
self.chat_id = ""
|
39
|
-
self.first_chat = True #
|
40
|
-
self.system_message = ""
|
41
|
-
self.model_name = "kimi"
|
45
|
+
self.chat_id = "" # 当前会话ID
|
46
|
+
self.first_chat = True # 标记是否是第一次对话
|
47
|
+
self.system_message = "" # 系统提示消息
|
48
|
+
self.model_name = "kimi" # 默认模型名称
|
42
49
|
|
43
50
|
def set_system_prompt(self, message: str):
|
44
51
|
"""Set system message"""
|
@@ -246,7 +253,12 @@ class KimiModel(BasePlatform):
|
|
246
253
|
return True
|
247
254
|
|
248
255
|
def chat(self, message: str) -> Generator[str, None, None]:
|
249
|
-
"""
|
256
|
+
"""发送消息并获取响应流
|
257
|
+
参数:
|
258
|
+
message: 要发送的消息内容
|
259
|
+
返回:
|
260
|
+
生成器,逐块返回模型响应
|
261
|
+
"""
|
250
262
|
if not self.chat_id:
|
251
263
|
if not self._create_chat():
|
252
264
|
raise Exception("Failed to create chat session")
|
@@ -6,13 +6,10 @@ import sys
|
|
6
6
|
from typing import Dict, List, Optional, Type
|
7
7
|
|
8
8
|
from jarvis.jarvis_platform.base import BasePlatform
|
9
|
-
from jarvis.jarvis_utils.config import (
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
get_thinking_model_name,
|
14
|
-
get_thinking_platform_name,
|
15
|
-
)
|
9
|
+
from jarvis.jarvis_utils.config import (get_data_dir, get_normal_model_name,
|
10
|
+
get_normal_platform_name,
|
11
|
+
get_thinking_model_name,
|
12
|
+
get_thinking_platform_name)
|
16
13
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
17
14
|
|
18
15
|
REQUIRED_METHODS = [
|
@@ -4,10 +4,8 @@ from typing import Any, Dict
|
|
4
4
|
|
5
5
|
from jarvis.jarvis_code_agent.code_agent import CodeAgent
|
6
6
|
from jarvis.jarvis_git_utils.git_commiter import GitCommitTool
|
7
|
-
from jarvis.jarvis_utils.git_utils import (
|
8
|
-
|
9
|
-
has_uncommitted_changes,
|
10
|
-
)
|
7
|
+
from jarvis.jarvis_utils.git_utils import (get_latest_commit_hash,
|
8
|
+
has_uncommitted_changes)
|
11
9
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
12
10
|
|
13
11
|
|
jarvis/jarvis_utils/config.py
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
import os
|
3
3
|
from functools import lru_cache
|
4
|
-
|
5
4
|
from typing import Any, Dict, List
|
6
5
|
|
7
|
-
|
8
6
|
import yaml
|
9
7
|
|
10
|
-
|
11
8
|
from jarvis.jarvis_utils.builtin_replace_map import BUILTIN_REPLACE_MAP
|
12
9
|
|
13
|
-
|
14
10
|
# 全局环境变量存储
|
15
11
|
|
16
12
|
GLOBAL_CONFIG_DATA: Dict[str, Any] = {}
|
@@ -67,7 +63,7 @@ def get_replace_map() -> dict:
|
|
67
63
|
if not os.path.exists(replace_map_path):
|
68
64
|
return BUILTIN_REPLACE_MAP.copy()
|
69
65
|
|
70
|
-
from jarvis.jarvis_utils.output import
|
66
|
+
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
71
67
|
|
72
68
|
PrettyOutput.print(
|
73
69
|
"警告:使用replace_map.yaml进行配置的方式已被弃用,将在未来版本中移除。"
|
@@ -269,6 +265,16 @@ def is_print_prompt() -> bool:
|
|
269
265
|
return GLOBAL_CONFIG_DATA.get("JARVIS_PRINT_PROMPT", False) == True
|
270
266
|
|
271
267
|
|
268
|
+
def get_history_count() -> int:
|
269
|
+
"""
|
270
|
+
获取是否启用历史记录功能。
|
271
|
+
|
272
|
+
返回:
|
273
|
+
bool: 如果启用历史记录则返回True,默认为False
|
274
|
+
"""
|
275
|
+
return GLOBAL_CONFIG_DATA.get("JARVIS_USE_HISTORY_COUNT", 0)
|
276
|
+
|
277
|
+
|
272
278
|
def get_mcp_config() -> List[Dict[str, Any]]:
|
273
279
|
"""
|
274
280
|
获取MCP配置列表。
|
jarvis/jarvis_utils/embedding.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
import functools
|
3
3
|
import os
|
4
|
-
from typing import List
|
5
|
-
|
6
|
-
from transformers import AutoTokenizer
|
4
|
+
from typing import Any, List
|
7
5
|
|
8
6
|
from jarvis.jarvis_utils.config import get_data_dir
|
9
7
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
@@ -22,7 +20,8 @@ def get_context_token_count(text: str) -> int:
|
|
22
20
|
int: 文本中的token数量
|
23
21
|
"""
|
24
22
|
try:
|
25
|
-
|
23
|
+
from transformers import AutoTokenizer # type: ignore
|
24
|
+
tokenizer : AutoTokenizer = load_tokenizer()
|
26
25
|
# 分批处理长文本,确保不超过模型最大长度
|
27
26
|
total_tokens = 0
|
28
27
|
chunk_size = 100 # 每次处理100个字符,避免超过模型最大长度(考虑到中文字符可能被编码成多个token)
|
@@ -88,13 +87,16 @@ def split_text_into_chunks(
|
|
88
87
|
|
89
88
|
|
90
89
|
@functools.lru_cache(maxsize=1)
|
91
|
-
def load_tokenizer() ->
|
90
|
+
def load_tokenizer() -> Any:
|
92
91
|
"""
|
93
92
|
加载用于文本处理的分词器,使用缓存避免重复加载。
|
94
93
|
|
95
94
|
返回:
|
96
95
|
AutoTokenizer: 加载的分词器
|
97
96
|
"""
|
97
|
+
|
98
|
+
from transformers import AutoTokenizer # type: ignore
|
99
|
+
|
98
100
|
model_name = "gpt2"
|
99
101
|
cache_dir = os.path.join(get_data_dir(), "huggingface", "hub")
|
100
102
|
|
jarvis/jarvis_utils/git_utils.py
CHANGED
@@ -128,16 +128,28 @@ def get_diff() -> str:
|
|
128
128
|
str: 差异内容或错误信息
|
129
129
|
"""
|
130
130
|
try:
|
131
|
-
#
|
132
|
-
subprocess.run(
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
["git", "diff", "HEAD"], capture_output=True, text=False, check=True
|
131
|
+
# 检查是否为空仓库
|
132
|
+
head_check = subprocess.run(
|
133
|
+
["git", "rev-parse", "--verify", "HEAD"],
|
134
|
+
stderr=subprocess.PIPE,
|
135
|
+
stdout=subprocess.PIPE,
|
137
136
|
)
|
137
|
+
if head_check.returncode != 0:
|
138
|
+
# 空仓库情况,直接获取工作区差异
|
139
|
+
result = subprocess.run(
|
140
|
+
["git", "diff"], capture_output=True, text=False, check=True
|
141
|
+
)
|
142
|
+
else:
|
143
|
+
# 暂存新增文件
|
144
|
+
subprocess.run(["git", "add", "-N", "."], check=True)
|
138
145
|
|
139
|
-
|
140
|
-
|
146
|
+
# 获取所有差异(包括新增文件)
|
147
|
+
result = subprocess.run(
|
148
|
+
["git", "diff", "HEAD"], capture_output=True, text=False, check=True
|
149
|
+
)
|
150
|
+
|
151
|
+
# 重置暂存区
|
152
|
+
subprocess.run(["git", "reset"], check=True)
|
141
153
|
|
142
154
|
try:
|
143
155
|
return result.stdout.decode("utf-8")
|
@@ -199,9 +211,7 @@ def handle_commit_workflow() -> bool:
|
|
199
211
|
Returns:
|
200
212
|
bool: 提交是否成功
|
201
213
|
"""
|
202
|
-
if is_confirm_before_apply_patch() and not user_confirm(
|
203
|
-
"是否要提交代码?", default=True
|
204
|
-
):
|
214
|
+
if is_confirm_before_apply_patch() and not user_confirm("是否要提交代码?", default=True):
|
205
215
|
revert_change()
|
206
216
|
return False
|
207
217
|
|
@@ -405,9 +415,7 @@ def get_diff_file_list() -> List[str]:
|
|
405
415
|
subprocess.run(["git", "reset"], check=True)
|
406
416
|
|
407
417
|
if result.returncode != 0:
|
408
|
-
PrettyOutput.print(
|
409
|
-
f"获取差异文件列表失败: {result.stderr}", OutputType.ERROR
|
410
|
-
)
|
418
|
+
PrettyOutput.print(f"获取差异文件列表失败: {result.stderr}", OutputType.ERROR)
|
411
419
|
return []
|
412
420
|
|
413
421
|
return [f for f in result.stdout.splitlines() if f]
|
@@ -427,11 +435,11 @@ def get_recent_commits_with_files() -> List[Dict[str, Any]]:
|
|
427
435
|
List[Dict[str, Any]]: 包含commit信息和文件清单的字典列表,格式为:
|
428
436
|
[
|
429
437
|
{
|
430
|
-
'hash':
|
431
|
-
'message':
|
432
|
-
'author':
|
433
|
-
'date':
|
434
|
-
'files': [
|
438
|
+
'hash': str,
|
439
|
+
'message': str,
|
440
|
+
'author': str,
|
441
|
+
'date': str,
|
442
|
+
'files': List[str] # 修改的文件列表 (最多20个文件)
|
435
443
|
},
|
436
444
|
...
|
437
445
|
]
|
@@ -470,8 +478,9 @@ def get_recent_commits_with_files() -> List[Dict[str, Any]]:
|
|
470
478
|
text=True,
|
471
479
|
)
|
472
480
|
if files_result.returncode == 0:
|
473
|
-
|
474
|
-
|
481
|
+
file_lines = files_result.stdout.splitlines()
|
482
|
+
unique_files = set(filter(None, file_lines))
|
483
|
+
commit["files"] = list(unique_files)[:20] # 限制最多20个文件
|
475
484
|
|
476
485
|
return commits
|
477
486
|
|
jarvis/jarvis_utils/input.py
CHANGED
@@ -12,7 +12,8 @@ from colorama import Fore
|
|
12
12
|
from colorama import Style as ColoramaStyle
|
13
13
|
from fuzzywuzzy import process
|
14
14
|
from prompt_toolkit import PromptSession
|
15
|
-
from prompt_toolkit.completion import Completer, Completion,
|
15
|
+
from prompt_toolkit.completion import (CompleteEvent, Completer, Completion,
|
16
|
+
PathCompleter)
|
16
17
|
from prompt_toolkit.document import Document
|
17
18
|
from prompt_toolkit.formatted_text import FormattedText
|
18
19
|
from prompt_toolkit.key_binding import KeyBindings
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import glob
|
2
|
+
import os
|
3
|
+
from datetime import datetime
|
4
|
+
from typing import Dict, List, Optional, Union
|
5
|
+
|
6
|
+
import yaml
|
7
|
+
|
8
|
+
|
9
|
+
class JarvisHistory:
|
10
|
+
def __init__(self):
|
11
|
+
self.records: List[Dict[str, str]] = []
|
12
|
+
self.current_file: Optional[str] = None
|
13
|
+
|
14
|
+
def start_record(self, data_dir: str) -> None:
|
15
|
+
"""Start a new recording session with timestamped filename"""
|
16
|
+
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
17
|
+
self.current_file = os.path.join(data_dir, f"history_{timestamp}.yaml")
|
18
|
+
self.records = []
|
19
|
+
|
20
|
+
def append_msg(self, role: str, msg: str) -> None:
|
21
|
+
"""Append a message to current recording session"""
|
22
|
+
if not self.current_file:
|
23
|
+
raise RuntimeError("Recording not started. Call start_record first.")
|
24
|
+
self.records.append({"role": role, "message": msg})
|
25
|
+
|
26
|
+
def stop_record(self) -> None:
|
27
|
+
"""Save recorded messages to YAML file"""
|
28
|
+
if not self.current_file:
|
29
|
+
raise RuntimeError("No recording session to stop.")
|
30
|
+
|
31
|
+
# Skip saving if records is empty
|
32
|
+
if not self.records:
|
33
|
+
self.current_file = None
|
34
|
+
self.records = []
|
35
|
+
return
|
36
|
+
|
37
|
+
# Ensure directory exists
|
38
|
+
os.makedirs(os.path.dirname(self.current_file), exist_ok=True)
|
39
|
+
|
40
|
+
with open(self.current_file, "w") as f:
|
41
|
+
yaml.safe_dump({"conversation": self.records}, f, allow_unicode=True)
|
42
|
+
|
43
|
+
self.current_file = None
|
44
|
+
self.records = []
|
45
|
+
|
46
|
+
@staticmethod
|
47
|
+
def export_history_to_markdown(
|
48
|
+
input_dir: str, output_file: str, max_files: Optional[int] = None
|
49
|
+
) -> None:
|
50
|
+
"""
|
51
|
+
Export all history files in the directory to a single markdown file
|
52
|
+
|
53
|
+
Args:
|
54
|
+
input_dir: Directory containing history YAML files
|
55
|
+
output_file: Path to output markdown file
|
56
|
+
max_files: Maximum number of history files to export (None for all)
|
57
|
+
"""
|
58
|
+
# Find all history files in the directory
|
59
|
+
history_files = glob.glob(os.path.join(input_dir, "history_*.yaml"))
|
60
|
+
|
61
|
+
if not history_files:
|
62
|
+
raise FileNotFoundError(f"No history files found in {input_dir}")
|
63
|
+
|
64
|
+
# Sort files by modification time (newest first) and limit to max_files
|
65
|
+
history_files.sort(key=os.path.getmtime, reverse=True)
|
66
|
+
if max_files is not None:
|
67
|
+
history_files = history_files[:max_files]
|
68
|
+
|
69
|
+
# Ensure output directory exists
|
70
|
+
os.makedirs(os.path.dirname(output_file), exist_ok=True)
|
71
|
+
|
72
|
+
with open(output_file, "w", encoding="utf-8") as md_file:
|
73
|
+
md_file.write("# Jarvis Conversation History\n\n")
|
74
|
+
|
75
|
+
for history_file in sorted(history_files):
|
76
|
+
# Read YAML file
|
77
|
+
with open(history_file, "r", encoding="utf-8") as f:
|
78
|
+
data = yaml.safe_load(f)
|
79
|
+
|
80
|
+
if not data or "conversation" not in data:
|
81
|
+
continue
|
82
|
+
|
83
|
+
# Write file header with timestamp from filename
|
84
|
+
timestamp = os.path.basename(history_file)[
|
85
|
+
8:-5
|
86
|
+
] # Extract timestamp from "history_YYYYMMDD_HHMMSS.yaml"
|
87
|
+
md_file.write(
|
88
|
+
f"## Conversation at {timestamp[:4]}-{timestamp[4:6]}-{timestamp[6:8]} "
|
89
|
+
f"{timestamp[9:11]}:{timestamp[11:13]}:{timestamp[13:15]}\n\n"
|
90
|
+
)
|
91
|
+
|
92
|
+
# Write conversation messages
|
93
|
+
for msg in data["conversation"]:
|
94
|
+
md_file.write(f"**{msg['role']}**: {msg['message']}\n\n")
|
95
|
+
|
96
|
+
md_file.write("\n---\n\n")
|
@@ -10,7 +10,7 @@
|
|
10
10
|
import json
|
11
11
|
import os
|
12
12
|
import tempfile
|
13
|
-
from typing import Any, Dict, Optional
|
13
|
+
from typing import Any, Dict, List, Optional
|
14
14
|
|
15
15
|
from jarvis.jarvis_platform.base import BasePlatform
|
16
16
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
@@ -100,7 +100,7 @@ def _create_methodology_temp_file(methodologies: Dict[str, str]) -> Optional[str
|
|
100
100
|
return None
|
101
101
|
|
102
102
|
|
103
|
-
def upload_methodology(platform: BasePlatform) -> bool:
|
103
|
+
def upload_methodology(platform: BasePlatform, other_files: List[str] = []) -> bool:
|
104
104
|
"""
|
105
105
|
上传方法论文件到指定平台
|
106
106
|
|
@@ -125,7 +125,7 @@ def upload_methodology(platform: BasePlatform) -> bool:
|
|
125
125
|
return False
|
126
126
|
|
127
127
|
try:
|
128
|
-
return platform.upload_files([temp_file_path])
|
128
|
+
return platform.upload_files([temp_file_path, *other_files])
|
129
129
|
|
130
130
|
finally:
|
131
131
|
if temp_file_path and os.path.exists(temp_file_path):
|
jarvis/jarvis_utils/output.py
CHANGED
@@ -287,8 +287,11 @@ class PrettyOutput:
|
|
287
287
|
console.print(content)
|
288
288
|
else:
|
289
289
|
console.print(header, content)
|
290
|
-
if traceback:
|
291
|
-
|
290
|
+
if traceback or output_type == OutputType.ERROR:
|
291
|
+
try:
|
292
|
+
console.print_exception()
|
293
|
+
except Exception as e:
|
294
|
+
console.print(f"Error: {e}")
|
292
295
|
|
293
296
|
@staticmethod
|
294
297
|
def section(title: str, output_type: OutputType = OutputType.INFO):
|
jarvis/jarvis_utils/utils.py
CHANGED
@@ -11,15 +11,13 @@ from typing import Any, Callable, Dict, Optional
|
|
11
11
|
import yaml
|
12
12
|
|
13
13
|
from jarvis import __version__
|
14
|
-
from jarvis.jarvis_utils.config import (
|
15
|
-
|
16
|
-
get_max_big_content_size,
|
17
|
-
set_global_env_data,
|
18
|
-
)
|
14
|
+
from jarvis.jarvis_utils.config import (get_data_dir, get_max_big_content_size,
|
15
|
+
set_global_env_data)
|
19
16
|
from jarvis.jarvis_utils.embedding import get_context_token_count
|
17
|
+
from jarvis.jarvis_utils.globals import (get_in_chat, get_interrupt,
|
18
|
+
set_interrupt)
|
20
19
|
from jarvis.jarvis_utils.input import get_single_line_input
|
21
20
|
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
22
|
-
from jarvis.jarvis_utils.globals import get_in_chat, get_interrupt, set_interrupt
|
23
21
|
|
24
22
|
g_config_file = None
|
25
23
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: jarvis-ai-assistant
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.196
|
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
|
@@ -117,6 +117,63 @@ pip3 install jarvis-ai-assistant
|
|
117
117
|
| `jarvis-git-details` | - | 使用git details功能 |
|
118
118
|
| `jarvis-methodology` | - | 使用方法论功能 |
|
119
119
|
|
120
|
+
### Jarvis功能 (jarvis)
|
121
|
+
|
122
|
+
`jarvis` 是Jarvis的通用代理工具,提供开箱即用的AI助手功能。
|
123
|
+
|
124
|
+
#### 1. 核心功能
|
125
|
+
- 任务分析与规划
|
126
|
+
- 代码分析与修改
|
127
|
+
- 系统交互与操作
|
128
|
+
- 方法论应用与优化
|
129
|
+
- 多代理协作
|
130
|
+
|
131
|
+
#### 2. 使用方式
|
132
|
+
```bash
|
133
|
+
# 基本用法
|
134
|
+
jarvis
|
135
|
+
|
136
|
+
# 带参数使用
|
137
|
+
jarvis -p <平台> -m <模型> -t "初始任务"
|
138
|
+
```
|
139
|
+
|
140
|
+
#### 3. 命令行参数
|
141
|
+
| 参数 | 描述 |
|
142
|
+
|------|------|
|
143
|
+
| `-p/--platform` | 指定AI平台 (yuanbao/kimi/tongyi/openai) |
|
144
|
+
| `-m/--model` | 指定模型名称 |
|
145
|
+
| `-t/--task` | 指定初始任务 |
|
146
|
+
|
147
|
+
#### 4. 工作流程
|
148
|
+
1. 初始化环境
|
149
|
+
2. 加载默认配置
|
150
|
+
3. 创建代理实例
|
151
|
+
4. 执行初始任务(如果指定)
|
152
|
+
5. 进入交互式模式(如果没有初始任务)
|
153
|
+
6. 根据用户输入执行任务
|
154
|
+
|
155
|
+
#### 5. 任务执行特点
|
156
|
+
- 自动应用最佳方法论
|
157
|
+
- 智能任务分解
|
158
|
+
- 多工具协同工作
|
159
|
+
- 实时进度反馈
|
160
|
+
- 自动生成任务总结
|
161
|
+
|
162
|
+
#### 6. 示例
|
163
|
+
```bash
|
164
|
+
# 基本使用
|
165
|
+
jarvis
|
166
|
+
|
167
|
+
# 指定平台和模型
|
168
|
+
jarvis -p yuanbao -m deep_seek_v3
|
169
|
+
|
170
|
+
# 直接执行任务
|
171
|
+
jarvis -t "分析项目结构并生成架构图"
|
172
|
+
|
173
|
+
# 组合使用
|
174
|
+
jarvis -p kimi -m k1 -t "优化项目性能"
|
175
|
+
```
|
176
|
+
|
120
177
|
### 代码代理功能 (jarvis-code-agent)
|
121
178
|
|
122
179
|
`jarvis-code-agent` 是Jarvis的代码分析与修改工具,专注于代码工程任务。
|
@@ -153,16 +210,7 @@ jarvis-code-agent -p <平台> -m <模型> -r "需求描述"
|
|
153
210
|
4. 自动处理git提交
|
154
211
|
5. 显示修改结果
|
155
212
|
|
156
|
-
#### 5.
|
157
|
-
代码代理遵循以下规范进行代码修改:
|
158
|
-
1. 每次响应仅执行一步操作,先分析再修改,避免一步多改
|
159
|
-
2. 充分利用工具理解用户需求和现有代码,禁止凭空假设
|
160
|
-
3. 如果不清楚要修改的文件,必须先分析并找出需要修改的文件
|
161
|
-
4. 代码编辑任务优先使用 edit_file 工具,确保搜索文本在目标文件中有且仅有一次精确匹配
|
162
|
-
5. 如需大范围重写,才可使用 rewrite_file 工具
|
163
|
-
6. 如遇信息不明,优先调用工具补充分析,不要主观臆断
|
164
|
-
|
165
|
-
#### 6. 示例
|
213
|
+
#### 5. 示例
|
166
214
|
```bash
|
167
215
|
# 使用默认平台分析代码
|
168
216
|
jca
|
@@ -221,7 +269,7 @@ jarvis-git-commit --root-dir <目录> --prefix "前缀" --suffix "后缀"
|
|
221
269
|
- `test`: 测试相关
|
222
270
|
- `chore`: 其他修改
|
223
271
|
|
224
|
-
|
272
|
+
默认格式规则(可配置):
|
225
273
|
1. 类型必须使用上述预定义类型
|
226
274
|
2. 范围表示变更的模块或组件(例如:auth, database, ui)
|
227
275
|
3. 主题行不超过72个字符,不以句号结尾,使用祈使语气
|
@@ -250,7 +298,7 @@ jgc --prefix "[紧急修复]"
|
|
250
298
|
jgc --suffix "相关issue: #123"
|
251
299
|
```
|
252
300
|
|
253
|
-
###
|
301
|
+
### 自定义代理功能 (jarvis-agent)
|
254
302
|
|
255
303
|
`jarvis-agent` 是Jarvis的核心代理工具,提供通用的AI助手功能,支持自定义配置和任务执行。
|
256
304
|
|
@@ -490,6 +538,7 @@ OPENAI_API_BASE: https://api.openai.com/v1
|
|
490
538
|
| `JARVIS_PRINT_PROMPT` | false | 是否打印提示 |
|
491
539
|
| `JARVIS_USE_METHODOLOGY` | true | 是否启用方法论功能 |
|
492
540
|
| `JARVIS_USE_ANALYSIS` | true | 是否启用任务分析功能 |
|
541
|
+
| `JARVIS_USE_HISTORY` | false | 是否启用历史记录功能 |
|
493
542
|
| `JARVIS_DATA_PATH` | ~/.jarvis | Jarvis数据存储目录路径 |
|
494
543
|
|
495
544
|
## 🛠️ 工具说明 <a id="tools"></a>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
jarvis/__init__.py,sha256=
|
2
|
-
jarvis/jarvis_agent/__init__.py,sha256=
|
1
|
+
jarvis/__init__.py,sha256=kYWJwIMa2ypcsRdrrfHUmeaXSvmV7v53HTQlUE3nCcs,75
|
2
|
+
jarvis/jarvis_agent/__init__.py,sha256=l826UsXr8_hVj9RSaOnJtkDgnINWnOzLltRTBcMO0l8,32501
|
3
3
|
jarvis/jarvis_agent/builtin_input_handler.py,sha256=4CCEtVLRBIpkhDUKd54VcX1JFCIWCvDqDh4B1H-eSn0,2187
|
4
|
-
jarvis/jarvis_agent/jarvis.py,sha256=
|
4
|
+
jarvis/jarvis_agent/jarvis.py,sha256=GH2zi8eXNpW8twiY3LKDEZgGmFC5geB0jlkwFrm7hOQ,6279
|
5
5
|
jarvis/jarvis_agent/main.py,sha256=c6bQe-8LXvW2-NBn9Rn_yPYdrwnkJ8KQaSFY2cPvkxw,2775
|
6
6
|
jarvis/jarvis_agent/output_handler.py,sha256=P7oWpXBGFfOsWq7cIhS_z9crkQ19ES7qU5pM92KKjAs,1172
|
7
7
|
jarvis/jarvis_agent/shell_input_handler.py,sha256=zVaKNthIHJh1j4g8_-d3w5ahNH9aH-ZNRSOourQpHR4,1328
|
8
8
|
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
|
-
jarvis/jarvis_code_agent/code_agent.py,sha256=
|
9
|
+
jarvis/jarvis_code_agent/code_agent.py,sha256=aNAjj7EqabaMQg8Ngf26TMLpQJpBVceE-_FPTpXbRs8,15389
|
10
10
|
jarvis/jarvis_code_agent/lint.py,sha256=j1kS-wFYigmkXyxOuUiaJ9cknYkraikQSSf51VWturE,4038
|
11
|
-
jarvis/jarvis_code_analysis/code_review.py,sha256=
|
11
|
+
jarvis/jarvis_code_analysis/code_review.py,sha256=jwvGYwwTM7UG6cESw6I7vCp6FimESKvowCbz6u28ikE,31439
|
12
12
|
jarvis/jarvis_code_analysis/checklists/__init__.py,sha256=LIXAYa1sW3l7foP6kohLWnE98I_EQ0T7z5bYKHq6rJA,78
|
13
13
|
jarvis/jarvis_code_analysis/checklists/c_cpp.py,sha256=9t62bMqs6qTkFSio4SKkj88qyb5ZubWrw3MxJBQ4X1A,1317
|
14
14
|
jarvis/jarvis_code_analysis/checklists/csharp.py,sha256=ShPXrl2_UPAnGaCHAG2wLl90COG3HK2XCSr1UK2dxN4,2420
|
@@ -20,7 +20,7 @@ jarvis/jarvis_code_analysis/checklists/infrastructure.py,sha256=7z5MZnOUT3FpMrTQ
|
|
20
20
|
jarvis/jarvis_code_analysis/checklists/java.py,sha256=gWRVhXfsNhRFdthjIiQTkviqLwisuKCrr6gjxP0S9Z4,2085
|
21
21
|
jarvis/jarvis_code_analysis/checklists/javascript.py,sha256=SQkw2I09DaaLxD_WTZjuHn4leUKil68IEPB03BoSYuo,2340
|
22
22
|
jarvis/jarvis_code_analysis/checklists/kotlin.py,sha256=dNSHM1u3R7lxe8BU8ADtDyKJxmj3NUh9ZQuC7HHWHGY,4436
|
23
|
-
jarvis/jarvis_code_analysis/checklists/loader.py,sha256=
|
23
|
+
jarvis/jarvis_code_analysis/checklists/loader.py,sha256=XYqVBOM6ouWXMfFuYPE6tMBONkuP3VKQByyB7MFUw9E,2088
|
24
24
|
jarvis/jarvis_code_analysis/checklists/php.py,sha256=qW34sF9AqLuSVuOVP5yJUHnB9V3-YRQjNPuB3lFI5UY,2481
|
25
25
|
jarvis/jarvis_code_analysis/checklists/python.py,sha256=gjyJ0QPY1CAwqhbDnIyLYruvFduZU5hiKyehAXMHu-I,1452
|
26
26
|
jarvis/jarvis_code_analysis/checklists/ruby.py,sha256=kzwd7Wl6gKrkAANq7_MvA5X5du5r1MeE-EY2Xb43n7U,4274
|
@@ -29,39 +29,39 @@ jarvis/jarvis_code_analysis/checklists/shell.py,sha256=aRFYhQQvTgbYd-uY5pc8UHIUA
|
|
29
29
|
jarvis/jarvis_code_analysis/checklists/sql.py,sha256=vR0T6qC7b4dURjJVAd7kSVxyvZEQXPG1Jqc2sNTGp5c,2355
|
30
30
|
jarvis/jarvis_code_analysis/checklists/swift.py,sha256=TPx4I6Gupvs6tSerRKmTSKEPQpOLEbH2Y7LXg1uBgxc,2566
|
31
31
|
jarvis/jarvis_code_analysis/checklists/web.py,sha256=25gGD7pDadZQybNFvALYxWvK0VRjGQb1NVJQElwjyk0,3943
|
32
|
-
jarvis/jarvis_data/config_schema.json,sha256=
|
32
|
+
jarvis/jarvis_data/config_schema.json,sha256=yMXCNy8-CRL44r9GKBClvX6LBX20cpm7QOW9TSffAbs,6533
|
33
33
|
jarvis/jarvis_data/huggingface.tar.gz,sha256=dWKnc_tvyx-I_ZkXo91O0b38KxDmLW1ZbmJ3E6fCl_k,1120205
|
34
34
|
jarvis/jarvis_dev/main.py,sha256=zzVDrPQlPJFnHxNjChBAYA8YwIaQYmPxG-bHjIxdL3s,40940
|
35
35
|
jarvis/jarvis_git_details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
36
|
jarvis/jarvis_git_details/main.py,sha256=MjpUHB4ErR_SKPBx1TLLK_XLkH427RTtsyVn6EUd88Y,8907
|
37
37
|
jarvis/jarvis_git_squash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
jarvis/jarvis_git_squash/main.py,sha256=lx0WVOiaydYgwzWBDG7C8wJxYJwSb1SIxyoD-rgzgvA,2274
|
39
|
-
jarvis/jarvis_git_utils/git_commiter.py,sha256=
|
39
|
+
jarvis/jarvis_git_utils/git_commiter.py,sha256=f-mOpGGIVEgjQ1QxeJzKIqXmt_TMmS1yVtc_qitYYwE,13279
|
40
40
|
jarvis/jarvis_mcp/__init__.py,sha256=OPMtjD-uq9xAaKCRIDyKIosaFfBe1GBPu1az-mQ0rVM,2048
|
41
41
|
jarvis/jarvis_mcp/sse_mcp_client.py,sha256=-3Qy1LyqgHswoc6YbadVRG3ias2op7lUp7Ne2-QUKBM,22474
|
42
42
|
jarvis/jarvis_mcp/stdio_mcp_client.py,sha256=armvgyHAv-AxF5lqiK-TbVLzg3XgSCwmTdWmxBSTLRk,11248
|
43
43
|
jarvis/jarvis_mcp/streamable_mcp_client.py,sha256=1OZpsG82U2MLbGuojllJAblFUAMmp1N0i5fsKM4n5Ts,14453
|
44
|
-
jarvis/jarvis_methodology/main.py,sha256=
|
44
|
+
jarvis/jarvis_methodology/main.py,sha256=NMtd6DRn-Q8NcYtQ3qgTKUp9RW0cDGJod8ZXeblQqYU,12436
|
45
45
|
jarvis/jarvis_multi_agent/__init__.py,sha256=sDd3sK88dS7_qAz2ywIAaEWdQ4iRVCiuBu2rQQmrKbU,4512
|
46
46
|
jarvis/jarvis_multi_agent/main.py,sha256=h7VUSwoPrES0XTK8z5kt3XLX1mmcm8UEuFEHQOUWPH4,1696
|
47
47
|
jarvis/jarvis_platform/__init__.py,sha256=WLQHSiE87PPket2M50_hHzjdMIgPIBx2VF8JfB_NNRk,105
|
48
|
-
jarvis/jarvis_platform/base.py,sha256=
|
49
|
-
jarvis/jarvis_platform/human.py,sha256=
|
50
|
-
jarvis/jarvis_platform/kimi.py,sha256=
|
48
|
+
jarvis/jarvis_platform/base.py,sha256=HsqEtgVF_ZUdXUgeod6IRDWPRggKkovkGCJxOwEtRe8,7759
|
49
|
+
jarvis/jarvis_platform/human.py,sha256=r8Vlltp_LirJZeZh1Mmi30iJr9tl1JaNFoqthSRHF6o,2826
|
50
|
+
jarvis/jarvis_platform/kimi.py,sha256=uIpSWQ3MqDBYYMROeXin_YqM2LFrovMICKpwLWO1ODo,12784
|
51
51
|
jarvis/jarvis_platform/openai.py,sha256=uEjBikfFj7kp5wondLvOx4WdkmTX0aqF6kixxAufcHg,4806
|
52
|
-
jarvis/jarvis_platform/registry.py,sha256=
|
52
|
+
jarvis/jarvis_platform/registry.py,sha256=Sz4ADAaxuufpAQG0KSQZuL1yALzH-aF3FDapkNn5foE,8107
|
53
53
|
jarvis/jarvis_platform/tongyi.py,sha256=zu1bE-LdF_Sohwb5FxoIkDOTI0Lv5G_XhuSOPI20Gf8,21190
|
54
54
|
jarvis/jarvis_platform/yuanbao.py,sha256=1PagfRWvGylUaeUe7yiBnGjYZ1HQk3uruogfKem84ss,21394
|
55
55
|
jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
56
56
|
jarvis/jarvis_platform_manager/main.py,sha256=BdBH2tPzq7p9Mvii7abu6M7uj4lfG05gwjYfMqU5HUA,29567
|
57
57
|
jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
|
-
jarvis/jarvis_smart_shell/main.py,sha256=
|
58
|
+
jarvis/jarvis_smart_shell/main.py,sha256=YfQNGKanhYHAUCh6ZYLpevWpSlaFo_YfteSK9pakjB0,5295
|
59
59
|
jarvis/jarvis_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
60
60
|
jarvis/jarvis_tools/ask_user.py,sha256=dSnZbt2XXDxjDj17Mi7-Twg75yHhMzM_FEj_TazJvC8,2068
|
61
61
|
jarvis/jarvis_tools/base.py,sha256=tFVmK6ppsImW2BzHZmrNmMRiOJdW-4aZP6Me3VxdYcA,1194
|
62
62
|
jarvis/jarvis_tools/chdir.py,sha256=BlRvggcOeBM7UwHGL8U8hjuNm_WGkH5BdhxmPVJXejw,2509
|
63
63
|
jarvis/jarvis_tools/code_plan.py,sha256=XRXHdkN4O1A4qbShLa4VBHFdRl6YdyMgZxbPPotrqNs,7358
|
64
|
-
jarvis/jarvis_tools/create_code_agent.py,sha256=
|
64
|
+
jarvis/jarvis_tools/create_code_agent.py,sha256=wls2B2iLrIEeG9kSWnJHv1wQ4TNqdD9T5OPoAyN53N0,3384
|
65
65
|
jarvis/jarvis_tools/create_sub_agent.py,sha256=ilnApbz7ptNz5o3IrhBTTiNMJGtdeUmkpYL2BFqyI6c,2874
|
66
66
|
jarvis/jarvis_tools/edit_file.py,sha256=cIaxWEW5ES1fiNp6Hm5f2MUXHLPzpeeKITukQaMRsKg,18717
|
67
67
|
jarvis/jarvis_tools/execute_script.py,sha256=gMarE5yCCSPU6Dp6HlcL2KT-2xCzR-1p-oQNlYOJK58,6157
|
@@ -79,19 +79,20 @@ jarvis/jarvis_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
79
79
|
jarvis/jarvis_tools/cli/main.py,sha256=Mg6TQDxMdzB1Ua1UrZ2EE-uQWsbaeojWaEGHJp2HimA,6375
|
80
80
|
jarvis/jarvis_utils/__init__.py,sha256=67h0ldisGlh3oK4DAeNEL2Bl_VsI3tSmfclasyVlueM,850
|
81
81
|
jarvis/jarvis_utils/builtin_replace_map.py,sha256=s7C5wKhoKkv-O4ltMcDzNpv5oGPC1EbXgiohPHAqksw,4892
|
82
|
-
jarvis/jarvis_utils/config.py,sha256=
|
83
|
-
jarvis/jarvis_utils/embedding.py,sha256=
|
82
|
+
jarvis/jarvis_utils/config.py,sha256=OomZRIeRHiBntKXdqYP1ArI8aqRFqtMlLkd9-VSd5dA,7364
|
83
|
+
jarvis/jarvis_utils/embedding.py,sha256=suqKOgH4cq2HYj4xvNpqDPN9pyc3hTCl934xYonF6qk,3922
|
84
84
|
jarvis/jarvis_utils/file_processors.py,sha256=XiM248SHS7lLgQDCbORVFWqinbVDUawYxWDOsLXDxP8,3043
|
85
|
-
jarvis/jarvis_utils/git_utils.py,sha256=
|
85
|
+
jarvis/jarvis_utils/git_utils.py,sha256=F1558EbJ3dRl12DMwmT24XjkC8XqddBjhpWxLgyI0aI,15688
|
86
86
|
jarvis/jarvis_utils/globals.py,sha256=9NTMfCVd0jvtloOv14-KE6clhcVStFmyN9jWxLmQ5so,3369
|
87
|
-
jarvis/jarvis_utils/input.py,sha256=
|
88
|
-
jarvis/jarvis_utils/
|
89
|
-
jarvis/jarvis_utils/
|
87
|
+
jarvis/jarvis_utils/input.py,sha256=WOs9hYSiZE3ao5K-UJmC7KyZByYnC1opHGJTUZm7DVo,7884
|
88
|
+
jarvis/jarvis_utils/jarvis_history.py,sha256=TCfxJvEP321iY5CFpEOxo6sVKNw5tWEQFaWf9cV4Als,3597
|
89
|
+
jarvis/jarvis_utils/methodology.py,sha256=MhPrMxMqElyAn54BDfpQdUqrRr7IbSlrLvAI39LCgTM,8487
|
90
|
+
jarvis/jarvis_utils/output.py,sha256=PRCgudPOB8gMEP3u-g0FGD2c6tBgJhLXUMqNPglfjV8,10813
|
90
91
|
jarvis/jarvis_utils/tag.py,sha256=f211opbbbTcSyzCDwuIK_oCnKhXPNK-RknYyGzY1yD0,431
|
91
|
-
jarvis/jarvis_utils/utils.py,sha256
|
92
|
-
jarvis_ai_assistant-0.1.
|
93
|
-
jarvis_ai_assistant-0.1.
|
94
|
-
jarvis_ai_assistant-0.1.
|
95
|
-
jarvis_ai_assistant-0.1.
|
96
|
-
jarvis_ai_assistant-0.1.
|
97
|
-
jarvis_ai_assistant-0.1.
|
92
|
+
jarvis/jarvis_utils/utils.py,sha256=55kIbFXPFEd6770mdy2fZDh96XH0rIFJw2w3rYhE2Cc,11895
|
93
|
+
jarvis_ai_assistant-0.1.196.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
94
|
+
jarvis_ai_assistant-0.1.196.dist-info/METADATA,sha256=xGxSUcjUBvI2jzh5z_dv6hoOKgjouRgtaNpCQijpA5s,20200
|
95
|
+
jarvis_ai_assistant-0.1.196.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
96
|
+
jarvis_ai_assistant-0.1.196.dist-info/entry_points.txt,sha256=Gy3DOP1PYLMK0GCj4rrP_9lkOyBQ39EK_lKGUSwn41E,869
|
97
|
+
jarvis_ai_assistant-0.1.196.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
98
|
+
jarvis_ai_assistant-0.1.196.dist-info/RECORD,,
|
File without changes
|
{jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/entry_points.txt
RENAMED
File without changes
|
{jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{jarvis_ai_assistant-0.1.194.dist-info → jarvis_ai_assistant-0.1.196.dist-info}/top_level.txt
RENAMED
File without changes
|