plan-manager-client 0.2.182__tar.gz → 0.2.237__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 (47) hide show
  1. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/PKG-INFO +3 -3
  2. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/_version.py +8 -4
  3. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/authoring_diagnostics.py +1 -0
  4. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/client.py +2 -0
  5. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_bug_project_mixin.py +17 -1
  6. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_context_gate_mixin.py +3 -27
  7. plan_manager_client-0.2.237/plan_manager_client/facade_name_tree_mixin.py +115 -0
  8. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_plan_hrs_mixin.py +8 -4
  9. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_runtime_mixin/authoring_part.py +117 -13
  10. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_runtime_mixin/facade.py +47 -4
  11. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_runtime_mixin/overlay_part.py +4 -4
  12. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_step_graph_mixin.py +4 -12
  13. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/server_api.py +38 -9
  14. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/server_api_mutating.py +18 -4
  15. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client.egg-info/PKG-INFO +3 -3
  16. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client.egg-info/SOURCES.txt +3 -2
  17. plan_manager_client-0.2.237/plan_manager_client.egg-info/requires.txt +7 -0
  18. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/pyproject.toml +2 -2
  19. plan_manager_client-0.2.237/tests/test_matrix_check_facade_passthrough.py +46 -0
  20. plan_manager_client-0.2.182/plan_manager_client.egg-info/requires.txt +0 -7
  21. plan_manager_client-0.2.182/tests/test_contract_facade_passthrough.py +0 -62
  22. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/__init__.py +0 -0
  23. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/config.py +0 -0
  24. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/__init__.py +0 -0
  25. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/archive.py +0 -0
  26. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/atomicity.py +0 -0
  27. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/commit.py +0 -0
  28. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/destination.py +0 -0
  29. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/provenance.py +0 -0
  30. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/delivery/upload.py +0 -0
  31. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/dispatch.py +0 -0
  32. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/export_fetch_chunks.py +0 -0
  33. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/export_fetch_request.py +0 -0
  34. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/export_fetch_unpack.py +0 -0
  35. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/export_fetch_verify.py +0 -0
  36. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_agent_config_mixin.py +0 -0
  37. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_entity_common_mixin.py +0 -0
  38. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_hrs_file_mixin.py +0 -0
  39. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/facade_runtime_mixin/__init__.py +0 -0
  40. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/id_rule.py +0 -0
  41. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/info_walker.py +0 -0
  42. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client/scenario_runtime.py +0 -0
  43. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client.egg-info/dependency_links.txt +0 -0
  44. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/plan_manager_client.egg-info/top_level.txt +0 -0
  45. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/setup.cfg +0 -0
  46. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/tests/test_client_server_api_sync.py +0 -0
  47. {plan_manager_client-0.2.182 → plan_manager_client-0.2.237}/tests/test_dispatch_validation_error_classification.py +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-manager-client
3
- Version: 0.2.182
3
+ Version: 0.2.237
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
- Requires-Dist: mcp-proxy-adapter==8.11.15
6
+ Requires-Dist: mcp-proxy-adapter>=8.11.21
7
7
  Provides-Extra: ca
8
- Requires-Dist: code-analysis-client>=1.6.338; extra == "ca"
8
+ Requires-Dist: code-analysis-client>=1.6.408; extra == "ca"
9
9
  Provides-Extra: dev
10
10
  Requires-Dist: pytest>=9; extra == "dev"
@@ -9,6 +9,8 @@ import tomllib
9
9
 
10
10
 
11
11
  _DIST_NAME = "plan-manager-client"
12
+ # The DEV build (build.sh --dev yes) publishes the same import package under the distribution name plan-manager-client-dev.
13
+ _DIST_NAMES = (_DIST_NAME, "plan-manager-client-dev")
12
14
 
13
15
 
14
16
  def version_from_source_tree(module_file: Path | None = None) -> str:
@@ -42,10 +44,12 @@ def resolve_version() -> str:
42
44
  """Prefer source metadata for an editable checkout, otherwise use the installed version."""
43
45
  if (Path(__file__).resolve().parents[2] / "pyproject.toml").is_file():
44
46
  return version_from_source_tree()
45
- try:
46
- return installed_version(_DIST_NAME)
47
- except PackageNotFoundError:
48
- return version_from_source_tree()
47
+ for name in _DIST_NAMES:
48
+ try:
49
+ return installed_version(name)
50
+ except PackageNotFoundError:
51
+ continue
52
+ return version_from_source_tree()
49
53
 
50
54
 
51
55
  __version__ = resolve_version()
