wcgw 2.6.3__py3-none-any.whl → 2.7.0__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 wcgw might be problematic. Click here for more details.
- wcgw/client/anthropic_client.py +64 -51
- wcgw/client/diff-instructions.txt +0 -1
- wcgw/client/file_ops/diff_edit.py +482 -0
- wcgw/client/file_ops/search_replace.py +119 -0
- wcgw/client/mcp_server/server.py +19 -0
- wcgw/client/memory.py +52 -0
- wcgw/client/openai_client.py +42 -18
- wcgw/client/tools.py +75 -169
- wcgw/relay/serve.py +41 -12
- wcgw/types_.py +12 -0
- {wcgw-2.6.3.dist-info → wcgw-2.7.0.dist-info}/METADATA +1 -1
- {wcgw-2.6.3.dist-info → wcgw-2.7.0.dist-info}/RECORD +15 -12
- {wcgw-2.6.3.dist-info → wcgw-2.7.0.dist-info}/WHEEL +0 -0
- {wcgw-2.6.3.dist-info → wcgw-2.7.0.dist-info}/entry_points.txt +0 -0
- {wcgw-2.6.3.dist-info → wcgw-2.7.0.dist-info}/licenses/LICENSE +0 -0
wcgw/relay/serve.py
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import base64
|
|
3
|
-
from importlib import metadata
|
|
4
|
-
import semantic_version # type: ignore[import-untyped]
|
|
5
2
|
import threading
|
|
6
3
|
import time
|
|
7
|
-
from
|
|
4
|
+
from importlib import metadata
|
|
5
|
+
from typing import Any, Callable, Coroutine, DefaultDict, Optional
|
|
8
6
|
from uuid import UUID
|
|
7
|
+
|
|
9
8
|
import fastapi
|
|
10
|
-
|
|
11
|
-
from pydantic import BaseModel
|
|
9
|
+
import semantic_version # type: ignore[import-untyped]
|
|
12
10
|
import uvicorn
|
|
13
|
-
from fastapi.staticfiles import StaticFiles
|
|
14
|
-
|
|
15
11
|
from dotenv import load_dotenv
|
|
12
|
+
from fastapi import WebSocket, WebSocketDisconnect
|
|
13
|
+
from fastapi.staticfiles import StaticFiles
|
|
14
|
+
from pydantic import BaseModel
|
|
16
15
|
|
|
17
16
|
from ..types_ import (
|
|
18
17
|
BashCommand,
|
|
19
18
|
BashInteraction,
|
|
20
|
-
WriteIfEmpty,
|
|
21
|
-
FileEditFindReplace,
|
|
22
19
|
FileEdit,
|
|
20
|
+
FileEditFindReplace,
|
|
23
21
|
Initialize,
|
|
22
|
+
KnowledgeTransfer,
|
|
24
23
|
ReadFiles,
|
|
25
24
|
ResetShell,
|
|
26
|
-
|
|
25
|
+
WriteIfEmpty,
|
|
27
26
|
)
|
|
28
27
|
|
|
29
28
|
|
|
@@ -37,6 +36,7 @@ class Mdata(BaseModel):
|
|
|
37
36
|
| FileEdit
|
|
38
37
|
| ReadFiles
|
|
39
38
|
| Initialize
|
|
39
|
+
| KnowledgeTransfer
|
|
40
40
|
| str
|
|
41
41
|
)
|
|
42
42
|
user_id: UUID
|
|
@@ -51,7 +51,7 @@ gpts: dict[UUID, Callable[[str], None]] = {}
|
|
|
51
51
|
images: DefaultDict[UUID, dict[str, dict[str, Any]]] = DefaultDict(dict)
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
CLIENT_VERSION_MINIMUM = "
|
|
54
|
+
CLIENT_VERSION_MINIMUM = "2.7.0"
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
@app.websocket("/v1/register/{uuid}")
|
|
@@ -317,6 +317,35 @@ async def initialize(initialize_data: InitializeWithUUID) -> str:
|
|
|
317
317
|
raise fastapi.HTTPException(status_code=500, detail="Timeout error")
|
|
318
318
|
|
|
319
319
|
|
|
320
|
+
class KTWithUUID(KnowledgeTransfer):
|
|
321
|
+
user_id: UUID
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
@app.post("/v1/knowledge_transfer")
|
|
325
|
+
async def knowledge_transfer(knowledge_transfer_data: KTWithUUID) -> str:
|
|
326
|
+
user_id = knowledge_transfer_data.user_id
|
|
327
|
+
if user_id not in clients:
|
|
328
|
+
return "Failure: id not found, ask the user to check it."
|
|
329
|
+
|
|
330
|
+
results: Optional[str] = None
|
|
331
|
+
|
|
332
|
+
def put_results(result: str) -> None:
|
|
333
|
+
nonlocal results
|
|
334
|
+
results = result
|
|
335
|
+
|
|
336
|
+
gpts[user_id] = put_results
|
|
337
|
+
|
|
338
|
+
await clients[user_id](Mdata(data=knowledge_transfer_data, user_id=user_id))
|
|
339
|
+
|
|
340
|
+
start_time = time.time()
|
|
341
|
+
while time.time() - start_time < 30:
|
|
342
|
+
if results is not None:
|
|
343
|
+
return results
|
|
344
|
+
await asyncio.sleep(0.1)
|
|
345
|
+
|
|
346
|
+
raise fastapi.HTTPException(status_code=500, detail="Timeout error")
|
|
347
|
+
|
|
348
|
+
|
|
320
349
|
app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
321
350
|
|
|
322
351
|
|
wcgw/types_.py
CHANGED
|
@@ -59,6 +59,7 @@ class FileEdit(BaseModel):
|
|
|
59
59
|
class Initialize(BaseModel):
|
|
60
60
|
any_workspace_path: str
|
|
61
61
|
initial_files_to_read: list[str]
|
|
62
|
+
task_id_to_resume: str
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
class GetScreenInfo(BaseModel):
|
|
@@ -98,3 +99,14 @@ class Mouse(BaseModel):
|
|
|
98
99
|
class Keyboard(BaseModel):
|
|
99
100
|
action: Literal["key", "type"]
|
|
100
101
|
text: str
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class KnowledgeTransfer(BaseModel):
|
|
105
|
+
id: str
|
|
106
|
+
project_root_path: str
|
|
107
|
+
objective: str
|
|
108
|
+
all_user_instructions: str
|
|
109
|
+
current_status_of_the_task: str
|
|
110
|
+
all_issues_snippets: str
|
|
111
|
+
relevant_file_paths: list[str]
|
|
112
|
+
build_and_development_instructions: str
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
wcgw/__init__.py,sha256=9K2QW7QuSLhMTVbKbBYd9UUp-ZyrfBrxcjuD_xk458k,118
|
|
2
|
-
wcgw/types_.py,sha256=
|
|
2
|
+
wcgw/types_.py,sha256=qSl3h1D2mAcKmW3jzEmD-jdMYP1DE1G3f5RzIEcXuHY,2090
|
|
3
3
|
wcgw/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
wcgw/client/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
|
|
5
|
-
wcgw/client/anthropic_client.py,sha256=
|
|
5
|
+
wcgw/client/anthropic_client.py,sha256=U9uE9mBiaq01FnxFC6cBIIAeSpO16UxrZJKeVGqItiA,22135
|
|
6
6
|
wcgw/client/cli.py,sha256=-z0kpDAW3mzfQrQeZfaVJhBCAQY3HXnt9GdgQ8s-u0Y,1003
|
|
7
7
|
wcgw/client/common.py,sha256=OCH7Tx64jojz3M3iONUrGMadE07W21DiZs5sOxWX1Qc,1456
|
|
8
8
|
wcgw/client/computer_use.py,sha256=35NKAlMrxwD0TBlMMRnbCwz4g8TBRGOlcy-cmS-yJ_A,15247
|
|
9
|
-
wcgw/client/diff-instructions.txt,sha256=
|
|
10
|
-
wcgw/client/
|
|
9
|
+
wcgw/client/diff-instructions.txt,sha256=tmJ9Fu9XdO_72lYXQQNY9RZyx91bjxrXJf9d_KBz57k,1611
|
|
10
|
+
wcgw/client/memory.py,sha256=wdsd_czb01XM6Gu80HRsLM-Ll5gJ4E7UEnkneh5sWFI,1704
|
|
11
|
+
wcgw/client/openai_client.py,sha256=ONTbQAHvU2O0HxmYlqbVjXwsf4rvHfQvnNKSUEu4mXc,19013
|
|
11
12
|
wcgw/client/openai_utils.py,sha256=KfMB1-p2zDiA7pPWwAVarochf7-qeL1UMgtlDV9DtKA,2662
|
|
12
13
|
wcgw/client/sys_utils.py,sha256=GajPntKhaTUMn6EOmopENWZNR2G_BJyuVbuot0x6veI,1376
|
|
13
|
-
wcgw/client/tools.py,sha256=
|
|
14
|
+
wcgw/client/tools.py,sha256=TM2wBGoi9C1BmbDY1GSl-T4T1soPBDuNm1PwmF1BlqA,44606
|
|
15
|
+
wcgw/client/file_ops/diff_edit.py,sha256=o0ucArVwn5p6QTDgYsjLfMy4TJXxUG3qcppFBNF3bbQ,16751
|
|
16
|
+
wcgw/client/file_ops/search_replace.py,sha256=89ieDC9fTsIKPDx7CJwnwpX32dRdSlMKoBtKVXc7VWI,3971
|
|
14
17
|
wcgw/client/mcp_server/Readme.md,sha256=I8N4dHkTUVGNQ63BQkBMBhCCBTgqGOSF_pUR6iOEiUk,2495
|
|
15
18
|
wcgw/client/mcp_server/__init__.py,sha256=hyPPwO9cabAJsOMWhKyat9yl7OlSmIobaoAZKHu3DMc,381
|
|
16
|
-
wcgw/client/mcp_server/server.py,sha256=
|
|
19
|
+
wcgw/client/mcp_server/server.py,sha256=yi5PXSa1FFam3BtkFKgvda6QcTcErFP7vDCRNQtyCl0,13883
|
|
17
20
|
wcgw/client/repo_ops/display_tree.py,sha256=5FD4hfMkM2cIZnXlu7WfJswJLthj0SkuHlkGH6dpWQU,4632
|
|
18
21
|
wcgw/client/repo_ops/path_prob.py,sha256=SWf0CDn37rtlsYRQ51ufSxay-heaQoVIhr1alB9tZ4M,2144
|
|
19
22
|
wcgw/client/repo_ops/paths_model.vocab,sha256=M1pXycYDQehMXtpp-qAgU7rtzeBbCOiJo4qcYFY0kqk,315087
|
|
20
23
|
wcgw/client/repo_ops/paths_tokens.model,sha256=jiwwE4ae8ADKuTZISutXuM5Wfyc_FBmN5rxTjoNnCos,1569052
|
|
21
24
|
wcgw/client/repo_ops/repo_context.py,sha256=5NqRxBY0K-SBFXJ0Ybt7llzYOBD8pRkTpruMMJHWxv4,4336
|
|
22
|
-
wcgw/relay/serve.py,sha256=
|
|
25
|
+
wcgw/relay/serve.py,sha256=dWT2cmmjqEvh6dqGoI0zEpXxl0w7SVts5j1iIl7ycL4,9555
|
|
23
26
|
wcgw/relay/static/privacy.txt,sha256=s9qBdbx2SexCpC_z33sg16TptmAwDEehMCLz4L50JLc,529
|
|
24
27
|
mcp_wcgw/__init__.py,sha256=fKCgOdN7cn7gR3YGFaGyV5Goe8A2sEyllLcsRkN0i-g,2601
|
|
25
28
|
mcp_wcgw/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -43,8 +46,8 @@ mcp_wcgw/shared/memory.py,sha256=dBsOghxHz8-tycdSVo9kSujbsC8xb_tYsGmuJobuZnw,281
|
|
|
43
46
|
mcp_wcgw/shared/progress.py,sha256=ymxOsb8XO5Mhlop7fRfdbmvPodANj7oq6O4dD0iUcnw,1048
|
|
44
47
|
mcp_wcgw/shared/session.py,sha256=e44a0LQOW8gwdLs9_DE9oDsxqW2U8mXG3d5KT95bn5o,10393
|
|
45
48
|
mcp_wcgw/shared/version.py,sha256=d2LZii-mgsPIxpshjkXnOTUmk98i0DT4ff8VpA_kAvE,111
|
|
46
|
-
wcgw-2.
|
|
47
|
-
wcgw-2.
|
|
48
|
-
wcgw-2.
|
|
49
|
-
wcgw-2.
|
|
50
|
-
wcgw-2.
|
|
49
|
+
wcgw-2.7.0.dist-info/METADATA,sha256=0qgZ9bqCnkUZNTKWAEbmxBq8xMHRZL-DKmikYxxIWfk,6979
|
|
50
|
+
wcgw-2.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
51
|
+
wcgw-2.7.0.dist-info/entry_points.txt,sha256=eKo1omwbAggWlQ0l7GKoR7uV1-j16nk9tK0BhC2Oz_E,120
|
|
52
|
+
wcgw-2.7.0.dist-info/licenses/LICENSE,sha256=BvY8xqjOfc3X2qZpGpX3MZEmF-4Dp0LqgKBbT6L_8oI,11142
|
|
53
|
+
wcgw-2.7.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|