This commit is contained in:
@@ -389,17 +389,23 @@ uv run --package device-host-agent device-host-agent setup
|
||||
缓存身份不存在时,Host Agent 会直接向云端注册,由云端返回 `host_id`;后续运行
|
||||
使用本地持久化的随机 Host secret。无需配置静态 Host 或 enrollment token:
|
||||
|
||||
Host Agent 的 Planner transport 默认是 `cloud`。启动前在 Cloud Console 创建并激活
|
||||
LLM Provider profile;Provider API key 只由 Cloud API 加密保存,边缘 Host 不需要也
|
||||
不应配置厂商 API key。
|
||||
|
||||
```bash
|
||||
export HOST_AGENT_IDENTITY_PATH="tasks/host_identity.json"
|
||||
export HOST_AGENT_DISPLAY_NAME="Edge Mac 01"
|
||||
|
||||
export AI_PLANNER_ENABLED="true"
|
||||
export AI_PLANNER_PROVIDER="anthropic"
|
||||
export ANTHROPIC_API_KEY="<secret>"
|
||||
|
||||
uv run --package device-host-agent device-host-agent
|
||||
```
|
||||
|
||||
只有需要绕过 Cloud API 时,才显式设置
|
||||
`AI_PLANNER_TRANSPORT=direct`,并在该 Host 上配置
|
||||
`AI_PLANNER_PROVIDER`、`AI_PLANNER_MODEL` 与对应的厂商 API key。
|
||||
|
||||
首次启动顺序为:持久化候选 Host secret、向云端换取 `host_id`、为每个本地设备
|
||||
换取 `device_id`、保存映射、连接 WDA、发送 heartbeat、开始 long-poll 领取任务。
|
||||
Host Agent 会在本机回环地址提供 Console。必须保留并保护 `tasks/host_identity.json` 和
|
||||
|
||||
Reference in New Issue
Block a user