@@ -22,6 +22,7 @@ AUTHORING_DIAGNOSTIC_COMMANDS = frozenset(
22
22
  "authoring_job_stop",
23
23
  "authoring_job_delete",
24
24
  "authoring_job_get",
25
+ "authoring_prompt_get",
25
26
  "authoring_job_update",
26
27
  "authoring_child_list",
27
28
  "authoring_context_read",
@@ -16,6 +16,7 @@ from plan_manager_client.facade_bug_project_mixin import BugProjectCommandsMixin
16
16
  from plan_manager_client.facade_context_gate_mixin import ContextGateCommandsMixin
17
17
  from plan_manager_client.facade_entity_common_mixin import EntityCommonCommandsMixin
18
18
  from plan_manager_client.facade_hrs_file_mixin import HrsFileCommandsMixin
19
+ from plan_manager_client.facade_name_tree_mixin import NameTreeCommandsMixin
19
20
  from plan_manager_client.facade_plan_hrs_mixin import PlanHrsCommandsMixin
20
21
  from plan_manager_client.facade_runtime_mixin import RuntimeCommandsMixin
21
22
  from plan_manager_client.facade_step_graph_mixin import StepGraphCommandsMixin
@@ -27,6 +28,7 @@ class PlanManagerClient(
27
28
  HrsFileCommandsMixin,
28
29
  StepGraphCommandsMixin,
29
30
  ContextGateCommandsMixin,
31
+ NameTreeCommandsMixin,
30
32
  EntityCommonCommandsMixin,
31
33
  RuntimeCommandsMixin,
32
34
  BugProjectCommandsMixin,
@@ -179,7 +179,7 @@ class BugProjectCommandsMixin:
179
179
  return await self._call("project_import", params)
180
180
 
181
181
  async def project_list(self, **params: Any) -> Any:
182
- """List the imported projects, filtered by imported_by or imported_by_prefix, with owned and referenced counts."""
182
+ """List the imported projects, filtered by imported_by or imported_by_prefix, with owned_count, comment and deleted; include_deleted=true also lists the marked projects (deleted true)."""
183
183
  return await self._call("project_list", params)
184
184
 
185
185
  async def project_remove(self, **params: Any) -> Any:
@@ -198,5 +198,21 @@ class BugProjectCommandsMixin:
198
198
  """Project-centric aggregate view: paginated todos/bugs (plus a comments count) scoped to one project, direct or transitive via bound plans."""
199
199
  return await self._call("project_view", params)
200
200
 
201
+ async def project_checkpoint_save(self, **params: Any) -> Any:
202
+ """Save the one checkpoint of a project: create it or replace the whole record (project_uuid, changed_by, done, stages, plans, dry_run); no history, an overwrite cannot be undone."""
203
+ return await self._call("project_checkpoint_save", params)
204
+
205
+ async def project_checkpoint_get(self, **params: Any) -> Any:
206
+ """Read the checkpoint of a project (project_uuid); checkpoint is null when the project has none."""
207
+ return await self._call("project_checkpoint_get", params)
208
+
209
+ async def project_checkpoint_items(self, **params: Any) -> Any:
210
+ """Read only the checkpoint items at one stage, in_progress by default (project_uuid, stage)."""
211
+ return await self._call("project_checkpoint_items", params)
212
+
213
+ async def project_checkpoint_delete(self, **params: Any) -> Any:
214
+ """Mark the checkpoint of a project deleted (default) or fully delete a marked one (hard); dry_run previews (project_uuid, changed_by)."""
215
+ return await self._call("project_checkpoint_delete", params)
216
+
201
217
 
202
218
  __all__ = ["BugProjectCommandsMixin"]
@@ -86,30 +86,6 @@ class ContextGateCommandsMixin:
86
86
  """Delete a Report: soft (mark) by default, hard=true removes an already marked one (passed through: report_id, changed_by, hard, recursive, dry_run)."""
87
87
  return await self._call("report_delete", params)
88
88
 
89
- async def plan_contract_create(self, **params: Any) -> Any:
90
- """Declare the external-API contract of a plan: exactly three documents (matrix, relations, results).
91
-
92
- Parameters are passed through unchanged (plan, documents, changed_by, idempotency_key) so that a missing or
93
- invalid argument is refused by the server with the adapter's -32602 violation, not by a Python TypeError.
94
- """
95
- return await self._call("plan_contract_create", params)
96
-
97
- async def plan_contract_get(self, **params: Any) -> Any:
98
- """Read a contract declaration: exactly one of contract_id and plan (passed through; a marked one carries deleted_at)."""
99
- return await self._call("plan_contract_get", params)
100
-
101
- async def plan_contract_list(self, **params: Any) -> Any:
102
- """List contract declarations (plan, project, include_deleted, limit, offset; passed through)."""
103
- return await self._call("plan_contract_list", params)
104
-
105
- async def plan_contract_update(self, **params: Any) -> Any:
106
- """Replace the three documents of a declaration under expected_contract_revision (parameters passed through)."""
107
- return await self._call("plan_contract_update", params)
108
-
109
- async def plan_contract_delete(self, **params: Any) -> Any:
110
- """Delete a declaration: soft (mark) by default, hard=true removes an already marked one (parameters passed through)."""
111
- return await self._call("plan_contract_delete", params)
112
-
113
89
  async def matrix_case_get(self, **params: Any) -> Any:
114
90
  """Read one matrix case of a plan by namespace and case_id; a case marked deleted is read with its mark (parameters passed through)."""
115
91
  return await self._call("matrix_case_get", params)
@@ -159,9 +135,9 @@ class ContextGateCommandsMixin:
159
135
  """Read the matrix of a plan: summary, parts, or a page of calls or cases (parameters passed through)."""
160
136
  return await self._call("matrix_get", params)
161
137
 
162
- async def plan_contract_check(self, **params: Any) -> Any:
163
- """Queue a read-only check of the plan's step texts against its declared contract (passed through)."""
164
- return await self._call("plan_contract_check", params)
138
+ async def plan_matrix_check(self, **params: Any) -> Any:
139
+ """Queue a read-only check of the plan's step texts against the plan matrix and its attachments (passed through)."""
140
+ return await self._call("plan_matrix_check", params)
165
141
 
166
142
  async def context_compile(self, **params: Any) -> Any:
167
143
  """Compile a typed context block directly from concept ids."""
@@ -0,0 +1,115 @@
1
+ """Name tree command-family facade mixin (plan b742ad73: declarations, relations and the reads of the name tree).
2
+
3
+ Author: Vasiliy Zdanovskiy
4
+ email: vasilyvz@gmail.com
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Any
10
+
11
+
12
+ class NameTreeCommandsMixin:
13
+ """One method per name tree command; every parameter is passed through and validated by the server.
14
+
15
+ Assumes it is mixed into a class that also inherits plan_manager_client.dispatch._CommandDispatchMixin (``_call``).
16
+ """
17
+
18
+ async def name_create(self, **params: Any) -> Any:
19
+ """Create one declaration (plan, kind, short_name, owner, value_type, mark, visibility, mode, is_optional, description, realizes, step, position, changed_by)."""
20
+ return await self._call("name_create", params)
21
+
22
+ async def name_get(self, **params: Any) -> Any:
23
+ """Read one declaration (plan, name, view summary|full)."""
24
+ return await self._call("name_get", params)
25
+
26
+ async def name_list(self, **params: Any) -> Any:
27
+ """List declarations (plan, owner, kind, mark, public, unused, query, include_deleted, limit, offset)."""
28
+ return await self._call("name_list", params)
29
+
30
+ async def name_update(self, **params: Any) -> Any:
31
+ """Change value_type, visibility, mark, mode, is_optional, description or realizes of one declaration (expected_revision, changed_by)."""
32
+ return await self._call("name_update", params)
33
+
34
+ async def name_rename(self, **params: Any) -> Any:
35
+ """Rename or re-sign one declaration (new_short_name, new_params, new_returns); dry_run (default true) returns the proposal."""
36
+ return await self._call("name_rename", params)
37
+
38
+ async def name_delete(self, **params: Any) -> Any:
39
+ """Mark (default, recursive for the subtree) or fully delete (hard) one declaration; dry_run previews."""
40
+ return await self._call("name_delete", params)
41
+
42
+ async def name_relation_add(self, **params: Any) -> Any:
43
+ """Add one relation (plan, source, target, kind, origin, probability, state, changed_by)."""
44
+ return await self._call("name_relation_add", params)
45
+
46
+ async def name_relation_list(self, **params: Any) -> Any:
47
+ """List relations (plan, source, target, under, kind, state, origin, level, min_probability, include_deleted, limit, offset)."""
48
+ return await self._call("name_relation_list", params)
49
+
50
+ async def name_relation_update(self, **params: Any) -> Any:
51
+ """Set the state of one relation (plan, relation, state, changed_by); the origin becomes author."""
52
+ return await self._call("name_relation_update", params)
53
+
54
+ async def name_relation_remove(self, **params: Any) -> Any:
55
+ """Mark (default) or fully delete (hard) one relation; dry_run previews."""
56
+ return await self._call("name_relation_remove", params)
57
+
58
+ async def name_relation_decide(self, **params: Any) -> Any:
59
+ """Run pass two of the name tree through the MACSC decider (queued job: plan, scope, level, dry_run, changed_by)."""
60
+ return await self._call("name_relation_decide", params)
61
+
62
+ async def name_relation_recount(self, **params: Any) -> Any:
63
+ """Recompute the acceptance of the decider relations with no decider call (plan, scope, changed_by)."""
64
+ return await self._call("name_relation_recount", params)
65
+
66
+ async def name_namespace_list(self, **params: Any) -> Any:
67
+ """List the namespaces (packages) of the tree (plan, parent, recursive, limit, offset)."""
68
+ return await self._call("name_namespace_list", params)
69
+
70
+ async def name_tree_get(self, **params: Any) -> Any:
71
+ """Read the name tree of one revision (plan, root, revision, with_relations, with_steps, limit, offset)."""
72
+ return await self._call("name_tree_get", params)
73
+
74
+ async def names_by_target_file(self, **params: Any) -> Any:
75
+ """Read the steps and declarations of one target file (plan, target_file, revision)."""
76
+ return await self._call("names_by_target_file", params)
77
+
78
+ async def name_visible_names(self, **params: Any) -> Any:
79
+ """Compute the names visible to one step (plan, step, include_probe, limit, offset)."""
80
+ return await self._call("name_visible_names", params)
81
+
82
+ async def plan_name_table_policy_set(self, **params: Any) -> Any:
83
+ """Set the plan attribute name table required (plan, required, changed_by)."""
84
+ return await self._call("plan_name_table_policy_set", params)
85
+
86
+ async def plan_name_table_policy_get(self, **params: Any) -> Any:
87
+ """Read the plan attribute name table required and the not-ready count (plan)."""
88
+ return await self._call("plan_name_table_policy_get", params)
89
+
90
+ async def step_name_table_check(self, **params: Any) -> Any:
91
+ """Check the readiness of the closed name table of one step (plan, step)."""
92
+ return await self._call("step_name_table_check", params)
93
+
94
+ async def step_name_table_set(self, **params: Any) -> Any:
95
+ """Replace the closed name table of one step (plan, step, entries, expected_revision, changed_by)."""
96
+ return await self._call("step_name_table_set", params)
97
+
98
+ async def step_name_table_get(self, **params: Any) -> Any:
99
+ """Read the closed name table of one step (plan, step)."""
100
+ return await self._call("step_name_table_get", params)
101
+
102
+ async def name_move(self, **params: Any) -> Any:
103
+ """Move a declaration with its subtree to another owner of the plan, dry run by default (plan, name, new_owner, dry_run, changed_by)."""
104
+ return await self._call("name_move", params)
105
+
106
+ async def name_namespace_view(self, **params: Any) -> Any:
107
+ """View one namespace or subtree of the name tree compactly (plan, namespace, depth, with_relations, with_signatures, limit, cursor)."""
108
+ return await self._call("name_namespace_view", params)
109
+
110
+ async def step_tree_from_names(self, **params: Any) -> Any:
111
+ """Make the step subtree of name tree nodes, dry run by default (plan, nodes, level, parent_step, merge, slug, dry_run, changed_by)."""
112
+ return await self._call("step_tree_from_names", params)
113
+
114
+
115
+ __all__ = ["NameTreeCommandsMixin"]
@@ -19,15 +19,15 @@ class PlanHrsCommandsMixin:
19
19
  """
20
20
 
21
21
  async def plan_create(self, **params: Any) -> Any:
22
- """Create a new plan aggregate with a unique name."""
22
+ """Create a new plan aggregate with a unique name; the answer carries mrs_id, the id of the empty MRS container created with the plan."""
23
23
  return await self._call("plan_create", params)
24
24
 
25
25
  async def plan_list(self, **params: Any) -> Any:
26
- """List a paginated page of plans in the catalog with their bound projects; soft-deleted plans are hidden unless show_deleted is true."""
26
+ """List a paginated page of plans in the catalog with their bound projects; soft-deleted plans are hidden unless show_deleted is true; every row carries mrs_id."""
27
27
  return await self._call("plan_list", params)
28
28
 
29
29
  async def plan_status(self, **params: Any) -> Any:
30
- """Return the dashboard for one plan: counts, gate, and scoring."""
30
+ """Return the dashboard for one plan: counts, gate, and scoring (plan.mrs_id is the id of its MRS container, never null)."""
31
31
  return await self._call("plan_status", params)
32
32
 
33
33
  async def plan_delete(self, **params: Any) -> Any:
@@ -62,6 +62,10 @@ class PlanHrsCommandsMixin:
62
62
  },
63
63
  )
