wcgw 2.5.0__tar.gz → 2.6.2__tar.gz

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 wcgw might be problematic. Click here for more details.

Files changed (130) hide show
  1. {wcgw-2.5.0 → wcgw-2.6.2}/.github/workflows/python-tests.yml +8 -2
  2. {wcgw-2.5.0 → wcgw-2.6.2}/.vscode/settings.json +7 -0
  3. wcgw-2.6.2/LICENSE +213 -0
  4. {wcgw-2.5.0 → wcgw-2.6.2}/PKG-INFO +18 -54
  5. {wcgw-2.5.0 → wcgw-2.6.2}/README.md +16 -53
  6. {wcgw-2.5.0 → wcgw-2.6.2}/gpt_action_json_schema.json +17 -16
  7. {wcgw-2.5.0 → wcgw-2.6.2}/gpt_instructions.txt +6 -1
  8. {wcgw-2.5.0 → wcgw-2.6.2}/pyproject.toml +9 -1
  9. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/mcp_server/server.py +34 -29
  10. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/openai_client.py +17 -29
  11. wcgw-2.6.2/src/wcgw/client/repo_ops/display_tree.py +127 -0
  12. wcgw-2.6.2/src/wcgw/client/repo_ops/path_prob.py +58 -0
  13. wcgw-2.6.2/src/wcgw/client/repo_ops/paths_model.vocab +20000 -0
  14. wcgw-2.6.2/src/wcgw/client/repo_ops/paths_tokens.model +80042 -0
  15. wcgw-2.6.2/src/wcgw/client/repo_ops/repo_context.py +148 -0
  16. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/tools.py +72 -43
  17. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/types_.py +12 -9
  18. wcgw-2.6.2/tests/client/repo_ops/__init__.py +0 -0
  19. wcgw-2.6.2/tests/client/repo_ops/test_display_tree.py +152 -0
  20. wcgw-2.6.2/tests/client/repo_ops/test_display_tree_simple.py +62 -0
  21. wcgw-2.6.2/tests/client/repo_ops/test_path_prob.py +115 -0
  22. wcgw-2.6.2/tests/client/repo_ops/test_repo_context.py +150 -0
  23. wcgw-2.6.2/tests/client/test_anthropic_client_utils.py +103 -0
  24. wcgw-2.6.2/tests/client/test_openai_utils.py +101 -0
  25. wcgw-2.6.2/tests/client/test_tools_basic.py +57 -0
  26. wcgw-2.6.2/tests/client/test_tools_extended.py +597 -0
  27. wcgw-2.6.2/tests/test_anthropic_client.py +88 -0
  28. wcgw-2.6.2/tests/test_common.py +111 -0
  29. wcgw-2.6.2/tests/test_computer_use.py +142 -0
  30. wcgw-2.6.2/tests/test_computer_use_base.py +123 -0
  31. wcgw-2.6.2/tests/test_computer_use_shell.py +120 -0
  32. wcgw-2.6.2/tests/test_sys_utils.py +102 -0
  33. {wcgw-2.5.0 → wcgw-2.6.2}/tests/test_tools.py +2 -2
  34. {wcgw-2.5.0 → wcgw-2.6.2}/uv.lock +211 -3
  35. wcgw-2.5.0/LICENSE +0 -243
  36. {wcgw-2.5.0 → wcgw-2.6.2}/.github/workflows/python-publish.yml +0 -0
  37. {wcgw-2.5.0 → wcgw-2.6.2}/.github/workflows/python-types.yml +0 -0
  38. {wcgw-2.5.0 → wcgw-2.6.2}/.gitignore +0 -0
  39. {wcgw-2.5.0 → wcgw-2.6.2}/.gitmodules +0 -0
  40. {wcgw-2.5.0 → wcgw-2.6.2}/.python-version +0 -0
  41. {wcgw-2.5.0 → wcgw-2.6.2}/openai.md +0 -0
  42. {wcgw-2.5.0 → wcgw-2.6.2}/src/__init__.py +0 -0
  43. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.git +0 -0
  44. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  45. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  46. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.github/workflows/main-checks.yml +0 -0
  47. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.github/workflows/publish-pypi.yml +0 -0
  48. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.github/workflows/pull-request-checks.yml +0 -0
  49. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.github/workflows/shared.yml +0 -0
  50. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.gitignore +0 -0
  51. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/.python-version +0 -0
  52. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/CODE_OF_CONDUCT.md +0 -0
  53. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/CONTRIBUTING.md +0 -0
  54. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/LICENSE +0 -0
  55. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/README.md +0 -0
  56. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/RELEASE.md +0 -0
  57. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/SECURITY.md +0 -0
  58. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/README.md +0 -0
  59. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-prompt/.python-version +0 -0
  60. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-prompt/README.md +0 -0
  61. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-prompt/mcp_simple_prompt/__init__.py +0 -0
  62. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-prompt/mcp_simple_prompt/__main__.py +0 -0
  63. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-prompt/mcp_simple_prompt/server.py +0 -0
  64. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-prompt/pyproject.toml +0 -0
  65. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-resource/.python-version +0 -0
  66. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-resource/README.md +0 -0
  67. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-resource/mcp_simple_resource/__init__.py +0 -0
  68. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-resource/mcp_simple_resource/__main__.py +0 -0
  69. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-resource/mcp_simple_resource/server.py +0 -0
  70. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-resource/pyproject.toml +0 -0
  71. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-tool/.python-version +0 -0
  72. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-tool/README.md +0 -0
  73. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-tool/mcp_simple_tool/__init__.py +0 -0
  74. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-tool/mcp_simple_tool/__main__.py +0 -0
  75. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-tool/mcp_simple_tool/server.py +0 -0
  76. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/examples/servers/simple-tool/pyproject.toml +0 -0
  77. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/pyproject.toml +0 -0
  78. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/__init__.py +0 -0
  79. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/client/__init__.py +0 -0
  80. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/client/__main__.py +0 -0
  81. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/client/session.py +0 -0
  82. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/client/sse.py +0 -0
  83. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/client/stdio.py +0 -0
  84. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/py.typed +0 -0
  85. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/__init__.py +0 -0
  86. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/__main__.py +0 -0
  87. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/models.py +0 -0
  88. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/session.py +0 -0
  89. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/sse.py +0 -0
  90. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/stdio.py +0 -0
  91. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/server/websocket.py +0 -0
  92. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/__init__.py +0 -0
  93. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/context.py +0 -0
  94. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/exceptions.py +0 -0
  95. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/memory.py +0 -0
  96. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/progress.py +0 -0
  97. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/session.py +0 -0
  98. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/shared/version.py +0 -0
  99. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/src/mcp_wcgw/types.py +0 -0
  100. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/__init__.py +0 -0
  101. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/client/__init__.py +0 -0
  102. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/client/test_session.py +0 -0
  103. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/client/test_stdio.py +0 -0
  104. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/conftest.py +0 -0
  105. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/server/__init__.py +0 -0
  106. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/server/test_session.py +0 -0
  107. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/server/test_stdio.py +0 -0
  108. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/shared/test_memory.py +0 -0
  109. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/tests/test_types.py +0 -0
  110. {wcgw-2.5.0 → wcgw-2.6.2}/src/mcp_wcgw/uv.lock +0 -0
  111. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/__init__.py +0 -0
  112. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/__init__.py +0 -0
  113. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/__main__.py +0 -0
  114. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/anthropic_client.py +0 -0
  115. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/cli.py +0 -0
  116. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/common.py +0 -0
  117. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/computer_use.py +0 -0
  118. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/diff-instructions.txt +0 -0
  119. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/mcp_server/Readme.md +0 -0
  120. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/mcp_server/__init__.py +0 -0
  121. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/openai_utils.py +0 -0
  122. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/client/sys_utils.py +0 -0
  123. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/relay/serve.py +0 -0
  124. {wcgw-2.5.0 → wcgw-2.6.2}/src/wcgw/relay/static/privacy.txt +0 -0
  125. {wcgw-2.5.0 → wcgw-2.6.2}/static/claude-ss.jpg +0 -0
  126. {wcgw-2.5.0 → wcgw-2.6.2}/static/computer-use.jpg +0 -0
  127. {wcgw-2.5.0 → wcgw-2.6.2}/static/example.jpg +0 -0
  128. {wcgw-2.5.0 → wcgw-2.6.2}/static/rocket-icon.png +0 -0
  129. {wcgw-2.5.0 → wcgw-2.6.2}/static/ss1.png +0 -0
  130. {wcgw-2.5.0 → wcgw-2.6.2}/tests/test_basic.py +0 -0
