jarvis-ai-assistant 0.7.0__py3-none-any.whl → 0.7.6__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 +243 -139
- jarvis/jarvis_agent/agent_manager.py +5 -10
- jarvis/jarvis_agent/builtin_input_handler.py +2 -6
- jarvis/jarvis_agent/config_editor.py +2 -7
- jarvis/jarvis_agent/event_bus.py +82 -12
- jarvis/jarvis_agent/file_context_handler.py +265 -15
- jarvis/jarvis_agent/file_methodology_manager.py +3 -4
- jarvis/jarvis_agent/jarvis.py +113 -98
- jarvis/jarvis_agent/language_extractors/__init__.py +57 -0
- jarvis/jarvis_agent/language_extractors/c_extractor.py +21 -0
- jarvis/jarvis_agent/language_extractors/cpp_extractor.py +21 -0
- jarvis/jarvis_agent/language_extractors/go_extractor.py +21 -0
- jarvis/jarvis_agent/language_extractors/java_extractor.py +84 -0
- jarvis/jarvis_agent/language_extractors/javascript_extractor.py +79 -0
- jarvis/jarvis_agent/language_extractors/python_extractor.py +21 -0
- jarvis/jarvis_agent/language_extractors/rust_extractor.py +21 -0
- jarvis/jarvis_agent/language_extractors/typescript_extractor.py +84 -0
- jarvis/jarvis_agent/language_support_info.py +486 -0
- jarvis/jarvis_agent/main.py +6 -12
- jarvis/jarvis_agent/memory_manager.py +7 -16
- jarvis/jarvis_agent/methodology_share_manager.py +10 -16
- jarvis/jarvis_agent/prompt_manager.py +1 -1
- jarvis/jarvis_agent/prompts.py +193 -171
- jarvis/jarvis_agent/protocols.py +8 -12
- jarvis/jarvis_agent/run_loop.py +77 -14
- jarvis/jarvis_agent/session_manager.py +2 -3
- jarvis/jarvis_agent/share_manager.py +12 -21
- jarvis/jarvis_agent/shell_input_handler.py +1 -2
- jarvis/jarvis_agent/task_analyzer.py +26 -4
- jarvis/jarvis_agent/task_manager.py +11 -27
- jarvis/jarvis_agent/tool_executor.py +2 -3
- jarvis/jarvis_agent/tool_share_manager.py +12 -24
- jarvis/jarvis_agent/web_server.py +55 -20
- jarvis/jarvis_c2rust/__init__.py +5 -5
- jarvis/jarvis_c2rust/cli.py +461 -499
- jarvis/jarvis_c2rust/collector.py +45 -53
- jarvis/jarvis_c2rust/constants.py +26 -0
- jarvis/jarvis_c2rust/library_replacer.py +264 -132
- jarvis/jarvis_c2rust/llm_module_agent.py +162 -190
- jarvis/jarvis_c2rust/loaders.py +207 -0
- jarvis/jarvis_c2rust/models.py +28 -0
- jarvis/jarvis_c2rust/optimizer.py +1592 -395
- jarvis/jarvis_c2rust/transpiler.py +1722 -1064
- jarvis/jarvis_c2rust/utils.py +385 -0
- jarvis/jarvis_code_agent/build_validation_config.py +2 -3
- jarvis/jarvis_code_agent/code_agent.py +394 -320
- jarvis/jarvis_code_agent/code_analyzer/__init__.py +3 -0
- jarvis/jarvis_code_agent/code_analyzer/build_validator/base.py +4 -0
- jarvis/jarvis_code_agent/code_analyzer/build_validator/cmake.py +17 -2
- jarvis/jarvis_code_agent/code_analyzer/build_validator/fallback.py +3 -0
- jarvis/jarvis_code_agent/code_analyzer/build_validator/go.py +36 -4
- jarvis/jarvis_code_agent/code_analyzer/build_validator/java_gradle.py +9 -0
- jarvis/jarvis_code_agent/code_analyzer/build_validator/java_maven.py +9 -0
- jarvis/jarvis_code_agent/code_analyzer/build_validator/makefile.py +12 -1
- jarvis/jarvis_code_agent/code_analyzer/build_validator/nodejs.py +22 -5
- jarvis/jarvis_code_agent/code_analyzer/build_validator/python.py +57 -32
- jarvis/jarvis_code_agent/code_analyzer/build_validator/rust.py +62 -6
- jarvis/jarvis_code_agent/code_analyzer/build_validator/validator.py +8 -9
- jarvis/jarvis_code_agent/code_analyzer/context_manager.py +290 -5
- jarvis/jarvis_code_agent/code_analyzer/language_support.py +21 -0
- jarvis/jarvis_code_agent/code_analyzer/languages/__init__.py +21 -3
- jarvis/jarvis_code_agent/code_analyzer/languages/c_cpp_language.py +72 -4
- jarvis/jarvis_code_agent/code_analyzer/languages/go_language.py +35 -3
- jarvis/jarvis_code_agent/code_analyzer/languages/java_language.py +212 -0
- jarvis/jarvis_code_agent/code_analyzer/languages/javascript_language.py +254 -0
- jarvis/jarvis_code_agent/code_analyzer/languages/python_language.py +52 -2
- jarvis/jarvis_code_agent/code_analyzer/languages/rust_language.py +73 -1
- jarvis/jarvis_code_agent/code_analyzer/languages/typescript_language.py +280 -0
- jarvis/jarvis_code_agent/code_analyzer/llm_context_recommender.py +306 -152
- jarvis/jarvis_code_agent/code_analyzer/structured_code.py +556 -0
- jarvis/jarvis_code_agent/code_analyzer/symbol_extractor.py +193 -18
- jarvis/jarvis_code_agent/code_analyzer/tree_sitter_extractor.py +18 -8
- jarvis/jarvis_code_agent/lint.py +258 -27
- jarvis/jarvis_code_agent/utils.py +0 -1
- jarvis/jarvis_code_analysis/code_review.py +19 -24
- jarvis/jarvis_data/config_schema.json +53 -26
- jarvis/jarvis_git_squash/main.py +4 -5
- jarvis/jarvis_git_utils/git_commiter.py +44 -49
- jarvis/jarvis_mcp/sse_mcp_client.py +20 -27
- jarvis/jarvis_mcp/stdio_mcp_client.py +11 -12
- jarvis/jarvis_mcp/streamable_mcp_client.py +15 -14
- jarvis/jarvis_memory_organizer/memory_organizer.py +55 -74
- jarvis/jarvis_methodology/main.py +32 -48
- jarvis/jarvis_multi_agent/__init__.py +79 -61
- jarvis/jarvis_multi_agent/main.py +3 -7
- jarvis/jarvis_platform/base.py +469 -199
- jarvis/jarvis_platform/human.py +7 -8
- jarvis/jarvis_platform/kimi.py +30 -36
- jarvis/jarvis_platform/openai.py +65 -27
- jarvis/jarvis_platform/registry.py +26 -10
- jarvis/jarvis_platform/tongyi.py +24 -25
- jarvis/jarvis_platform/yuanbao.py +31 -42
- jarvis/jarvis_platform_manager/main.py +66 -77
- jarvis/jarvis_platform_manager/service.py +8 -13
- jarvis/jarvis_rag/cli.py +49 -51
- jarvis/jarvis_rag/embedding_manager.py +13 -18
- jarvis/jarvis_rag/llm_interface.py +8 -9
- jarvis/jarvis_rag/query_rewriter.py +10 -21
- jarvis/jarvis_rag/rag_pipeline.py +24 -27
- jarvis/jarvis_rag/reranker.py +4 -5
- jarvis/jarvis_rag/retriever.py +28 -30
- jarvis/jarvis_sec/__init__.py +220 -3520
- jarvis/jarvis_sec/agents.py +143 -0
- jarvis/jarvis_sec/analysis.py +276 -0
- jarvis/jarvis_sec/cli.py +29 -6
- jarvis/jarvis_sec/clustering.py +1439 -0
- jarvis/jarvis_sec/file_manager.py +427 -0
- jarvis/jarvis_sec/parsers.py +73 -0
- jarvis/jarvis_sec/prompts.py +268 -0
- jarvis/jarvis_sec/report.py +83 -4
- jarvis/jarvis_sec/review.py +453 -0
- jarvis/jarvis_sec/utils.py +499 -0
- jarvis/jarvis_sec/verification.py +848 -0
- jarvis/jarvis_sec/workflow.py +7 -0
- jarvis/jarvis_smart_shell/main.py +38 -87
- jarvis/jarvis_stats/cli.py +1 -1
- jarvis/jarvis_stats/stats.py +7 -7
- jarvis/jarvis_stats/storage.py +15 -21
- jarvis/jarvis_tools/clear_memory.py +3 -20
- jarvis/jarvis_tools/cli/main.py +20 -23
- jarvis/jarvis_tools/edit_file.py +1066 -0
- jarvis/jarvis_tools/execute_script.py +42 -21
- jarvis/jarvis_tools/file_analyzer.py +6 -9
- jarvis/jarvis_tools/generate_new_tool.py +11 -20
- jarvis/jarvis_tools/lsp_client.py +1552 -0
- jarvis/jarvis_tools/methodology.py +2 -3
- jarvis/jarvis_tools/read_code.py +1525 -87
- jarvis/jarvis_tools/read_symbols.py +2 -3
- jarvis/jarvis_tools/read_webpage.py +7 -10
- jarvis/jarvis_tools/registry.py +370 -181
- jarvis/jarvis_tools/retrieve_memory.py +20 -19
- jarvis/jarvis_tools/rewrite_file.py +105 -0
- jarvis/jarvis_tools/save_memory.py +3 -15
- jarvis/jarvis_tools/search_web.py +3 -7
- jarvis/jarvis_tools/sub_agent.py +17 -6
- jarvis/jarvis_tools/sub_code_agent.py +14 -16
- jarvis/jarvis_tools/virtual_tty.py +54 -32
- jarvis/jarvis_utils/clipboard.py +7 -10
- jarvis/jarvis_utils/config.py +98 -63
- jarvis/jarvis_utils/embedding.py +5 -5
- jarvis/jarvis_utils/fzf.py +8 -8
- jarvis/jarvis_utils/git_utils.py +81 -67
- jarvis/jarvis_utils/input.py +24 -49
- jarvis/jarvis_utils/jsonnet_compat.py +465 -0
- jarvis/jarvis_utils/methodology.py +33 -35
- jarvis/jarvis_utils/utils.py +245 -202
- {jarvis_ai_assistant-0.7.0.dist-info → jarvis_ai_assistant-0.7.6.dist-info}/METADATA +205 -70
- jarvis_ai_assistant-0.7.6.dist-info/RECORD +218 -0
- jarvis/jarvis_agent/edit_file_handler.py +0 -584
- jarvis/jarvis_agent/rewrite_file_handler.py +0 -141
- jarvis/jarvis_agent/task_planner.py +0 -496
- jarvis/jarvis_platform/ai8.py +0 -332
- jarvis/jarvis_tools/ask_user.py +0 -54
- jarvis_ai_assistant-0.7.0.dist-info/RECORD +0 -192
- {jarvis_ai_assistant-0.7.0.dist-info → jarvis_ai_assistant-0.7.6.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.7.0.dist-info → jarvis_ai_assistant-0.7.6.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.7.0.dist-info → jarvis_ai_assistant-0.7.6.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.7.0.dist-info → jarvis_ai_assistant-0.7.6.dist-info}/top_level.txt +0 -0
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
3
|
+
使用libclang收集头文件中函数名的轻量级工具。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
- Write unique names (de-duplicated, preserving first-seen order) to the specified output file (one per line).
|
|
5
|
+
用途:
|
|
6
|
+
- 给定一个或多个C/C++头文件(.h/.hh/.hpp/.hxx),使用libclang解析每个文件并收集函数名
|
|
7
|
+
- 优先使用限定名称(qualified names),否则回退到非限定名称
|
|
8
|
+
- 将唯一名称(去重并保留首次出现顺序)写入指定输出文件(每行一个)
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
-
|
|
10
|
+
设计:
|
|
11
|
+
- 复用扫描工具:
|
|
13
12
|
- _try_import_libclang()
|
|
14
13
|
- find_compile_commands()
|
|
15
14
|
- load_compile_commands()
|
|
16
|
-
- scan_file()
|
|
17
|
-
-
|
|
18
|
-
-
|
|
15
|
+
- scan_file() (注意: scan_file只收集定义;内联头文件通常是定义)
|
|
16
|
+
- 如果存在compile_commands.json,使用其参数;否则回退到包含文件父目录的最小参数集
|
|
17
|
+
- 对于头文件解析,确保语言标志(-x c-header / -x c++-header)存在,如果参数中未指定
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
19
|
+
注意事项:
|
|
20
|
+
- 本模块注重正确性/鲁棒性而非性能
|
|
21
|
+
- 不尝试发现传递包含;仅通过添加-I <file.parent>来辅助解析器
|
|
23
22
|
"""
|
|
24
|
-
|
|
25
23
|
from __future__ import annotations
|
|
26
24
|
|
|
27
25
|
from pathlib import Path
|
|
@@ -41,27 +39,26 @@ HEADER_EXTS = {".h", ".hh", ".hpp", ".hxx"}
|
|
|
41
39
|
|
|
42
40
|
def _guess_lang_header_flag(file: Path) -> List[str]:
|
|
43
41
|
"""
|
|
44
|
-
|
|
42
|
+
如果编译参数中未指定,则猜测头文件合适的-x语言标志
|
|
45
43
|
"""
|
|
46
44
|
ext = file.suffix.lower()
|
|
47
45
|
if ext in {".hh", ".hpp", ".hxx"}:
|
|
48
46
|
return ["-x", "c++-header"]
|
|
49
|
-
#
|
|
47
|
+
# 对于.h文件默认使用C头文件(保守选择)
|
|
50
48
|
return ["-x", "c-header"]
|
|
51
49
|
|
|
52
|
-
|
|
53
50
|
def _ensure_parse_args_for_header(file: Path, base_args: Optional[List[str]]) -> List[str]:
|
|
54
51
|
"""
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
52
|
+
确保头文件解析所需的最小参数集:
|
|
53
|
+
- 通过-I包含file.parent目录
|
|
54
|
+
- 如果没有语言标志则添加-x c-header/c++-header
|
|
58
55
|
"""
|
|
59
56
|
args = list(base_args or [])
|
|
60
|
-
#
|
|
57
|
+
# 检测是否已存在语言标志(-x <lang>)
|
|
61
58
|
has_lang = False
|
|
62
59
|
for i, a in enumerate(args):
|
|
63
60
|
if a == "-x":
|
|
64
|
-
#
|
|
61
|
+
# 如果存在'-x'且后面有值,则认为已指定语言
|
|
65
62
|
if i + 1 < len(args):
|
|
66
63
|
has_lang = True
|
|
67
64
|
break
|
|
@@ -72,7 +69,7 @@ def _ensure_parse_args_for_header(file: Path, base_args: Optional[List[str]]) ->
|
|
|
72
69
|
if not has_lang:
|
|
73
70
|
args.extend(_guess_lang_header_flag(file))
|
|
74
71
|
|
|
75
|
-
#
|
|
72
|
+
# 确保存在-I <file.parent>
|
|
76
73
|
inc_dir = str(file.parent)
|
|
77
74
|
has_inc = False
|
|
78
75
|
i = 0
|
|
@@ -85,7 +82,7 @@ def _ensure_parse_args_for_header(file: Path, base_args: Optional[List[str]]) ->
|
|
|
85
82
|
i += 2
|
|
86
83
|
continue
|
|
87
84
|
elif a.startswith("-I"):
|
|
88
|
-
#
|
|
85
|
+
# 可能是-I/path格式
|
|
89
86
|
if a[2:] == inc_dir:
|
|
90
87
|
has_inc = True
|
|
91
88
|
break
|
|
@@ -95,11 +92,10 @@ def _ensure_parse_args_for_header(file: Path, base_args: Optional[List[str]]) ->
|
|
|
95
92
|
|
|
96
93
|
return args
|
|
97
94
|
|
|
98
|
-
|
|
99
95
|
def _collect_decl_function_names(cindex, file: Path, args: List[str]) -> List[str]:
|
|
100
96
|
"""
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
对于没有内联定义的头文件的回退方案:
|
|
98
|
+
收集此头文件中定义的函数声明(原型/方法)
|
|
103
99
|
"""
|
|
104
100
|
try:
|
|
105
101
|
index = cindex.Index.create()
|
|
@@ -137,25 +133,24 @@ def _collect_decl_function_names(cindex, file: Path, args: List[str]) -> List[st
|
|
|
137
133
|
pass
|
|
138
134
|
return names
|
|
139
135
|
|
|
140
|
-
|
|
141
136
|
def collect_function_names(
|
|
142
137
|
files: List[Path],
|
|
143
138
|
out_path: Path,
|
|
144
139
|
compile_commands_root: Optional[Path] = None,
|
|
145
140
|
) -> Path:
|
|
146
141
|
"""
|
|
147
|
-
|
|
142
|
+
从给定的头文件中收集函数名并将唯一名称写入out_path
|
|
148
143
|
|
|
149
|
-
|
|
150
|
-
- files:
|
|
151
|
-
- out_path:
|
|
152
|
-
- compile_commands_root:
|
|
153
|
-
|
|
144
|
+
参数:
|
|
145
|
+
- files: 头文件路径列表(.h/.hh/.hpp/.hxx)。非头文件将被跳过
|
|
146
|
+
- out_path: 输出文件路径。将被创建(包括父目录)并覆盖
|
|
147
|
+
- compile_commands_root: 可选,搜索compile_commands.json的根目录
|
|
148
|
+
如果未提供,则从每个文件的目录向上搜索
|
|
154
149
|
|
|
155
|
-
|
|
156
|
-
-
|
|
150
|
+
返回值:
|
|
151
|
+
- 写入的out_path路径
|
|
157
152
|
"""
|
|
158
|
-
#
|
|
153
|
+
# 标准化和过滤头文件
|
|
159
154
|
hdrs: List[Path] = []
|
|
160
155
|
for p in files or []:
|
|
161
156
|
try:
|
|
@@ -166,30 +161,30 @@ def collect_function_names(
|
|
|
166
161
|
hdrs.append(fp)
|
|
167
162
|
|
|
168
163
|
if not hdrs:
|
|
169
|
-
raise ValueError("
|
|
164
|
+
raise ValueError("未提供有效的头文件(.h/.hh/.hpp/.hxx)")
|
|
170
165
|
|
|
171
|
-
#
|
|
166
|
+
# 准备libclang
|
|
172
167
|
cindex = _try_import_libclang()
|
|
173
168
|
if cindex is None:
|
|
174
169
|
from clang import cindex as _ci # type: ignore
|
|
175
170
|
cindex = _ci
|
|
176
171
|
|
|
177
|
-
#
|
|
172
|
+
# 准备compile_commands参数映射(如果提供了根目录则全局一次,否则每个文件单独处理)
|
|
178
173
|
cc_args_map_global: Optional[Dict[str, List[str]]] = None
|
|
179
174
|
if compile_commands_root is not None:
|
|
180
175
|
cc_file = find_compile_commands(Path(compile_commands_root))
|
|
181
176
|
if cc_file:
|
|
182
177
|
cc_args_map_global = load_compile_commands(cc_file)
|
|
183
178
|
|
|
184
|
-
#
|
|
179
|
+
# 收集名称(保持顺序)
|
|
185
180
|
seen = set()
|
|
186
181
|
ordered_names: List[str] = []
|
|
187
182
|
|
|
188
183
|
for hf in hdrs:
|
|
189
|
-
#
|
|
184
|
+
# 确定此文件的参数
|
|
190
185
|
cc_args_map = cc_args_map_global
|
|
191
186
|
if cc_args_map is None:
|
|
192
|
-
#
|
|
187
|
+
# 尝试在此文件附近查找compile_commands.json
|
|
193
188
|
cc_file_local = find_compile_commands(hf.parent)
|
|
194
189
|
if cc_file_local:
|
|
195
190
|
try:
|
|
@@ -205,7 +200,7 @@ def collect_function_names(
|
|
|
205
200
|
|
|
206
201
|
args = _ensure_parse_args_for_header(hf, base_args)
|
|
207
202
|
|
|
208
|
-
#
|
|
203
|
+
# 尝试扫描。如果出错,尝试使用最小参数集的回退方案
|
|
209
204
|
try:
|
|
210
205
|
funcs = scan_file(cindex, hf, args)
|
|
211
206
|
except Exception:
|
|
@@ -214,7 +209,7 @@ def collect_function_names(
|
|
|
214
209
|
except Exception:
|
|
215
210
|
funcs = []
|
|
216
211
|
|
|
217
|
-
#
|
|
212
|
+
# 从定义中提取首选名称(qualified_name或name)
|
|
218
213
|
added_count = 0
|
|
219
214
|
for fn in funcs:
|
|
220
215
|
name = ""
|
|
@@ -231,7 +226,7 @@ def collect_function_names(
|
|
|
231
226
|
ordered_names.append(name)
|
|
232
227
|
added_count += 1
|
|
233
228
|
|
|
234
|
-
#
|
|
229
|
+
# 回退: 如果在此头文件中未找到定义,则收集声明
|
|
235
230
|
if not funcs or added_count == 0:
|
|
236
231
|
try:
|
|
237
232
|
decl_names = _collect_decl_function_names(cindex, hf, args)
|
|
@@ -244,15 +239,12 @@ def collect_function_names(
|
|
|
244
239
|
seen.add(name)
|
|
245
240
|
ordered_names.append(name)
|
|
246
241
|
|
|
247
|
-
#
|
|
242
|
+
# 写出文件(每行一个)
|
|
248
243
|
out_path = Path(out_path)
|
|
249
244
|
out_path.parent.mkdir(parents=True, exist_ok=True)
|
|
250
245
|
try:
|
|
251
246
|
out_path.write_text("\n".join(ordered_names) + ("\n" if ordered_names else ""), encoding="utf-8")
|
|
252
247
|
except Exception as e:
|
|
253
|
-
raise RuntimeError(f"
|
|
254
|
-
|
|
255
|
-
return out_path
|
|
256
|
-
|
|
248
|
+
raise RuntimeError(f"写入输出文件失败: {out_path}: {e}")
|
|
257
249
|
|
|
258
|
-
|
|
250
|
+
return out_path
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
C2Rust 转译器常量定义
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# 数据文件常量
|
|
7
|
+
C2RUST_DIRNAME = ".jarvis/c2rust"
|
|
8
|
+
|
|
9
|
+
SYMBOLS_JSONL = "symbols.jsonl"
|
|
10
|
+
ORDER_JSONL = "translation_order.jsonl"
|
|
11
|
+
PROGRESS_JSON = "progress.json"
|
|
12
|
+
CONFIG_JSON = "config.json"
|
|
13
|
+
SYMBOL_MAP_JSONL = "symbol_map.jsonl"
|
|
14
|
+
|
|
15
|
+
# 配置常量
|
|
16
|
+
ERROR_SUMMARY_MAX_LENGTH = 2000 # 错误信息摘要最大长度
|
|
17
|
+
DEFAULT_PLAN_MAX_RETRIES = 0 # 规划阶段默认最大重试次数(0表示无限重试)
|
|
18
|
+
DEFAULT_REVIEW_MAX_ITERATIONS = 0 # 审查阶段最大迭代次数(0表示无限重试)
|
|
19
|
+
DEFAULT_CHECK_MAX_RETRIES = 0 # cargo check 阶段默认最大重试次数(0表示无限重试)
|
|
20
|
+
DEFAULT_TEST_MAX_RETRIES = 0 # cargo test 阶段默认最大重试次数(0表示无限重试)
|
|
21
|
+
|
|
22
|
+
# 回退与重试常量
|
|
23
|
+
CONSECUTIVE_FIX_FAILURE_THRESHOLD = 10 # 连续修复失败次数阈值,达到此值将触发回退
|
|
24
|
+
MAX_FUNCTION_RETRIES = 10 # 函数重新开始处理的最大次数
|
|
25
|
+
DEFAULT_PLAN_MAX_RETRIES_ENTRY = 5 # run_transpile 入口函数的 plan_max_retries 默认值
|
|
26
|
+
|