64
64
 
65
+ async def plan_model_autofill_set(self, plan: str, enabled: bool, changed_by: str) -> Any:
66
+ """Set the plan flag model auto-fill; with the flag on, the model decider fills the steps that have no configuration of their own."""
67
+ return await self._call("plan_model_autofill_set", {"plan": plan, "enabled": enabled, "changed_by": changed_by})
68
+
65
69
  async def plan_model_mapping_get(self, plan: str) -> Any:
66
70
  """Read the plan-owned G/T/A model mapping and header revision."""
67
71
  return await self._call("plan_model_mapping_get", {"plan": plan})
@@ -79,7 +83,7 @@ class PlanHrsCommandsMixin:
79
83
  return await self._call("plan_snapshot", params)
80
84
 
81
85
  async def plan_import(self, **params: Any) -> Any:
82
- """Import a plan from a standard file layout under the configured export root."""
86
+ """Import a plan from a standard file layout under the configured export root; a real import answers mrs_id of the new plan."""
83
87
  return await self._call("plan_import", params)
84
88
 
85
89
  async def export_upload_save(self, **params: Any) -> Any:
@@ -135,26 +135,65 @@ class RuntimeAuthoringPart:
135
135
  server unchanged and refused there with -32602.
136
136
  """
137
137
  params = supplied(session_id=session_id, changed_by=changed_by, drop_dialogue=drop_dialogue)
138
- if hard:
139
- params["hard"] = True
140
- if recursive:
141
- params["recursive"] = True
138
+ # bug bbb17085: a value other than the default False goes to the server unchanged, so a wrong type ('yes') is refused there
139
+ # with -32602; coercing it to True here turned the type violation into a lookup of an unknown id.
140
+ if hard is not False:
141
+ params["hard"] = hard
142
+ if recursive is not False:
143
+ params["recursive"] = recursive
142
144
  if dry_run:
143
145
  params["dry_run"] = True
144
146
  params.update(unknown)
145
147
  return await self._call("authoring_session_delete", params)
146
148
 
149
+ async def authoring_logger_outbox_list(
150
+ self,
151
+ state: Any = ABSENT,
152
+ session_id: Any = ABSENT,
153
+ job_id: Any = ABSENT,
154
+ limit: Any = ABSENT,
155
+ offset: Any = ABSENT,
156
+ **unknown: Any,
157
+ ) -> Any:
158
+ """List the queued AI Logger messages (default only the refused ones, state error); for a human operator.
159
+
160
+ Every argument is passed to the server unchanged; a wrong value is refused there with -32602.
161
+ """
162
+ params = supplied(state=state, session_id=session_id, job_id=job_id, limit=limit, offset=offset)
163
+ params.update(unknown)
164
+ return await self._call("authoring_logger_outbox_list", params)
165
+
166
+ async def authoring_logger_outbox_resend(self, message_id: Any = ABSENT, changed_by: Any = ABSENT, **unknown: Any) -> Any:
167
+ """Put a refused AI Logger message (state error) back into delivery under the same message id; for a human operator."""
168
+ params = supplied(message_id=message_id, changed_by=changed_by)
169
+ params.update(unknown)
170
+ return await self._call("authoring_logger_outbox_resend", params)
171
+
172
+ async def authoring_logger_outbox_delete(self, message_id: Any = ABSENT, changed_by: Any = ABSENT, **unknown: Any) -> Any:
173
+ """Remove a refused AI Logger message (state error) from the queue for good; for a human operator."""
174
+ params = supplied(message_id=message_id, changed_by=changed_by)
175
+ params.update(unknown)
176
+ return await self._call("authoring_logger_outbox_delete", params)
177
+
147
178
  async def authoring_job_start(
148
179
  self,
149
180
  plan: str,
150
181
  step: str,
151
182
  session_id: str,
152
183
  orchestrator_model_id: str | None = None,
184
+ caller_id: str | None = None,
153
185
  ) -> Any:
154
- """Start one session-bound authoring job for the step ``step`` (its id, a uuid4)."""
186
+ """Start one session-bound authoring job for the step ``step`` (its id, a uuid4).
187
+
188
+ An external root start presents ``caller_id``: the id of the plan's model-bearing owner, otherwise the id of the plan's MRS
189
+ (the session model); ``orchestrator_model_id`` is only the per-message sender label. The server refuses a start without
190
+ caller_id (-32602) and a caller that is not the plan's authority (AUTHORING_SCOPE_FORBIDDEN).
191
+ """
155
192
  params = {"plan": plan, "step": step, "session_id": session_id}
156
193
  if orchestrator_model_id is not None:
157
194
  params["orchestrator_model_id"] = orchestrator_model_id
195
+ if caller_id is not None:
196
+ params["caller_id"] = caller_id
158
197
  return await self._call("authoring_job_start", params)
159
198
 
160
199
  async def authoring_job_status(
@@ -177,8 +216,13 @@ class RuntimeAuthoringPart:
177
216
  session_id: str,
178
217
  answer: str,
179
218
  orchestrator_model_id: str | None = None,
219
+ caller_id: str | None = None,
180
220
  ) -> Any:
181
- """Answer and resume the waiting authoring job of the step ``step`` (its id, a uuid4)."""
221
+ """Answer and resume the waiting authoring job of the step ``step`` (its id, a uuid4).
222
+
223
+ An external answer to a root escalation presents ``caller_id``, the CURRENT authority of the plan (the id of its model-bearing
224
+ owner, otherwise the id of its MRS); any other caller is refused AUTHORING_SCOPE_DENIED and the answer is not consumed.
225
+ """
182
226
  params = {
183
227
  "plan": plan,
184
228
  "step": step,
@@ -187,6 +231,8 @@ class RuntimeAuthoringPart:
187
231
  }
188
232
  if orchestrator_model_id is not None:
189
233
  params["orchestrator_model_id"] = orchestrator_model_id
234
+ if caller_id is not None:
235
+ params["caller_id"] = caller_id
190
236
  return await self._call("authoring_job_resume", params)
191
237
 
192
238
  async def authoring_job_stop(self, plan: str, step: str, session_id: str) -> Any:
@@ -205,6 +251,19 @@ class RuntimeAuthoringPart:
205
251
  params.update(unknown)
206
252
  return await self._call("authoring_job_get", params)
207
253
 
254
+ async def authoring_prompt_get(
255
+ self, plan: Any = ABSENT, step: Any = ABSENT, revision: Any = ABSENT, job_id: Any = ABSENT, section: Any = ABSENT, **unknown: Any
256
+ ) -> Any:
257
+ """Read the compiled request of one G, T or A step exactly as its authoring model will be sent it (read-only, no side effect).
258
+
259
+ Returns the plain-text messages (system_common, system_executor, tools_summary, parent_common, assignment), the tool declarations, the
260
+ sha256 of the whole text, its size, the sources and would_fail_with. A missing plan or step, a wrongly typed or out-of-range value or an
261
+ unknown field is passed to the server unchanged and refused there with -32602.
262
+ """
263
+ params = supplied(plan=plan, step=step, revision=revision, job_id=job_id, section=section)
264
+ params.update(unknown)
265
+ return await self._call("authoring_prompt_get", params)
266
+
208
267
  async def authoring_job_update(
209
268
  self,
210
269
  job_id: Any = ABSENT,
@@ -227,16 +286,30 @@ class RuntimeAuthoringPart:
227
286
  params.update(unknown)
228
287
  return await self._call("authoring_job_update", params)
229
288
 
230
- async def authoring_job_delete(self, job_id: Any = ABSENT, hard: bool = False, recursive: bool = False, **unknown: Any) -> Any:
289
+ async def authoring_job_delete(
290
+ self,
291
+ job_id: Any = ABSENT,
292
+ hard: bool = False,
293
+ recursive: bool = False,
294
+ caller_id: Any = ABSENT,
295
+ emergency: Any = ABSENT,
296
+ reason: Any = ABSENT,
297
+ **unknown: Any,
298
+ ) -> Any:
231
299
  """Soft-delete (mark) one terminal authoring job; hard=True removes an already marked job (server default: false).