@@ -26,6 +26,12 @@ jobs:
26
26
  run: |
27
27
  pip install uv
28
28
  uv venv --python "${{ matrix.python-version }}"
29
- - name: Run tests
29
+ - name: Run tests with coverage
30
30
  run: |
31
- uv run python -m unittest discover -s tests
31
+ uv pip install pytest pytest-cov
32
+ uv run pytest --cov=wcgw --cov-report=xml --cov-report=term-missing:skip-covered
33
+ - name: Upload coverage reports to Codecov
34
+ uses: codecov/codecov-action@v4
35
+ if: success()
36
+ env:
37
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -14,4 +14,11 @@
14
14
  ],
15
15
  "editor.formatOnSave": true,
16
16
  "editor.renderWhitespace": "selection",
17
+ "[python]": {
18
+ "editor.defaultFormatter": "charliermarsh.ruff",
19
+ "editor.codeActionsOnSave": {
20
+ "source.fixAll": "always",
21
+ "source.organizeImports": "always",
22
+ }
23
+ }
17
24
  }
wcgw-2.6.2/LICENSE ADDED
@@ -0,0 +1,213 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2024] [arusia]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+ ---
204
+
205
+ ## Third Party Components
206
+
207
+ This project includes components from the following third-party projects:
208
+
209
+ 1. The file at `src/wcgw/client/diff-instructions.txt` is substantially modified from **Aider**
210
+ - **Source:** https://github.com/Aider-AI/aider
211
+ - **Original Copyright (c) 2023 Aider-AI**
212
+ - **Licensed under the Apache License, Version 2.0**
213
+ - **Modified version Copyright (c) 2024 arusia**
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wcgw
3
- Version: 2.5.0
3
+ Version: 2.6.2
4
4
  Summary: Shell and coding agent on claude and chatgpt
