Files
workphone-sdk/sdk/agent/hawk/__init__.py

16 lines
704 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Hawk - 设备端网络与连接恢复模块(与 Agent 代码隔离、协同)
职责边界:
- Agent业务逻辑、技能执行、WebSocket 连接与重连策略。
- Hawk仅负责「网络层」可做的合法操作检测网络状态、打开系统网络设置、
开启/关闭 WiFi、触发连接已保存网络、重试等。不涉及任何未授权访问或破解行为。
协同方式Agent 在断网/重连前可调用 Hawk.try_reconnect_network(device)
由 Hawk 在设备上执行合法网络恢复操作,再由 Agent 继续重连。
"""
from hawk.network import try_reconnect_network, is_network_available
__all__ = ["try_reconnect_network", "is_network_available"]