232
300
 
233
- A missing job_id or an unknown field is passed to the server unchanged and refused there with -32602.
301
+ ``caller_id`` is the identity of the one who set the job (the step id of the parent job for a child job; for a root job the id of
302
+ the plan's model-bearing owner, otherwise the id of the plan's MRS); the session model deletes another setter's job only with
303
+ ``emergency=True`` and a ``reason`` (1 to 500 characters). The answer carries ``deleted_by`` (starter | session_model).
304
+ A missing job_id or caller_id, an unknown field or a wrong value is passed to the server unchanged and refused there with -32602.
234
305
  """
235
- params = supplied(job_id=job_id)
236
- if hard:
237
- params["hard"] = True
238
- if recursive:
239
- params["recursive"] = True
306
+ params = supplied(job_id=job_id, caller_id=caller_id, emergency=emergency, reason=reason)
307
+ # bug bbb17085: a value other than the default False goes to the server unchanged, so a wrong type ('yes') is refused there
308
+ # with -32602; coercing it to True here turned the type violation into a lookup of an unknown id.
309
+ if hard is not False:
310
+ params["hard"] = hard
311
+ if recursive is not False:
312
+ params["recursive"] = recursive
240
313
  params.update(unknown)
241
314
  return await self._call("authoring_job_delete", params)
242
315
 
@@ -267,6 +340,37 @@ class RuntimeAuthoringPart:
267
340
  params.update(unknown)
268
341
  return await self._call("authoring_child_write", params)
269
342
 
343
+ async def authoring_name_write(self, names: Any = ABSENT, relations: Any = ABSENT, **unknown: Any) -> Any:
344
+ """Model tool of pass one of the name tree: up to 50 names and 50 large relations by full names (names job of a plan only).
345
+
346
+ Works only inside an authoring job (outside one the server answers AUTHORING_NO_CURRENT_JOB); a missing names list or an unknown
347
+ field is passed to the server unchanged and refused there with -32602.
348
+ """
349
+ params = supplied(names=names, relations=relations)
350
+ params.update(unknown)
351
+ return await self._call("authoring_name_write", params)
352
+
353
+ async def authoring_name_table_set(self, child: Any = ABSENT, entries: Any = ABSENT, **unknown: Any) -> Any:
354
+ """Model tool: replace the closed name table of one direct child of the calling job's step (G writes T tables, T writes A tables).
355
+
356
+ Works only inside an authoring job (outside one the server answers AUTHORING_NO_CURRENT_JOB); a missing field or an unknown one is passed to
357
+ the server unchanged and refused there with -32602.
358
+ """
359
+ params = supplied(child=child, entries=entries)
360
+ params.update(unknown)
361
+ return await self._call("authoring_name_table_set", params)
362
+
363
+ async def authoring_names_view(self, namespace: Any = ABSENT, depth: Any = ABSENT, with_relations: Any = ABSENT, with_signatures: Any = ABSENT,
364
+ limit: Any = ABSENT, cursor: Any = ABSENT, **unknown: Any) -> Any:
365
+ """Model tool: view one namespace or subtree of the name tree of the plan of the calling job (the view of name_namespace_view).
366
+
367
+ Works only inside an authoring job (outside one the server answers AUTHORING_NO_CURRENT_JOB); an unknown field (plan included) is
368
+ passed to the server unchanged and refused there with -32602.
369
+ """
370
+ params = supplied(namespace=namespace, depth=depth, with_relations=with_relations, with_signatures=with_signatures, limit=limit, cursor=cursor)
371
+ params.update(unknown)
372
+ return await self._call("authoring_names_view", params)
373
+
270
374
  async def authoring_child_start(self, steps: Any = ABSENT, restart: Any = ABSENT, **unknown: Any) -> Any:
271
375
  """Model tool: start the jobs of up to 12 direct children of the calling job's step; restart=True restarts failed or stopped children.
