jarvis-ai-assistant 0.3.8__py3-none-any.whl → 0.3.10__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """Jarvis AI Assistant"""
3
3
 
4
- __version__ = "0.3.8"
4
+ __version__ = "0.3.10"
@@ -19,17 +19,17 @@ def run_cli(
19
19
  ctx: typer.Context,
20
20
  llm_type: str = typer.Option(
21
21
  "normal",
22
- "-t", "--llm_type",
22
+ "-t", "--llm-type",
23
23
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
24
24
  ),
25
25
  task: Optional[str] = typer.Option(
26
26
  None, "-T", "--task", help="从命令行直接输入任务内容"
27
27
  ),
28
28
  model_group: Optional[str] = typer.Option(
29
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
29
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
30
30
  ),
31
31
  tool_group: Optional[str] = typer.Option(
32
- None, "-G", "--tool_group", help="使用的工具组,覆盖配置文件中的设置"
32
+ None, "-G", "--tool-group", help="使用的工具组,覆盖配置文件中的设置"
33
33
  ),
34
34
  config_file: Optional[str] = typer.Option(
35
35
  None, "-f", "--config", help="自定义配置文件路径"
@@ -43,18 +43,18 @@ def cli(
43
43
  None, "-f", "--config", help="代理配置文件路径"
44
44
  ),
45
45
  agent_definition: Optional[str] = typer.Option(
46
- None, "-c", "--agent_definition", help="代理定义文件路径"
46
+ None, "-c", "--agent-definition", help="代理定义文件路径"
47
47
  ),
48
48
  task: Optional[str] = typer.Option(
49
49
  None, "-t", "--task", help="初始任务内容"
50
50
  ),
51
51
  llm_type: str = typer.Option(
52
52
  "normal",
53
- "-t", "--llm_type",
53
+ "-t", "--llm-type",
54
54
  help="使用的LLM类型,覆盖配置文件中的设置",
55
55
  ),
56
56
  model_group: Optional[str] = typer.Option(
57
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
57
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
58
58
  ),):
59
59
  """Main entry point for Jarvis agent"""
60
60
  # Initialize environment
@@ -51,24 +51,31 @@ class CodeAgent:
51
51
  llm_type: str = "normal",
52
52
  model_group: Optional[str] = None,
53
53
  need_summary: bool = True,
54
+ append_tools: Optional[str] = None,
54
55
  ):
55
56
  self.root_dir = os.getcwd()
56
57
 
57
58
  # 检测 git username 和 email 是否已设置
58
59
  self._check_git_config()
59
60
  tool_registry = ToolRegistry() # type: ignore
60
- tool_registry.use_tools(
61
- [
62
- "execute_script",
63
- "search_web",
64
- "ask_user",
65
- "read_code",
66
- "rewrite_file",
67
- "save_memory",
68
- "retrieve_memory",
69
- "clear_memory",
70
- ]
71
- )
61
+ base_tools = [
62
+ "execute_script",
63
+ "search_web",
64
+ "ask_user",
65
+ "read_code",
66
+ "rewrite_file",
67
+ "save_memory",
68
+ "retrieve_memory",
69
+ "clear_memory",
70
+ ]
71
+
72
+ if append_tools:
73
+ additional_tools = [tool.strip() for tool in append_tools.split(",")]
74
+ base_tools.extend(additional_tools)
75
+ # 去重
76
+ base_tools = list(dict.fromkeys(base_tools))
77
+
78
+ tool_registry.use_tools(base_tools)
72
79
  code_system_prompt = self._get_system_prompt()
