runs and deployment: first slice

uhh
This commit is contained in:
lda
2026-06-01 02:53:52 +07:00 Verified
parent 3cd7f529e9
commit d4ab0e6912
7 changed files with 1042 additions and 3 deletions
+9
View File
@@ -3,6 +3,8 @@ from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
import typer
from wf_mcp.broker import build_service_from_config, load_broker_config
from wf_mcp.broker.service import WfMcpService
from wf_mcp.workflow_surface import WorkflowSurfaceHandlers
@@ -23,6 +25,13 @@ class CliContext:
handlers: WorkflowSurfaceHandlers
def config_path_from_context(ctx: typer.Context) -> str:
"""Return the root --config path captured by the Typer callback."""
obj = ctx.obj if isinstance(ctx.obj, dict) else {}
value = obj.get("config_path", "wf_mcp.config.json")
return value if isinstance(value, str) else "wf_mcp.config.json"
def load_cli_context(config_path: str | Path) -> CliContext:
"""Load config and build workflow-surface handlers for CLI commands."""
resolved_config_path = Path(config_path)