272
376
 
@@ -209,15 +209,33 @@ class RuntimeCommandsMixin:
209
209
  session_id, changed_by, hard=hard, recursive=recursive, dry_run=dry_run, drop_dialogue=drop_dialogue, **unknown
210
210
  )
211
211
 
212
+ async def authoring_logger_outbox_list(
213
+ self,
214
+ state: Any = ABSENT,
215
+ session_id: Any = ABSENT,
216
+ job_id: Any = ABSENT,
217
+ limit: Any = ABSENT,
218
+ offset: Any = ABSENT,
219
+ **unknown: Any,
220
+ ) -> Any:
221
+ return await self.runtimeAuthoringPart.authoring_logger_outbox_list(state, session_id, job_id, limit, offset, **unknown)
222
+
223
+ async def authoring_logger_outbox_resend(self, message_id: Any = ABSENT, changed_by: Any = ABSENT, **unknown: Any) -> Any:
224
+ return await self.runtimeAuthoringPart.authoring_logger_outbox_resend(message_id, changed_by, **unknown)
225
+
226
+ async def authoring_logger_outbox_delete(self, message_id: Any = ABSENT, changed_by: Any = ABSENT, **unknown: Any) -> Any:
227
+ return await self.runtimeAuthoringPart.authoring_logger_outbox_delete(message_id, changed_by, **unknown)
228
+
212
229
  async def authoring_job_start(
213
230
  self,
214
231
  plan: str,
215
232
  step: str,
216
233
  session_id: str,
217
234
  orchestrator_model_id: str | None = None,
235
+ caller_id: str | None = None,
218
236
  ) -> Any:
219
237
  return await self.runtimeAuthoringPart.authoring_job_start(
220
- plan, step, session_id, orchestrator_model_id
238
+ plan, step, session_id, orchestrator_model_id, caller_id
221
239
  )
222
240
 
223
241
  async def authoring_job_status(
@@ -234,9 +252,10 @@ class RuntimeCommandsMixin:
234
252
  session_id: str,
235
253
  answer: str,
236
254
  orchestrator_model_id: str | None = None,
255
+ caller_id: str | None = None,
237
256
  ) -> Any:
238
257
  return await self.runtimeAuthoringPart.authoring_job_resume(
239
- plan, step, session_id, answer, orchestrator_model_id
258
+ plan, step, session_id, answer, orchestrator_model_id, caller_id
240
259
  )
241
260
 
242
261
  async def authoring_job_stop(self, plan: str, step: str, session_id: str) -> Any:
@@ -244,12 +263,26 @@ class RuntimeCommandsMixin:
244
263
  plan, step, session_id
245
264
  )
246
265
 
