INNER CODE UNIT · Python

_safe_provide

Priivacy-ai/spec-kitty · packages/spec-kitty-services/spec_kitty_services/__init__.py:79

def _safe_provide(service: str) -> str | None:
    # Broad on purpose: the CLI turns a raising provider into a SERVICE_BINARY_MISSING
    # refusal that would block its own fetch, so any failure here must mean "offer nothing".
    try:
        return _provide(service)
    except Exception:
        return None


def write_service() -> str | None:
    """The bundled write-service binary for this host and CLI version, or ``None``."""
    return _safe_provide("write-service")


def charter_service() -> str | None:
    """The bundled charter-service binary for this host and CLI version, or ``None``."""
    return _safe_provide("charter-service")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…