Add opinionated MCP modes for workspace workflows
Introduce explicit repro-fix, inspect, cold-start, and review-eval modes across the MCP server, CLI, and host helpers, with canonical mode-to-tool mappings, narrowed schemas, and mode-specific tool descriptions on top of the existing workspace runtime. Reposition the docs, host onramps, and use-case recipes so named modes are the primary user-facing startup story while the generic no-mode workspace-core path remains the escape hatch, and update the shared smoke runner to validate repro-fix and cold-start through mode-backed servers. Validation: UV_OFFLINE=1 UV_CACHE_DIR=.uv-cache uv run pytest --no-cov tests/test_api.py tests/test_server.py tests/test_host_helpers.py tests/test_public_contract.py tests/test_cli.py tests/test_workspace_use_case_smokes.py; UV_OFFLINE=1 UV_CACHE_DIR=.uv-cache make check; UV_OFFLINE=1 UV_CACHE_DIR=.uv-cache make dist-check; real guest-backed make smoke-repro-fix-loop smoke-cold-start-validation outside the sandbox.
This commit is contained in:
parent
dc86d84e96
commit
d0cf6d8f21
33 changed files with 1034 additions and 274 deletions
|
|
@ -62,7 +62,12 @@ from pyro_mcp.contract import (
|
|||
PUBLIC_CLI_WORKSPACE_SYNC_PUSH_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SYNC_SUBCOMMANDS,
|
||||
PUBLIC_CLI_WORKSPACE_UPDATE_FLAGS,
|
||||
PUBLIC_MCP_COLD_START_MODE_TOOLS,
|
||||
PUBLIC_MCP_INSPECT_MODE_TOOLS,
|
||||
PUBLIC_MCP_MODES,
|
||||
PUBLIC_MCP_PROFILES,
|
||||
PUBLIC_MCP_REPRO_FIX_MODE_TOOLS,
|
||||
PUBLIC_MCP_REVIEW_EVAL_MODE_TOOLS,
|
||||
PUBLIC_MCP_WORKSPACE_CORE_PROFILE_TOOLS,
|
||||
PUBLIC_SDK_METHODS,
|
||||
)
|
||||
|
|
@ -139,6 +144,8 @@ def test_public_cli_help_lists_commands_and_run_flags() -> None:
|
|||
assert flag in mcp_serve_help_text
|
||||
for profile_name in PUBLIC_MCP_PROFILES:
|
||||
assert profile_name in mcp_serve_help_text
|
||||
for mode_name in PUBLIC_MCP_MODES:
|
||||
assert mode_name in mcp_serve_help_text
|
||||
|
||||
workspace_help_text = _subparser_choice(parser, "workspace").format_help()
|
||||
for subcommand_name in PUBLIC_CLI_WORKSPACE_SUBCOMMANDS:
|
||||
|
|
@ -372,6 +379,14 @@ def test_public_mcp_tools_match_contract(tmp_path: Path) -> None:
|
|||
assert tool_names == tuple(sorted(PUBLIC_MCP_WORKSPACE_CORE_PROFILE_TOOLS))
|
||||
|
||||
|
||||
def test_public_mcp_modes_are_declared_and_non_empty() -> None:
|
||||
assert PUBLIC_MCP_MODES == ("repro-fix", "inspect", "cold-start", "review-eval")
|
||||
assert PUBLIC_MCP_REPRO_FIX_MODE_TOOLS
|
||||
assert PUBLIC_MCP_INSPECT_MODE_TOOLS
|
||||
assert PUBLIC_MCP_COLD_START_MODE_TOOLS
|
||||
assert PUBLIC_MCP_REVIEW_EVAL_MODE_TOOLS
|
||||
|
||||
|
||||
def test_pyproject_exposes_single_public_cli_script() -> None:
|
||||
pyproject = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
|
||||
scripts = pyproject["project"]["scripts"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue