wcgw 2.5.0__tar.gz → 2.6.1__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.1}/.github/workflows/python-tests.yml +8 -2
  2. {wcgw-2.5.0 → wcgw-2.6.1}/.vscode/settings.json +7 -0
  3. wcgw-2.6.1/LICENSE +213 -0
  4. {wcgw-2.5.0 → wcgw-2.6.1}/PKG-INFO +17 -54
  5. {wcgw-2.5.0 → wcgw-2.6.1}/README.md +15 -53
  6. {wcgw-2.5.0 → wcgw-2.6.1}/gpt_action_json_schema.json +13 -0
  7. {wcgw-2.5.0 → wcgw-2.6.1}/gpt_instructions.txt +6 -1
  8. {wcgw-2.5.0 → wcgw-2.6.1}/pyproject.toml +9 -1
  9. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/mcp_server/server.py +34 -29
  10. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/openai_client.py +17 -29
  11. wcgw-2.6.1/src/wcgw/client/repo_ops/display_tree.py +127 -0
  12. wcgw-2.6.1/src/wcgw/client/repo_ops/path_prob.py +58 -0
  13. wcgw-2.6.1/src/wcgw/client/repo_ops/paths_model.vocab +20000 -0
  14. wcgw-2.6.1/src/wcgw/client/repo_ops/paths_tokens.model +80042 -0
  15. wcgw-2.6.1/src/wcgw/client/repo_ops/repo_context.py +148 -0
  16. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/tools.py +70 -41
  17. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/types_.py +3 -1
  18. wcgw-2.6.1/tests/client/repo_ops/__init__.py +0 -0
  19. wcgw-2.6.1/tests/client/repo_ops/test_display_tree.py +152 -0
  20. wcgw-2.6.1/tests/client/repo_ops/test_display_tree_simple.py +62 -0
  21. wcgw-2.6.1/tests/client/repo_ops/test_path_prob.py +115 -0
  22. wcgw-2.6.1/tests/client/repo_ops/test_repo_context.py +150 -0
  23. wcgw-2.6.1/tests/client/test_anthropic_client_utils.py +103 -0
  24. wcgw-2.6.1/tests/client/test_openai_utils.py +101 -0
  25. wcgw-2.6.1/tests/client/test_tools_basic.py +57 -0
  26. wcgw-2.6.1/tests/client/test_tools_extended.py +636 -0
  27. wcgw-2.6.1/tests/test_anthropic_client.py +88 -0
  28. wcgw-2.6.1/tests/test_common.py +111 -0
  29. wcgw-2.6.1/tests/test_computer_use.py +142 -0
  30. wcgw-2.6.1/tests/test_computer_use_base.py +123 -0
  31. wcgw-2.6.1/tests/test_computer_use_shell.py +120 -0
  32. wcgw-2.6.1/tests/test_sys_utils.py +102 -0
  33. {wcgw-2.5.0 → wcgw-2.6.1}/tests/test_tools.py +2 -2
  34. {wcgw-2.5.0 → wcgw-2.6.1}/uv.lock +210 -2
  35. wcgw-2.5.0/LICENSE +0 -243
  36. {wcgw-2.5.0 → wcgw-2.6.1}/.github/workflows/python-publish.yml +0 -0
  37. {wcgw-2.5.0 → wcgw-2.6.1}/.github/workflows/python-types.yml +0 -0
  38. {wcgw-2.5.0 → wcgw-2.6.1}/.gitignore +0 -0
  39. {wcgw-2.5.0 → wcgw-2.6.1}/.gitmodules +0 -0
  40. {wcgw-2.5.0 → wcgw-2.6.1}/.python-version +0 -0
  41. {wcgw-2.5.0 → wcgw-2.6.1}/openai.md +0 -0
  42. {wcgw-2.5.0 → wcgw-2.6.1}/src/__init__.py +0 -0
  43. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.git +0 -0
  44. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  45. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  46. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.github/workflows/main-checks.yml +0 -0
  47. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.github/workflows/publish-pypi.yml +0 -0
  48. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.github/workflows/pull-request-checks.yml +0 -0
  49. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.github/workflows/shared.yml +0 -0
  50. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.gitignore +0 -0
  51. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/.python-version +0 -0
  52. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/CODE_OF_CONDUCT.md +0 -0
  53. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/CONTRIBUTING.md +0 -0
  54. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/LICENSE +0 -0
  55. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/README.md +0 -0
  56. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/RELEASE.md +0 -0
  57. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/SECURITY.md +0 -0
  58. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/README.md +0 -0
  59. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-prompt/.python-version +0 -0
  60. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-prompt/README.md +0 -0
  61. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-prompt/mcp_simple_prompt/__init__.py +0 -0
  62. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-prompt/mcp_simple_prompt/__main__.py +0 -0
  63. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-prompt/mcp_simple_prompt/server.py +0 -0
  64. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-prompt/pyproject.toml +0 -0
  65. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-resource/.python-version +0 -0
  66. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-resource/README.md +0 -0
  67. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-resource/mcp_simple_resource/__init__.py +0 -0
  68. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-resource/mcp_simple_resource/__main__.py +0 -0
  69. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-resource/mcp_simple_resource/server.py +0 -0
  70. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-resource/pyproject.toml +0 -0
  71. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-tool/.python-version +0 -0
  72. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-tool/README.md +0 -0
  73. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-tool/mcp_simple_tool/__init__.py +0 -0
  74. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-tool/mcp_simple_tool/__main__.py +0 -0
  75. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-tool/mcp_simple_tool/server.py +0 -0
  76. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/examples/servers/simple-tool/pyproject.toml +0 -0
  77. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/pyproject.toml +0 -0
  78. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/__init__.py +0 -0
  79. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/client/__init__.py +0 -0
  80. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/client/__main__.py +0 -0
  81. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/client/session.py +0 -0
  82. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/client/sse.py +0 -0
  83. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/client/stdio.py +0 -0
  84. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/py.typed +0 -0
  85. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/__init__.py +0 -0
  86. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/__main__.py +0 -0
  87. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/models.py +0 -0
  88. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/session.py +0 -0
  89. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/sse.py +0 -0
  90. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/stdio.py +0 -0
  91. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/server/websocket.py +0 -0
  92. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/__init__.py +0 -0
  93. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/context.py +0 -0
  94. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/exceptions.py +0 -0
  95. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/memory.py +0 -0
  96. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/progress.py +0 -0
  97. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/session.py +0 -0
  98. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/shared/version.py +0 -0
  99. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/src/mcp_wcgw/types.py +0 -0
  100. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/__init__.py +0 -0
  101. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/client/__init__.py +0 -0
  102. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/client/test_session.py +0 -0
  103. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/client/test_stdio.py +0 -0
  104. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/conftest.py +0 -0
  105. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/server/__init__.py +0 -0
  106. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/server/test_session.py +0 -0
  107. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/server/test_stdio.py +0 -0
  108. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/shared/test_memory.py +0 -0
  109. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/tests/test_types.py +0 -0
  110. {wcgw-2.5.0 → wcgw-2.6.1}/src/mcp_wcgw/uv.lock +0 -0
  111. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/__init__.py +0 -0
  112. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/__init__.py +0 -0
  113. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/__main__.py +0 -0
  114. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/anthropic_client.py +0 -0
  115. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/cli.py +0 -0
  116. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/common.py +0 -0
  117. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/computer_use.py +0 -0
  118. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/diff-instructions.txt +0 -0
  119. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/mcp_server/Readme.md +0 -0
  120. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/mcp_server/__init__.py +0 -0
  121. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/openai_utils.py +0 -0
  122. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/client/sys_utils.py +0 -0
  123. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/relay/serve.py +0 -0
  124. {wcgw-2.5.0 → wcgw-2.6.1}/src/wcgw/relay/static/privacy.txt +0 -0
  125. {wcgw-2.5.0 → wcgw-2.6.1}/static/claude-ss.jpg +0 -0
  126. {wcgw-2.5.0 → wcgw-2.6.1}/static/computer-use.jpg +0 -0
  127. {wcgw-2.5.0 → wcgw-2.6.1}/static/example.jpg +0 -0
  128. {wcgw-2.5.0 → wcgw-2.6.1}/static/rocket-icon.png +0 -0
  129. {wcgw-2.5.0 → wcgw-2.6.1}/static/ss1.png +0 -0
  130. {wcgw-2.5.0 → wcgw-2.6.1}/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.1/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.1
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,6 +38,7 @@ 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
42
44
 
