code-analysis-client 1.6.302__tar.gz → 1.6.304__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.302 → code_analysis_client-1.6.304}/PKG-INFO +1 -1
  2. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/check_chain.py +8 -2
  3. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/file_session.py +20 -11
  4. code_analysis_client-1.6.304/code_analysis_client/version.txt +1 -0
  5. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client.egg-info/PKG-INFO +1 -1
  6. code_analysis_client-1.6.302/code_analysis_client/version.txt +0 -1
  7. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/README.md +0 -0
  8. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/__init__.py +0 -0
  9. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/client.py +0 -0
  10. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/commands_proxy.py +0 -0
  11. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/config.py +0 -0
  12. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/exceptions.py +0 -0
  13. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/project.py +0 -0
  14. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/py.typed +0 -0
  15. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/queue_wait.py +0 -0
  16. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/responses.py +0 -0
  17. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/schema_disk_cache.py +0 -0
  18. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/server_api.py +0 -0
  19. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/server_schema.py +0 -0
  20. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/symbol_tree.py +0 -0
  21. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/universal_file.py +0 -0
  22. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/validation.py +0 -0
  23. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/vectorizer_state.py +0 -0
  24. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client/worktree.py +0 -0
  25. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client.egg-info/SOURCES.txt +0 -0
  26. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client.egg-info/dependency_links.txt +0 -0
  27. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client.egg-info/requires.txt +0 -0
  28. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/code_analysis_client.egg-info/top_level.txt +0 -0
  29. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/pyproject.toml +0 -0
  30. {code_analysis_client-1.6.302 → code_analysis_client-1.6.304}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-analysis-client
3
- Version: 1.6.302
3
+ Version: 1.6.304
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
@@ -167,7 +167,10 @@ class FileCheckAndPromoteResult:
167
167
  diagnostics: List[Diagnostic]
168
168
  degraded: Optional[Degraded]
169
169
  raw: Dict[str, Any] = field(default_factory=dict, compare=False, repr=False)
170
- # Write-back state of a promoted documentation copy (None for an ordinary file).
170
+ # Delivered write-back of a promoted documentation copy: {document_id, file_path,
171
+ # status "transferred"}; None for an ordinary file. A failed write-back is not a result:
172
+ # the server answers an error (CheckChainError, e.g. DOCUMENTATION_SERVER_UNAVAILABLE)
173
+ # whose details carry promoted, commit, edit_kept and holder_session_id.
171
174
  documentation_transfer: Optional[Dict[str, Any]] = None
172
175
  # Seconds spent waiting for the path lock and the project main lock
173
176
  # ({path_waited_seconds, main_waited_seconds}); None from an older server.
@@ -323,7 +326,10 @@ class CheckChainClient:
323
326
  Raises WorktreeConflictError on WORKTREE_SYNC_CONFLICT (with
324
327
  ``conflicts`` and ``preserved_locked_files``), CheckChainConfigInvalidError
325
328
  for a malformed registry entry, and CheckChainError (``code`` from the
326
- closed enum, e.g. FCP_PROMOTE_RACE) for every other server error.
329
+ closed enum, e.g. FCP_PROMOTE_RACE) for every other server error. A
330
+ documentation copy whose single write-back failed raises CheckChainError
331
+ too (DOCUMENTATION_SERVER_UNAVAILABLE, NOT_FOUND or INTERNAL_ERROR) although
332
+ the commit is promoted; the edit and the lock stay with the session.
327
333
  """
328
334
  project_id = _require_non_empty(project_id, field_name="project_id")
329
335
  editor_session_id = _require_non_empty(
@@ -381,18 +381,26 @@ class FileSessionClient:
381
381
  session_id: str,
382
382
  project_id: str,
383
383
  file_id: str,
384
+ discard_documentation_edit: Optional[bool] = None,
384
385
  ) -> Dict[str, Any]:
385
- """Release a DB file lock without transfer (``session_close_file``)."""
386
+ """Release a DB file lock without transfer (``session_close_file``).
387
+
388
+ ``discard_documentation_edit`` (sent only when not None) matters only for a fetched
389
+ documentation copy with an edit the documentation server did not receive: without it
390
+ (or False) the server refuses the close with DOCUMENTATION_EDIT_UNSENT and keeps the
391
+ lock; True releases the lock and deletes the copy and the edit. The result carries
392
+ ``documentation_edit_discarded``.
393
+ """
386
394
  await self.assert_session_exists(session_id)
395
+ params: Dict[str, Any] = {
396
+ "session_id": session_id,
397
+ "project_id": project_id,
398
+ "file_id": file_id,
399
+ }
400
+ if discard_documentation_edit is not None:
401
+ params["discard_documentation_edit"] = bool(discard_documentation_edit)
387
402
  return _unwrap(
388
- await self._client.call_validated(
389
- "session_close_file",
390
- {
391
- "session_id": session_id,
392
- "project_id": project_id,
393
- "file_id": file_id,
394
- },
395
- )
403
+ await self._client.call_validated("session_close_file", params)
396
404
  )
397
405
 
398
406
  async def open_documentation_document(
@@ -405,9 +413,10 @@ class FileSessionClient:
405
413
 
406
414
  Returns ``session_id``, ``project_id``, ``document_id``, ``file_id``, ``file_path``
407
415
  (``<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
416
+ ``waited_seconds``, ``lock_file`` and ``documentation_warning`` (``None`` or the
410
417
  ``UNDELIVERED_EDITS_RECOVERED`` mapping the reader must be shown with the document).
418
+ The open never writes to the documentation server: saved edits are delivered by
419
+ ``file_check_and_promote``.
411
420
  """
412
421
  return _unwrap(
413
422
  await self._client.call_validated(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-analysis-client
3
- Version: 1.6.302
3
+ Version: 1.6.304
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