plan-manager-client 0.2.149__tar.gz → 0.2.150__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.149 → plan_manager_client-0.2.150}/PKG-INFO +1 -1
  2. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/export_fetch_request.py +8 -2
  3. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_context_gate_mixin.py +4 -0
  4. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_hrs_file_mixin.py +77 -0
  5. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_plan_hrs_mixin.py +8 -0
  6. plan_manager_client-0.2.150/plan_manager_client/facade_runtime_mixin/__init__.py +11 -0
  7. plan_manager_client-0.2.149/plan_manager_client/facade_runtime_mixin.py → plan_manager_client-0.2.150/plan_manager_client/facade_runtime_mixin/authoring_part.py +24 -190
  8. plan_manager_client-0.2.150/plan_manager_client/facade_runtime_mixin/facade.py +324 -0
  9. plan_manager_client-0.2.150/plan_manager_client/facade_runtime_mixin/overlay_part.py +192 -0
  10. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/info_walker.py +22 -1
  11. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/server_api.py +3 -0
  12. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/server_api_mutating.py +1 -0
  13. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client.egg-info/PKG-INFO +1 -1
  14. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client.egg-info/SOURCES.txt +4 -1
  15. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/__init__.py +0 -0
  16. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/_version.py +0 -0
  17. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/authoring_diagnostics.py +0 -0
  18. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/client.py +0 -0
  19. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/config.py +0 -0
  20. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/__init__.py +0 -0
  21. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/archive.py +0 -0
  22. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/atomicity.py +0 -0
  23. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/commit.py +0 -0
  24. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/destination.py +0 -0
  25. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/provenance.py +0 -0
  26. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/delivery/upload.py +0 -0
  27. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/dispatch.py +0 -0
  28. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/export_fetch_chunks.py +0 -0
  29. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/export_fetch_unpack.py +0 -0
  30. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/export_fetch_verify.py +0 -0
  31. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_agent_config_mixin.py +0 -0
  32. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_bug_project_mixin.py +0 -0
  33. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_entity_common_mixin.py +0 -0
  34. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/facade_step_graph_mixin.py +0 -0
  35. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client/scenario_runtime.py +0 -0
  36. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client.egg-info/dependency_links.txt +0 -0
  37. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client.egg-info/requires.txt +0 -0
  38. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/plan_manager_client.egg-info/top_level.txt +0 -0
  39. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/pyproject.toml +0 -0
  40. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/setup.cfg +0 -0
  41. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/tests/test_client_server_api_sync.py +0 -0
  42. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/tests/test_contract_facade_passthrough.py +0 -0
  43. {plan_manager_client-0.2.149 → plan_manager_client-0.2.150}/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.149
3
+ Version: 0.2.150
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
@@ -18,7 +18,7 @@ class SupportsExportProduction(Protocol):
18
18
  """The two calls this module needs from a client facade."""
19
19
 
20
20
  async def plan_export(
21
- self, plan: str, revision: str | None = None
21
+ self, plan: str, revision: str | None = None, include_step_uuids: bool = False
22
22
  ) -> dict[str, Any]:
23
23
  ...
24
24
 
@@ -47,6 +47,7 @@ async def request_export_archive(
47
47
  client: SupportsExportProduction,
48
48
  plan: str,
49
49
  revision: str | None = None,
50
+ include_step_uuids: bool = False,
50
51
  ) -> ExportArchiveRef:
51
52
  """Produce a plan's export tree and obtain the reference to its archive.
52
53
 
@@ -60,12 +61,17 @@ async def request_export_archive(
60
61
  plan: The plan identifier whose export tree is produced and archived.
61
62
  revision: Optional revision passed to the export production call only; when None
62
63
  that call uses its own default revision selection.
64
+ include_step_uuids: When True the export descriptors carry step_uuid (bug 62cff4e4
65
+ part b); forwarded to plan_export only when True.
63
66
 
64
67
  Returns:
65
68
  The ExportArchiveRef naming exactly one archive file, with its size, declared
66
69
  whole-file digest, and packed-file count.
67
70
  """
68
- await client.plan_export(plan=plan, revision=revision)
71
+ export_params: dict[str, Any] = {"plan": plan, "revision": revision}
72
+ if include_step_uuids:
73
+ export_params["include_step_uuids"] = True
74
+ await client.plan_export(**export_params)
69
75
  response = await client.export_archive(plan=plan)