@@ -48,12 +50,11 @@ Description-Content-Type: text/markdown
48
50
 
49
51
  ## 🚀 Highlights
50
52
 
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
53
  - ⚡ **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
54
  - ⚡ **Large file edit**: Supports large file incremental edits to avoid token limit issues. Faster than full file write.
55
+ - ⚡ **Syntax checking on edits**: Reports feedback to the LLM if its edits have any syntax errors, so that it can redo it.
55
56
  - ⚡ **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.
57
+ - ⚡ **Full Shell Access**: No restrictions, complete control.
57
58
 
58
59
  ## Top use cases examples
59
60
 
@@ -70,9 +71,11 @@ Description-Content-Type: text/markdown
70
71
  - 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
72
  - 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
73
 
73
- ## Claude Setup
74
+ ## Claude setup (using mcp)
74
75
 
75
- First install `uv` https://docs.astral.sh/uv/getting-started/installation/#installation-methods
76
+ First install `uv` using homebrew `brew install uv`
77
+
78
+ (**Important:** use homebrew to install uv. Otherwise make sure `uv` is present in a global location like /usr/bin/)
76
79
 
77
80
  Then update `claude_desktop_config.json` (~/Library/Application Support/Claude/claude_desktop_config.json)
78
81
 
@@ -99,53 +102,21 @@ Then restart claude app.
99
102
 
100
103
  _If there's an error in setting up_
101
104
 
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
105
+ - 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
106
  - 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
107
  - Debug the mcp server using `npx @modelcontextprotocol/inspector@0.1.7 uv tool run --from wcgw@latest --python 3.12 wcgw_mcp`
