jarvis-ai-assistant 0.4.1__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jarvis/__init__.py +1 -1
- jarvis/jarvis_agent/__init__.py +79 -73
- jarvis/jarvis_agent/run_loop.py +18 -0
- jarvis/jarvis_agent/share_manager.py +8 -1
- jarvis/jarvis_code_agent/code_agent.py +91 -2
- jarvis/jarvis_code_analysis/code_review.py +483 -568
- jarvis/jarvis_data/config_schema.json +7 -2
- jarvis/jarvis_multi_agent/__init__.py +24 -11
- jarvis/jarvis_tools/registry.py +26 -14
- jarvis/jarvis_tools/sub_agent.py +9 -0
- jarvis/jarvis_utils/config.py +16 -11
- jarvis/jarvis_utils/input.py +77 -6
- jarvis/jarvis_utils/methodology.py +25 -19
- jarvis/jarvis_utils/utils.py +58 -2
- {jarvis_ai_assistant-0.4.1.dist-info → jarvis_ai_assistant-0.5.0.dist-info}/METADATA +1 -1
- {jarvis_ai_assistant-0.4.1.dist-info → jarvis_ai_assistant-0.5.0.dist-info}/RECORD +20 -21
- jarvis/jarvis_agent/config.py +0 -100
- {jarvis_ai_assistant-0.4.1.dist-info → jarvis_ai_assistant-0.5.0.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.4.1.dist-info → jarvis_ai_assistant-0.5.0.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.4.1.dist-info → jarvis_ai_assistant-0.5.0.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.4.1.dist-info → jarvis_ai_assistant-0.5.0.dist-info}/top_level.txt +0 -0
|
@@ -193,6 +193,11 @@
|
|
|
193
193
|
"description": "脚本执行的超时时间(秒),仅在非交互模式下生效。",
|
|
194
194
|
"default": 300
|
|
195
195
|
},
|
|
196
|
+
"JARVIS_AUTO_SUMMARY_ROUNDS": {
|
|
197
|
+
"type": "number",
|
|
198
|
+
"description": "基于对话轮次的自动总结阈值(达到该轮次后自动总结并清理历史)",
|
|
199
|
+
"default": 20
|
|
200
|
+
},
|
|
196
201
|
"JARVIS_CONFIRM_BEFORE_APPLY_PATCH": {
|
|
197
202
|
"type": "boolean",
|
|
198
203
|
"description": "应用补丁前是否需要确认",
|
|
@@ -274,12 +279,12 @@
|
|
|
274
279
|
},
|
|
275
280
|
"JARVIS_CENTRAL_METHODOLOGY_REPO": {
|
|
276
281
|
"type": "string",
|
|
277
|
-
"description": "
|
|
282
|
+
"description": "中心方法论仓库路径或Git仓库地址。支持本地目录(含git子路径):若为本地目录将直接加入方法论加载路径;若为Git URL则会克隆到数据目录后加载。",
|
|
278
283
|
"default": ""
|
|
279
284
|
},
|
|
280
285
|
"JARVIS_CENTRAL_TOOL_REPO": {
|
|
281
286
|
"type": "string",
|
|
282
|
-
"description": "
|
|
287
|
+
"description": "中心工具仓库路径或Git仓库地址。支持本地目录(含git子路径):若为本地目录将直接加载其中的工具;若为Git URL则会克隆到数据目录并加载。",
|
|
283
288
|
"default": ""
|
|
284
289
|
},
|
|
285
290
|
"JARVIS_PRINT_PROMPT": {
|
|
@@ -287,6 +287,11 @@ content: |2
|
|
|
287
287
|
return None
|
|
288
288
|
|
|
289
289
|
config = self.agents_config_map[name].copy()
|
|
290
|
+
# 标记为多智能体运行,避免在非交互模式下自动开启 auto_complete
|
|
291
|
+
config.setdefault("in_multi_agent", True)
|
|
292
|
+
# 非主智能体统一禁用自动补全,防止多智能体并行时误触发自动交互
|
|
293
|
+
if name != self.main_agent_name:
|
|
294
|
+
config["auto_complete"] = False
|
|
290
295
|
|
|
291
296
|
# Prepend common system prompt if configured
|
|
292
297
|
common_sp = getattr(self, "common_system_prompt", "")
|
|
@@ -328,9 +333,14 @@ content: |2
|
|
|
328
333
|
break
|
|
329
334
|
|
|
330
335
|
# Generate a brief summary via direct model call to avoid run-loop recursion
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
336
|
+
# 如果在配置中显式设置了 summary_on_send=False,则不生成摘要
|
|
337
|
+
sender_config = self.agents_config_map.get(last_agent_name, {}) if hasattr(self, "agents_config_map") else {}
|
|
338
|
+
summary_on_send = sender_config.get("summary_on_send", True)
|
|
339
|
+
summary_text = ""
|
|
340
|
+
if summary_on_send:
|
|
341
|
+
try:
|
|
342
|
+
# 参照 Agent.generate_summary 的实现思路:基于当前 session.prompt 追加请求提示,直接调用底层模型
|
|
343
|
+
multi_agent_summary_prompt = """
|
|
334
344
|
请基于当前会话,为即将发送给其他智能体的协作交接写一段摘要,包含:
|
|
335
345
|
- 已完成的主要工作与产出
|
|
336
346
|
- 关键决策及其理由
|
|
@@ -341,12 +351,12 @@ content: |2
|
|
|
341
351
|
- 仅输出纯文本,不包含任何指令或工具调用
|
|
342
352
|
- 使用简洁的要点式表述
|
|
343
353
|
""".strip()
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
354
|
+
summary_any: Any = agent.model.chat_until_success( # type: ignore[attr-defined]
|
|
355
|
+
f"{agent.session.prompt}\n{multi_agent_summary_prompt}"
|
|
356
|
+
)
|
|
357
|
+
summary_text = summary_any.strip() if isinstance(summary_any, str) else ""
|
|
358
|
+
except Exception:
|
|
359
|
+
summary_text = ""
|
|
350
360
|
prompt = f"""
|
|
351
361
|
Please handle this message:
|
|
352
362
|
from: {last_agent_name}
|
|
@@ -373,6 +383,9 @@ content: {msg['content']}
|
|
|
373
383
|
f"{last_agent_name} 正在向 {to_agent_name} 发送消息...", OutputType.INFO
|
|
374
384
|
)
|
|
375
385
|
|
|
386
|
+
# Keep a reference to the sender before switching to the receiver
|
|
387
|
+
sender_agent = agent
|
|
388
|
+
|
|
376
389
|
agent = self._get_agent(to_agent_name)
|
|
377
390
|
if not agent:
|
|
378
391
|
return f"智能体 {to_agent_name} 未找到"
|
|
@@ -380,9 +393,9 @@ content: {msg['content']}
|
|
|
380
393
|
# Check if the sending agent should be cleared
|
|
381
394
|
sender_config = self.agents_config_map.get(last_agent_name, {})
|
|
382
395
|
if sender_config.get("clear_after_send_message"):
|
|
383
|
-
if
|
|
396
|
+
if sender_agent:
|
|
384
397
|
PrettyOutput.print(f"清除智能体 {last_agent_name} 在发送消息后的历史记录...", OutputType.INFO)
|
|
385
|
-
|
|
398
|
+
sender_agent.clear_history()
|
|
386
399
|
|
|
387
400
|
last_agent_name = agent.name
|
|
388
401
|
msg = agent.run(prompt)
|
jarvis/jarvis_tools/registry.py
CHANGED
|
@@ -350,22 +350,28 @@ class ToolRegistry(OutputHandlerProtocol):
|
|
|
350
350
|
# 如果配置了中心工具仓库,将其添加到加载路径
|
|
351
351
|
central_repo = get_central_tool_repo()
|
|
352
352
|
if central_repo:
|
|
353
|
-
#
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
# 支持本地目录路径或Git仓库URL
|
|
354
|
+
expanded = os.path.expanduser(os.path.expandvars(central_repo))
|
|
355
|
+
if os.path.isdir(expanded):
|
|
356
|
+
# 直接使用本地目录(支持Git仓库的子目录)
|
|
357
|
+
tool_dirs.append(expanded)
|
|
358
|
+
else:
|
|
359
|
+
# 中心工具仓库存储在数据目录下的特定位置
|
|
360
|
+
central_repo_path = os.path.join(get_data_dir(), "central_tool_repo")
|
|
361
|
+
tool_dirs.append(central_repo_path)
|
|
356
362
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
363
|
+
# 确保中心工具仓库被克隆/更新
|
|
364
|
+
if not os.path.exists(central_repo_path):
|
|
365
|
+
try:
|
|
366
|
+
import subprocess
|
|
361
367
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
368
|
+
subprocess.run(
|
|
369
|
+
["git", "clone", central_repo, central_repo_path], check=True
|
|
370
|
+
)
|
|
371
|
+
except Exception as e:
|
|
372
|
+
PrettyOutput.print(
|
|
373
|
+
f"克隆中心工具仓库失败: {str(e)}", OutputType.ERROR
|
|
374
|
+
)
|
|
369
375
|
|
|
370
376
|
# --- 全局每日更新检查 ---
|
|
371
377
|
daily_check_git_updates(tool_dirs, "tools")
|
|
@@ -633,6 +639,12 @@ class ToolRegistry(OutputHandlerProtocol):
|
|
|
633
639
|
异常:
|
|
634
640
|
Exception: 如果工具调用缺少必要字段
|
|
635
641
|
"""
|
|
642
|
+
# 如果</TOOL_CALL>出现在响应的末尾,但是前面没有换行符,自动插入一个换行符进行修复
|
|
643
|
+
if content.rstrip().endswith(ct("TOOL_CALL")):
|
|
644
|
+
pos = content.rfind(ct("TOOL_CALL"))
|
|
645
|
+
if pos > 0 and content[pos - 1] not in ("\n", "\r"):
|
|
646
|
+
content = content[:pos] + "\n" + content[pos:]
|
|
647
|
+
|
|
636
648
|
# 将内容拆分为行
|
|
637
649
|
pattern = rf'(?ms){re.escape(ot("TOOL_CALL"))}(.*?)^{re.escape(ct("TOOL_CALL"))}'
|
|
638
650
|
data = re.findall(pattern, content)
|
jarvis/jarvis_tools/sub_agent.py
CHANGED
|
@@ -51,6 +51,10 @@ class SubAgentTool:
|
|
|
51
51
|
"type": "string",
|
|
52
52
|
"description": "覆盖子Agent的总结提示词(必填)",
|
|
53
53
|
},
|
|
54
|
+
"non_interactive": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "是否启用无交互模式(可选,默认继承父Agent或系统默认)",
|
|
57
|
+
},
|
|
54
58
|
},
|
|
55
59
|
"required": [
|
|
56
60
|
"task",
|
|
@@ -131,6 +135,11 @@ class SubAgentTool:
|
|
|
131
135
|
# 安全兜底:无法从父Agent获取配置则保持为None,使用系统默认
|
|
132
136
|
pass
|
|
133
137
|
|
|
138
|
+
# 可选参数:允许显式覆盖无交互模式
|
|
139
|
+
explicit_non_interactive = args.get("non_interactive", None)
|
|
140
|
+
if explicit_non_interactive is not None:
|
|
141
|
+
parent_non_interactive = bool(explicit_non_interactive)
|
|
142
|
+
|
|
134
143
|
agent = Agent(
|
|
135
144
|
system_prompt=system_prompt,
|
|
136
145
|
name=agent_name,
|
jarvis/jarvis_utils/config.py
CHANGED
|
@@ -76,17 +76,6 @@ def get_replace_map() -> dict:
|
|
|
76
76
|
return {**BUILTIN_REPLACE_MAP, **file_map}
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
def get_max_token_count(model_group_override: Optional[str] = None) -> int:
|
|
80
|
-
"""
|
|
81
|
-
获取模型允许的最大token数量。
|
|
82
|
-
|
|
83
|
-
返回:
|
|
84
|
-
int: 模型能处理的最大token数量,为最大输入token数量的30倍。
|
|
85
|
-
"""
|
|
86
|
-
max_input_tokens = get_max_input_token_count(model_group_override)
|
|
87
|
-
return max_input_tokens * 30
|
|
88
|
-
|
|
89
|
-
|
|
90
79
|
def get_max_input_token_count(model_group_override: Optional[str] = None) -> int:
|
|
91
80
|
"""
|
|
92
81
|
获取模型允许的最大输入token数量。
|
|
@@ -712,6 +701,22 @@ def get_tool_filter_threshold() -> int:
|
|
|
712
701
|
return int(GLOBAL_CONFIG_DATA.get("JARVIS_TOOL_FILTER_THRESHOLD", 30))
|
|
713
702
|
|
|
714
703
|
|
|
704
|
+
def get_auto_summary_rounds() -> int:
|
|
705
|
+
"""
|
|
706
|
+
获取基于对话轮次的自动总结阈值。
|
|
707
|
+
|
|
708
|
+
返回:
|
|
709
|
+
int: 轮次阈值,默认20
|
|
710
|
+
"""
|
|
711
|
+
try:
|
|
712
|
+
return int(GLOBAL_CONFIG_DATA.get("JARVIS_AUTO_SUMMARY_ROUNDS", 20))
|
|
713
|
+
except Exception:
|
|
714
|
+
return 20
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
715
720
|
def get_script_execution_timeout() -> int:
|
|
716
721
|
"""
|
|
717
722
|
获取脚本执行的超时时间(秒)。
|
jarvis/jarvis_utils/input.py
CHANGED
|
@@ -363,11 +363,50 @@ class FileCompleter(Completer):
|
|
|
363
363
|
return tag
|
|
364
364
|
|
|
365
365
|
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
# ---------------------
|
|
367
|
+
# 公共判定辅助函数(按当前Agent优先)
|
|
368
|
+
# ---------------------
|
|
369
|
+
def _get_current_agent_for_input():
|
|
370
|
+
try:
|
|
371
|
+
import jarvis.jarvis_utils.globals as g
|
|
372
|
+
current_name = getattr(g, "current_agent_name", "")
|
|
373
|
+
if current_name:
|
|
374
|
+
return g.get_agent(current_name)
|
|
375
|
+
except Exception:
|
|
376
|
+
pass
|
|
377
|
+
return None
|
|
378
|
+
|
|
379
|
+
def _is_non_interactive_for_current_agent() -> bool:
|
|
368
380
|
try:
|
|
369
381
|
from jarvis.jarvis_utils.config import is_non_interactive
|
|
370
|
-
|
|
382
|
+
ag = _get_current_agent_for_input()
|
|
383
|
+
try:
|
|
384
|
+
return bool(getattr(ag, "non_interactive", False)) if ag else bool(is_non_interactive())
|
|
385
|
+
except Exception:
|
|
386
|
+
return bool(is_non_interactive())
|
|
387
|
+
except Exception:
|
|
388
|
+
return False
|
|
389
|
+
|
|
390
|
+
def _is_auto_complete_for_current_agent() -> bool:
|
|
391
|
+
try:
|
|
392
|
+
from jarvis.jarvis_utils.config import GLOBAL_CONFIG_DATA
|
|
393
|
+
ag = _get_current_agent_for_input()
|
|
394
|
+
if ag is not None and hasattr(ag, "auto_complete"):
|
|
395
|
+
try:
|
|
396
|
+
return bool(getattr(ag, "auto_complete", False))
|
|
397
|
+
except Exception:
|
|
398
|
+
pass
|
|
399
|
+
env_v = os.getenv("JARVIS_AUTO_COMPLETE")
|
|
400
|
+
if env_v is not None:
|
|
401
|
+
return str(env_v).strip().lower() in ("1", "true", "yes", "on")
|
|
402
|
+
return bool(GLOBAL_CONFIG_DATA.get("JARVIS_AUTO_COMPLETE", False))
|
|
403
|
+
except Exception:
|
|
404
|
+
return False
|
|
405
|
+
|
|
406
|
+
def user_confirm(tip: str, default: bool = True) -> bool:
|
|
407
|
+
"""提示用户确认是/否问题(按当前Agent优先判断非交互)"""
|
|
408
|
+
try:
|
|
409
|
+
if _is_non_interactive_for_current_agent():
|
|
371
410
|
return default
|
|
372
411
|
suffix = "[Y/n]" if default else "[y/N]"
|
|
373
412
|
ret = get_single_line_input(f"{tip} {suffix}: ")
|
|
@@ -666,9 +705,41 @@ def get_multiline_input(tip: str, print_on_empty: bool = True) -> str:
|
|
|
666
705
|
preset: Optional[str] = None
|
|
667
706
|
preset_cursor: Optional[int] = None
|
|
668
707
|
while True:
|
|
669
|
-
from jarvis.jarvis_utils.config import is_non_interactive
|
|
670
|
-
|
|
671
|
-
|
|
708
|
+
from jarvis.jarvis_utils.config import is_non_interactive, GLOBAL_CONFIG_DATA
|
|
709
|
+
# 基于“当前Agent”精确判断非交互与自动完成,避免多Agent相互干扰
|
|
710
|
+
if _is_non_interactive_for_current_agent():
|
|
711
|
+
# 在多Agent系统中,无论是否启用自动完成,均提示可用智能体并建议使用 SEND_MESSAGE 转移控制权
|
|
712
|
+
hint = ""
|
|
713
|
+
try:
|
|
714
|
+
ag = _get_current_agent_for_input()
|
|
715
|
+
ohs = getattr(ag, "output_handler", [])
|
|
716
|
+
available_agents: List[str] = []
|
|
717
|
+
for oh in (ohs or []):
|
|
718
|
+
cfgs = getattr(oh, "agents_config", None)
|
|
719
|
+
if isinstance(cfgs, list):
|
|
720
|
+
for c in cfgs:
|
|
721
|
+
try:
|
|
722
|
+
name = c.get("name")
|
|
723
|
+
except Exception:
|
|
724
|
+
name = None
|
|
725
|
+
if isinstance(name, str) and name.strip():
|
|
726
|
+
available_agents.append(name.strip())
|
|
727
|
+
if available_agents:
|
|
728
|
+
# 去重但保留顺序
|
|
729
|
+
seen = set()
|
|
730
|
+
ordered = []
|
|
731
|
+
for n in available_agents:
|
|
732
|
+
if n not in seen:
|
|
733
|
+
seen.add(n)
|
|
734
|
+
ordered.append(n)
|
|
735
|
+
hint = "\n当前可用智能体: " + ", ".join(ordered) + f"\n如需将任务交给其他智能体,请使用 {ot('SEND_MESSAGE')} 块。"
|
|
736
|
+
except Exception:
|
|
737
|
+
hint = ""
|
|
738
|
+
if _is_auto_complete_for_current_agent():
|
|
739
|
+
base_msg = "我无法与你交互,所有的事情你都自我决策,如果无法决策,就完成任务。输出" + ot("!!!COMPLETE!!!")
|
|
740
|
+
return base_msg + hint
|
|
741
|
+
else:
|
|
742
|
+
return "我无法与你交互,所有的事情你都自我决策" + hint
|
|
672
743
|
user_input = _get_multiline_input_internal(
|
|
673
744
|
tip, preset=preset, preset_cursor=preset_cursor
|
|
674
745
|
)
|
|
@@ -54,25 +54,31 @@ def _load_all_methodologies() -> Dict[str, str]:
|
|
|
54
54
|
# 如果配置了中心方法论仓库,将其添加到加载路径
|
|
55
55
|
central_repo = get_central_methodology_repo()
|
|
56
56
|
if central_repo:
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
# 支持本地目录路径或Git仓库URL
|
|
58
|
+
expanded = os.path.expanduser(os.path.expandvars(central_repo))
|
|
59
|
+
if os.path.isdir(expanded):
|
|
60
|
+
# 直接使用本地目录(支持Git仓库的子目录)
|
|
61
|
+
methodology_dirs.append(expanded)
|
|
62
|
+
else:
|
|
63
|
+
# 中心方法论仓库存储在数据目录下的特定位置
|
|
64
|
+
central_repo_path = os.path.join(get_data_dir(), "central_methodology_repo")
|
|
65
|
+
methodology_dirs.append(central_repo_path)
|
|
66
|
+
|
|
67
|
+
# 确保中心方法论仓库被克隆/更新
|
|
68
|
+
if not os.path.exists(central_repo_path):
|
|
69
|
+
try:
|
|
70
|
+
import subprocess
|
|
71
|
+
|
|
72
|
+
PrettyOutput.print(
|
|
73
|
+
f"正在克隆中心方法论仓库: {central_repo}", OutputType.INFO
|
|
74
|
+
)
|
|
75
|
+
subprocess.run(
|
|
76
|
+
["git", "clone", central_repo, central_repo_path], check=True
|
|
77
|
+
)
|
|
78
|
+
except Exception as e:
|
|
79
|
+
PrettyOutput.print(
|
|
80
|
+
f"克隆中心方法论仓库失败: {str(e)}", OutputType.ERROR
|
|
81
|
+
)
|
|
76
82
|
|
|
77
83
|
# --- 全局每日更新检查 ---
|
|
78
84
|
daily_check_git_updates(methodology_dirs, "methodologies")
|
jarvis/jarvis_utils/utils.py
CHANGED
|
@@ -1212,6 +1212,37 @@ def _collect_optional_config_interactively(
|
|
|
1212
1212
|
or changed
|
|
1213
1213
|
)
|
|
1214
1214
|
|
|
1215
|
+
# 新增:会话与调试相关配置
|
|
1216
|
+
changed = (
|
|
1217
|
+
_ask_and_set(
|
|
1218
|
+
"JARVIS_SAVE_SESSION_HISTORY",
|
|
1219
|
+
"是否保存会话记录?",
|
|
1220
|
+
False,
|
|
1221
|
+
"bool",
|
|
1222
|
+
)
|
|
1223
|
+
or changed
|
|
1224
|
+
)
|
|
1225
|
+
changed = (
|
|
1226
|
+
_ask_and_set(
|
|
1227
|
+
"JARVIS_PRINT_ERROR_TRACEBACK",
|
|
1228
|
+
"是否在错误输出时打印回溯调用链?",
|
|
1229
|
+
False,
|
|
1230
|
+
"bool",
|
|
1231
|
+
)
|
|
1232
|
+
or changed
|
|
1233
|
+
)
|
|
1234
|
+
|
|
1235
|
+
# 其它可选开关
|
|
1236
|
+
changed = (
|
|
1237
|
+
_ask_and_set(
|
|
1238
|
+
"JARVIS_SKIP_PREDEFINED_TASKS",
|
|
1239
|
+
"是否跳过预定义任务加载(不读取 pre-command 列表)?",
|
|
1240
|
+
False,
|
|
1241
|
+
"bool",
|
|
1242
|
+
)
|
|
1243
|
+
or changed
|
|
1244
|
+
)
|
|
1245
|
+
|
|
1215
1246
|
# 代码与工具操作安全提示
|
|
1216
1247
|
changed = (
|
|
1217
1248
|
_ask_and_set(
|
|
@@ -1258,6 +1289,23 @@ def _collect_optional_config_interactively(
|
|
|
1258
1289
|
)
|
|
1259
1290
|
or changed
|
|
1260
1291
|
)
|
|
1292
|
+
# 新增:自动总结轮次与脚本超时
|
|
1293
|
+
changed = (
|
|
1294
|
+
_ask_and_set_int(
|
|
1295
|
+
"JARVIS_AUTO_SUMMARY_ROUNDS",
|
|
1296
|
+
"基于对话轮次的自动总结阈值(达到该轮次后自动总结并清理历史,默认20)",
|
|
1297
|
+
20,
|
|
1298
|
+
)
|
|
1299
|
+
or changed
|
|
1300
|
+
)
|
|
1301
|
+
changed = (
|
|
1302
|
+
_ask_and_set_int(
|
|
1303
|
+
"JARVIS_SCRIPT_EXECUTION_TIMEOUT",
|
|
1304
|
+
"脚本执行超时时间(秒,默认300,仅非交互模式生效)",
|
|
1305
|
+
300,
|
|
1306
|
+
)
|
|
1307
|
+
or changed
|
|
1308
|
+
)
|
|
1261
1309
|
|
|
1262
1310
|
# 目录类配置(逗号分隔)
|
|
1263
1311
|
changed = (
|
|
@@ -1295,6 +1343,14 @@ def _collect_optional_config_interactively(
|
|
|
1295
1343
|
)
|
|
1296
1344
|
or changed
|
|
1297
1345
|
)
|
|
1346
|
+
# 新增:工具调用后回调实现目录
|
|
1347
|
+
changed = (
|
|
1348
|
+
_ask_and_set_list(
|
|
1349
|
+
"JARVIS_AFTER_TOOL_CALL_CB_DIRS",
|
|
1350
|
+
"指定工具调用后回调实现目录(逗号分隔,留空跳过):",
|
|
1351
|
+
)
|
|
1352
|
+
or changed
|
|
1353
|
+
)
|
|
1298
1354
|
|
|
1299
1355
|
# Web 搜索配置(可选)
|
|
1300
1356
|
changed = (
|
|
@@ -1439,7 +1495,7 @@ def _collect_optional_config_interactively(
|
|
|
1439
1495
|
changed = (
|
|
1440
1496
|
_ask_and_set(
|
|
1441
1497
|
"JARVIS_CENTRAL_METHODOLOGY_REPO",
|
|
1442
|
-
"
|
|
1498
|
+
"请输入中心方法论仓库路径或Git地址(可留空跳过):",
|
|
1443
1499
|
"",
|
|
1444
1500
|
"str",
|
|
1445
1501
|
)
|
|
@@ -1448,7 +1504,7 @@ def _collect_optional_config_interactively(
|
|
|
1448
1504
|
changed = (
|
|
1449
1505
|
_ask_and_set(
|
|
1450
1506
|
"JARVIS_CENTRAL_TOOL_REPO",
|
|
1451
|
-
"
|
|
1507
|
+
"请输入中心工具仓库路径或Git地址(可留空跳过):",
|
|
1452
1508
|
"",
|
|
1453
1509
|
"str",
|
|
1454
1510
|
)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=
|
|
2
|
-
jarvis/jarvis_agent/__init__.py,sha256=
|
|
1
|
+
jarvis/__init__.py,sha256=oTkuIy1EsFy9C2D4yYth5JohcbEgLLtiPlfbyY7LvrM,73
|
|
2
|
+
jarvis/jarvis_agent/__init__.py,sha256=uq8p8ruYW5CjN8J8fncYAe7YrRORXjm183TSu_0ST2Y,51837
|
|
3
3
|
jarvis/jarvis_agent/agent_manager.py,sha256=Q0S-mYTPt8Xd7RKGoLWoWU_RP_wEXFWxCjve8_t2f2A,3807
|
|
4
4
|
jarvis/jarvis_agent/builtin_input_handler.py,sha256=wS-FqpT3pIXwHn1dfL3SpXonUKWgVThbQueUIeyRc2U,2917
|
|
5
|
-
jarvis/jarvis_agent/config.py,sha256=f_VmSfdEtl4a32y-fVxhcZYkni4RznBAUKjv6kET1LU,3517
|
|
6
5
|
jarvis/jarvis_agent/config_editor.py,sha256=hlb9EYxKWcR_qdW2O89CgNDdciR9Isi743JU_1gD8j4,1927
|
|
7
6
|
jarvis/jarvis_agent/edit_file_handler.py,sha256=8j7SRSWTw468fTuR-ueNKFK_0pR1GwDxTvsGGmm3zlA,24714
|
|
8
7
|
jarvis/jarvis_agent/event_bus.py,sha256=pRdfk7d0OG18K6yNfWlCvAh_dW5p9sBtT2Yc3jGmzgo,1519
|
|
@@ -19,9 +18,9 @@ jarvis/jarvis_agent/prompt_manager.py,sha256=_1qLBSA3yn4nT_N3X2npTpW40Cp-pMeyvnz
|
|
|
19
18
|
jarvis/jarvis_agent/prompts.py,sha256=CvbPYx_klEz6OQrxVReZAnC2uQNo53rWkkucmh30uKg,9531
|
|
20
19
|
jarvis/jarvis_agent/protocols.py,sha256=YFJaC9MHi7JfLzmvlyotJDjiCO4Z07XJXy1gKhVdUy4,956
|
|
21
20
|
jarvis/jarvis_agent/rewrite_file_handler.py,sha256=FVSrfrC115_cGvdPW9RIn3A-gQAhok7GyyBfnOFdpXs,5276
|
|
22
|
-
jarvis/jarvis_agent/run_loop.py,sha256=
|
|
21
|
+
jarvis/jarvis_agent/run_loop.py,sha256=iGfa28J2K6I07k6p66O3WJFSk9z4uOarqe6CLqALIsk,6167
|
|
23
22
|
jarvis/jarvis_agent/session_manager.py,sha256=5wVcaZGwJ9cEKTQglSbqyxUDJ2fI5KxYN8C8L16UWLw,3024
|
|
24
|
-
jarvis/jarvis_agent/share_manager.py,sha256=
|
|
23
|
+
jarvis/jarvis_agent/share_manager.py,sha256=Nl7zvy5PbcYAPXUgfnvatoUB0V4sIQOt61LyYkp5-2w,9127
|
|
25
24
|
jarvis/jarvis_agent/shell_input_handler.py,sha256=wiAPjB-9uTkcLszbO5dlOUwIfaeR39RgRcZhahIGqoA,2018
|
|
26
25
|
jarvis/jarvis_agent/stdio_redirect.py,sha256=xqF-sENitpefCT3TA9oRwATFqbDrU2dvqM-UiMZRhbE,9944
|
|
27
26
|
jarvis/jarvis_agent/task_analyzer.py,sha256=JXc-63hnTD7oSX-nIfRcgxqCMhh4fM4QYVc7C1gp--M,7813
|
|
@@ -34,9 +33,9 @@ jarvis/jarvis_agent/web_bridge.py,sha256=h15PXuPWWfZynWt8bPW4BDeCpIVoIOlRXfO0je6
|
|
|
34
33
|
jarvis/jarvis_agent/web_output_sink.py,sha256=sZ6WbLZnuCdT5dS9d8msHY_g-pnj-dvML-I6uJ7-sbc,1733
|
|
35
34
|
jarvis/jarvis_agent/web_server.py,sha256=oZZy4nAOPhRWJn7K8VjBlho1F9AsvLEYiusKgipjO94,28204
|
|
36
35
|
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
jarvis/jarvis_code_agent/code_agent.py,sha256=
|
|
36
|
+
jarvis/jarvis_code_agent/code_agent.py,sha256=JtUZ6maMxOic5g5THCoOpgv9hyYecJZL71QR7nE2KDM,42269
|
|
38
37
|
jarvis/jarvis_code_agent/lint.py,sha256=_qLJB_bC3PuoHG-j4EGOnYzNGO26jHlKLbkysfyQW1c,3954
|
|
39
|
-
jarvis/jarvis_code_analysis/code_review.py,sha256=
|
|
38
|
+
jarvis/jarvis_code_analysis/code_review.py,sha256=48r0UE4pmOUaRgBJIJrpPW307sKGo1rnTNkWdsqkOrY,29889
|
|
40
39
|
jarvis/jarvis_code_analysis/checklists/__init__.py,sha256=LIXAYa1sW3l7foP6kohLWnE98I_EQ0T7z5bYKHq6rJA,78
|
|
41
40
|
jarvis/jarvis_code_analysis/checklists/c_cpp.py,sha256=9t62bMqs6qTkFSio4SKkj88qyb5ZubWrw3MxJBQ4X1A,1317
|
|
42
41
|
jarvis/jarvis_code_analysis/checklists/csharp.py,sha256=ShPXrl2_UPAnGaCHAG2wLl90COG3HK2XCSr1UK2dxN4,2420
|
|
@@ -57,7 +56,7 @@ jarvis/jarvis_code_analysis/checklists/shell.py,sha256=aRFYhQQvTgbYd-uY5pc8UHIUA
|
|
|
57
56
|
jarvis/jarvis_code_analysis/checklists/sql.py,sha256=vR0T6qC7b4dURjJVAd7kSVxyvZEQXPG1Jqc2sNTGp5c,2355
|
|
58
57
|
jarvis/jarvis_code_analysis/checklists/swift.py,sha256=TPx4I6Gupvs6tSerRKmTSKEPQpOLEbH2Y7LXg1uBgxc,2566
|
|
59
58
|
jarvis/jarvis_code_analysis/checklists/web.py,sha256=25gGD7pDadZQybNFvALYxWvK0VRjGQb1NVJQElwjyk0,3943
|
|
60
|
-
jarvis/jarvis_data/config_schema.json,sha256=
|
|
59
|
+
jarvis/jarvis_data/config_schema.json,sha256=1c8h8kDlcBqqiX2uHhajgT70F9o88QR1ee-zk2GJJ6w,15093
|
|
61
60
|
jarvis/jarvis_data/tiktoken/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
|
|
62
61
|
jarvis/jarvis_git_squash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
62
|
jarvis/jarvis_git_squash/main.py,sha256=BRbsEQVXwseVFKliVqV8_JPh1om6QT6dLTHw0jQ7OE0,2474
|
|
@@ -69,7 +68,7 @@ jarvis/jarvis_mcp/streamable_mcp_client.py,sha256=BenOeZGNHdUOJT5Z3cc5MhS6aOeKQg
|
|
|
69
68
|
jarvis/jarvis_memory_organizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
69
|
jarvis/jarvis_memory_organizer/memory_organizer.py,sha256=CMFL46vvtpcTI6oS3CAlYteR6xAlwCkvVJmMT22uDRw,26295
|
|
71
70
|
jarvis/jarvis_methodology/main.py,sha256=uiNzk5b5O6xdvRhsOuD7ubxdd2tPcDsFFnvmes8uH8I,11370
|
|
72
|
-
jarvis/jarvis_multi_agent/__init__.py,sha256=
|
|
71
|
+
jarvis/jarvis_multi_agent/__init__.py,sha256=frH5ufVMasKFz_jbVsBk2wH5nq4D0sfDcmfBWQ-DLoA,16726
|
|
73
72
|
jarvis/jarvis_multi_agent/main.py,sha256=vqLzHesgQkpScVvbgOSyi6X7XoEDQYq3dJ9gZfGiPZw,3351
|
|
74
73
|
jarvis/jarvis_platform/__init__.py,sha256=WLQHSiE87PPket2M50_hHzjdMIgPIBx2VF8JfB_NNRk,105
|
|
75
74
|
jarvis/jarvis_platform/ai8.py,sha256=g8JkqPGs9SEbqstNMCc5rCHO0QcPHX9LNvb7HMWwB-Q,11471
|
|
@@ -109,11 +108,11 @@ jarvis/jarvis_tools/generate_new_tool.py,sha256=tJz0YtfDwyH9y00VEWw3Btqr9JCNhvtI
|
|
|
109
108
|
jarvis/jarvis_tools/methodology.py,sha256=_K4GIDUodGEma3SvNRo7Qs5rliijgNespVLyAPN35JU,5233
|
|
110
109
|
jarvis/jarvis_tools/read_code.py,sha256=F1RuO0c69t0h7CvrUGqrTyNcOCcUrFQPACc61O_YSso,6382
|
|
111
110
|
jarvis/jarvis_tools/read_webpage.py,sha256=dfyXJ9vaX-ZRbua1P5ZlaU_SlSzKkeNw-1kI_3-gxFE,5433
|
|
112
|
-
jarvis/jarvis_tools/registry.py,sha256=
|
|
111
|
+
jarvis/jarvis_tools/registry.py,sha256=KDDuaQC_Ej8nGKk2P5W7uMV22BQQx_lSf9dLrLZ6ocY,34033
|
|
113
112
|
jarvis/jarvis_tools/retrieve_memory.py,sha256=hhhGSr7jebPHICY9oEKICyI8mfqsRtKjh58qZNZApKc,8624
|
|
114
113
|
jarvis/jarvis_tools/save_memory.py,sha256=RQtNxcpU53FFv_EBjH0i0oyQ7jWubm-trD1BHuqaGjI,6985
|
|
115
114
|
jarvis/jarvis_tools/search_web.py,sha256=Hi8WBxcRH02qjOF1qcJP2qSqs3kVOKGFAARfh548Ii4,6370
|
|
116
|
-
jarvis/jarvis_tools/sub_agent.py,sha256=
|
|
115
|
+
jarvis/jarvis_tools/sub_agent.py,sha256=Fn2RZ7jLD4cZCWt0HnpSLkdIbeqeZq-1h97Nfg2RAqE,8485
|
|
117
116
|
jarvis/jarvis_tools/sub_code_agent.py,sha256=KpwTCU89kq_RGNpfyA1C0bTl-f0dTvsCyDKplU-hrds,9600
|
|
118
117
|
jarvis/jarvis_tools/virtual_tty.py,sha256=L7-J00ARQvIa25T45Hhqg2eCBl6W2LFgqDlWMWf-7dk,25275
|
|
119
118
|
jarvis/jarvis_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -121,21 +120,21 @@ jarvis/jarvis_tools/cli/main.py,sha256=WL2GNV7WqYl7G1-btRGvCkzDCMk4fPfNvzCrnUFVP
|
|
|
121
120
|
jarvis/jarvis_utils/__init__.py,sha256=67h0ldisGlh3oK4DAeNEL2Bl_VsI3tSmfclasyVlueM,850
|
|
122
121
|
jarvis/jarvis_utils/builtin_replace_map.py,sha256=z8iAqsbZUiGFaozxG1xSu128op8udqHOeEw-GxNt4bU,1708
|
|
123
122
|
jarvis/jarvis_utils/clipboard.py,sha256=D3wzQeqg_yiH7Axs4d6MRxyNa9XxdnenH-ND2uj2WVQ,2967
|
|
124
|
-
jarvis/jarvis_utils/config.py,sha256=
|
|
123
|
+
jarvis/jarvis_utils/config.py,sha256=jOVCrlD597U6FTu8j-lyO93Mpoyqv3Do7Seja_XrRfE,22580
|
|
125
124
|
jarvis/jarvis_utils/embedding.py,sha256=x6mrkL7Bc3qgfuBDsjc4fg4nKG8ofGxVLVVydbsb8PY,2838
|
|
126
125
|
jarvis/jarvis_utils/file_processors.py,sha256=XiM248SHS7lLgQDCbORVFWqinbVDUawYxWDOsLXDxP8,3043
|
|
127
126
|
jarvis/jarvis_utils/fzf.py,sha256=vCs0Uh5dUqGbWzXn2JCtLLCOYE2B39ZNdNveR9PK4DA,1681
|
|
128
127
|
jarvis/jarvis_utils/git_utils.py,sha256=zxjdxbFb_X6aYo-w1fbMx3d2n1ScbmmaAYlE3wGaaSg,24071
|
|
129
128
|
jarvis/jarvis_utils/globals.py,sha256=7Xvf9HY6jYJL4vSD1F1WCoxHkHCAyltJUYt4V9gGVU4,8865
|
|
130
129
|
jarvis/jarvis_utils/http.py,sha256=eRhV3-GYuWmQ0ogq9di9WMlQkFcVb1zGCrySnOgT1x0,4392
|
|
131
|
-
jarvis/jarvis_utils/input.py,sha256=
|
|
132
|
-
jarvis/jarvis_utils/methodology.py,sha256=
|
|
130
|
+
jarvis/jarvis_utils/input.py,sha256=4VXpUZoAocW1mldlZd4bmXI8a_CmcQj7IPLBNgNLGSI,40045
|
|
131
|
+
jarvis/jarvis_utils/methodology.py,sha256=YuuKBjr58cu8QWcniU7QVlEM9Cem6wo4IYcq1iwSDMw,13158
|
|
133
132
|
jarvis/jarvis_utils/output.py,sha256=y2fVcao_2ZowFl0IxUrJZCi8T6ZM0z-iPzpk8T8eLxc,13623
|
|
134
133
|
jarvis/jarvis_utils/tag.py,sha256=f211opbbbTcSyzCDwuIK_oCnKhXPNK-RknYyGzY1yD0,431
|
|
135
|
-
jarvis/jarvis_utils/utils.py,sha256=
|
|
136
|
-
jarvis_ai_assistant-0.
|
|
137
|
-
jarvis_ai_assistant-0.
|
|
138
|
-
jarvis_ai_assistant-0.
|
|
139
|
-
jarvis_ai_assistant-0.
|
|
140
|
-
jarvis_ai_assistant-0.
|
|
141
|
-
jarvis_ai_assistant-0.
|
|
134
|
+
jarvis/jarvis_utils/utils.py,sha256=uBWPwVmzM23HUDjnFdEOEsPF50cjJvC7lMvJqXHyjJ0,74276
|
|
135
|
+
jarvis_ai_assistant-0.5.0.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
|
136
|
+
jarvis_ai_assistant-0.5.0.dist-info/METADATA,sha256=Y1rxsB9YwcJmuEDvCayrnpUAVx87Nq-yVdjuBWo_g8U,18751
|
|
137
|
+
jarvis_ai_assistant-0.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
138
|
+
jarvis_ai_assistant-0.5.0.dist-info/entry_points.txt,sha256=4GcWKFxRJD-QU14gw_3ZaW4KuEVxOcZK9i270rwPdjA,1395
|
|
139
|
+
jarvis_ai_assistant-0.5.0.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
140
|
+
jarvis_ai_assistant-0.5.0.dist-info/RECORD,,
|