MCPcopy
hub / github.com/lightningpixel/modly / _recovery_meta

Function _recovery_meta

tools/modly-cli/agent.py:202–222  ·  view source on GitHub ↗
(base_url: str, run_id: str, *, legacy: bool = False, kind: str = "workflow-run", extra: dict[str, Any] | None = None)

Source from the content-addressed store, hash-verified

200
201
202def _recovery_meta(base_url: str, run_id: str, *, legacy: bool = False, kind: str = "workflow-run", extra: dict[str, Any] | None = None) -> dict[str, Any]:
203 prefix = "python tools/modly-cli/agent.py"
204 if base_url.rstrip("/") != DEFAULT_BASE_URL.rstrip("/"):
205 prefix = f"{prefix} --base-url {base_url.rstrip('/')}"
206 if legacy:
207 group = "legacy job"
208 cancel = "legacy cancel"
209 elif kind == "process-run":
210 group = "process-run status"
211 cancel = "process-run cancel"
212 else:
213 group = "workflow-run status"
214 cancel = "workflow-run cancel"
215 meta = {
216 "status_command": f"{prefix} {group} {run_id}",
217 "cancel_command": f"{prefix} {cancel} {run_id}",
218 "legacy": legacy,
219 }
220 if extra:
221 meta.update(extra)
222 return meta
223
224
225def _unsupported_process(message: str = "This process is not available through the canonical process-run contract.") -> ModlyCliError:

Callers 8

cmd_jobFunction · 0.85
cmd_cancelFunction · 0.85
cmd_workflow_run_startFunction · 0.85
cmd_workflow_run_statusFunction · 0.85
cmd_workflow_run_cancelFunction · 0.85
_generate_oneFunction · 0.85
cmd_legacy_generateFunction · 0.85
cmd_process_run_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected