plan-manager-client 0.2.150__tar.gz → 0.2.151__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 (43) hide show
  1. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/PKG-INFO +1 -1
  2. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/client.py +5 -0
  3. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_hrs_file_mixin.py +15 -0
  4. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client.egg-info/PKG-INFO +1 -1
  5. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/__init__.py +0 -0
  6. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/_version.py +0 -0
  7. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/authoring_diagnostics.py +0 -0
  8. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/config.py +0 -0
  9. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/__init__.py +0 -0
  10. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/archive.py +0 -0
  11. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/atomicity.py +0 -0
  12. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/commit.py +0 -0
  13. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/destination.py +0 -0
  14. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/provenance.py +0 -0
  15. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/delivery/upload.py +0 -0
  16. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/dispatch.py +0 -0
  17. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/export_fetch_chunks.py +0 -0
  18. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/export_fetch_request.py +0 -0
  19. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/export_fetch_unpack.py +0 -0
  20. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/export_fetch_verify.py +0 -0
  21. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_agent_config_mixin.py +0 -0
  22. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_bug_project_mixin.py +0 -0
  23. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_context_gate_mixin.py +0 -0
  24. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_entity_common_mixin.py +0 -0
  25. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_plan_hrs_mixin.py +0 -0
  26. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_runtime_mixin/__init__.py +0 -0
  27. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_runtime_mixin/authoring_part.py +0 -0
  28. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_runtime_mixin/facade.py +0 -0
  29. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_runtime_mixin/overlay_part.py +0 -0
  30. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/facade_step_graph_mixin.py +0 -0
  31. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/info_walker.py +0 -0
  32. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/scenario_runtime.py +0 -0
  33. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/server_api.py +0 -0
  34. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client/server_api_mutating.py +0 -0
  35. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client.egg-info/SOURCES.txt +0 -0
  36. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client.egg-info/dependency_links.txt +0 -0
  37. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client.egg-info/requires.txt +0 -0
  38. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/plan_manager_client.egg-info/top_level.txt +0 -0
  39. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/pyproject.toml +0 -0
  40. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/setup.cfg +0 -0
  41. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/tests/test_client_server_api_sync.py +0 -0
  42. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/tests/test_contract_facade_passthrough.py +0 -0
  43. {plan_manager_client-0.2.150 → plan_manager_client-0.2.151}/tests/test_dispatch_validation_error_classification.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-manager-client
3
- Version: 0.2.150
3
+ Version: 0.2.151
4
4
  Summary: First-class client library for the plan_manager JSON-RPC API: full command-surface facade plus export delivery module boundary.
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: mcp-proxy-adapter==8.11.3
@@ -65,6 +65,11 @@ class PlanManagerClient(
65
65
  canonical command methods.
66
66
  """
67
67
  self._rpc = JsonRpcClient(**jsonrpc_kwargs)
68
+ # Chain the cooperative initialisers of every mixin in the MRO (for example
69
+ # RuntimeCommandsMixin, which creates runtimeOverlayPart and
70
+ # runtimeAuthoringPart). Called without arguments: the mixins take none, and
71
+ # object.__init__ rejects keyword arguments.
72
+ super().__init__()
68
73
 
69
74
 
70
75
  __all__ = ["PlanManagerClient"]
@@ -127,6 +127,7 @@ class HrsFileCommandsMixin:
127
127
  returned unchanged. A path that is empty or None is refused before any request.
128
128
  """
129
129
  destination = _require_destination(path)
130
+ _require_writable_destination(destination, overwrite)
130
131
  exported = _reply_payload(await self._call("hrs_export", {"plan": plan, "target": "file"}))
131
132
  if not isinstance(exported, dict) or exported.get("success") is not True:
132
133
  return exported
@@ -175,6 +176,20 @@ def _require_destination(path: Any) -> Path:
175
176
  return Path(path)
176
177
 
177
178
 
179
+ def _require_writable_destination(destination: Path, overwrite: bool) -> None:
180
+ """Refuse a destination that cannot be written, before any request: a directory, a missing parent, a read-only
181
+ parent, or an existing file without overwrite."""
182
+ if destination.is_dir():
183
+ raise IsADirectoryError(f"destination is a directory: {destination}")
184
+ parent = destination.parent
185
+ if not parent.is_dir():
186
+ raise FileNotFoundError(f"destination directory does not exist: {parent}")
187
+ if not os.access(parent, os.W_OK | os.X_OK):
188
+ raise PermissionError(f"destination directory is not writable: {parent}")
189
+ if destination.exists() and not overwrite:
190
+ raise FileExistsError(f"destination exists and overwrite is False: {destination}")
191
+
192
+
178
193
  def with_suppressed_unlink(path: Path) -> None:
179
194
  """Remove a temporary file if it exists."""
180
195
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-manager-client
3
- Version: 0.2.150
3
+ Version: 0.2.151
4
4
  Summary: First-class client library for the plan_manager JSON-RPC API: full command-surface facade plus export delivery module boundary.
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: mcp-proxy-adapter==8.11.3