106
108
 
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
- ```
109
+ ### Alternative configuration using smithery (npx required)
110
+ [![smithery badge](https://smithery.ai/badge/wcgw)](https://smithery.ai/server/wcgw)
130
111
 
131
- Claude will be able to connect to any docker container with linux environment. Native system control isn't supported outside docker.
112
+ You need to first install uv using homebrew. `brew install uv`
132
113
 
133
- You'll need to run a docker image with desktop and optional VNC connection. Here's a demo image:
114
+ Then to configure wcgw for Claude Desktop automatically via [Smithery](https://smithery.ai/server/wcgw):
134
115
 
135
- ```sh
136
- docker run -p 6080:6080 ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest
116
+ ```bash
117
+ npx -y @smithery/cli install wcgw --client claude
137
118
  ```
138
119
 
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
120
  ### Usage
150
121
 
151
122
  Wait for a few seconds. You should be able to see this icon if everything goes right.
@@ -157,8 +128,6 @@ over here
157
128
 
158
129
  Then ask claude to execute shell commands, read files, edit files, run your code, etc.
159
130
 
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
131
 
163
132
  ### [Optional] Vs code extension
164
133
  https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw
@@ -172,12 +141,6 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
172
141
 
173
142
  ## Examples
174
143
 
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
144
  ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
182
145
 
183
146
  ## [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,6 +9,7 @@
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
14
15
 
@@ -20,12 +21,11 @@
20
21
 
21
22
  ## 🚀 Highlights
22
23
 
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
24
  - ⚡ **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
25
  - ⚡ **Large file edit**: Supports large file incremental edits to avoid token limit issues. Faster than full file write.
26
+ - ⚡ **Syntax checking on edits**: Reports feedback to the LLM if its edits have any syntax errors, so that it can redo it.
27
27
  - ⚡ **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.
28
+ - ⚡ **Full Shell Access**: No restrictions, complete control.
29
29
 
30
30
  ## Top use cases examples
31
31
 
@@ -42,9 +42,11 @@
42
42
  - 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
43
  - 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
44
 
45
- ## Claude Setup
45
+ ## Claude setup (using mcp)
46
46
 
47
- First install `uv` https://docs.astral.sh/uv/getting-started/installation/#installation-methods
47
+ First install `uv` using homebrew `brew install uv`
48
+
49
+ (**Important:** use homebrew to install uv. Otherwise make sure `uv` is present in a global location like /usr/bin/)
48
50
 
49
51
  Then update `claude_desktop_config.json` (~/Library/Application Support/Claude/claude_desktop_config.json)
50
52
 
@@ -71,53 +73,21 @@ Then restart claude app.
71
73
 
72
74
  _If there's an error in setting up_
73
75
 
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
76
+ - 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
77
  - 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
78
  - Debug the mcp server using `npx @modelcontextprotocol/inspector@0.1.7 uv tool run --from wcgw@latest --python 3.12 wcgw_mcp`
78
79
 
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
- ```
80
+ ### Alternative configuration using smithery (npx required)
81
+ [![smithery badge](https://smithery.ai/badge/wcgw)](https://smithery.ai/server/wcgw)
102
82
 
103
- Claude will be able to connect to any docker container with linux environment. Native system control isn't supported outside docker.
83
+ You need to first install uv using homebrew. `brew install uv`
104
84
 
105
- You'll need to run a docker image with desktop and optional VNC connection. Here's a demo image:
85
+ Then to configure wcgw for Claude Desktop automatically via [Smithery](https://smithery.ai/server/wcgw):
106
86
 
107
- ```sh
108
- docker run -p 6080:6080 ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest
87
+ ```bash
88
+ npx -y @smithery/cli install wcgw --client claude
109
89
  ```
110
90
 
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
91
  ### Usage
122
92
 
123
93
  Wait for a few seconds. You should be able to see this icon if everything goes right.
@@ -129,8 +99,6 @@ over here
129
99
 
130
100
  Then ask claude to execute shell commands, read files, edit files, run your code, etc.
131
101
 
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
102
 
135
103
  ### [Optional] Vs code extension
136
104
  https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw
@@ -144,12 +112,6 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
144
112
 
145
113
  ## Examples
146
114
 
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
115
  ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
154
116
 
155
117
  ## [Optional] Local shell access with openai API key or anthropic API key
@@ -436,6 +436,17 @@
436
436
  "const": "Initialize",
437
437
  "title": "Type"
438
438
  },
439
+ "any_workspace_path": {
440
+ "type": "string",
441
+ "title": "Any Workspace Path"
442
+ },
443
+ "initial_files_to_read": {
444
+ "items": {
445
+ "type": "string"
446
+ },
447
+ "type": "array",
448
+ "title": "Initial Files To Read"
449
+ },
439
450
  "user_id": {
440
451
  "type": "string",
441
452
  "format": "uuid",
@@ -445,6 +456,8 @@
445
456
  "type": "object",
446
457
  "required": [
447
458
  "type",
459
+ "any_workspace_path",
460
+ "initial_files_to_read",
448
461
  "user_id"
449
462
  ],
450
463
  "title": "InitializeWithUUID"
@@ -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.1"
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"]