# SmartAgent 独立 HIL 中心接入 中心地址:**https://hil-center.smartagent.xin**。 这是独立的远程调试中心。使用管理员私下交付的个人凭证,现场终端主动建立出站 WSS, 不需要开放现场电脑入站端口。台架执行和设备安全确认仍由现场服务负责。 ## 1. 准备客户端和身份 使用管理员交付并核对 SHA-256 的 HIL 0.5.0 客户端。本入口不提供匿名安装包下载。 将个人 Token 保存到仅本人可读的 `operator.token` 文件;不要写入 URL、聊天或日志。 以下命令用客户端自带 Python 或已安装该版本 HIL 的 Python 执行。 Windows 包可用 `runtime/python.exe` 替代 `python`。 ```sh python -m hil_core.center_cli --url https://hil-center.smartagent.xin --token-file operator.token owners python -m hil_core.center_cli --url https://hil-center.smartagent.xin --token-file operator.token list ``` `owners` 返回自己的 `owner_id`;后续 `prepare` 返回需现场确认的 `center_id`。测试 HIL/WikiBox 的凭据不通用。 只操作已有授权台架时直接跳到第 3 步。 ## 2. 将新现场绑定到中心 现场先完成 bench/capmap、设备身份、接线和插件检查,再用 `site-init` 创建全新私有现场目录。 已有现场实例不得覆盖初始化;访问同一硬件的服务和插件必须使用相同机器级锁目录。 用实际 OWNER_ID 和 BENCH_ID 替换以下占位符: ```sh python -m hil_core.center_cli --url https://hil-center.smartagent.xin --token-file operator.token reserve --owner OWNER_ID --bench BENCH_ID python -m hil_core.center_cli --url https://hil-center.smartagent.xin --token-file operator.token prepare --owner OWNER_ID --bench BENCH_ID --out request.json ``` 将 `request.json` 安全交付现场,在有效期内核对返回的 CENTER_ID、OWNER_ID 和 BENCH_ID: ```sh python -m hil_core.center_cli consume --request-file request.json --center-id CENTER_ID --owner OWNER_ID --bench BENCH_ID --credentials SITE_HOME/secrets/credentials.db --relay-token-file SITE_HOME/secrets/relay.token --state SITE_HOME/binding.json --config SITE_HOME/config.json python -m hil_core site-service --config SITE_HOME/config.json ``` 绑定失败或回复丢失时复用同一 request 文件,不另行覆盖令牌或现场状态。 个人台架默认一台;换机须明确解绑。解绑后保持旧现场服务运行,完成撤权同步。 ## 3. 操作已授权台架 在私有目录创建 `center.profile.json`,替换 BENCH_ID,Token 路径相对于 profile: ```json { "mode": "center", "url": "wss://hil-center.smartagent.xin/site/BENCH_ID", "bench_id": "BENCH_ID", "token_file": "operator.token" } ``` ```sh python -m hil_core client diagnose --profile center.profile.json python -m hil_core client check --profile center.profile.json --plan APPROVED_PLAN.yaml python -m hil_core client submit --profile center.profile.json --plan APPROVED_PLAN.yaml --request-record requests/first.json python -m hil_core client status --profile center.profile.json --job-id JOB_ID python -m hil_core client download --profile center.profile.json --job-id JOB_ID --out evidence/first ``` 先使用台架负责人确认的只读计划。烧录、复位、供电等操作需要对应确认与准入。 不确定提交是否成功时复用原 request-record;证据下载目录须不存在,并核验 SHA-256/run-verify。 健康检查只代表中心可达,不能替代台架上线、授权和真实任务验收。