auto-coder 0.1.338__py3-none-any.whl → 0.1.339__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.
Potentially problematic release.
This version of auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.338.dist-info → auto_coder-0.1.339.dist-info}/METADATA +1 -1
- {auto_coder-0.1.338.dist-info → auto_coder-0.1.339.dist-info}/RECORD +9 -9
- autocoder/common/v2/agent/agentic_edit.py +31 -43
- autocoder/common/v2/agent/agentic_tool_display.py +1 -1
- autocoder/version.py +1 -1
- {auto_coder-0.1.338.dist-info → auto_coder-0.1.339.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.338.dist-info → auto_coder-0.1.339.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.338.dist-info → auto_coder-0.1.339.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.338.dist-info → auto_coder-0.1.339.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@ autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,1
|
|
|
14
14
|
autocoder/lang.py,sha256=PFtATuOhHRnfpqHQkXr6p4C893JvpsgwTMif3l-GEi0,14321
|
|
15
15
|
autocoder/models.py,sha256=_SCar82QIeBFTZZBdM2jPS6atKVhHnvE0gX3V0CsxD4,11590
|
|
16
16
|
autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
|
|
17
|
-
autocoder/version.py,sha256
|
|
17
|
+
autocoder/version.py,sha256=-seC5wEXkr8QKedh44SePAzcBOumRQcM3gKZh2mLQy0,23
|
|
18
18
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
autocoder/agent/agentic_edit.py,sha256=XsfePZ-t6M-uBSdG1VLZXk1goqXk2HPeJ_A8IYyBuWQ,58896
|
|
20
20
|
autocoder/agent/agentic_edit_types.py,sha256=oFcDd_cxJ2yH9Ed1uTpD3BipudgoIEWDMPb5pAkq4gI,3288
|
|
@@ -126,10 +126,10 @@ autocoder/common/v2/code_editblock_manager.py,sha256=G0CIuV9Ki0FqMLnpA8nBT4pnkCN
|
|
|
126
126
|
autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
|
|
127
127
|
autocoder/common/v2/code_strict_diff_manager.py,sha256=v-J1kDyLg7tLGg_6_lbO9S4fNkx7M_L8Xr2G7fPptiU,9347
|
|
128
128
|
autocoder/common/v2/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
|
-
autocoder/common/v2/agent/agentic_edit.py,sha256=
|
|
129
|
+
autocoder/common/v2/agent/agentic_edit.py,sha256=KnnzwDb54ptMtFgvGjCTOuzHd0Er4LRDuOeHHSLT9qY,88698
|
|
130
130
|
autocoder/common/v2/agent/agentic_edit_conversation.py,sha256=2GZrw5f8Sh9GgUDnuFc2v7Q4syrm77kKEfXI6k6uEFY,7310
|
|
131
131
|
autocoder/common/v2/agent/agentic_edit_types.py,sha256=6qBLLmvdlcsbzrpMHsYQVIHqbOWubMXOnmkqTs1pBWQ,4629
|
|
132
|
-
autocoder/common/v2/agent/agentic_tool_display.py,sha256=
|
|
132
|
+
autocoder/common/v2/agent/agentic_tool_display.py,sha256=WKirt-2V346KLnbHgH3NVJiK3xvriD9oaCWj2IdvzLU,7309
|
|
133
133
|
autocoder/common/v2/agent/agentic_edit_tools/__init__.py,sha256=wGICCc1dYh07osB21j62zOQ9Ws0PyyOQ12UYRHmHrtI,1229
|
|
134
134
|
autocoder/common/v2/agent/agentic_edit_tools/ask_followup_question_tool_resolver.py,sha256=pjrukXjWXMIfUAUzoHzr7j2Onf1L7bxmjsUR1gGaFoA,2809
|
|
135
135
|
autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py,sha256=82ZGKeRBSDKeead_XVBW4FxpiE-5dS7tBOk_3RZ6B5s,1511
|
|
@@ -276,9 +276,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
276
276
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
277
277
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=KW0mlmcHlStXi8-_6fXZ2-ifeJ5mgP0OV7DQFzCtIsw,14008
|
|
278
278
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
279
|
-
auto_coder-0.1.
|
|
280
|
-
auto_coder-0.1.
|
|
281
|
-
auto_coder-0.1.
|
|
282
|
-
auto_coder-0.1.
|
|
283
|
-
auto_coder-0.1.
|
|
284
|
-
auto_coder-0.1.
|
|
279
|
+
auto_coder-0.1.339.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
280
|
+
auto_coder-0.1.339.dist-info/METADATA,sha256=MnX-I9AFRF5xVGXxuurajWhBPbN6GwMpfyx4aOZK4do,2747
|
|
281
|
+
auto_coder-0.1.339.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
282
|
+
auto_coder-0.1.339.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
283
|
+
auto_coder-0.1.339.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
284
|
+
auto_coder-0.1.339.dist-info/RECORD,,
|
|
@@ -126,17 +126,17 @@ class AgenticEdit:
|
|
|
126
126
|
self.shadow_manager, verbose=False)
|
|
127
127
|
|
|
128
128
|
self.mcp_server_info = ""
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
try:
|
|
130
|
+
self.mcp_server = get_mcp_server()
|
|
131
|
+
mcp_server_info_response = self.mcp_server.send_request(
|
|
132
|
+
McpServerInfoRequest(
|
|
133
|
+
model=args.inference_model or args.model,
|
|
134
|
+
product_mode=args.product_mode,
|
|
135
|
+
)
|
|
136
|
+
)
|
|
137
|
+
self.mcp_server_info = mcp_server_info_response.result
|
|
138
|
+
except Exception as e:
|
|
139
|
+
logger.error(f"Error getting MCP server info: {str(e)}")
|
|
140
140
|
|
|
141
141
|
# 变更跟踪信息
|
|
142
142
|
# 格式: { file_path: FileChangeEntry(...) }
|
|
@@ -386,7 +386,7 @@ class AgenticEdit:
|
|
|
386
386
|
</options>
|
|
387
387
|
</plan_mode_respond>
|
|
388
388
|
|
|
389
|
-
##
|
|
389
|
+
## mcp_tool
|
|
390
390
|
Description: Request to execute a tool via the Model Context Protocol (MCP) server. Use this when you need to execute a tool that is not natively supported by the agentic edit tools.
|
|
391
391
|
Parameters:
|
|
392
392
|
- server_name: (optional) The name of the MCP server to use. If not provided, the tool will automatically choose the best server based on the query.
|
|
@@ -472,24 +472,13 @@ class AgenticEdit:
|
|
|
472
472
|
</diff>
|
|
473
473
|
</replace_in_file>
|
|
474
474
|
|
|
475
|
-
## Example 4: Another example of using an MCP tool (where the server name is a unique identifier
|
|
475
|
+
## Example 4: Another example of using an MCP tool (where the server name is a unique identifier listed in MCP_SERVER_LIST)
|
|
476
476
|
|
|
477
477
|
<use_mcp_tool>
|
|
478
|
-
<server_name>github
|
|
478
|
+
<server_name>github</server_name>
|
|
479
479
|
<tool_name>create_issue</tool_name>
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
"owner": "octocat",
|
|
483
|
-
"repo": "hello-world",
|
|
484
|
-
"title": "Found a bug",
|
|
485
|
-
"body": "I'm having a problem with this.",
|
|
486
|
-
"labels": ["bug", "help wanted"],
|
|
487
|
-
"assignees": ["octocat"]
|
|
488
|
-
}
|
|
489
|
-
</arguments>
|
|
490
|
-
</use_mcp_tool>`
|
|
491
|
-
: ""
|
|
492
|
-
}
|
|
480
|
+
<query>ower is octocat, repo is hello-world, title is Found a bug, body is I'm having a problem with this. labels is "bug" and "help wanted",assignees is "octocat"</query>
|
|
481
|
+
</use_mcp_tool>
|
|
493
482
|
|
|
494
483
|
# Tool Use Guidelines
|
|
495
484
|
|
|
@@ -669,12 +658,12 @@ class AgenticEdit:
|
|
|
669
658
|
4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user. You may also provide a CLI command to showcase the result of your task; this can be particularly useful for web development tasks, where you can run e.g. \`open index.html\` to show the website you've built.
|
|
670
659
|
5. The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.
|
|
671
660
|
|
|
672
|
-
{
|
|
661
|
+
{% if enable_active_context %}
|
|
673
662
|
**Very Important Notice**
|
|
674
663
|
Each directory has a description file stored separately. For example, the description for the directory `{{ current_project }}/src/abc/bbc` can be found in the file `{{ current_project }}/.auto-coder/active-context/src/abc/bbc/active.md`.
|
|
675
664
|
You can use the tool `read_file` to read these description files, which helps you decide exactly which files need detailed attention. Note that the `active.md` file does not contain information about all files within the directory—it only includes information
|
|
676
665
|
about the files that were recently changed.
|
|
677
|
-
{
|
|
666
|
+
{% endif %}
|
|
678
667
|
"""
|
|
679
668
|
env_info = detect_env()
|
|
680
669
|
shell_type = "bash"
|
|
@@ -744,8 +733,8 @@ class AgenticEdit:
|
|
|
744
733
|
Analyzes the user request, interacts with the LLM, parses responses,
|
|
745
734
|
executes tools, and yields structured events for visualization until completion or error.
|
|
746
735
|
"""
|
|
747
|
-
system_prompt = self._analyze.prompt(request)
|
|
748
|
-
|
|
736
|
+
system_prompt = self._analyze.prompt(request)
|
|
737
|
+
# print(system_prompt)
|
|
749
738
|
conversations = [
|
|
750
739
|
{"role": "system", "content": system_prompt},
|
|
751
740
|
] + self.conversation_manager.get_history()
|
|
@@ -946,19 +935,18 @@ class AgenticEdit:
|
|
|
946
935
|
params['requires_approval'] = params['requires_approval'].lower(
|
|
947
936
|
) == 'true'
|
|
948
937
|
# Attempt to handle JSON parsing for arguments in use_mcp_tool
|
|
949
|
-
if tool_tag == 'use_mcp_tool' and '
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
938
|
+
# if tool_tag == 'use_mcp_tool' and 'query' in params:
|
|
939
|
+
# try:
|
|
940
|
+
# params['arguments'] = json.loads(
|
|
941
|
+
# params['arguments'])
|
|
942
|
+
# except json.JSONDecodeError:
|
|
943
|
+
# logger.warning(
|
|
944
|
+
# f"Could not decode JSON arguments for use_mcp_tool: {params['arguments']}")
|
|
945
|
+
# # Keep as string or handle error? Let's keep as string for now.
|
|
946
|
+
# pass
|
|
958
947
|
# Handle recursive for list_files
|
|
959
948
|
if tool_tag == 'list_files' and 'recursive' in params:
|
|
960
|
-
params['recursive'] = params['recursive'].lower() == 'true'
|
|
961
|
-
|
|
949
|
+
params['recursive'] = params['recursive'].lower() == 'true'
|
|
962
950
|
return tool_cls(**params)
|
|
963
951
|
else:
|
|
964
952
|
logger.error(f"Tool class not found for tag: {tool_tag}")
|
|
@@ -996,7 +984,7 @@ class AgenticEdit:
|
|
|
996
984
|
break
|
|
997
985
|
|
|
998
986
|
# 2. Check for </tool_tag> if inside tool block
|
|
999
|
-
elif in_tool_block:
|
|
987
|
+
elif in_tool_block:
|
|
1000
988
|
end_tag = f"</{current_tool_tag}>"
|
|
1001
989
|
end_tool_pos = buffer.find(end_tag)
|
|
1002
990
|
if end_tool_pos != -1:
|
|
@@ -165,7 +165,7 @@ def get_tool_display_message(tool: BaseTool) -> str:
|
|
|
165
165
|
"options_text": options_text_zh if lang == 'zh' else options_text_en
|
|
166
166
|
}
|
|
167
167
|
elif isinstance(tool, UseMcpTool):
|
|
168
|
-
args_str =
|
|
168
|
+
args_str = tool.query
|
|
169
169
|
snippet = args_str[:100]
|
|
170
170
|
context = {
|
|
171
171
|
"server_name": tool.server_name,
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.339"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|