code-analysis-client 1.6.293__tar.gz → 1.6.294__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.
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/PKG-INFO +1 -1
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/__init__.py +2 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/check_chain.py +3 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/client.py +6 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/file_session.py +45 -0
- code_analysis_client-1.6.294/code_analysis_client/project.py +59 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/server_api.py +4 -0
- code_analysis_client-1.6.294/code_analysis_client/version.txt +1 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client.egg-info/PKG-INFO +1 -1
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client.egg-info/SOURCES.txt +1 -0
- code_analysis_client-1.6.293/code_analysis_client/version.txt +0 -1
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/README.md +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/commands_proxy.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/config.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/exceptions.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/py.typed +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/queue_wait.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/responses.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/schema_disk_cache.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/server_schema.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/symbol_tree.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/universal_file.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/validation.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/vectorizer_state.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/worktree.py +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client.egg-info/dependency_links.txt +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client.egg-info/requires.txt +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client.egg-info/top_level.txt +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/pyproject.toml +0 -0
- {code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-analysis-client
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.294
|
|
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
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/__init__.py
RENAMED
|
@@ -40,6 +40,7 @@ from code_analysis_client.check_chain import (
|
|
|
40
40
|
FileCheckAndPromoteResult,
|
|
41
41
|
)
|
|
42
42
|
from code_analysis_client.worktree import WorktreeClient, WorktreeConflictError
|
|
43
|
+
from code_analysis_client.project import ProjectClient
|
|
43
44
|
from code_analysis_client.queue_wait import QueuedJob
|
|
44
45
|
from code_analysis_client.server_api import (
|
|
45
46
|
CLIENT_FACADE_COMMANDS,
|
|
@@ -108,6 +109,7 @@ __all__ = [
|
|
|
108
109
|
"Diagnostic",
|
|
109
110
|
"ExtensionChain",
|
|
110
111
|
"FileCheckAndPromoteResult",
|
|
112
|
+
"ProjectClient",
|
|
111
113
|
"WorktreeClient",
|
|
112
114
|
"WorktreeConflictError",
|
|
113
115
|
"adapter_settings_from_server_config",
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/check_chain.py
RENAMED
|
@@ -164,6 +164,8 @@ class FileCheckAndPromoteResult:
|
|
|
164
164
|
diagnostics: List[Diagnostic]
|
|
165
165
|
degraded: Optional[Degraded]
|
|
166
166
|
raw: Dict[str, Any] = field(default_factory=dict, compare=False, repr=False)
|
|
167
|
+
# Write-back state of a promoted documentation copy (None for an ordinary file).
|
|
168
|
+
documentation_transfer: Optional[Dict[str, Any]] = None
|
|
167
169
|
|
|
168
170
|
|
|
169
171
|
def _require_non_empty(value: Any, *, field_name: str) -> str:
|
|
@@ -348,4 +350,5 @@ class CheckChainClient:
|
|
|
348
350
|
diagnostics=[_diagnostic(d) for d in (payload.get("diagnostics") or [])],
|
|
349
351
|
degraded=_degraded(payload.get("degraded")),
|
|
350
352
|
raw=payload,
|
|
353
|
+
documentation_transfer=payload.get("documentation_transfer"),
|
|
351
354
|
)
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/client.py
RENAMED
|
@@ -32,6 +32,7 @@ from code_analysis_client.config import (
|
|
|
32
32
|
)
|
|
33
33
|
from code_analysis_client.file_session import FileSessionClient
|
|
34
34
|
from code_analysis_client.check_chain import CheckChainClient
|
|
35
|
+
from code_analysis_client.project import ProjectClient
|
|
35
36
|
from code_analysis_client.worktree import WorktreeClient
|
|
36
37
|
from code_analysis_client.queue_wait import (
|
|
37
38
|
QueuedJob,
|
|
@@ -227,6 +228,11 @@ class CodeAnalysisAsyncClient:
|
|
|
227
228
|
"""Session workflow: ``session_*``, ``subordinate_session_*``, transfer, advisory locks."""
|
|
228
229
|
return FileSessionClient(self)
|
|
229
230
|
|
|
231
|
+
@property
|
|
232
|
+
def projects(self) -> ProjectClient:
|
|
233
|
+
"""Project commands outside the session workflow (documentation-server override)."""
|
|
234
|
+
return ProjectClient(self)
|
|
235
|
+
|
|
230
236
|
@property
|
|
231
237
|
def worktrees(self) -> WorktreeClient:
|
|
232
238
|
"""Worktree management: ``worktree_*`` commands."""
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/file_session.py
RENAMED
|
@@ -395,6 +395,51 @@ class FileSessionClient:
|
|
|
395
395
|
)
|
|
396
396
|
)
|
|
397
397
|
|
|
398
|
+
async def open_documentation_document(
|
|
399
|
+
self,
|
|
400
|
+
session_id: str,
|
|
401
|
+
project_id: str,
|
|
402
|
+
document_id: str,
|
|
403
|
+
) -> Dict[str, Any]:
|
|
404
|
+
"""Fetch a documentation-server document and lock the copy (``session_open_documentation_document``).
|
|
405
|
+
|
|
406
|
+
Returns ``session_id``, ``project_id``, ``document_id``, ``file_id``, ``file_path``
|
|
407
|
+
(``<directory>/<document_id>-<name>``), ``created``, ``size_bytes``, ``sha256``,
|
|
408
|
+
``documentation_transfer`` (``None`` or ``{document_id, file_path, status, attempts,
|
|
409
|
+
max_attempts, next_attempt_at, reason}``) and ``documentation_warning`` (``None`` or the
|
|
410
|
+
``UNDELIVERED_EDITS_RECOVERED`` mapping the reader must be shown with the document).
|
|
411
|
+
"""
|
|
412
|
+
return _unwrap(
|
|
413
|
+
await self._client.call_validated(
|
|
414
|
+
"session_open_documentation_document",
|
|
415
|
+
{
|
|
416
|
+
"session_id": session_id,
|
|
417
|
+
"project_id": project_id,
|
|
418
|
+
"document_id": document_id,
|
|
419
|
+
},
|
|
420
|
+
)
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
async def list_documentation_orphans(
|
|
424
|
+
self,
|
|
425
|
+
*,
|
|
426
|
+
project_id: Optional[str] = None,
|
|
427
|
+
document_id: Optional[str] = None,
|
|
428
|
+
limit: Optional[int] = None,
|
|
429
|
+
offset: Optional[int] = None,
|
|
430
|
+
) -> Dict[str, Any]:
|
|
431
|
+
"""List documentation copies with undelivered edits and no holding session (read-only)."""
|
|
432
|
+
params: Dict[str, Any] = {}
|
|
433
|
+
for key, value in (
|
|
434
|
+
("project_id", project_id),
|
|
435
|
+
("document_id", document_id),
|
|
436
|
+
("limit", limit),
|
|
437
|
+
("offset", offset),
|
|
438
|
+
):
|
|
439
|
+
if value is not None:
|
|
440
|
+
params[key] = value
|
|
441
|
+
return _unwrap(await self._client.call_validated("list_documentation_orphans", params))
|
|
442
|
+
|
|
398
443
|
async def list_file_locks(self, session_id: str) -> Dict[str, Any]:
|
|
399
444
|
"""Return locks held by the session (``session_list_file_locks``)."""
|
|
400
445
|
return _unwrap(
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Project-level typed methods on top of CodeAnalysisAsyncClient.
|
|
3
|
+
|
|
4
|
+
Wraps ``project_documentation_server_override`` (per-project address override of the documentation
|
|
5
|
+
server, used by live proofs that substitute an unreachable address).
|
|
6
|
+
|
|
7
|
+
Author: Vasiliy Zdanovskiy
|
|
8
|
+
email: vasilyvz@gmail.com
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from typing import TYPE_CHECKING, Any, Dict, Optional
|
|
14
|
+
|
|
15
|
+
from code_analysis_client.exceptions import ClientValidationError
|
|
16
|
+
from code_analysis_client.responses import FacadeCaller, unwrap_command_result
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from code_analysis_client.client import CodeAnalysisAsyncClient
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ProjectClient:
|
|
23
|
+
"""Project-scoped commands that are not part of the session workflow."""
|
|
24
|
+
|
|
25
|
+
__slots__ = ("_client",)
|
|
26
|
+
|
|
27
|
+
def __init__(self, client: CodeAnalysisAsyncClient) -> None:
|
|
28
|
+
"""Store the underlying async client."""
|
|
29
|
+
self._client = FacadeCaller(client) # type: ignore[assignment]
|
|
30
|
+
|
|
31
|
+
async def documentation_server_override(
|
|
32
|
+
self,
|
|
33
|
+
project_id: str,
|
|
34
|
+
*,
|
|
35
|
+
host: Optional[str] = None,
|
|
36
|
+
port: Optional[int] = None,
|
|
37
|
+
) -> Dict[str, Any]:
|
|
38
|
+
"""Set (``host`` and ``port``) or clear (neither) the documentation-server override.
|
|
39
|
+
|
|
40
|
+
Calls ``project_documentation_server_override``; returns ``project_id``, ``override``
|
|
41
|
+
(``None`` or ``{host, port}``) and ``effective`` (``None`` or ``{protocol, host, port}``).
|
|
42
|
+
|
|
43
|
+
Raises:
|
|
44
|
+
ClientValidationError: ``host`` and ``port`` were not supplied together.
|
|
45
|
+
"""
|
|
46
|
+
if (host is None) != (port is None):
|
|
47
|
+
raise ClientValidationError(
|
|
48
|
+
"host and port must be supplied together or both omitted",
|
|
49
|
+
field="port" if host is not None else "host",
|
|
50
|
+
)
|
|
51
|
+
params: Dict[str, Any] = {"project_id": project_id}
|
|
52
|
+
if host is not None:
|
|
53
|
+
params["host"] = host
|
|
54
|
+
params["port"] = port
|
|
55
|
+
return unwrap_command_result(
|
|
56
|
+
await self._client.call_validated(
|
|
57
|
+
"project_documentation_server_override", params
|
|
58
|
+
)
|
|
59
|
+
)
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/server_api.py
RENAMED
|
@@ -137,8 +137,10 @@ FILE_SESSION_COMMANDS: FrozenSet[str] = frozenset(
|
|
|
137
137
|
"session_list",
|
|
138
138
|
"session_view",
|
|
139
139
|
"session_open_file",
|
|
140
|
+
"session_open_documentation_document",
|
|
140
141
|
"session_close_file",
|
|
141
142
|
"session_list_file_locks",
|
|
143
|
+
"list_documentation_orphans",
|
|
142
144
|
"subordinate_session_create",
|
|
143
145
|
"subordinate_session_get",
|
|
144
146
|
"subordinate_session_update",
|
|
@@ -176,6 +178,8 @@ FILE_SESSION_FACADE_METHODS: Dict[str, str] = {
|
|
|
176
178
|
"session_list": "list_sessions",
|
|
177
179
|
"session_view": "view_session",
|
|
178
180
|
"session_open_file": "lock_file",
|
|
181
|
+
"session_open_documentation_document": "open_documentation_document",
|
|
182
|
+
"list_documentation_orphans": "list_documentation_orphans",
|
|
179
183
|
"session_close_file": "unlock_file",
|
|
180
184
|
"session_list_file_locks": "list_file_locks",
|
|
181
185
|
"subordinate_session_create": "create_subordinate_session",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.6.294
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-analysis-client
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.294
|
|
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
|
|
@@ -7,6 +7,7 @@ code_analysis_client/commands_proxy.py
|
|
|
7
7
|
code_analysis_client/config.py
|
|
8
8
|
code_analysis_client/exceptions.py
|
|
9
9
|
code_analysis_client/file_session.py
|
|
10
|
+
code_analysis_client/project.py
|
|
10
11
|
code_analysis_client/py.typed
|
|
11
12
|
code_analysis_client/queue_wait.py
|
|
12
13
|
code_analysis_client/responses.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.6.293
|
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/commands_proxy.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/config.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/queue_wait.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/responses.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/server_schema.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/symbol_tree.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/universal_file.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/validation.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.293 → code_analysis_client-1.6.294}/code_analysis_client/worktree.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|