INNER CODE UNIT · Python

_read_skill_evolution_token_fd

TianGzlab/OmicsClaw · omicsclaw/surfaces/desktop/server.py:249

def _read_skill_evolution_token_fd(raw_fd: str) -> str:
    """Consume one Electron-delivered 256-bit token from an inherited pipe.

    A daemon reader keeps this portable across POSIX and Windows pipes while
    the startup thread enforces a strict deadline.  Timeout is fatal and never
    permits a lower-priority environment credential fallback.
    """

    try:
        fd = int(raw_fd, 10)
    except ValueError as exc:
        raise RuntimeError("invalid Skill Evolution credential descriptor") from exc
    if fd < 3:
        raise RuntimeError("invalid Skill Evolution credential descriptor")

    outcomes: queue.Queue[tuple[bytes | None, Exception | None]] = queue.Queue(
        maxsize=1
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…