247
- async def authoring_job_delete(self, job_id: Any = ABSENT, hard: bool = False, recursive: bool = False, **unknown: Any) -> Any:
248
- return await self.runtimeAuthoringPart.authoring_job_delete(job_id, hard=hard, recursive=recursive, **unknown)
266
+ async def authoring_job_delete(
267
+ self,
268
+ job_id: Any = ABSENT,
269
+ hard: bool = False,
270
+ recursive: bool = False,
271
+ caller_id: Any = ABSENT,
272
+ emergency: Any = ABSENT,
273
+ reason: Any = ABSENT,
274
+ **unknown: Any,
275
+ ) -> Any:
276
+ return await self.runtimeAuthoringPart.authoring_job_delete(
277
+ job_id, hard=hard, recursive=recursive, caller_id=caller_id, emergency=emergency, reason=reason, **unknown
278
+ )
249
279
 
250
280
  async def authoring_job_get(self, job_id: Any = ABSENT, **unknown: Any) -> Any:
251
281
  return await self.runtimeAuthoringPart.authoring_job_get(job_id, **unknown)
252
282
 
283
+ async def authoring_prompt_get(self, plan: Any = ABSENT, step: Any = ABSENT, revision: Any = ABSENT, job_id: Any = ABSENT, section: Any = ABSENT, **unknown: Any) -> Any:
284
+ return await self.runtimeAuthoringPart.authoring_prompt_get(plan, step, revision, job_id, section, **unknown)
285
+
253
286
  async def authoring_job_update(self, job_id: Any = ABSENT, changed_by: Any = ABSENT, state: str | None = None, result: dict[str, Any] | None = None, question: str | None = None, answer: str | None = None, error_reason: str | None = None, **unknown: Any) -> Any:
254
287
  return await self.runtimeAuthoringPart.authoring_job_update(job_id, changed_by, state=state, result=result, question=question, answer=answer, error_reason=error_reason, **unknown)
255
288
 
@@ -262,6 +295,16 @@ class RuntimeCommandsMixin:
262
295
  async def authoring_child_write(self, children: Any = ABSENT, **unknown: Any) -> Any:
263
296
  return await self.runtimeAuthoringPart.authoring_child_write(children, **unknown)
264
297
 
298
+ async def authoring_name_write(self, names: Any = ABSENT, relations: Any = ABSENT, **unknown: Any) -> Any:
299
+ return await self.runtimeAuthoringPart.authoring_name_write(names, relations, **unknown)
300
+
301
+ async def authoring_names_view(self, namespace: Any = ABSENT, depth: Any = ABSENT, with_relations: Any = ABSENT, with_signatures: Any = ABSENT,
302
+ limit: Any = ABSENT, cursor: Any = ABSENT, **unknown: Any) -> Any:
303
+ return await self.runtimeAuthoringPart.authoring_names_view(namespace, depth, with_relations, with_signatures, limit, cursor, **unknown)
304
+
305
+ async def authoring_name_table_set(self, child: Any = ABSENT, entries: Any = ABSENT, **unknown: Any) -> Any:
306
+ return await self.runtimeAuthoringPart.authoring_name_table_set(child, entries, **unknown)
307
+
265
308
  async def authoring_child_start(self, steps: Any = ABSENT, restart: Any = ABSENT, **unknown: Any) -> Any:
266
309
  return await self.runtimeAuthoringPart.authoring_child_start(steps, restart, **unknown)
267
310
 
@@ -21,19 +21,19 @@ class RuntimeOverlayPart:
21
21
  return getattr(self._owner, name)
22
22
 
23
23
  async def todo_create(self, **params: Any) -> Any:
24
- """Create a new TODO work item with a primary anchor."""
24
+ """Create a new TODO work item with a primary anchor. model_binding_id (uuid4 or None) names the live model binding of the TODO; the answer always carries the key."""
25
25
  return await self._call("todo_create", params)
26
26
 
27
27
  async def todo_get(self, **params: Any) -> Any:
28
- """Fetch a single TODO work item by identifier."""
28
+ """Fetch a single TODO work item by identifier (the answer carries model_binding_id, null when it names none)."""
29
29
  return await self._call("todo_get", params)
30
30
 
31
31
  async def todo_list(self, **params: Any) -> Any:
32
- """List TODO work items with uniform filtering and pagination."""
32
+ """List TODO work items with uniform filtering and pagination (every row carries model_binding_id)."""
33
33
  return await self._call("todo_list", params)
34
34
 
35
35
  async def todo_update(self, **params: Any) -> Any:
36
- """Update mutable fields of an existing TODO work item."""
36
+ """Update mutable fields of an existing TODO work item. model_binding_id: omit = unchanged, a uuid4 sets it, None clears it (sent as null)."""
37
37
  return await self._call("todo_update", params)
38
38
 
39
39
  async def todo_reanchor(self, **params: Any) -> Any:
@@ -22,6 +22,10 @@ class StepGraphCommandsMixin:
22
22
  """Return one step of a plan identified by step (its id, a uuid4), with resolved parent context."""
23
23
  return await self._call("step_get", params)
24
24
 
25
+ async def step_decider_check(self, **params: Any) -> Any:
26
+ """Ask the decider (through MACSC) whether a model of a given level will manage one written step: outcome ready, return_to_author with failed criteria, or needs_review; changes nothing in the plan."""
27
+ return await self._call("step_decider_check", params)
28
+
25
29
  async def step_tree(self, **params: Any) -> Any:
26
30
  """Return a paginated page of the plan's full step tree as a flat, sorted list with statuses."""
27
31
  return await self._call("step_tree", params)
@@ -74,18 +78,6 @@ class StepGraphCommandsMixin:
74
78
  """Return the target_file to writer-steps matrix for a plan scope, with ordering-conflict detection."""
75
79
  return await self._call("files_report", params)
76
80
 
77
- async def namespace_view(self, **params: Any) -> Any:
78
- """Return a paginated page of one step's computed inherited namespace (ancestor-chain fields.names, optionally CA-probe seeded)."""
79
- return await self._call("namespace_view", params)
80
-
81
- async def namespace_rename_suggest(self, **params: Any) -> Any:
82
- """Propose the full down-tree rename/signature-change cascade of one fields.names declaration entry; read-only."""
83
- return await self._call("namespace_rename_suggest", params)
84
-
85
- async def namespace_rename_apply(self, **params: Any) -> Any:
86
- """Apply the rename/signature-change cascade atomically as one revision, or dry-run it (the default)."""
87
- return await self._call("namespace_rename_apply", params)
88
-
89
81
  async def hrs_prototype(self, **params: Any) -> Any:
90
82
  """Assemble the mechanical HRS prototype of one plan: paginated per-G sections plus MRS/HRS digests, gaps seed, and the consumer-model guidance contract."""
91
83
  return await self._call("hrs_prototype", params)