73
80
  self.agent = Agent(
74
81
  system_prompt=code_system_prompt,
@@ -639,15 +646,18 @@ def cli(
639
646
  llm_type: str = typer.Option(
640
647
  "normal",
641
648
  "-t",
642
- "--llm_type",
649
+ "--llm-type",
643
650
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
644
651
  ),
645
652
  model_group: Optional[str] = typer.Option(
646
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
653
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
647
654
  ),
648
655
  requirement: Optional[str] = typer.Option(
649
656
  None, "-r", "--requirement", help="要处理的需求描述"
650
657
  ),
658
+ append_tools: Optional[str] = typer.Option(
659
+ None, "--append-tools", help="要追加的工具列表,用逗号分隔"
660
+ ),
651
661
  restore_session: bool = typer.Option(
652
662
  False,
653
663
  "--restore-session",
@@ -698,6 +708,7 @@ def cli(
698
708
  llm_type=llm_type,
699
709
  model_group=model_group,
700
710
  need_summary=False,
711
+ append_tools=append_tools,
701
712
  )
702
713
 
703
714
  # 尝试恢复会话
@@ -826,11 +826,11 @@ def review_commit(
826
826
  llm_type: str = typer.Option(
827
827
  "normal",
828
828
  "-t",
829
- "--llm_type",
829
+ "--llm-type",
830
830
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
831
831
  ),
832
832
  model_group: Optional[str] = typer.Option(
833
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
833
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
834
834
  ),
835
835
  ):
836
836
  """审查指定的提交"""
@@ -857,11 +857,11 @@ def review_current(
857
857
  llm_type: str = typer.Option(
858
858
  "normal",
859
859
  "-t",
860
- "--llm_type",
860
+ "--llm-type",
861
861
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
862
862
  ),
863
863
  model_group: Optional[str] = typer.Option(
864
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
864
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
865
865
  ),
866
866
  ):
867
867
  """审查当前的变更"""
@@ -889,11 +889,11 @@ def review_range(
889
889
  llm_type: str = typer.Option(
890
890
  "normal",
891
891
  "-t",
892
- "--llm_type",
892
+ "--llm-type",
893
893
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
894
894
  ),
895
895
  model_group: Optional[str] = typer.Option(
896
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
896
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
897
897
  ),
898
898
  ):
899
899
  """审查提交范围"""
@@ -922,11 +922,11 @@ def review_file(
922
922
  llm_type: str = typer.Option(
923
923
  "normal",
924
924
  "-t",
925
- "--llm_type",
925
+ "--llm-type",
926
926
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
927
927
  ),
928
928
  model_group: Optional[str] = typer.Option(
929
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
929
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
930
930
  ),
931
931
  ):
932
932
  """审查指定的文件"""
@@ -389,11 +389,11 @@ def cli(
389
389
  llm_type: str = typer.Option(
390
390
  "normal",
391
391
  "-t",
392
- "--llm_type",
392
+ "--llm-type",
393
393
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
394
394
  ),
395
395
  model_group: Optional[str] = typer.Option(
396
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
396
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
397
397
  ),
398
398
  ):
399
399
  init_env("欢迎使用 Jarvis-GitCommitTool,您的Git提交助手已准备就绪!")
@@ -590,12 +590,12 @@ def organize(
590
590
  help="模拟运行,只显示将要进行的操作但不实际执行",
591
591
  ),
592
592
  llm_group: Optional[str] = typer.Option(
593
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
593
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
594
594
  ),
595
595
  llm_type: Optional[str] = typer.Option(
596
596
  "normal",
597
597
  "-t",
598
- "--llm_type",
598
+ "--llm-type",
599
599
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
600
600
  ),
601
601
  ):
@@ -363,11 +363,11 @@ def chat_command(
363
363
  llm_type: str = typer.Option(
364
364
  "normal",
365
365
  "-t",
366
- "--llm_type",
366
+ "--llm-type",
367
367
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式)",
368
368
  ),
369
369
  llm_group: Optional[str] = typer.Option(
370
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
370
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
371
371
  ),
372
372
  ) -> None:
373
373
  """与指定平台和模型聊天。"""
@@ -447,11 +447,11 @@ def role_command(
447
447
  llm_type: Optional[str] = typer.Option(
448
448
  None,
449
449
  "-t",
450
- "--llm_type",
450
+ "--llm-type",
451
451
  help="使用的LLM类型,可选值:'normal'(普通)或 'thinking'(思考模式),覆盖角色配置",
452
452
  ),
453
453
  llm_group: Optional[str] = typer.Option(
454
- None, "-g", "--llm_group", help="使用的模型组,覆盖配置文件中的设置"
454
+ None, "-g", "--llm-group", help="使用的模型组,覆盖配置文件中的设置"
455
455
  ),
456
456
  ) -> None:
457
457
  """加载角色配置文件并开始对话。"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.3.8
3
+ Version: 0.3.10
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
@@ -61,6 +61,7 @@ Requires-Dist: markdownify>=1.1.0
61
61
  Requires-Dist: typer
62
62
  Requires-Dist: pathspec
63
63
  Requires-Dist: plotext==5.2.8
64
+ Requires-Dist: packaging>=24.2
64
65
  Provides-Extra: dev
65
66
  Requires-Dist: pytest; extra == "dev"
66
67
  Requires-Dist: black; extra == "dev"
@@ -1,12 +1,12 @@
1
- jarvis/__init__.py,sha256=v5YcQ0Ez7aCUxmeZE7-B-WO0DwFAP8zg1gHfdxy9-eo,73
1
+ jarvis/__init__.py,sha256=tk1ticxnbAOJGeyx5laAITBb3eg6KF7MxbYRsoDNBe0,74
2
2
  jarvis/jarvis_agent/__init__.py,sha256=NF_eUF85RRplGJyLmInIsTn-09aEPtjj4utYvEALvJw,31802
3
3
  jarvis/jarvis_agent/agent_manager.py,sha256=YzpMiF0H2-eyk2kn2o24Bkj3bXsQx7Pv2vfD4gWepo0,2893
4
4
  jarvis/jarvis_agent/builtin_input_handler.py,sha256=Qs4LAr4xdKLBJpQE81YP4CkucAop86ms0iVoKa1nnso,2468
5
5
  jarvis/jarvis_agent/config_editor.py,sha256=Ctk82sO6w2cNW0-_5L7Bomj-hgM4U7WwMc52fwhAJyg,1809
6
6
  jarvis/jarvis_agent/edit_file_handler.py,sha256=w-byNJ4TN_SlV3djjfFC7OksySOFGrM8ku49w662dzc,11854
7
7
  jarvis/jarvis_agent/file_methodology_manager.py,sha256=qCRh36LLiaF3cXwIRlHurCzQlQQCUvd9BteCdj3CxfQ,4526
8
- jarvis/jarvis_agent/jarvis.py,sha256=2XMuMA3A4ihE4RAo-XnYZHnJ0ZrGRFagE1s-eiGdZ9Q,3252
9
- jarvis/jarvis_agent/main.py,sha256=Sd4-OnBcMqY5i7vb-Riy_JT2fGfuANtgiAWvWFY8LXM,3345
8
+ jarvis/jarvis_agent/jarvis.py,sha256=eBz0cKCaDHHA9JZvYSKu1igSCMclhRw6bEr0hOJuK-0,3252
9
+ jarvis/jarvis_agent/main.py,sha256=0xq-rjadcTedcB2HJSk2v0ihcm2-r2NXLj_Nq9xS9LY,3345
10
10
  jarvis/jarvis_agent/memory_manager.py,sha256=F7HTNzdN1_-cSygnz7zKSJRJvPLUOosqcXQeiW8zG4U,5266
11
11
  jarvis/jarvis_agent/methodology_share_manager.py,sha256=vwWNexluTXSI3qeNP3zJAemOjWW37o_1AlqDR1C8wCI,6910
12
12
  jarvis/jarvis_agent/output_handler.py,sha256=P7oWpXBGFfOsWq7cIhS_z9crkQ19ES7qU5pM92KKjAs,1172
@@ -21,9 +21,9 @@ jarvis/jarvis_agent/task_manager.py,sha256=HJm4_SMpsFbQMUUsAZeHm7cZuhNbz28YW-DRL
21
21
  jarvis/jarvis_agent/tool_executor.py,sha256=k73cKhZEZpljvui4ZxALlFEIE-iLzJ32Softsmiwzqk,1896
22
22
  jarvis/jarvis_agent/tool_share_manager.py,sha256=R5ONIQlDXX9pFq3clwHFhEW8BAJ3ECaR2DqWCEC9tzM,5205
23
23
  jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- jarvis/jarvis_code_agent/code_agent.py,sha256=49B2079pBLlxMmUaAzToAa-SdwAwDqWCeBhCnaA3Quk,29106
24
+ jarvis/jarvis_code_agent/code_agent.py,sha256=KEku3DaunvjLVX7lIvTRsHT-DlN2K5bZT0ypfgYtLmA,29555
25
25
  jarvis/jarvis_code_agent/lint.py,sha256=LZPsfyZPMo7Wm7LN4osZocuNJwZx1ojacO3MlF870x8,4009
26
- jarvis/jarvis_code_analysis/code_review.py,sha256=GHNzJKLRxNIINGxM2dnDg7JV9bxG88bY2ZDh4qgqTV0,36023
26
+ jarvis/jarvis_code_analysis/code_review.py,sha256=OLoMtXz7Kov6cVTdBoxq_OsX_j0rb7Rk3or5tKgiLpo,36023
27
27
  jarvis/jarvis_code_analysis/checklists/__init__.py,sha256=LIXAYa1sW3l7foP6kohLWnE98I_EQ0T7z5bYKHq6rJA,78
28
28
  jarvis/jarvis_code_analysis/checklists/c_cpp.py,sha256=9t62bMqs6qTkFSio4SKkj88qyb5ZubWrw3MxJBQ4X1A,1317
29
29
  jarvis/jarvis_code_analysis/checklists/csharp.py,sha256=ShPXrl2_UPAnGaCHAG2wLl90COG3HK2XCSr1UK2dxN4,2420
@@ -48,13 +48,13 @@ jarvis/jarvis_data/config_schema.json,sha256=xri_qfCrs2AJ-fPwvnV4oU7VJpIrUxddffQ
48
48
  jarvis/jarvis_data/tiktoken/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
49
49
  jarvis/jarvis_git_squash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  jarvis/jarvis_git_squash/main.py,sha256=6PECdAbTbrsJBRLK1pXBh4hdJ_LADh-XXSic1xJi97E,2255
51
- jarvis/jarvis_git_utils/git_commiter.py,sha256=6mdYbC6bMMQt4q5Is65ylL2S-Mho7ZdAB_NgoNq-CKA,15894
51
+ jarvis/jarvis_git_utils/git_commiter.py,sha256=GpSnVa72b9yWoJBbK1Qp_Kb4iimwVW6K7JjXF5pCfnk,15894
52
52
  jarvis/jarvis_mcp/__init__.py,sha256=OPMtjD-uq9xAaKCRIDyKIosaFfBe1GBPu1az-mQ0rVM,2048
53
53
  jarvis/jarvis_mcp/sse_mcp_client.py,sha256=neKrgFxwLDPWjVrl9uDt1ricNwbLZbv1ZEFh0IkmqZk,22656
54
54
  jarvis/jarvis_mcp/stdio_mcp_client.py,sha256=APYUksYKlMx7AVNODKOLrTkKZPnp4kqTQIYIuNDDKko,11286
55
55
  jarvis/jarvis_mcp/streamable_mcp_client.py,sha256=sP0KEsxVcXGht0eA7a_m-ECtZAk39s4PL9OUdm35x2Y,14467
56
56
  jarvis/jarvis_memory_organizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
- jarvis/jarvis_memory_organizer/memory_organizer.py,sha256=nUySOLUfWtGTu92XH2w5Jez46HZl_CFIdxEE_feFqpQ,26502
57
+ jarvis/jarvis_memory_organizer/memory_organizer.py,sha256=4tf6Bs8u6Drj4repvuY3-XeH2Sb6ajVMFcW-rQEiGEY,26502
58
58
  jarvis/jarvis_methodology/main.py,sha256=6QF8hH3vB6rfxim0fPR34uVPf41zVpb4ZLqrFN2qONg,10983
59
59
  jarvis/jarvis_multi_agent/__init__.py,sha256=kCgtAX7VvliyEOQxIj2DvNjRAuh6bpNaOtDn60nzph4,6089
60
60
  jarvis/jarvis_multi_agent/main.py,sha256=Wbarez48QxXexlKEOcRsoMbcQEOP5rv_DzGkNk0SfpY,1779
@@ -68,7 +68,7 @@ jarvis/jarvis_platform/registry.py,sha256=1bMy0YZUa8NLzuZlKfC4CBtpa0iniypTxUZk0H
68
68
  jarvis/jarvis_platform/tongyi.py,sha256=KXEMfylTU91kHisXSaiz8dxzNXK_d7XD9vjuw4yXuVs,22891
69
69
  jarvis/jarvis_platform/yuanbao.py,sha256=32hjk1Ju1tqrMpF47JsSuaxej5K-gUPxjsDu9g0briY,23575
70
70
  jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
- jarvis/jarvis_platform_manager/main.py,sha256=kN5X6Y6p9g0ZHvMY-uBYd0QxCaJ9uhyPRzo1SUk2kxM,20966
71
+ jarvis/jarvis_platform_manager/main.py,sha256=5k7D-tBsNjXPH07eO4f-0gwyUY7STGSNBSl1PbLq15A,20966
72
72
  jarvis/jarvis_platform_manager/service.py,sha256=myJYGSUclCEiRTf3JKs4JndwhXJeQj7MQQy4i13jMt0,13767
73
73
  jarvis/jarvis_rag/__init__.py,sha256=HRTXgnQxDuaE9x-e3r6SYqhJ5d4DSI_rrIxy2IGY6qk,320
74
74
  jarvis/jarvis_rag/cache.py,sha256=Tqx_Oe-AhuWlMXHGHUaIuG6OEHoHBVZq7mL3kldtFFU,2723
@@ -119,9 +119,9 @@ jarvis/jarvis_utils/methodology.py,sha256=IIMU17WVSunsWXsnXROd4G77LxgYs4xEC_xm_0
119
119
  jarvis/jarvis_utils/output.py,sha256=QRLlKObQKT0KuRSeZRqYb7NlTQvsd1oZXZ41WxeWEuU,10894
120
120
  jarvis/jarvis_utils/tag.py,sha256=f211opbbbTcSyzCDwuIK_oCnKhXPNK-RknYyGzY1yD0,431
121
121
  jarvis/jarvis_utils/utils.py,sha256=LiVui9RMsbfUdzbvBBwbGNC4uniGnLp3LFsk7LXGrQE,47370
122
- jarvis_ai_assistant-0.3.8.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
123
- jarvis_ai_assistant-0.3.8.dist-info/METADATA,sha256=5h0sEIQsEFZ1lrU4nb22YbwiccopozZDg4n9GEygOPo,18184
124
- jarvis_ai_assistant-0.3.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
125
- jarvis_ai_assistant-0.3.8.dist-info/entry_points.txt,sha256=4GcWKFxRJD-QU14gw_3ZaW4KuEVxOcZK9i270rwPdjA,1395
126
- jarvis_ai_assistant-0.3.8.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
127
- jarvis_ai_assistant-0.3.8.dist-info/RECORD,,
122
+ jarvis_ai_assistant-0.3.10.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
123
+ jarvis_ai_assistant-0.3.10.dist-info/METADATA,sha256=rp-slMeLj1Yk803AxEoLzwNSvSfH0QUSeja5zdq8_Vs,18216
124
+ jarvis_ai_assistant-0.3.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
125
+ jarvis_ai_assistant-0.3.10.dist-info/entry_points.txt,sha256=4GcWKFxRJD-QU14gw_3ZaW4KuEVxOcZK9i270rwPdjA,1395
126
+ jarvis_ai_assistant-0.3.10.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
127
+ jarvis_ai_assistant-0.3.10.dist-info/RECORD,,