INNER CODE UNIT · Python

_is_valid_skill_evolution_dedicated_token

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

def _is_valid_skill_evolution_dedicated_token(token: str) -> bool:
    """Accept only the 256-bit lowercase-hex local authority contract."""

    return len(token) == 64 and all(
        character in "0123456789abcdef" for character in token
    )


def _capture_skill_evolution_bearer_authority(
    app: FastAPI,
    environ: MutableMapping[str, str],
) -> _SkillEvolutionBearerAuthority:
    """Freeze the process-lifetime Skill Evolution authority at startup."""

    authority = _SkillEvolutionBearerAuthority.capture(environ)
    setattr(app.state, _SKILL_EVOLUTION_AUTH_STATE_ATTR, authority)
    if authority.source == "dedicated_environment":
        logger.warning(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…