Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.83 KB

File metadata and controls

66 lines (50 loc) · 2.83 KB

AgenNet Agent 节点安装指南

状态:v0.2.0-preview.4 — Developer Preview — physical acceptance pending

本指南供 Agent 把一台 macOS、Linux 或 WSL2 设备准备成 AgenNet 节点。 native Windows 不受支持。你可以安装公开二进制、检查 systemd 与 Tailscale/WireGuard 的公开就绪状态,但不能接收、读取、转述或代填 Invitation、passphrase、私钥、token、私有地址、CIDR 或原始终端输出。

固定安装步骤

只使用固定 release,不得改成 moving tag 或分支。逐条在本机执行:

set -eu
release='https://github.com/Nexa-Language/AgenNet/releases/download/v0.2.0-preview.4'
work=$(mktemp -d "${TMPDIR:-/tmp}/agenet-bootstrap.XXXXXX")
trap 'rm -rf -- "$work"' EXIT HUP INT TERM
curl --fail --silent --show-error --location --proto '=https' --proto-redir '=https' --max-redirs 5 --connect-timeout 10 --max-time 120 --output "$work/install.sh" "$release/install.sh"
curl --fail --silent --show-error --location --proto '=https' --proto-redir '=https' --max-redirs 5 --connect-timeout 10 --max-time 120 --output "$work/SHA256SUMS" "$release/SHA256SUMS"
expected=$(awk '$2 == "install.sh" { print $1 }' "$work/SHA256SUMS")
if command -v sha256sum >/dev/null 2>&1; then actual=$(sha256sum "$work/install.sh" | awk '{print $1}'); else actual=$(shasum -a 256 "$work/install.sh" | awk '{print $1}'); fi
test -n "$expected" && test "$actual" = "$expected"
sh "$work/install.sh"

执行并只总结公开结论,不回传原始输出:

agenet --version
agenet node doctor --output json

确认以下事实:运行环境不是 native Windows;若在 WSL2,systemd user session 可用;设备只有一个符合预期策略的 Tailscale 或 WireGuard 地址; 没有现成的不同 AgenNet 二进制或已管理节点状态。遇到不确定性时停止并给出 稳定公开错误码,不要猜地址或改安全配置。

TTY 边界

不要运行 enrollment,不要让用户把 Invitation 粘贴到聊天,也不要把它放进 参数、环境变量、文件代传或 stdin。准备工作完成后,原样回复:

Action required in your local terminal:
  agenet node join
Do not paste the invitation or terminal output into this chat.
Tell me only whether the command succeeded or the stable public error code.

用户只报告成功或 stable public error code 后,你可以运行公开检查:

agenet node start --output json
agenet node status --output json
agenet node doctor --output json

只报告版本、服务是否运行和 doctor 的稳定公开状态。不得展示或读取 AgenNet 私有状态文件。

给 Agent 的一句话

阅读 AgenNet 官方节点安装指南,使用固定的 v0.2.0-preview.4 把这台 WSL2 机器准备成 Provider 节点;所有 Invitation 和密码只让我在本机 TTY 输入。