MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _build_runtime

Function _build_runtime

config/loader.py:184–190  ·  view source on GitHub ↗
(raw: Mapping[str, Any])

Source from the content-addressed store, hash-verified

182
183
184def _build_runtime(raw: Mapping[str, Any]) -> RuntimeConfig:
185 runtime_data = _as_mapping(raw.get("runtime"))
186 ssh_data = _as_mapping(runtime_data.get("ssh", raw.get("ssh", {})))
187 provider = str(runtime_data.get("provider", "local")).strip().lower() or "local"
188 if provider not in {"local", "ssh"}:
189 raise ConfigError("`runtime.provider` must be either `local` or `ssh`.")
190 return RuntimeConfig(provider=provider, ssh=_build_ssh(ssh_data))
191
192
193def _build_command_tool_provider(data: Mapping[str, Any], *, default_executable: str = "") -> CommandToolProviderConfig:

Callers 1

load_app_configFunction · 0.85

Calls 4

_as_mappingFunction · 0.85
ConfigErrorClass · 0.85
RuntimeConfigClass · 0.85
_build_sshFunction · 0.85

Tested by

no test coverage detected