70
76
  return ExportArchiveRef(
71
77
  name=str(response["archive"]),
@@ -76,6 +76,10 @@ class ContextGateCommandsMixin:
76
76
  """Read one declared matrix namespace of a plan with its content_hash (parameters passed through; the server validates them)."""
77
77
  return await self._call("matrix_namespace_get", params)
78
78
 
79
+ async def matrix_case_get(self, **params: Any) -> Any:
80
+ """Read one matrix case of a plan by namespace and case_id; a case marked deleted is read with its mark (parameters passed through)."""
81
+ return await self._call("matrix_case_get", params)
82
+
79
83
  async def matrix_lint(self, **params: Any) -> Any:
80
84
  """Lint the matrix parts of a plan and page the defects (parameters passed through)."""
81
85
  return await self._call("matrix_lint", params)
@@ -10,8 +10,10 @@ plan_manager_client.server_api.FILE_WRAPPER_NAMES.
10
10
 
11
11
  from __future__ import annotations
12
12
 
13
+ import hashlib
13
14
  import os
14
15
  import uuid
16
+ from pathlib import Path
15
17
  from typing import Any, Callable
16
18
 
17
19
 
@@ -106,4 +108,79 @@ class HrsFileCommandsMixin:
106
108
  return await self._call("hrs_import", params)
107
109
 
108
110
 
111
+ async def hrs_export_file(
112
+ self,
113
+ plan: str,
114
+ path: str,
115
+ *,
116
+ overwrite: bool = False,
117
+ compression: str = "identity",
118
+ chunk_size: int | None = None,
119
+ on_progress: Callable[[int, int], None] | None = None,
120
+ ) -> Any:
121
+ """Export a plan to a local file: hrs_export(target file), export_download_begin, download, sha256 check.
122
+
123
+ The export file stays on the server until the sweep timer removes it after its lifetime (no confirm
124
+ command). The download goes to a temporary file next to the destination; the destination is replaced
125
+ only by the final rename, after the sha256 of the downloaded bytes equals the export sha256. Without
126
+ overwrite an existing destination is refused after the verified download. A server error reply is
127
+ returned unchanged. A path that is empty or None is refused before any request.
128
+ """
129
+ destination = _require_destination(path)
130
+ exported = _reply_payload(await self._call("hrs_export", {"plan": plan, "target": "file"}))
131
+ if not isinstance(exported, dict) or exported.get("success") is not True:
132
+ return exported
133
+ data = exported["data"]
134
+ begin_params: dict[str, Any] = {"plan": plan, "file": data["file"], "compression": compression}
135
+ if chunk_size is not None:
136
+ begin_params["chunk_size"] = chunk_size
137
+ begun_reply = await self._call("export_download_begin", begin_params)
138
+ begun = _reply_payload(begun_reply)
139
+ if not isinstance(begun, dict) or begun.get("success") is not True:
140
+ return begun_reply
141
+ transfer_id = begun["data"]["transfer_id"]
142
+
143
+ temporary = destination.with_name(f".{destination.name}.{uuid.uuid4().hex}.part")
144
+ try:
145
+ receipt = await self._rpc.download_file(
146
+ transfer_id, str(temporary), chunk_size=chunk_size, on_progress=on_progress
147
+ )
148
+ if not (receipt.completed and receipt.checksum_verified):
149
+ raise ValueError(f"download of {data['file']} is not completed or its checksum is not verified")
150
+ body = temporary.read_bytes()
151
+ if len(body) != data["size_bytes"] or hashlib.sha256(body).hexdigest() != data["sha256"]:
152
+ raise ValueError(f"downloaded file does not match the export {data['file']}")
153
+ if destination.exists() and not overwrite:
154
+ raise FileExistsError(f"destination exists and overwrite is False: {destination}")
155
+ os.replace(temporary, destination)
156
+ except BaseException:
157
+ with_suppressed_unlink(temporary)
158
+ raise
159
+ return {
160
+ "plan": plan,
161
+ "path": str(destination),
162
+ "size_bytes": data["size_bytes"],
163
+ "sha256": data["sha256"],
164
+ "paragraphs": data["paragraphs"],
165
+ "transfer_id": transfer_id,
166
+ "server_file": data["file"],
167
+ "expires_at": data["expires_at"],
168
+ }
169
+
170
+
171
+ def _require_destination(path: Any) -> Path:
172
+ """Return the destination path; an empty or missing path is refused before any request."""
173
+ if path is None or (isinstance(path, str) and not path.strip()):
174
+ raise ValueError("path must be a non-empty file path")
175
+ return Path(path)
176
+
177
+
178
+ def with_suppressed_unlink(path: Path) -> None:
179
+ """Remove a temporary file if it exists."""
180
+ try:
181
+ path.unlink()
182
+ except FileNotFoundError:
183
+ pass
184
+
185
+
109
186
  __all__ = ["HrsFileCommandsMixin"]
@@ -102,6 +102,10 @@ class PlanHrsCommandsMixin:
102
102
  """Export the byte-identical HRS Markdown text of a plan."""
103
103
  return await self._call("hrs_export", params)
104
104
 
105
+ async def export_download_begin(self, **params: Any) -> Any:
106
+ """Open the download session of one hrs_export file of a plan (plan, file, compression, chunk_size); the server file stays until the sweep timer removes it."""
107
+ return await self._call("export_download_begin", params)
108
+
105
109
  async def export_cleanup(self, **params: Any) -> Any:
106
110
  """Purge export artifacts under the configured export root, classified per plan; dry_run defaults to true and reports what would be removed without removing it."""
107
111
  return await self._call("export_cleanup", params)
@@ -138,6 +142,10 @@ class PlanHrsCommandsMixin:
138
142
  """Split one binding HRS paragraph, addressed by label, into several binding paragraphs cut at the given offsets."""
139
143
  return await self._call("para_split", params)
140
144
 
145
+ async def hrs_fields_fill(self, **params: Any) -> Any:
146
+ """Fill the kind, title and statement of broken HRS paragraphs with one model call each (queued; the body never changes)."""
147
+ return await self._call("hrs_fields_fill", params)
148
+
141
149
  async def concept_get(self, **params: Any) -> Any:
142
150
  """Return one concept of a plan by its id."""
143
151
  return await self._call("concept_get", params)
@@ -0,0 +1,11 @@
1
+ """Todo/runtime-link/comment and model-binding/execution/review/escalation command-family facade mixin.
2
+
3
+ Author: Vasiliy Zdanovskiy
4
+ email: vasilyvz@gmail.com
5
+ """
6
+
7
+ from .authoring_part import RuntimeAuthoringPart
8
+ from .facade import RuntimeCommandsMixin
9
+ from .overlay_part import RuntimeOverlayPart
10
+
11
+ __all__ = ["RuntimeCommandsMixin"]
@@ -1,194 +1,31 @@
1
- """Todo/runtime-link/comment and model-binding/execution/review/escalation command-family facade mixin.
2
-
3
- Author: Vasiliy Zdanovskiy
4
- email: vasilyvz@gmail.com
5
- """
1
+ """Module for split package."""
6
2
 
7
3
  from __future__ import annotations
8
-
9
4
  from typing import Any
10
5
 
11
-
12
- class RuntimeCommandsMixin:
6
+ class RuntimeAuthoringPart:
13
7
  """One method per plan_manager command in the runtime work-item family.
14
8
 
15
9
  Assumes it is mixed into a class that also inherits
16
10
  plan_manager_client.dispatch._CommandDispatchMixin, which supplies the
17
11
  coroutine async def _call(self, command: str, params: dict[str, Any] | None = None) -> Any
18
- used by every method below.
19
- """
20
-
21
- async def authoring_usage_get(self, step: str, include_descendants: bool) -> Any:
22
- """Read persisted MACSC token usage for one planned step (its id, a uuid4) or its subtree."""
23
- return await self._call("authoring_usage_get", {"step": step, "include_descendants": include_descendants})
24
-
25
- async def todo_create(self, **params: Any) -> Any:
26
- """Create a new TODO work item with a primary anchor."""
27
- return await self._call("todo_create", params)
28
-
29
- async def todo_get(self, **params: Any) -> Any:
30
- """Fetch a single TODO work item by identifier."""
31
- return await self._call("todo_get", params)
32
-
33
- async def todo_list(self, **params: Any) -> Any:
34
- """List TODO work items with uniform filtering and pagination."""
35
- return await self._call("todo_list", params)
36
-
37
- async def todo_update(self, **params: Any) -> Any:
38
- """Update mutable fields of an existing TODO work item."""
39
- return await self._call("todo_update", params)
40
-
41
- async def todo_reanchor(self, **params: Any) -> Any:
42
- """Move a TODO item's primary anchor to a new target, with an audit record."""
43
- return await self._call("todo_reanchor", params)
44
-
45
- async def todo_resolve(self, **params: Any) -> Any:
46
- """Mark a TODO work item resolved."""
47
- return await self._call("todo_resolve", params)
48
-
49
- async def todo_close(self, **params: Any) -> Any:
50
- """Mark a TODO work item closed."""
51
- return await self._call("todo_close", params)
52
-
53
- async def todo_reopen(self, **params: Any) -> Any:
54
- """Reopen a TODO work item from a terminal state."""
55
- return await self._call("todo_reopen", params)
56
-
57
- async def todo_delete(self, **params: Any) -> Any:
58
- """Delete a TODO work item: soft by default, hard=true gated by the inbound-reference integrity check, dry_run previews."""
59
- return await self._call("todo_delete", params)
60
-
61
- async def todo_link_add(self, **params: Any) -> Any:
62
- """Create a typed link between two TODO work items."""
63
- return await self._call("todo_link_add", params)
64
-
65
- async def todo_link_remove(self, **params: Any) -> Any:
66
- """Remove (soft-delete) a typed link between two TODO work items."""
67
- return await self._call("todo_link_remove", params)
68
-
69
- async def todo_link_get(self, **params: Any) -> Any:
70
- """Read one todo link by its id (parameters passed through; the server validates them)."""
71
- return await self._call("todo_link_get", params)
72
-
73
- async def todo_link_list(self, **params: Any) -> Any:
74
- """List todo links with filters and pagination (parameters passed through; the server validates them)."""
75
- return await self._call("todo_link_list", params)
76
-
77
- async def todo_link_delete(self, **params: Any) -> Any:
78
- """Delete a todo link: mark by default, hard=true removes a marked link, dry_run previews (parameters passed through; the server validates them)."""
79
- return await self._call("todo_link_delete", params)
80
-
81
- async def todo_queue(self, **params: Any) -> Any:
82
- """Surface a paginated page of the TODO-derived portion of the unified runtime work queue."""
83
- return await self._call("todo_queue", params)
84
-
85
- async def wish_create(self, **params: Any) -> Any:
86
- """Create a new runtime wish item."""
87
- return await self._call("wish_create", params)
88
-
89
- async def wish_get(self, **params: Any) -> Any:
90
- """Fetch a single runtime wish item by identifier."""
91
- return await self._call("wish_get", params)
92
-
93
- async def wish_list(self, **params: Any) -> Any:
94
- """List runtime wish items with filtering and pagination."""
95
- return await self._call("wish_list", params)
96
-
97
- async def wish_update(self, **params: Any) -> Any:
98
- """Update mutable fields of a runtime wish item."""
99
- return await self._call("wish_update", params)
100
-
101
- async def wish_reanchor(self, **params: Any) -> Any:
102
- """Move a wish item's primary anchor to a new target, with an audit record."""
103
- return await self._call("wish_reanchor", params)
12
+ used by every method below."""
104
13
 
105
- async def wish_delete(self, **params: Any) -> Any:
106
- """Delete a runtime wish item: soft by default, hard=true gated by the inbound-reference integrity check, dry_run previews."""
107
- return await self._call("wish_delete", params)
14
+ def __init__(self, owner):
15
+ self._owner = owner
108
16
 
109
- async def calendar_entry_create(self, **params: Any) -> Any:
110
- """Create a calendar-based work entry spanning one or more calendar days."""
111
- return await self._call("calendar_entry_create", params)
17
+ def __getattr__(self, name):
18
+ """Resolve names this part does not define on the owning facade."""
19
+ if name == "_owner":
20
+ raise AttributeError(name)
21
+ return getattr(self._owner, name)
112
22
 
113
- async def calendar_entry_get(self, **params: Any) -> Any:
114
- """Fetch one calendar-based work entry by identifier."""
115
- return await self._call("calendar_entry_get", params)
116
-
117
- async def calendar_entry_list(self, **params: Any) -> Any:
118
- """List calendar-based work entries with filtering and pagination."""
119
- return await self._call("calendar_entry_list", params)
120
-
121
- async def calendar_entry_update(self, **params: Any) -> Any:
122
- """Update mutable fields of a calendar-based work entry."""
123
- return await self._call("calendar_entry_update", params)
124
-
125
- async def calendar_entry_reanchor(self, **params: Any) -> Any:
126
- """Move a calendar entry's primary anchor to a new target, with an audit record."""
127
- return await self._call("calendar_entry_reanchor", params)
128
-
129
- async def calendar_entry_delete(self, **params: Any) -> Any:
130
- """Delete a calendar-based work entry: soft by default, hard=true available, dry_run previews."""
131
- return await self._call("calendar_entry_delete", params)
132
-
133
- async def runtime_link_add(self, **params: Any) -> Any:
134
- """Create a typed link between two runtime records, each independently a bug or a todo."""
135
- return await self._call("runtime_link_add", params)
136
-
137
- async def runtime_link_list(self, **params: Any) -> Any:
138
- """List generic runtime links, optionally filtered to one endpoint record, with uniform pagination."""
139
- return await self._call("runtime_link_list", params)
140
-
141
- async def runtime_link_remove(self, **params: Any) -> Any:
142
- """Remove (soft-delete) a generic runtime link, with an optional dry-run preview."""
143
- return await self._call("runtime_link_remove", params)
144
-
145
- async def runtime_link_get(self, **params: Any) -> Any:
146
- """Read one runtime link by its id (parameters passed through; the server validates them)."""
147
- return await self._call("runtime_link_get", params)
148
-
149
- async def runtime_link_delete(self, **params: Any) -> Any:
150
- """Delete a runtime link: mark by default, hard=true removes a marked link, dry_run previews (parameters passed through; the server validates them)."""
151
- return await self._call("runtime_link_delete", params)
152
-
153
- async def runtime_overlay_export(self, **params: Any) -> Any:
154
- """Export the runtime overlay of one plan to overlay.json in the plan export folder (parameters passed through)."""
155
- return await self._call("runtime_overlay_export", params)
156
-
157
- async def runtime_overlay_import(self, **params: Any) -> Any:
158
- """Import a runtime overlay file into its plan, all or nothing; dry_run validates and counts only (parameters passed through)."""
159
- return await self._call("runtime_overlay_import", params)
160
-
161
- async def comment_add(self, **params: Any) -> Any:
162
- """Create a new runtime comment attached to a comment anchor."""
163
- return await self._call("comment_add", params)
164
-
165
- async def comment_get(self, **params: Any) -> Any:
166
- """Retrieve a single runtime comment by identifier."""
167
- return await self._call("comment_get", params)
168
-
169
- async def comment_list(self, **params: Any) -> Any:
170
- """List runtime comments with uniform filtering and pagination."""
171
- return await self._call("comment_list", params)
172
-
173
- async def comment_supersede(self, **params: Any) -> Any:
174
- """Create a new runtime comment that supersedes an existing one, preserving history."""
175
- return await self._call("comment_supersede", params)
176
-
177
- async def comment_resolve(self, **params: Any) -> Any:
178
- """Mark an existing runtime comment as resolved."""
179
- return await self._call("comment_resolve", params)
180
-
181
- async def comment_update(self, **params: Any) -> Any:
182
- """Change the body, kind, visibility or author of a runtime comment in place (parameters passed through; the server validates them)."""
183
- return await self._call("comment_update", params)
184
-
185
- async def comment_reanchor(self, **params: Any) -> Any:
186
- """Move a runtime comment's primary anchor to a new target, with an audit record."""
187
- return await self._call("comment_reanchor", params)
188
-
189
- async def comment_delete(self, **params: Any) -> Any:
190
- """Delete a runtime comment: soft by default, hard=true gated by the inbound-reference integrity check, dry_run previews."""
191
- return await self._call("comment_delete", params)
23
+ async def authoring_usage_get(self, step: str, include_descendants: bool, plan: str | None = None) -> Any:
24
+ """Read persisted MACSC token usage for one planned step (its id, a uuid4, or with plan its path) or its subtree."""
25
+ params: dict[str, Any] = {"step": step, "include_descendants": include_descendants}
26
+ if plan is not None:
27
+ params["plan"] = plan
28
+ return await self._call("authoring_usage_get", params)
192
29
 
193
30
  async def model_binding_set(self, **params: Any) -> Any:
194
31
  """Create a model binding runtime-configuration record (C-009) for the given scope."""
@@ -273,9 +110,7 @@ class RuntimeCommandsMixin:
273
110
  params["orchestrator_model_id"] = orchestrator_model_id
274
111
  return await self._call("authoring_job_resume", params)
275
112
 
276
- async def authoring_job_stop(
277
- self, plan: str, step: str, session_id: str
278
- ) -> Any:
113
+ async def authoring_job_stop(self, plan: str, step: str, session_id: str) -> Any:
279
114
  """Stop the authoring job of the step ``step`` (its id, a uuid4) and its active same-session descendants."""
280
115
  return await self._call(
281
116
  "authoring_job_stop",
@@ -286,9 +121,12 @@ class RuntimeCommandsMixin:
286
121
  """Delete transient context for one terminal authoring job."""
287
122
  return await self._call("authoring_job_delete", {"job_id": job_id})
288
123
 
289
- async def authoring_child_list(self, step: str) -> Any:
290
- """List the direct planned children of the step ``step`` (its id, a uuid4)."""
291
- return await self._call("authoring_child_list", {"step": step})
124
+ async def authoring_child_list(self, step: str, plan: str | None = None) -> Any:
125
+ """List the direct planned children of the step ``step`` (its id, a uuid4, or with ``plan`` its path)."""
126
+ params: dict[str, Any] = {"step": step}
127
+ if plan is not None:
128
+ params["plan"] = plan
129
+ return await self._call("authoring_child_list", params)
292
130
 
293
131
  async def authoring_step_create(self, **params: Any) -> Any:
294
132
  return await self._call("authoring_step_create", params)
@@ -301,9 +139,7 @@ class RuntimeCommandsMixin:
301
139
 
302
140
  async def authoring_step_submit(self, step_payload: dict[str, Any]) -> Any:
303
141
  """Submit the current job's assigned-step payload."""
304
- return await self._call(
305
- "authoring_step_submit", {"step_payload": step_payload}
306
- )
142
+ return await self._call("authoring_step_submit", {"step_payload": step_payload})
307
143
 
308
144
  async def authoring_escalate(self, question: str) -> Any:
309
145
  """Pause the current job with a question for its direct parent."""
@@ -425,5 +261,3 @@ class RuntimeCommandsMixin:
425
261
  """Delete an answer envelope: soft by default, hard when hard=true, dry_run previews."""
426
262
  return await self._call("answer_envelope_delete", params)
427
263
 
428
-
429
- __all__ = ["RuntimeCommandsMixin"]
@@ -0,0 +1,324 @@
1
+ """Module for split package."""
2
+
3
+ from __future__ import annotations
4
+ from typing import Any
5
+ from .overlay_part import RuntimeOverlayPart
6
+ from .authoring_part import RuntimeAuthoringPart
7
+
8
+ class RuntimeCommandsMixin:
9
+ """One method per plan_manager command in the runtime work-item family.
10
+
11
+ Assumes it is mixed into a class that also inherits
12
+ plan_manager_client.dispatch._CommandDispatchMixin, which supplies the
13
+ coroutine async def _call(self, command: str, params: dict[str, Any] | None = None) -> Any
14
+ used by every method below."""
15
+
16
+ def __init__(self, *args, **kwargs):
17
+ super().__init__(*args, **kwargs)
18
+ self.runtimeOverlayPart = RuntimeOverlayPart(self)
19
+ self.runtimeAuthoringPart = RuntimeAuthoringPart(self)
20
+
21
+ async def todo_create(self, **params: Any) -> Any:
22
+ return await self.runtimeOverlayPart.todo_create(**params)
23
+
24
+ async def todo_get(self, **params: Any) -> Any:
25
+ return await self.runtimeOverlayPart.todo_get(**params)
26
+
27
+ async def todo_list(self, **params: Any) -> Any:
28
+ return await self.runtimeOverlayPart.todo_list(**params)
29
+
30
+ async def todo_update(self, **params: Any) -> Any:
31
+ return await self.runtimeOverlayPart.todo_update(**params)
32
+
33
+ async def todo_reanchor(self, **params: Any) -> Any:
34
+ return await self.runtimeOverlayPart.todo_reanchor(**params)
35
+
36
+ async def todo_resolve(self, **params: Any) -> Any:
37
+ return await self.runtimeOverlayPart.todo_resolve(**params)
38
+
39
+ async def todo_close(self, **params: Any) -> Any:
40
+ return await self.runtimeOverlayPart.todo_close(**params)
41
+
42
+ async def todo_reopen(self, **params: Any) -> Any:
43
+ return await self.runtimeOverlayPart.todo_reopen(**params)
44
+
45
+ async def todo_delete(self, **params: Any) -> Any:
46
+ return await self.runtimeOverlayPart.todo_delete(**params)
47
+
48
+ async def todo_link_add(self, **params: Any) -> Any:
49
+ return await self.runtimeOverlayPart.todo_link_add(**params)
50
+
51
+ async def todo_link_remove(self, **params: Any) -> Any:
52
+ return await self.runtimeOverlayPart.todo_link_remove(**params)
53
+
54
+ async def todo_link_get(self, **params: Any) -> Any:
55
+ return await self.runtimeOverlayPart.todo_link_get(**params)
56
+
57
+ async def todo_link_list(self, **params: Any) -> Any:
58
+ return await self.runtimeOverlayPart.todo_link_list(**params)
59
+
60
+ async def todo_link_delete(self, **params: Any) -> Any:
61
+ return await self.runtimeOverlayPart.todo_link_delete(**params)
62
+
63
+ async def todo_queue(self, **params: Any) -> Any:
64
+ return await self.runtimeOverlayPart.todo_queue(**params)
65
+
66
+ async def wish_create(self, **params: Any) -> Any:
67
+ return await self.runtimeOverlayPart.wish_create(**params)
68
+
69
+ async def wish_get(self, **params: Any) -> Any:
70
+ return await self.runtimeOverlayPart.wish_get(**params)
71
+
72
+ async def wish_list(self, **params: Any) -> Any:
73
+ return await self.runtimeOverlayPart.wish_list(**params)
74
+
75
+ async def wish_update(self, **params: Any) -> Any:
76
+ return await self.runtimeOverlayPart.wish_update(**params)
77
+
78
+ async def wish_reanchor(self, **params: Any) -> Any:
79
+ return await self.runtimeOverlayPart.wish_reanchor(**params)
80
+
81
+ async def wish_delete(self, **params: Any) -> Any:
82
+ return await self.runtimeOverlayPart.wish_delete(**params)
83
+
84
+ async def calendar_entry_create(self, **params: Any) -> Any:
85
+ return await self.runtimeOverlayPart.calendar_entry_create(**params)
86
+
87
+ async def calendar_entry_get(self, **params: Any) -> Any:
88
+ return await self.runtimeOverlayPart.calendar_entry_get(**params)
89
+
90
+ async def calendar_entry_list(self, **params: Any) -> Any:
91
+ return await self.runtimeOverlayPart.calendar_entry_list(**params)
92
+
93
+ async def calendar_entry_update(self, **params: Any) -> Any:
94
+ return await self.runtimeOverlayPart.calendar_entry_update(**params)
95
+
96
+ async def calendar_entry_reanchor(self, **params: Any) -> Any:
97
+ return await self.runtimeOverlayPart.calendar_entry_reanchor(**params)
98
+
99
+ async def calendar_entry_delete(self, **params: Any) -> Any:
100
+ return await self.runtimeOverlayPart.calendar_entry_delete(**params)
101
+
102
+ async def runtime_link_add(self, **params: Any) -> Any:
103
+ return await self.runtimeOverlayPart.runtime_link_add(**params)
104
+
105
+ async def runtime_link_list(self, **params: Any) -> Any:
106
+ return await self.runtimeOverlayPart.runtime_link_list(**params)
107
+
108
+ async def runtime_link_remove(self, **params: Any) -> Any:
109
+ return await self.runtimeOverlayPart.runtime_link_remove(**params)
110
+
111
+ async def runtime_link_get(self, **params: Any) -> Any:
112
+ return await self.runtimeOverlayPart.runtime_link_get(**params)
113
+
114
+ async def runtime_link_delete(self, **params: Any) -> Any:
115
+ return await self.runtimeOverlayPart.runtime_link_delete(**params)
116
+
117
+ async def runtime_overlay_export(self, **params: Any) -> Any:
118
+ return await self.runtimeOverlayPart.runtime_overlay_export(**params)
119
+
120
+ async def runtime_overlay_import(self, **params: Any) -> Any:
121
+ return await self.runtimeOverlayPart.runtime_overlay_import(**params)
122
+
123
+ async def comment_add(self, **params: Any) -> Any:
124
+ return await self.runtimeOverlayPart.comment_add(**params)
125
+
126
+ async def comment_get(self, **params: Any) -> Any:
127
+ return await self.runtimeOverlayPart.comment_get(**params)
128
+
129
+ async def comment_list(self, **params: Any) -> Any:
130
+ return await self.runtimeOverlayPart.comment_list(**params)
131
+
132
+ async def comment_supersede(self, **params: Any) -> Any:
133
+ return await self.runtimeOverlayPart.comment_supersede(**params)
134
+
135
+ async def comment_resolve(self, **params: Any) -> Any:
136
+ return await self.runtimeOverlayPart.comment_resolve(**params)
137
+
138
+ async def comment_update(self, **params: Any) -> Any:
139
+ return await self.runtimeOverlayPart.comment_update(**params)
140
+
141
+ async def comment_reanchor(self, **params: Any) -> Any:
142
+ return await self.runtimeOverlayPart.comment_reanchor(**params)
143
+
144
+ async def comment_delete(self, **params: Any) -> Any:
145
+ return await self.runtimeOverlayPart.comment_delete(**params)
146
+
147
+ async def authoring_usage_get(self, step: str, include_descendants: bool, plan: str | None = None) -> Any:
148
+ return await self.runtimeAuthoringPart.authoring_usage_get(
149
+ step, include_descendants, plan=plan
150
+ )
151
+
152
+ async def model_binding_set(self, **params: Any) -> Any:
153
+ return await self.runtimeAuthoringPart.model_binding_set(**params)
154
+
155
+ async def model_binding_get(self, **params: Any) -> Any:
156
+ return await self.runtimeAuthoringPart.model_binding_get(**params)
157
+
158
+ async def model_binding_list(self, **params: Any) -> Any:
159
+ return await self.runtimeAuthoringPart.model_binding_list(**params)
160
+
161
+ async def model_binding_update(self, **params: Any) -> Any:
162
+ return await self.runtimeAuthoringPart.model_binding_update(**params)
163
+
164
+ async def model_binding_remove(self, **params: Any) -> Any:
165
+ return await self.runtimeAuthoringPart.model_binding_remove(**params)
166
+
167
+ async def model_binding_resolve(self, **params: Any) -> Any:
168
+ return await self.runtimeAuthoringPart.model_binding_resolve(**params)
169
+
170
+ async def authoring_session_create(
171
+ self,
172
+ plan: str,
173
+ common_prompt_document_id: str | None = None,
174
+ executor_prompt_document_ids: dict[str, str] | None = None,
175
+ ) -> Any:
176
+ return await self.runtimeAuthoringPart.authoring_session_create(
177
+ plan, common_prompt_document_id, executor_prompt_document_ids
178
+ )
179
+
180
+ async def authoring_job_start(
181
+ self,
182
+ plan: str,
183
+ step: str,
184
+ session_id: str,
185
+ orchestrator_model_id: str | None = None,
186
+ ) -> Any:
187
+ return await self.runtimeAuthoringPart.authoring_job_start(
188
+ plan, step, session_id, orchestrator_model_id
189
+ )
190
+
191
+ async def authoring_job_status(
192
+ self, plan: str, step: str, session_id: str
193
+ ) -> Any:
194
+ return await self.runtimeAuthoringPart.authoring_job_status(
195
+ plan, step, session_id
196
+ )
197
+
198
+ async def authoring_job_resume(
199
+ self,
200
+ plan: str,
201
+ step: str,
202
+ session_id: str,
203
+ answer: str,
204
+ orchestrator_model_id: str | None = None,
205
+ ) -> Any:
206
+ return await self.runtimeAuthoringPart.authoring_job_resume(
207
+ plan, step, session_id, answer, orchestrator_model_id
208
+ )
209
+
210
+ async def authoring_job_stop(self, plan: str, step: str, session_id: str) -> Any:
211
+ return await self.runtimeAuthoringPart.authoring_job_stop(
212
+ plan, step, session_id
213
+ )
214
+
215
+ async def authoring_job_delete(self, job_id: str) -> Any:
216
+ return await self.runtimeAuthoringPart.authoring_job_delete(job_id)
217
+
218
+ async def authoring_child_list(self, step: str, plan: str | None = None) -> Any:
219
+ return await self.runtimeAuthoringPart.authoring_child_list(step, plan=plan)
220
+
221
+ async def authoring_step_create(self, **params: Any) -> Any:
222
+ return await self.runtimeAuthoringPart.authoring_step_create(**params)
223
+
224
+ async def authoring_step_update(self, **params: Any) -> Any:
225
+ return await self.runtimeAuthoringPart.authoring_step_update(**params)
226
+
227
+ async def authoring_step_delete(self, **params: Any) -> Any:
228
+ return await self.runtimeAuthoringPart.authoring_step_delete(**params)
229
+
230
+ async def authoring_step_submit(self, step_payload: dict[str, Any]) -> Any:
231
+ return await self.runtimeAuthoringPart.authoring_step_submit(step_payload)
232
+
233
+ async def authoring_escalate(self, question: str) -> Any:
234
+ return await self.runtimeAuthoringPart.authoring_escalate(question)
235
+
236
+ async def execution_attempt_create(self, **params: Any) -> Any:
237
+ return await self.runtimeAuthoringPart.execution_attempt_create(**params)
238
+
239
+ async def execution_attempt_report(self, **params: Any) -> Any:
240
+ return await self.runtimeAuthoringPart.execution_attempt_report(**params)
241
+
242
+ async def execution_attempt_get(self, **params: Any) -> Any:
243
+ return await self.runtimeAuthoringPart.execution_attempt_get(**params)
244
+
245
+ async def execution_attempt_list(self, **params: Any) -> Any:
246
+ return await self.runtimeAuthoringPart.execution_attempt_list(**params)
247
+
248
+ async def execution_attempt_supersede(self, **params: Any) -> Any:
249
+ return await self.runtimeAuthoringPart.execution_attempt_supersede(**params)
250
+
251
+ async def execution_attempt_delete(self, **params: Any) -> Any:
252
+ return await self.runtimeAuthoringPart.execution_attempt_delete(**params)
253
+
254
+ async def review_result_create(self, **params: Any) -> Any:
255
+ return await self.runtimeAuthoringPart.review_result_create(**params)
256
+
257
+ async def review_result_get(self, **params: Any) -> Any:
258
+ return await self.runtimeAuthoringPart.review_result_get(**params)
259
+
260
+ async def review_result_list(self, **params: Any) -> Any:
261
+ return await self.runtimeAuthoringPart.review_result_list(**params)
262
+
263
+ async def review_result_supersede(self, **params: Any) -> Any:
264
+ return await self.runtimeAuthoringPart.review_result_supersede(**params)
265
+
266
+ async def review_result_delete(self, **params: Any) -> Any:
267
+ return await self.runtimeAuthoringPart.review_result_delete(**params)
268
+
269
+ async def escalation_create(self, **params: Any) -> Any:
270
+ return await self.runtimeAuthoringPart.escalation_create(**params)
271
+
272
+ async def escalation_get(self, **params: Any) -> Any:
273
+ return await self.runtimeAuthoringPart.escalation_get(**params)
274
+
275
+ async def escalation_list(self, **params: Any) -> Any:
276
+ return await self.runtimeAuthoringPart.escalation_list(**params)
277
+
278
+ async def escalation_resolve(self, **params: Any) -> Any:
279
+ return await self.runtimeAuthoringPart.escalation_resolve(**params)
280
+
281
+ async def escalation_reanchor(self, **params: Any) -> Any:
282
+ return await self.runtimeAuthoringPart.escalation_reanchor(**params)
283
+
284
+ async def escalation_delete(self, **params: Any) -> Any:
285
+ return await self.runtimeAuthoringPart.escalation_delete(**params)
286
+
287
+ async def escalation_update(self, **params: Any) -> Any:
288
+ return await self.runtimeAuthoringPart.escalation_update(**params)
289
+
290
+ async def escalation_policy_create(self, **params: Any) -> Any:
291
+ return await self.runtimeAuthoringPart.escalation_policy_create(**params)
292
+
293
+ async def escalation_policy_get(self, **params: Any) -> Any:
294
+ return await self.runtimeAuthoringPart.escalation_policy_get(**params)
295
+
296
+ async def escalation_policy_list(self, **params: Any) -> Any:
297
+ return await self.runtimeAuthoringPart.escalation_policy_list(**params)
298
+
299
+ async def escalation_policy_update(self, **params: Any) -> Any:
300
+ return await self.runtimeAuthoringPart.escalation_policy_update(**params)
301
+
302
+ async def escalation_policy_delete(self, **params: Any) -> Any:
303
+ return await self.runtimeAuthoringPart.escalation_policy_delete(**params)
304
+
305
+ async def escalation_policy_get_active(self, **params: Any) -> Any:
306
+ return await self.runtimeAuthoringPart.escalation_policy_get_active(**params)
307
+
308
+ async def answer_envelope_create(self, **params: Any) -> Any:
309
+ return await self.runtimeAuthoringPart.answer_envelope_create(**params)
310
+
311
+ async def answer_envelope_get(self, **params: Any) -> Any:
312
+ return await self.runtimeAuthoringPart.answer_envelope_get(**params)
313
+
314
+ async def answer_envelope_list(self, **params: Any) -> Any:
315
+ return await self.runtimeAuthoringPart.answer_envelope_list(**params)
316
+
317
+ async def answer_envelope_update(self, **params: Any) -> Any:
318
+ return await self.runtimeAuthoringPart.answer_envelope_update(**params)
319
+
320
+ async def answer_envelope_delete(self, **params: Any) -> Any:
321
+ return await self.runtimeAuthoringPart.answer_envelope_delete(**params)
322
+
323
+
324
+
@@ -0,0 +1,192 @@
1
+ """Module for split package."""
2
+
3
+ from __future__ import annotations
4
+ from typing import Any
5
+
6
+ class RuntimeOverlayPart:
7
+ """One method per plan_manager command in the runtime work-item family.
8
+
9
+ Assumes it is mixed into a class that also inherits
10
+ plan_manager_client.dispatch._CommandDispatchMixin, which supplies the
11
+ coroutine async def _call(self, command: str, params: dict[str, Any] | None = None) -> Any
12
+ used by every method below."""
13
+
14
+ def __init__(self, owner):
15
+ self._owner = owner
16
+
17
+ def __getattr__(self, name):
18
+ """Resolve names this part does not define on the owning facade."""
19
+ if name == "_owner":
20
+ raise AttributeError(name)
21
+ return getattr(self._owner, name)
22
+
23
+ async def todo_create(self, **params: Any) -> Any:
24
+ """Create a new TODO work item with a primary anchor."""
25
+ return await self._call("todo_create", params)
26
+
27
+ async def todo_get(self, **params: Any) -> Any:
28
+ """Fetch a single TODO work item by identifier."""
29
+ return await self._call("todo_get", params)
30
+
31
+ async def todo_list(self, **params: Any) -> Any:
32
+ """List TODO work items with uniform filtering and pagination."""
33
+ return await self._call("todo_list", params)
34
+
35
+ async def todo_update(self, **params: Any) -> Any:
36
+ """Update mutable fields of an existing TODO work item."""
37
+ return await self._call("todo_update", params)
38
+
39
+ async def todo_reanchor(self, **params: Any) -> Any:
40
+ """Move a TODO item's primary anchor to a new target, with an audit record."""
41
+ return await self._call("todo_reanchor", params)
42
+
43
+ async def todo_resolve(self, **params: Any) -> Any:
44
+ """Mark a TODO work item resolved."""
45
+ return await self._call("todo_resolve", params)
46
+
47
+ async def todo_close(self, **params: Any) -> Any:
48
+ """Mark a TODO work item closed."""
49
+ return await self._call("todo_close", params)
50
+
51
+ async def todo_reopen(self, **params: Any) -> Any:
52
+ """Reopen a TODO work item from a terminal state."""
53
+ return await self._call("todo_reopen", params)
54
+
55
+ async def todo_delete(self, **params: Any) -> Any:
56
+ """Delete a TODO work item: soft by default, hard=true gated by the inbound-reference integrity check, dry_run previews."""
57
+ return await self._call("todo_delete", params)
58
+
59
+ async def todo_link_add(self, **params: Any) -> Any:
60
+ """Create a typed link between two TODO work items."""
61
+ return await self._call("todo_link_add", params)
62
+
63
+ async def todo_link_remove(self, **params: Any) -> Any:
64
+ """Remove (soft-delete) a typed link between two TODO work items."""
65
+ return await self._call("todo_link_remove", params)
66
+
67
+ async def todo_link_get(self, **params: Any) -> Any:
68
+ """Read one todo link by its id (parameters passed through; the server validates them)."""
69
+ return await self._call("todo_link_get", params)
70
+
71
+ async def todo_link_list(self, **params: Any) -> Any:
72
+ """List todo links with filters and pagination (parameters passed through; the server validates them)."""
73
+ return await self._call("todo_link_list", params)
74
+
75
+ async def todo_link_delete(self, **params: Any) -> Any:
76
+ """Delete a todo link: mark by default, hard=true removes a marked link, dry_run previews (parameters passed through; the server validates them)."""
77
+ return await self._call("todo_link_delete", params)
78
+
79
+ async def todo_queue(self, **params: Any) -> Any:
80
+ """Surface a paginated page of the TODO-derived portion of the unified runtime work queue."""
81
+ return await self._call("todo_queue", params)
82
+
83
+ async def wish_create(self, **params: Any) -> Any:
84
+ """Create a new runtime wish item."""
85
+ return await self._call("wish_create", params)
86
+
87
+ async def wish_get(self, **params: Any) -> Any:
88
+ """Fetch a single runtime wish item by identifier."""
89
+ return await self._call("wish_get", params)
90
+
91
+ async def wish_list(self, **params: Any) -> Any:
92
+ """List runtime wish items with filtering and pagination."""
93
+ return await self._call("wish_list", params)
94
+
95
+ async def wish_update(self, **params: Any) -> Any:
96
+ """Update mutable fields of a runtime wish item."""
97
+ return await self._call("wish_update", params)
98
+
99
+ async def wish_reanchor(self, **params: Any) -> Any:
100
+ """Move a wish item's primary anchor to a new target, with an audit record."""
101
+ return await self._call("wish_reanchor", params)
102
+
103
+ async def wish_delete(self, **params: Any) -> Any:
104
+ """Delete a runtime wish item: soft by default, hard=true gated by the inbound-reference integrity check, dry_run previews."""
105
+ return await self._call("wish_delete", params)
106
+
107
+ async def calendar_entry_create(self, **params: Any) -> Any:
108
+ """Create a calendar-based work entry spanning one or more calendar days."""
109
+ return await self._call("calendar_entry_create", params)
110
+
111
+ async def calendar_entry_get(self, **params: Any) -> Any:
112
+ """Fetch one calendar-based work entry by identifier."""
113
+ return await self._call("calendar_entry_get", params)
114
+
115
+ async def calendar_entry_list(self, **params: Any) -> Any:
116
+ """List calendar-based work entries with filtering and pagination."""
117
+ return await self._call("calendar_entry_list", params)
118
+
119
+ async def calendar_entry_update(self, **params: Any) -> Any:
120
+ """Update mutable fields of a calendar-based work entry."""
121
+ return await self._call("calendar_entry_update", params)
122
+
123
+ async def calendar_entry_reanchor(self, **params: Any) -> Any:
124
+ """Move a calendar entry's primary anchor to a new target, with an audit record."""
125
+ return await self._call("calendar_entry_reanchor", params)
126
+
127
+ async def calendar_entry_delete(self, **params: Any) -> Any:
128
+ """Delete a calendar-based work entry: soft by default, hard=true available, dry_run previews."""
129
+ return await self._call("calendar_entry_delete", params)
130
+
131
+ async def runtime_link_add(self, **params: Any) -> Any:
132
+ """Create a typed link between two runtime records, each independently a bug or a todo."""
133
+ return await self._call("runtime_link_add", params)
134
+
135
+ async def runtime_link_list(self, **params: Any) -> Any:
136
+ """List generic runtime links, optionally filtered to one endpoint record, with uniform pagination."""
137
+ return await self._call("runtime_link_list", params)
138
+
139
+ async def runtime_link_remove(self, **params: Any) -> Any:
140
+ """Remove (soft-delete) a generic runtime link, with an optional dry-run preview."""
141
+ return await self._call("runtime_link_remove", params)
142
+
143
+ async def runtime_link_get(self, **params: Any) -> Any:
144
+ """Read one runtime link by its id (parameters passed through; the server validates them)."""
145
+ return await self._call("runtime_link_get", params)
146
+
147
+ async def runtime_link_delete(self, **params: Any) -> Any:
148
+ """Delete a runtime link: mark by default, hard=true removes a marked link, dry_run previews (parameters passed through; the server validates them)."""
149
+ return await self._call("runtime_link_delete", params)
150
+
151
+ async def runtime_overlay_export(self, **params: Any) -> Any:
152
+ """Export the runtime overlay of one plan to overlay.json in the plan export folder (parameters passed through)."""
153
+ return await self._call("runtime_overlay_export", params)
154
+
155
+ async def runtime_overlay_import(self, **params: Any) -> Any:
156
+ """Import a runtime overlay file into its plan, all or nothing; dry_run validates and counts only (parameters passed through)."""
157
+ return await self._call("runtime_overlay_import", params)
158
+
159
+ async def comment_add(self, **params: Any) -> Any:
160
+ """Create a new runtime comment attached to a comment anchor."""
161
+ return await self._call("comment_add", params)
162
+
163
+ async def comment_get(self, **params: Any) -> Any:
164
+ """Retrieve a single runtime comment by identifier."""
165
+ return await self._call("comment_get", params)
166
+
167
+ async def comment_list(self, **params: Any) -> Any:
168
+ """List runtime comments with uniform filtering and pagination."""
169
+ return await self._call("comment_list", params)
170
+
171
+ async def comment_supersede(self, **params: Any) -> Any:
172
+ """Create a new runtime comment that supersedes an existing one, preserving history."""
173
+ return await self._call("comment_supersede", params)
174
+
175
+ async def comment_resolve(self, **params: Any) -> Any:
176
+ """Mark an existing runtime comment as resolved."""
177
+ return await self._call("comment_resolve", params)
178
+
179
+ async def comment_update(self, **params: Any) -> Any:
180
+ """Change the body, kind, visibility or author of a runtime comment in place (parameters passed through; the server validates them)."""
181
+ return await self._call("comment_update", params)
182
+
183
+ async def comment_reanchor(self, **params: Any) -> Any:
184
+ """Move a runtime comment's primary anchor to a new target, with an audit record."""
185
+ return await self._call("comment_reanchor", params)
186
+
187
+ async def comment_delete(self, **params: Any) -> Any:
188
+ """Delete a runtime comment: soft by default, hard=true gated by the inbound-reference integrity check, dry_run previews."""
189
+ return await self._call("comment_delete", params)
190
+
191
+
192
+
@@ -102,11 +102,32 @@ async def walk_info(
102
102
  return content
103
103
 
104
104
 
105
+ def _page_of_envelope(raw: Any) -> Any:
106
+ """The bare info page of a client reply.
107
+
108
+ The client `info` method answers the command envelope {command, job_id, status, result: {success,
109
+ data: page}} (bug 05336ae7). The walker reads the page itself (kind, has_more, next_offset and the
110
+ section key), so the envelope is unwrapped here; a reply that is already a bare page passes through.
111
+ A failed envelope raises, never a silent empty page.
112
+ """
113
+ if isinstance(raw, dict) and isinstance(raw.get("result"), dict):
114
+ result = raw["result"]
115
+ if result.get("success") is False:
116
+ raise RuntimeError("info failed: %r" % (result,))
117
+ if "data" in result:
118
+ return result["data"]
119
+ return raw
120
+
121
+
105
122
  async def info_walk(client: Any, **params: Any) -> Any:
106
123
  """Read one `info` node, or every section, to its end through a client's ``info`` method.
107
124
 
108
125
  ``client`` is any object with an async ``info(**params)`` method (the PlanManagerClient). This is a
109
126
  module function, not a facade method: the facade must expose only canonical command names.
110
127
  Parameters are those of :func:`walk_info`: section, subsection, path and follow_refs.
128
+ The client reply is unwrapped to the bare page first (see :func:`_page_of_envelope`).
111
129
  """
112
- return await walk_info(client.info, **params)
130
+ async def _info(**page_params: Any) -> Any:
131
+ return _page_of_envelope(await client.info(**page_params))
132
+
133
+ return await walk_info(_info, **params)
@@ -27,6 +27,7 @@ COMMAND_NAMES: frozenset[str] = frozenset(
27
27
  "matrix_namespace_delete",
28
28
  "matrix_namespace_rename",
29
29
  "matrix_namespace_get",
30
+ "matrix_case_get",
30
31
  "matrix_get",
31
32
  "matrix_lint",
32
33
  "matrix_call_upsert",
@@ -49,6 +50,7 @@ COMMAND_NAMES: frozenset[str] = frozenset(
49
50
  "export_archive",
50
51
  "hrs_import",
51
52
  "hrs_export",
53
+ "export_download_begin",
52
54
  "export_cleanup",
53
55
  "para_list",
54
56
  "para_get",
@@ -58,6 +60,7 @@ COMMAND_NAMES: frozenset[str] = frozenset(
58
60
  "para_update",
59
61
  "para_delete",
60
62
  "para_split",
63
+ "hrs_fields_fill",
61
64
  "concept_get",
62
65
  "concept_list",
63
66
  "concept_add",
@@ -31,6 +31,7 @@ MUTATING_COMMAND_NAMES: frozenset[str] = frozenset(
31
31
  "para_label_assign",
32
32
  "para_mark_non_binding",
33
33
  "para_split",
34
+ "hrs_fields_fill",
34
35
  "concept_add",
35
36
  "concept_update",
36
37
  "concept_remove",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-manager-client
3
- Version: 0.2.149
3
+ Version: 0.2.150
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
@@ -15,7 +15,6 @@ plan_manager_client/facade_context_gate_mixin.py
15
15
  plan_manager_client/facade_entity_common_mixin.py
16
16
  plan_manager_client/facade_hrs_file_mixin.py
17
17
  plan_manager_client/facade_plan_hrs_mixin.py
18
- plan_manager_client/facade_runtime_mixin.py
19
18
  plan_manager_client/facade_step_graph_mixin.py
20
19
  plan_manager_client/info_walker.py
21
20
  plan_manager_client/scenario_runtime.py
@@ -33,6 +32,10 @@ plan_manager_client/delivery/commit.py
33
32
  plan_manager_client/delivery/destination.py
34
33
  plan_manager_client/delivery/provenance.py
35
34
  plan_manager_client/delivery/upload.py
35
+ plan_manager_client/facade_runtime_mixin/__init__.py
36
+ plan_manager_client/facade_runtime_mixin/authoring_part.py
37
+ plan_manager_client/facade_runtime_mixin/facade.py
38
+ plan_manager_client/facade_runtime_mixin/overlay_part.py
36
39
  tests/test_client_server_api_sync.py
37
40
  tests/test_contract_facade_passthrough.py
38
41
  tests/test_dispatch_validation_error_classification.py