feat: select workflow cli target from config

This commit is contained in:
lda
2026-06-03 08:35:33 +07:00 Verified
parent 99a4d37618
commit b9b60250e8
3 changed files with 157 additions and 17 deletions
+18 -1
View File
@@ -23,9 +23,26 @@ def root(
help="Path to workflow/MCP config JSON.",
),
] = "wf_mcp.config.json",
local: Annotated[
bool,
typer.Option("--local", help="Force same-process local workflow target."),
] = False,
url: Annotated[
str | None,
typer.Option("--url", help="Override workflow JSON-RPC target URL."),
] = None,
timeout: Annotated[
float | None,
typer.Option("--timeout", min=0.1, help="Override RPC timeout seconds."),
] = None,
) -> None:
"""Run workflow platform commands."""
ctx.obj = {"config_path": config}
ctx.obj = {
"config_path": config,
"force_local": local,
"rpc_url": url,
"rpc_timeout_seconds": timeout,
}
app.add_typer(caps.app, name="cap")