Split the 657-line operation service into eor, submit, and verify modules, add the AGENT_REVOKED and KEY_RETIRED codes the Backend already emits, and condense every multi-line comment. Mirror Node, Python, and Go at 2.1.0 with the deep-health 503, non-idempotent retry, rotation grace, and path-encoding fixes. Document which routes and response fields the self-hosted server does not provide. Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
21 lines
650 B
Python
21 lines
650 B
Python
"""Strict Qwen Code managed runtime inspection."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import List, Tuple
|
|
|
|
from ._runtime import expected_runtime_scripts, runtime_contract_exists
|
|
from ._strict_json import JsonObject
|
|
from .qwen_contract import AGENT_KEY, QwenRuntimeContract
|
|
|
|
|
|
def _expected_scripts(agent_id: str, config: JsonObject) -> Tuple[str, str]:
|
|
return expected_runtime_scripts(AGENT_KEY, agent_id, config)
|
|
|
|
|
|
def qwen_runtime_files_exist(contracts: List[QwenRuntimeContract]) -> bool:
|
|
return any(
|
|
runtime_contract_exists(contract, AGENT_KEY, "Qwen Code", _expected_scripts)
|
|
for contract in contracts
|
|
)
|