code-analysis-client 1.6.438__tar.gz → 1.6.444__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.
Files changed (30) hide show
  1. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/PKG-INFO +1 -1
  2. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/server_api.py +31 -25
  3. code_analysis_client-1.6.444/code_analysis_client/version.txt +1 -0
  4. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/worktree.py +44 -64
  5. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client.egg-info/PKG-INFO +1 -1
  6. code_analysis_client-1.6.438/code_analysis_client/version.txt +0 -1
  7. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/README.md +0 -0
  8. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/__init__.py +0 -0
  9. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/check_chain.py +0 -0
  10. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/client.py +0 -0
  11. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/commands_proxy.py +0 -0
  12. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/config.py +0 -0
  13. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/exceptions.py +0 -0
  14. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/file_session.py +0 -0
  15. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/project.py +0 -0
  16. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/py.typed +0 -0
  17. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/queue_wait.py +0 -0
  18. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/responses.py +0 -0
  19. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/schema_disk_cache.py +0 -0
  20. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/server_schema.py +0 -0
  21. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/symbol_tree.py +0 -0
  22. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/universal_file.py +0 -0
  23. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/validation.py +0 -0
  24. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client/vectorizer_state.py +0 -0
  25. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client.egg-info/SOURCES.txt +0 -0
  26. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client.egg-info/dependency_links.txt +0 -0
  27. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client.egg-info/requires.txt +0 -0
  28. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/code_analysis_client.egg-info/top_level.txt +0 -0
  29. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/pyproject.toml +0 -0
  30. {code_analysis_client-1.6.438 → code_analysis_client-1.6.444}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-analysis-client
3
- Version: 1.6.438
3
+ Version: 1.6.444
4
4
  Summary: Async JSON-RPC client for the code-analysis MCP server (mcp-proxy-adapter JsonRpcClient)
5
5
  Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
6
6
  Requires-Python: >=3.10
@@ -254,13 +254,25 @@ def _assert_all_registered(
254
254
  raise KeyError(f"{message}: {missing}")
255
255
 
256
256
 
257
- def assert_facade_commands_registered(get_command: Callable[[str], object]) -> None:
258
- """Raise ``KeyError`` if any facade command is missing from the server registry."""
259
- _assert_all_registered(
260
- get_command,
261
- CLIENT_FACADE_COMMANDS,
262
- "Client facade commands not registered on server",
263
- )
257
+ def _registered_asserter(
258
+ names: FrozenSet[str], message: str, doc: str, name: str
259
+ ) -> Callable[[Callable[[str], object]], None]:
260
+ """Build a public ``assert_*_registered`` check over one command-name set."""
261
+
262
+ def check(get_command: Callable[[str], object]) -> None:
263
+ _assert_all_registered(get_command, names, message)
264
+
265
+ check.__name__ = check.__qualname__ = name
266
+ check.__doc__ = doc
267
+ return check
268
+
269
+
270
+ assert_facade_commands_registered = _registered_asserter(
271
+ CLIENT_FACADE_COMMANDS,
272
+ "Client facade commands not registered on server",
273
+ "Raise ``KeyError`` if any facade command is missing from the server registry.",
274
+ "assert_facade_commands_registered",
275
+ )
264
276
 
265
277
 
266
278
  def assert_removed_commands_absent(get_command: Callable[[str], object]) -> None:
@@ -274,21 +286,15 @@ def assert_removed_commands_absent(get_command: Callable[[str], object]) -> None
274
286
  raise AssertionError(f"Removed commands still registered: {present}")
275
287
 
276
288
 
277
- def assert_file_content_read_commands_registered(
278
- get_command: Callable[[str], object],
279
- ) -> None:
280
- """Raise ``KeyError`` if a read-only content command is missing from the registry."""
281
- _assert_all_registered(
282
- get_command,
283
- FILE_CONTENT_READ_COMMANDS,
284
- "File content read commands not registered",
285
- )
286
-
287
-
288
- def assert_fs_commands_registered(get_command: Callable[[str], object]) -> None:
289
- """Raise ``KeyError`` if a filesystem helper command is missing from the registry."""
290
- _assert_all_registered(
291
- get_command,
292
- FS_COMMANDS,
293
- "Filesystem commands not registered",
294
- )
289
+ assert_file_content_read_commands_registered = _registered_asserter(
290
+ FILE_CONTENT_READ_COMMANDS,
291
+ "File content read commands not registered",
292
+ "Raise ``KeyError`` if a read-only content command is missing from the registry.",
293
+ "assert_file_content_read_commands_registered",
294
+ )
295
+ assert_fs_commands_registered = _registered_asserter(
296
+ FS_COMMANDS,
297
+ "Filesystem commands not registered",
298
+ "Raise ``KeyError`` if a filesystem helper command is missing from the registry.",
299
+ "assert_fs_commands_registered",
300
+ )
@@ -41,6 +41,37 @@ def _unwrap(data: Dict[str, Any]) -> Dict[str, Any]:
41
41
  return unwrap_command_result(data)
42
42
 
43
43
 
44
+ def _named_read_method(command: str, method: str, summary: str, section: str) -> Any:
45
+ """Build the public ``(self, project_id, name)`` client method for one read-only worktree command."""
46
+
47
+ async def call(self: WorktreeClient, project_id: str, name: str) -> Dict[str, Any]:
48
+ return await self._named_read(command, project_id, name)
49
+
50
+ call.__name__ = call.__qualname__ = f"WorktreeClient.{method}"
51
+ call.__doc__ = f"{summary}\n\n Calls ``{command}`` per candidate-WT-1.md section {section}.\n "
52
+ return call
53
+
54
+
55
+ def _named_op_method(command: str, method: str, summary: str, section: str) -> Any:
56
+ """Build the public polled client method for one worktree command."""
57
+
58
+ async def call(
59
+ self: WorktreeClient,
60
+ project_id: str,
61
+ name: str,
62
+ *,
63
+ auto_poll: bool = True,
64
+ timeout: Optional[float] = None,
65
+ ) -> Dict[str, Any]:
66
+ return await self._named_op(
67
+ command, project_id, name, auto_poll=auto_poll, timeout=timeout
68
+ )
69
+
70
+ call.__name__ = call.__qualname__ = f"WorktreeClient.{method}"
71
+ call.__doc__ = f"{summary}\n\n Calls ``{command}`` per candidate-WT-1.md section {section}.\n "
72
+ return call
73
+
74
+
44
75
  class WorktreeClient:
45
76
  """Worktree lifecycle and sync management commands."""
46
77
 
@@ -138,17 +169,6 @@ class WorktreeClient:
138
169
  )
