STATE-WP-0069: MCP Phase 1 deprecation + open_workplans summary alias
Some checks are pending
CI Smoke / host-smoke (push) Waiting to run
CI Smoke / container-smoke (push) Waiting to run

Complete MCP legacy deprecation coverage (resource + docstrings + TOOLS.md).
Dual-write open_workplans on /state/summary alongside open_workstreams;
get_domain_summary prefers the new key. T06 internal rename started.
This commit is contained in:
tegwick 2026-07-08 20:33:53 +02:00
parent 9e93b517e4
commit e6a6af035c
7 changed files with 70 additions and 40 deletions

View file

@ -334,10 +334,10 @@ def get_domain_summary(domain_slug: str) -> str:
topic_id = topic["id"]
state_summary = _get("/state/summary")
workstreams = [
ws for ws in state_summary.get("open_workstreams", [])
if ws.get("topic_id") == topic_id
]
open_workplans = state_summary.get("open_workplans") or state_summary.get(
"open_workstreams", []
)
workstreams = [ws for ws in open_workplans if ws.get("topic_id") == topic_id]
blocking = _get("/decisions", {"decision_type": "pending", "topic_id": topic_id})
recent = _get("/progress", {"topic_id": topic_id, "limit": 5})
repos = _get("/repos", {"domain": domain_slug})
@ -467,7 +467,7 @@ def get_domain_summary(domain_slug: str) -> str:
@mcp.tool()
def get_topic(slug: str) -> str:
"""Return a topic (with workstreams) by slug, plus its recent progress events."""
"""Return a topic (with workplans) by slug, plus its recent progress events."""
topics = _get("/topics")
match = next((t for t in topics if t["slug"] == slug), None)
if not match:
@ -1304,10 +1304,10 @@ def get_next_steps() -> str:
"""Surface contextual next-action suggestions derived from hub state.
Returns suggestions based on:
- Recently resolved decisions first open task in the same workstream
- Workstreams whose every dependency is now finished -> first todo task
- Recently resolved decisions first open task in the same workplan
- Workplans whose every dependency is now finished -> first todo task
Each suggestion includes domain, workstream, task, and a plain-language
Each suggestion includes domain, workplan, task, and a plain-language
message. The hub surfaces *what* and *where* the domain owns *how*.
Derived next steps may include open demand-weighted suggestions from the
@ -2525,13 +2525,13 @@ def update_repo_goal(
@mcp.tool()
def get_repo_dispatch(repo_slug: str) -> str:
"""Return active workstreams, pending tasks, and goal for a repo.
"""Return active workplans, pending tasks, and goal for a repo.
Use this at the start of a repo agent session to discover what work is
pending without needing to read the full state summary or scan workplan
files. The response includes:
- active_goal: the highest-priority active repo goal
- active_workstreams: list of active workstreams with pending tasks
- active_workplans: list of active workplans with pending tasks
- human_interventions: tasks that need human input (needs_human=true)
- last_state_synced_at: when the repo was last synced to the hub