5
5
  Project-URL: Homepage, https://github.com/rusiaaman/wcgw
6
6
  Author-email: Aman Rusia <gapypi@arcfu.com>
@@ -12,6 +12,7 @@ Requires-Dist: openai>=1.46.0
12
12
  Requires-Dist: petname>=2.6
13
13
  Requires-Dist: pexpect>=4.9.0
14
14
  Requires-Dist: pydantic>=2.9.2
15
+ Requires-Dist: pygit2>=1.16.0
15
16
  Requires-Dist: pyte>=0.8.2
16
17
  Requires-Dist: python-dotenv>=1.0.1
17
18
  Requires-Dist: rich>=13.8.1
@@ -28,7 +29,7 @@ Description-Content-Type: text/markdown
28
29
 
29
30
  # Shell and Coding agent for Claude and Chatgpt
30
31
 
31
- - Claude - An MCP server on claude desktop for autonomous shell, coding and desktop control agent. (mac only)
32
+ - Claude - An MCP server on claude desktop for autonomous shell and coding agent. (mac only)
32
33
  - Chatgpt - Allows custom gpt to talk to your shell via a relay server. (linux or mac)
33
34
 
34
35
 
@@ -37,8 +38,10 @@ Description-Content-Type: text/markdown
37
38
  [![Tests](https://github.com/rusiaaman/wcgw/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/rusiaaman/wcgw/actions/workflows/python-tests.yml)
38
39
  [![Mypy strict](https://github.com/rusiaaman/wcgw/actions/workflows/python-types.yml/badge.svg?branch=main)](https://github.com/rusiaaman/wcgw/actions/workflows/python-types.yml)
39
40
  [![Build](https://github.com/rusiaaman/wcgw/actions/workflows/python-publish.yml/badge.svg)](https://github.com/rusiaaman/wcgw/actions/workflows/python-publish.yml)
41
+ [![codecov](https://codecov.io/gh/rusiaaman/wcgw/graph/badge.svg)](https://codecov.io/gh/rusiaaman/wcgw)
40
42
 
41
43
  ## Updates
44
+ - [29 Dec 2024] Syntax checking on file writing and edits is now stable. Made `initialize` tool call useful; sending smart repo structure to claude if any repo is referenced. Large file handling is also now improved.
42
45
 
43
46
  - [9 Dec 2024] [Vscode extension to paste context on Claude app](https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw)
44
47
 
@@ -48,12 +51,11 @@ Description-Content-Type: text/markdown
48
51
 
49
52
  ## 🚀 Highlights
50
53
 
51
- - ⚡ **Full Shell Access**: No restrictions, complete control.
52
- - ⚡ **Desktop control on Claude**: Screen capture, mouse control, keyboard control on claude desktop (on mac with docker linux)
53
54
  - ⚡ **Create, Execute, Iterate**: Ask claude to keep running compiler checks till all errors are fixed, or ask it to keep checking for the status of a long running command till it's done.
54
55
  - ⚡ **Large file edit**: Supports large file incremental edits to avoid token limit issues. Faster than full file write.
56
+ - ⚡ **Syntax checking on edits**: Reports feedback to the LLM if its edits have any syntax errors, so that it can redo it.
55
57
  - ⚡ **Interactive Command Handling**: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
56
- - ⚡ **REPL support**: [beta] Supports python/node and other REPL execution.
58
+ - ⚡ **Full Shell Access**: No restrictions, complete control.
57
59
 
58
60
  ## Top use cases examples
59
61
 
@@ -70,9 +72,11 @@ Description-Content-Type: text/markdown
70
72
  - Using 'screen' run my server in background instead, then run another api server in bg, finally run the frontend build. Keep checking logs for any issues in all three
71
73
  - Create repo wide unittest cases. Keep iterating through files and creating cases. Also keep running the tests after each update. Do not modify original code.
72
74
 
73
- ## Claude Setup
75
+ ## Claude setup (using mcp)
74
76
 
75
- First install `uv` https://docs.astral.sh/uv/getting-started/installation/#installation-methods
77
+ First install `uv` using homebrew `brew install uv`
78
+
79
+ (**Important:** use homebrew to install uv. Otherwise make sure `uv` is present in a global location like /usr/bin/)
76
80
 
77
81
  Then update `claude_desktop_config.json` (~/Library/Application Support/Claude/claude_desktop_config.json)
78
82
 
@@ -99,53 +103,21 @@ Then restart claude app.
99
103
 
100
104
  _If there's an error in setting up_
101
105
 
102
- - Make sure `uv` in the system PATH by running `uv --version` and also ensure `uv tool run wcgw --version` works globally.
103
- Otherwise, re-install uv and follow instructions to add it into your .zshrc or .bashrc
106
+ - If there's an error like "uv ENOENT", make sure `uv` is installed. Then run 'which uv' in the terminal, and use its output in place of "uv" in the configuration.
104
107
  - If there's still an issue, check that `uv tool run --from wcgw@latest --python 3.12 wcgw_mcp` runs in your terminal. It should have no output and shouldn't exit.
105
108
  - Debug the mcp server using `npx @modelcontextprotocol/inspector@0.1.7 uv tool run --from wcgw@latest --python 3.12 wcgw_mcp`
106
109
 
107
- ### [Optional] Computer use support using desktop on docker
108
-
109
- Computer use is disabled by default. Add `--computer-use` to enable it. This will add necessary tools to Claude including ScreenShot, Mouse and Keyboard control.
110
-
111
- ```json
112
- {
113
- "mcpServers": {
114
- "wcgw": {
115
- "command": "uv",
116
- "args": [
117
- "tool",
118
- "run",
119
- "--from",
120
- "wcgw@latest",
121
- "--python",
122
- "3.12",
123
- "wcgw_mcp",
124
- "--computer-use"
125
- ]
126
- }
127
- }
128
- }
129
- ```
110
+ ### Alternative configuration using smithery (npx required)
111
+ [![smithery badge](https://smithery.ai/badge/wcgw)](https://smithery.ai/server/wcgw)
130
112
 
131
- Claude will be able to connect to any docker container with linux environment. Native system control isn't supported outside docker.
113
+ You need to first install uv using homebrew. `brew install uv`
132
114
 
133
- You'll need to run a docker image with desktop and optional VNC connection. Here's a demo image:
115
+ Then to configure wcgw for Claude Desktop automatically via [Smithery](https://smithery.ai/server/wcgw):
134
116
 
135
- ```sh
136
- docker run -p 6080:6080 ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest
117
+ ```bash
118
+ npx -y @smithery/cli install wcgw --client claude
137
119
  ```
138
120
 
139
- Then ask claude desktop app to control the docker os. It'll connect to the docker container and control it.
140
-
141
- Connect to `http://localhost:6080/vnc.html` for desktop view (VNC) of the system running in the docker.
142
-
143
- The following requirements should be installed and working in the linux docker image:
144
-
145
- 1. Needs `xdotool` to execute commands on the desktop.
146
- 2. Needs `scrot` to take screenshots.
147
- 3. Needs `convert` from imagemagick to convert images.
148
-
149
121
  ### Usage
150
122
 
151
123
  Wait for a few seconds. You should be able to see this icon if everything goes right.
@@ -157,8 +129,6 @@ over here
157
129
 
158
130
  Then ask claude to execute shell commands, read files, edit files, run your code, etc.
159
131
 
160
- If you've run the docker for LLM to access, you can ask it to control the "docker os". If you don't provide the docker container id to it, it'll try to search for available docker using `docker ps` command.
161
-
162
132
 
163
133
  ### [Optional] Vs code extension
164
134
  https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw
@@ -172,12 +142,6 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
172
142
 
173
143
  ## Examples
174
144
 
175
- ### Computer use example
176
-
177
- ![computer-use](https://github.com/rusiaaman/wcgw/blob/main/static/computer-use.jpg?raw=true)
178
-
179
- ### Shell example
180
-
181
145
  ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
182
146
 
183
147
  ## [Optional] Local shell access with openai API key or anthropic API key
@@ -1,6 +1,6 @@
1
1
  # Shell and Coding agent for Claude and Chatgpt
2
2
 
3
- - Claude - An MCP server on claude desktop for autonomous shell, coding and desktop control agent. (mac only)
3
+ - Claude - An MCP server on claude desktop for autonomous shell and coding agent. (mac only)
4
4
  - Chatgpt - Allows custom gpt to talk to your shell via a relay server. (linux or mac)
5
5
 
6
6
 
@@ -9,8 +9,10 @@
9
9
  [![Tests](https://github.com/rusiaaman/wcgw/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/rusiaaman/wcgw/actions/workflows/python-tests.yml)
10
10
  [![Mypy strict](https://github.com/rusiaaman/wcgw/actions/workflows/python-types.yml/badge.svg?branch=main)](https://github.com/rusiaaman/wcgw/actions/workflows/python-types.yml)
11
11
  [![Build](https://github.com/rusiaaman/wcgw/actions/workflows/python-publish.yml/badge.svg)](https://github.com/rusiaaman/wcgw/actions/workflows/python-publish.yml)
12
+ [![codecov](https://codecov.io/gh/rusiaaman/wcgw/graph/badge.svg)](https://codecov.io/gh/rusiaaman/wcgw)
12
13
 
13
14
  ## Updates
15
+ - [29 Dec 2024] Syntax checking on file writing and edits is now stable. Made `initialize` tool call useful; sending smart repo structure to claude if any repo is referenced. Large file handling is also now improved.
14
16
 
15
17
  - [9 Dec 2024] [Vscode extension to paste context on Claude app](https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw)
16
18
 
@@ -20,12 +22,11 @@
20
22
 
21
23
  ## 🚀 Highlights
22
24
 
23
- - ⚡ **Full Shell Access**: No restrictions, complete control.
24
- - ⚡ **Desktop control on Claude**: Screen capture, mouse control, keyboard control on claude desktop (on mac with docker linux)
25
25
  - ⚡ **Create, Execute, Iterate**: Ask claude to keep running compiler checks till all errors are fixed, or ask it to keep checking for the status of a long running command till it's done.
26
26
  - ⚡ **Large file edit**: Supports large file incremental edits to avoid token limit issues. Faster than full file write.
27
+ - ⚡ **Syntax checking on edits**: Reports feedback to the LLM if its edits have any syntax errors, so that it can redo it.
27
28
  - ⚡ **Interactive Command Handling**: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
28
- - ⚡ **REPL support**: [beta] Supports python/node and other REPL execution.
29
+ - ⚡ **Full Shell Access**: No restrictions, complete control.
29
30
 
30
31
  ## Top use cases examples
31
32
 
@@ -42,9 +43,11 @@
42
43
  - Using 'screen' run my server in background instead, then run another api server in bg, finally run the frontend build. Keep checking logs for any issues in all three
43
44
  - Create repo wide unittest cases. Keep iterating through files and creating cases. Also keep running the tests after each update. Do not modify original code.
44
45
 
45
- ## Claude Setup
46
+ ## Claude setup (using mcp)
46
47
 
47
- First install `uv` https://docs.astral.sh/uv/getting-started/installation/#installation-methods
48
+ First install `uv` using homebrew `brew install uv`
49
+
50
+ (**Important:** use homebrew to install uv. Otherwise make sure `uv` is present in a global location like /usr/bin/)
48
51
 
49
52
  Then update `claude_desktop_config.json` (~/Library/Application Support/Claude/claude_desktop_config.json)
50
53
 
@@ -71,53 +74,21 @@ Then restart claude app.
71
74
 
72
75
  _If there's an error in setting up_
73
76
 
74
- - Make sure `uv` in the system PATH by running `uv --version` and also ensure `uv tool run wcgw --version` works globally.
75
- Otherwise, re-install uv and follow instructions to add it into your .zshrc or .bashrc
77
+ - If there's an error like "uv ENOENT", make sure `uv` is installed. Then run 'which uv' in the terminal, and use its output in place of "uv" in the configuration.
76
78
  - If there's still an issue, check that `uv tool run --from wcgw@latest --python 3.12 wcgw_mcp` runs in your terminal. It should have no output and shouldn't exit.
77
79
  - Debug the mcp server using `npx @modelcontextprotocol/inspector@0.1.7 uv tool run --from wcgw@latest --python 3.12 wcgw_mcp`
78
80
 
79
- ### [Optional] Computer use support using desktop on docker
80
-
81
- Computer use is disabled by default. Add `--computer-use` to enable it. This will add necessary tools to Claude including ScreenShot, Mouse and Keyboard control.
82
-
83
- ```json
84
- {
85
- "mcpServers": {
86
- "wcgw": {
87
- "command": "uv",
88
- "args": [
89
- "tool",
90
- "run",
91
- "--from",
92
- "wcgw@latest",
93
- "--python",
94
- "3.12",
95
- "wcgw_mcp",
96
- "--computer-use"
97
- ]
98
- }
99
- }
100
- }
101
- ```
81
+ ### Alternative configuration using smithery (npx required)
82
+ [![smithery badge](https://smithery.ai/badge/wcgw)](https://smithery.ai/server/wcgw)
102
83
 
103
- Claude will be able to connect to any docker container with linux environment. Native system control isn't supported outside docker.
84
+ You need to first install uv using homebrew. `brew install uv`
104
85
 
105
- You'll need to run a docker image with desktop and optional VNC connection. Here's a demo image:
86
+ Then to configure wcgw for Claude Desktop automatically via [Smithery](https://smithery.ai/server/wcgw):
106
87
 
107
- ```sh
108
- docker run -p 6080:6080 ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest
88
+ ```bash
89
+ npx -y @smithery/cli install wcgw --client claude
109
90
  ```
110
91
 
111
- Then ask claude desktop app to control the docker os. It'll connect to the docker container and control it.
112
-
113
- Connect to `http://localhost:6080/vnc.html` for desktop view (VNC) of the system running in the docker.
114
-
115
- The following requirements should be installed and working in the linux docker image:
116
-
117
- 1. Needs `xdotool` to execute commands on the desktop.
118
- 2. Needs `scrot` to take screenshots.
119
- 3. Needs `convert` from imagemagick to convert images.
120
-
121
92
  ### Usage
122
93
 
123
94
  Wait for a few seconds. You should be able to see this icon if everything goes right.
@@ -129,8 +100,6 @@ over here
129
100
 
130
101
  Then ask claude to execute shell commands, read files, edit files, run your code, etc.
131
102
 
132
- If you've run the docker for LLM to access, you can ask it to control the "docker os". If you don't provide the docker container id to it, it'll try to search for available docker using `docker ps` command.
133
-
134
103
 
135
104
  ### [Optional] Vs code extension
136
105
  https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw
@@ -144,12 +113,6 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
144
113
 
145
114
  ## Examples
146
115
 
147
- ### Computer use example
148
-
149
- ![computer-use](https://github.com/rusiaaman/wcgw/blob/main/static/computer-use.jpg?raw=true)
150
-
151
- ### Shell example
152
-
153
116
  ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
154
117
 
155
118
  ## [Optional] Local shell access with openai API key or anthropic API key
@@ -295,11 +295,6 @@
295
295
  "schemas": {
296
296
  "BashInteractionWithUUID": {
297
297
  "properties": {
298
- "type": {
299
- "type": "string",
300
- "const": "BashInteraction",
301
- "title": "Type"
302
- },
303
298
  "send_text": {
304
299
  "anyOf": [
305
300
  {
@@ -366,9 +361,9 @@
366
361
  "title": "User Id"
367
362
  }
368
363
  },
364
+ "additionalProperties": false,
369
365
  "type": "object",
370
366
  "required": [
371
- "type",
372
367
  "user_id"
373
368
  ],
374
369
  "title": "BashInteractionWithUUID"
@@ -408,6 +403,7 @@
408
403
  "title": "User Id"
409
404
  }
410
405
  },
406
+ "additionalProperties": false,
411
407
  "type": "object",
412
408
  "required": [
413
409
  "file_path",
@@ -431,10 +427,16 @@
431
427
  },
432
428
  "InitializeWithUUID": {
433
429
  "properties": {
434
- "type": {
430
+ "any_workspace_path": {
435
431
  "type": "string",
436
- "const": "Initialize",
437
- "title": "Type"
432
+ "title": "Any Workspace Path"
433
+ },
434
+ "initial_files_to_read": {
435
+ "items": {
436
+ "type": "string"
437
+ },
438
+ "type": "array",
439
+ "title": "Initial Files To Read"
438
440
  },
439
441
  "user_id": {
440
442
  "type": "string",
@@ -442,9 +444,11 @@
442
444
  "title": "User Id"
443
445
  }
444
446
  },
447
+ "additionalProperties": false,
445
448
  "type": "object",
446
449
  "required": [
447
- "type",
450
+ "any_workspace_path",
451
+ "initial_files_to_read",
448
452
  "user_id"
449
453
  ],
450
454
  "title": "InitializeWithUUID"
@@ -458,21 +462,16 @@
458
462
  "type": "array",
459
463
  "title": "File Paths"
460
464
  },
461
- "type": {
462
- "type": "string",
463
- "const": "ReadFiles",
464
- "title": "Type"
465
- },
466
465
  "user_id": {
467
466
  "type": "string",
468
467
  "format": "uuid",
469
468
  "title": "User Id"
470
469
  }
471
470
  },
471
+ "additionalProperties": false,
472
472
  "type": "object",
473
473
  "required": [
474
474
  "file_paths",
475
- "type",
476
475
  "user_id"
477
476
  ],
478
477
  "title": "ReadFileWithUUID"
@@ -490,6 +489,7 @@
490
489
  "title": "User Id"
491
490
  }
492
491
  },
492
+ "additionalProperties": false,
493
493
  "type": "object",
494
494
  "required": [
495
495
  "should_reset",
@@ -546,6 +546,7 @@
546
546
  "title": "User Id"
547
547
  }
548
548
  },
549
+ "additionalProperties": false,
549
550
  "type": "object",
550
551
  "required": [
551
552
  "file_path",
@@ -9,7 +9,12 @@ Instructions:
9
9
  - Do not install new tools/packages before ensuring no such tools/package or an alternative already exists.
10
10
 
11
11
  Instructions for `Initialize`:
12
- - Always call this at the start of the conversation.
12
+ - Always call this at the start of the conversation.- This will reset the shell.
13
+ - Use `any_workspace_path` to initialize the shell in the appropriate project directory.
14
+ - If the user has mentioned a workspace or project root, use it to set `any_workspace_path`.
15
+ - If the user has mentioned a folder or file with unclear project root, use the file or folder as `any_workspace_path`.
16
+ - If user has mentioned any files use `initial_files_to_read` to read, use absolute paths only.
17
+ - If `any_workspace_path` is provided, a tree structure of the workspace will be shown.
13
18
 
14
19
  Instructions for `BashCommand`:
15
20
  - Execute a bash command. This is stateful (beware with subsequent calls).
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  authors = [{ name = "Aman Rusia", email = "gapypi@arcfu.com" }]
3
3
  name = "wcgw"
4
- version = "2.5.0"
4
+ version = "2.6.2"
5
5
  description = "Shell and coding agent on claude and chatgpt"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.11, <3.13"
@@ -24,6 +24,7 @@ dependencies = [
24
24
  "anthropic>=0.39.0",
25
25
  "syntax-checker==0.2.10",
26
26
  "tokenizers>=0.21.0",
27
+ "pygit2>=1.16.0",
27
28
  ]
28
29
 
29
30
  [project.urls]
@@ -53,4 +54,11 @@ dev-dependencies = [
53
54
  "autoflake",
54
55
  "ipython>=8.12.3",
55
56
  "gunicorn>=23.0.0",
57
+ "pytest>=8.0.0",
58
+ "pytest-cov>=4.1.0",
59
+ "line-profiler>=4.2.0",
56
60
  ]
61
+
62
+ [tool.pytest.ini_options]
63
+ addopts = "--cov=wcgw --cov-report=term-missing:skip-covered --cov-report=html"
64
+ testpaths = ["tests"]