uni-diff-patch 0.0.3__py3-none-any.whl → 0.0.5__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.
- uni_diff_patch/server.py +13 -2
- {uni_diff_patch-0.0.3.dist-info → uni_diff_patch-0.0.5.dist-info}/METADATA +2 -2
- {uni_diff_patch-0.0.3.dist-info → uni_diff_patch-0.0.5.dist-info}/RECORD +5 -5
- {uni_diff_patch-0.0.3.dist-info → uni_diff_patch-0.0.5.dist-info}/WHEEL +1 -1
- {uni_diff_patch-0.0.3.dist-info → uni_diff_patch-0.0.5.dist-info}/entry_points.txt +0 -0
uni_diff_patch/server.py
CHANGED
|
@@ -66,8 +66,19 @@ def generate_patch_tool(
|
|
|
66
66
|
) -> dict:
|
|
67
67
|
"""Generate a valid unified diff patch from structured file changes.
|
|
68
68
|
|
|
69
|
-
Each change object must
|
|
70
|
-
|
|
69
|
+
Each change object must include a "mode" field and its mode-specific fields.
|
|
70
|
+
Use EXACT field names listed below — no aliases accepted.
|
|
71
|
+
|
|
72
|
+
Supported modes and required fields:
|
|
73
|
+
- file_content: file_path, new_content (full new file content; reads original from disk)
|
|
74
|
+
- search_replace: file_path, replacements (list of {search, replace, line_hint?})
|
|
75
|
+
- create_file: file_path, new_content (content for the new file)
|
|
76
|
+
- delete_file: file_path
|
|
77
|
+
- text_pair: file_path, old_text, new_text (both sides provided directly)
|
|
78
|
+
- rename_file: file_path (old path), new_path, new_content? (optional content change)
|
|
79
|
+
- chmod: file_path, old_mode, new_mode, new_content? (optional content change)
|
|
80
|
+
|
|
81
|
+
Optional shared fields: encoding (default "utf-8"), context_lines (default 3).
|
|
71
82
|
|
|
72
83
|
Args:
|
|
73
84
|
changes: Array of change objects (discriminated by "mode" field).
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: uni-diff-patch
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
4
4
|
Summary: MCP server and CLI tool for generating valid unified diff patches deterministically
|
|
5
5
|
Author: LimLLL
|
|
6
6
|
Author-email: LimLLL <github@awebapp.useforall.com>
|
|
7
7
|
Requires-Dist: mpatch
|
|
8
|
-
Requires-Dist: mcp[cli]
|
|
8
|
+
Requires-Dist: mcp[cli]>=1.28,<2.0
|
|
9
9
|
Requires-Dist: click
|
|
10
10
|
Requires-Dist: pydantic>=2.13.4
|
|
11
11
|
Requires-Python: >=3.12
|
|
@@ -6,8 +6,8 @@ uni_diff_patch/core/search_replace.py,sha256=kwUfr-SqB9oZJwXK0A3LOEmccXi_fx5SGQD
|
|
|
6
6
|
uni_diff_patch/core/validator.py,sha256=ZXO5xNCGNu1MjWr2r3xgWQA7mmMwAiWl03Rn-vBqnBk,7160
|
|
7
7
|
uni_diff_patch/models.py,sha256=M7PcWRcUWUz0CO8MK7z5CDwYxpoN-MCmihvAq7zH9x0,6154
|
|
8
8
|
uni_diff_patch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
uni_diff_patch/server.py,sha256=
|
|
10
|
-
uni_diff_patch-0.0.
|
|
11
|
-
uni_diff_patch-0.0.
|
|
12
|
-
uni_diff_patch-0.0.
|
|
13
|
-
uni_diff_patch-0.0.
|
|
9
|
+
uni_diff_patch/server.py,sha256=F377tvVLomnCfeB_owc4VkH5v-cuJPEVWvOTErfR81g,5660
|
|
10
|
+
uni_diff_patch-0.0.5.dist-info/WHEEL,sha256=lrO5MD1WVAWzcbNy_L2BwtfPrcM3KfUFpbKYXLkJX4A,80
|
|
11
|
+
uni_diff_patch-0.0.5.dist-info/entry_points.txt,sha256=SMaBpCbADshKmWiXYPpy_PSVvKWf0KQcwNJXi_FIsoM,60
|
|
12
|
+
uni_diff_patch-0.0.5.dist-info/METADATA,sha256=3O5D6VUr5qDTJy7j6F0xpX_-b1ROYapZi9ErVIm8aKk,4881
|
|
13
|
+
uni_diff_patch-0.0.5.dist-info/RECORD,,
|
|
File without changes
|