@@ -34,11 +34,30 @@ COMMAND_NAMES: frozenset[str] = frozenset(
34
34
  "report_list",
35
35
  "report_update",
36
36
  "report_delete",
37
- "plan_contract_create",
38
- "plan_contract_get",
39
- "plan_contract_list",
40
- "plan_contract_update",
41
- "plan_contract_delete",
37
+ "name_create",
38
+ "name_get",
39
+ "name_list",
40
+ "name_update",
41
+ "name_rename",
42
+ "name_move",
43
+ "name_delete",
44
+ "name_relation_add",
45
+ "name_relation_list",
46
+ "name_relation_update",
47
+ "name_relation_remove",
48
+ "name_relation_decide",
49
+ "name_relation_recount",
50
+ "name_namespace_list",
51
+ "name_tree_get",
52
+ "names_by_target_file",
53
+ "name_visible_names",
54
+ "name_namespace_view",
55
+ "step_tree_from_names",
56
+ "plan_name_table_policy_set",
57
+ "plan_name_table_policy_get",
58
+ "step_name_table_check",
59
+ "step_name_table_set",
60
+ "step_name_table_get",
42
61
  "matrix_case_get",
43
62
  "matrix_get",
44
63
  "matrix_lint",
@@ -49,10 +68,11 @@ COMMAND_NAMES: frozenset[str] = frozenset(
49
68
  "matrix_export",
50
69
  "plan_ref_check",
51
70
  "plan_authoring_guide",
52
- "plan_contract_check",
71
+ "plan_matrix_check",
53
72
  "plan_text_check",
54
73
  "plan_model_mapping_set",
55
74
  "plan_model_mapping_get",
75
+ "plan_model_autofill_set",
56
76
  "plan_project_attach",
57
77
  "plan_export",
58
78
  "plan_snapshot",
@@ -85,6 +105,7 @@ COMMAND_NAMES: frozenset[str] = frozenset(
85
105
  "relation_remove",
86
106
  "concept_coverage",
87
107
  "step_get",
108
+ "step_decider_check",
88
109
  "step_tree",
89
110
  "step_create",
90
111
  "step_update",
@@ -99,9 +120,6 @@ COMMAND_NAMES: frozenset[str] = frozenset(
99
120
  "step_search",
100
121
  "files_report",
101
122
  "step_xref",
102
- "namespace_view",
103
- "namespace_rename_suggest",
104
- "namespace_rename_apply",
105
123
  "hrs_prototype",
106
124
  "graph_deps",
107
125
  "graph_order",
@@ -195,14 +213,21 @@ COMMAND_NAMES: frozenset[str] = frozenset(
195
213
  "authoring_session_delete",
196
214
  "authoring_job_start",
197
215
  "authoring_job_status",
216
+ "authoring_logger_outbox_list",
217
+ "authoring_logger_outbox_resend",
218
+ "authoring_logger_outbox_delete",
198
219
  "authoring_job_resume",
199
220
  "authoring_job_stop",
200
221
  "authoring_job_delete",
201
222
  "authoring_job_get",
223
+ "authoring_prompt_get",
202
224
  "authoring_job_update",
203
225
  "authoring_child_list",
204
226
  "authoring_context_read",
205
227
  "authoring_child_write",
228
+ "authoring_name_write",
229
+ "authoring_name_table_set",
230
+ "authoring_names_view",
206
231
  "authoring_child_start",
207
232
  "authoring_child_status",
208
233
  "authoring_child_wait",
@@ -286,6 +311,10 @@ COMMAND_NAMES: frozenset[str] = frozenset(
286
311
  "project_update",
287
312
  "project_sync",
288
313
  "project_view",
314
+ "project_checkpoint_save",
315
+ "project_checkpoint_get",
316
+ "project_checkpoint_items",
317
+ "project_checkpoint_delete",
289
318
  "command_catalog_dump",
290
319
  "graph_dependents",
291
320
  "ops_status",
@@ -23,12 +23,28 @@ MUTATING_COMMAND_NAMES: frozenset[str] = frozenset(
23
23
  "report_create",
24
24
  "report_update",
25
25
  "report_delete",
26
+ "name_create",
27
+ "name_update",
28
+ "name_rename",
29
+ "name_move",
30
+ "step_tree_from_names",
31
+ "name_delete",
32
+ "name_relation_add",
33
+ "name_relation_update",
34
+ "name_relation_remove",
35
+ "name_relation_decide",
36
+ "name_relation_recount",
37
+ "plan_name_table_policy_set",
38
+ "step_name_table_set",
26
39
  "plan_model_mapping_set",
40
+ "plan_model_autofill_set",
27
41
  "plan_project_attach",
28
42
  "project_import",
29
43
  "project_remove",
30
44
  "project_update",
31
45
  "project_sync",
46
+ "project_checkpoint_save",
47
+ "project_checkpoint_delete",
32
48
  "plan_import",
33
49
  "export_archive",
34
50
  "hrs_import",
@@ -55,7 +71,6 @@ MUTATING_COMMAND_NAMES: frozenset[str] = frozenset(
55
71
  "step_dependency_clear",
56
72
  "step_dependency_apply",
57
73
  "execution_dependency_apply",
58
- "namespace_rename_apply",
59
74
  "block_rebuild",
60
75
  "plan_unfreeze",
61
76
  "plan_rollback",
@@ -88,14 +103,13 @@ MUTATING_COMMAND_NAMES: frozenset[str] = frozenset(
88
103
  "authoring_session_create",
89
104
  "authoring_session_update",
90
105
  "authoring_session_delete",
106
+ "authoring_logger_outbox_resend",
107
+ "authoring_logger_outbox_delete",
91
108
  "authoring_job_start",
92
109
  "authoring_job_resume",
93
110
  "authoring_job_stop",
94
111
  "authoring_job_delete",
95
112
  "authoring_job_update",
96
- "plan_contract_create",
97
- "plan_contract_update",
98
- "plan_contract_delete",
99
113
  "authoring_step_submit",
100
114
  "authoring_step_create",
101
115
  "authoring_step_update",
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plan-manager-client
3
- Version: 0.2.182
3
+ Version: 0.2.237
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
- Requires-Dist: mcp-proxy-adapter==8.11.15
6
+ Requires-Dist: mcp-proxy-adapter>=8.11.21
7
7
  Provides-Extra: ca
8
- Requires-Dist: code-analysis-client>=1.6.338; extra == "ca"
8
+ Requires-Dist: code-analysis-client>=1.6.408; extra == "ca"
9
9
  Provides-Extra: dev
10
10
  Requires-Dist: pytest>=9; extra == "dev"
@@ -14,6 +14,7 @@ plan_manager_client/facade_bug_project_mixin.py
14
14
  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
+ plan_manager_client/facade_name_tree_mixin.py
17
18
  plan_manager_client/facade_plan_hrs_mixin.py
18
19
  plan_manager_client/facade_step_graph_mixin.py
19
20
  plan_manager_client/id_rule.py
@@ -38,5 +39,5 @@ plan_manager_client/facade_runtime_mixin/authoring_part.py
38
39
  plan_manager_client/facade_runtime_mixin/facade.py
39
40
  plan_manager_client/facade_runtime_mixin/overlay_part.py
40
41
  tests/test_client_server_api_sync.py
41
- tests/test_contract_facade_passthrough.py
42
- tests/test_dispatch_validation_error_classification.py
42
+ tests/test_dispatch_validation_error_classification.py
43
+ tests/test_matrix_check_facade_passthrough.py
@@ -0,0 +1,7 @@
1
+ mcp-proxy-adapter>=8.11.21
2
+
3
+ [ca]
4
+ code-analysis-client>=1.6.408
5
+
6
+ [dev]
7
+ pytest>=9
@@ -8,12 +8,12 @@ dynamic = ["version"]
8
8
  description = "First-class client library for the plan_manager JSON-RPC API: full command-surface facade plus export delivery module boundary."
9
9
  requires-python = ">=3.12"
10
10
  dependencies = [
11
- "mcp-proxy-adapter==8.11.15",
11
+ "mcp-proxy-adapter>=8.11.21",
12
12
  ]
13
13
 
14
14
  [project.optional-dependencies]
15
15
  ca = [
16
- "code-analysis-client>=1.6.338",
16
+ "code-analysis-client>=1.6.408",
17
17
  ]
18
18
  dev = [
19
19
  "pytest>=9",
@@ -0,0 +1,46 @@
1
+ """Matrix-check facade method passes its arguments through, so a missing plan reaches the server (CK-P3); the six plan_contract
2
+ methods are gone (matrix change 15.11, RM-1).
3
+
4
+ Author: Vasiliy Zdanovskiy
5
+ email: vasilyvz@gmail.com
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import asyncio
11
+ from typing import Any
12
+
13
+ import pytest
14
+
15
+ from plan_manager_client.facade_context_gate_mixin import ContextGateCommandsMixin
16
+
17
+
18
+ class _Recorder(ContextGateCommandsMixin):
19
+ def __init__(self) -> None:
20
+ self.calls: list[tuple[str, dict[str, Any]]] = []
21
+
22
+ async def _call(self, command: str, params: dict[str, Any] | None = None) -> Any:
23
+ self.calls.append((command, dict(params or {})))
24
+ return {"refused_by": "server"}
25
+
26
+
27
+ def test_matrix_check_without_plan_is_forwarded() -> None:
28
+ client = _Recorder()
29
+ result = asyncio.run(client.plan_matrix_check(scope="plan"))
30
+ assert result == {"refused_by": "server"}
31
+ assert client.calls == [("plan_matrix_check", {"scope": "plan"})]
32
+
33
+
34
+ def test_matrix_check_forwards_every_argument_verbatim() -> None:
35
+ client = _Recorder()
36
+ args = {"plan": "p", "scope": "branch", "step": "s", "fail_fast": True, "format": "text", "limit": 5, "offset": 1}
37
+ asyncio.run(client.plan_matrix_check(**args))
38
+ assert client.calls == [("plan_matrix_check", args)]
39
+
40
+
41
+ @pytest.mark.parametrize("name", [
42
+ "plan_contract_check", "plan_contract_create", "plan_contract_get", "plan_contract_list", "plan_contract_update",
43
+ "plan_contract_delete", "plan_contract_set",
44
+ ])
45
+ def test_plan_contract_methods_are_removed_from_the_facade(name: str) -> None:
46
+ assert not hasattr(ContextGateCommandsMixin, name)
@@ -1,7 +0,0 @@
1
- mcp-proxy-adapter==8.11.15
2
-
3
- [ca]
4
- code-analysis-client>=1.6.338
5
-
6
- [dev]
7
- pytest>=9
@@ -1,62 +0,0 @@
1
- """Contract-check facade methods pass their arguments through, so a missing plan reaches the server (CK-P3).
2
-
3
- Author: Vasiliy Zdanovskiy
4
- email: vasilyvz@gmail.com
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- import asyncio
10
- from typing import Any
11
-
12
- from plan_manager_client.facade_context_gate_mixin import ContextGateCommandsMixin
13
-
14
-
15
- class _Recorder(ContextGateCommandsMixin):
16
- def __init__(self) -> None:
17
- self.calls: list[tuple[str, dict[str, Any]]] = []
18
-
19
- async def _call(self, command: str, params: dict[str, Any] | None = None) -> Any:
20
- self.calls.append((command, dict(params or {})))
21
- return {"refused_by": "server"}
22
-
23
-
24
- def test_contract_get_without_plan_is_forwarded_not_a_type_error() -> None:
25
- client = _Recorder()
26
- result = asyncio.run(client.plan_contract_get())
27
- assert result == {"refused_by": "server"}
28
- assert client.calls == [("plan_contract_get", {})]
29
-
30
-
31
- def test_contract_check_without_plan_is_forwarded() -> None:
32
- client = _Recorder()
33
- asyncio.run(client.plan_contract_check(scope="plan"))
34
- assert client.calls == [("plan_contract_check", {"scope": "plan"})]
35
-
36
-
37
- def test_contract_create_forwards_every_argument_verbatim() -> None:
38
- client = _Recorder()
39
- args = {
40
- "documents": [],
41
- "changed_by": "tester",
42
- "idempotency_key": "k",
43
- }
44
- asyncio.run(client.plan_contract_create(plan="p", **args))
45
- assert client.calls == [("plan_contract_create", {"plan": "p", **args})]
46
-
47
-
48
- def test_contract_update_list_delete_forward_every_argument_verbatim() -> None:
49
- client = _Recorder()
50
- update = {"contract_id": "c", "documents": [], "expected_contract_revision": "1", "changed_by": "t", "idempotency_key": "k"}
51
- asyncio.run(client.plan_contract_update(**update))
52
- asyncio.run(client.plan_contract_list(plan="p", limit=5))
53
- asyncio.run(client.plan_contract_delete(contract_id="c", changed_by="t", hard=True))
54
- assert client.calls == [
55
- ("plan_contract_update", update),
56
- ("plan_contract_list", {"plan": "p", "limit": 5}),
57
- ("plan_contract_delete", {"contract_id": "c", "changed_by": "t", "hard": True}),
58
- ]
59
-
60
-
61
- def test_contract_set_is_removed_from_the_facade() -> None:
62
- assert not hasattr(ContextGateCommandsMixin, "plan_contract_set")