139
170
  )
140
171
 
141
- async def status(
142
- self,
143
- project_id: str,
144
- name: str,
145
- ) -> Dict[str, Any]:
146
- """Get git status of one worktree (working tree + index).
147
-
148
- Calls ``worktree_status`` per candidate-WT-1.md section 5.3.
149
- """
150
- return await self._named_read("worktree_status", project_id, name)
151
-
152
172
  async def diff(
153
173
  self,
154
174
  project_id: str,
@@ -229,17 +249,6 @@ class WorktreeClient:
229
249
 
230
250
  return _unwrap(result)
231
251
 
232
- async def conflicts(
233
- self,
234
- project_id: str,
235
- name: str,
236
- ) -> Dict[str, Any]:
237
- """List merge/rebase conflicts with per-file markers.
238
-
239
- Calls ``worktree_conflicts`` per candidate-WT-1.md section 5.6.
240
- """
241
- return await self._named_read("worktree_conflicts", project_id, name)
242
-
243
252
  async def continue_(
244
253
  self,
245
254
  project_id: str,
@@ -279,22 +288,6 @@ class WorktreeClient:
279
288
  )
280
289
  )
281
290
 
282
- async def abort(
283
- self,
284
- project_id: str,
285
- name: str,
286
- *,
287
- auto_poll: bool = True,
288
- timeout: Optional[float] = None,
289
- ) -> Dict[str, Any]:
290
- """Abort in-progress merge or rebase.
291
-
292
- Calls ``worktree_abort`` per candidate-WT-1.md section 5.8.
293
- """
294
- return await self._named_op(
295
- "worktree_abort", project_id, name, auto_poll=auto_poll, timeout=timeout
296
- )
297
-
298
291
  # === Commit and removal ===
299
292
 
300
293
  async def commit(
@@ -439,17 +432,6 @@ class WorktreeClient:
439
432
  await self._client.call_validated("worktree_lock", params)
440
433
  )
441
434
 
442
- async def unlock(
443
- self,
444
- project_id: str,
445
- name: str,
446
- ) -> Dict[str, Any]:
447
- """Unlock a worktree.
448
-
449
- Calls ``worktree_unlock`` per candidate-WT-1.md section 5.13.
450
- """
451
- return await self._named_read("worktree_unlock", project_id, name)
452
-
453
435
  async def move(
454
436
  self,
455
437
  project_id: str,
@@ -482,18 +464,16 @@ class WorktreeClient:
482
464
  )
483
465
  )
484
466
 
485
- async def repair(
486
- self,
487
- project_id: str,
488
- name: str,
489
- *,
490
- auto_poll: bool = True,
491
- timeout: Optional[float] = None,
492
- ) -> Dict[str, Any]:
493
- """Repair worktree after manual filesystem move/restore.
494
-
495
- Calls ``worktree_repair`` per candidate-WT-1.md section 5.15.
496
- """
497
- return await self._named_op(
498
- "worktree_repair", project_id, name, auto_poll=auto_poll, timeout=timeout
499
- )
467
+ status = _named_read_method(
468
+ "worktree_status", "status", "Get git status of one worktree (working tree + index).", "5.3"
469
+ )
470
+ conflicts = _named_read_method(
471
+ "worktree_conflicts", "conflicts", "List merge/rebase conflicts with per-file markers.", "5.6"
472
+ )
473
+ unlock = _named_read_method("worktree_unlock", "unlock", "Unlock a worktree.", "5.13")
474
+ abort = _named_op_method(
475
+ "worktree_abort", "abort", "Abort in-progress merge or rebase.", "5.8"
476
+ )
477
+ repair = _named_op_method(
478
+ "worktree_repair", "repair", "Repair worktree after manual filesystem move/restore.", "5.15"
479
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-analysis-client
3
- Version: 1.6.438
3
+ Version: 1.6.444
4
4
  Summary: Async JSON-RPC client for the code-analysis MCP server (mcp-proxy-adapter JsonRpcClient)
5
5
  Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
6
6
  Requires-Python: >=3.10