AgentRelay-Runner

module
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: Apache-2.0

README

AgentRelay Runner

AgentRelay Runner 是 AgentRelay 的本机执行端。它在用户自己的电脑上连接 Codex CLI,并通过出站 HTTPS/WSS 与用户指定的 AgentRelay Control Plane 通信。

本仓库公开 Runner 的完整源码、协议、安装器和发布流程,让用户能够审查本机进程访问了哪些目录、执行了哪些操作、保存了哪些凭据,以及哪些数据会发送给 Control Plane。

信任边界

  • Runner 不监听公网入站端口,只主动连接用户指定的 Control Plane。
  • Codex 登录凭据保留在本机,Runner 不读取或上传 Codex OAuth 凭据。
  • Runner 只允许在已授权的工作区根目录内读取文件、生成 Diff 和执行验证命令,并拒绝符号链接逃逸。
  • 为支持远程对话,提示词、Codex 事件、工具结果、Diff、验证输出和用户明确请求的 Artifact 会发送到所连接的 Control Plane。
  • Runner Credential 优先保存在系统 Keyring;无法使用 Keyring 时才使用受限权限的本机状态文件。
  • 日志会对常见 Token、API Key、密码和 Bearer Credential 做脱敏,但用户仍应避免把秘密写入提示词或命令输出。

安装

通常应从 AgentRelay 网页复制带有 Cloud 地址的一键安装命令:

curl -fsSL https://YOUR_CLOUD/install.sh | sh

也可以直接使用本仓库的公开安装器:

curl -fsSL https://raw.githubusercontent.com/dijkstra402/AgentRelay-Runner/main/packaging/runner/install.sh \
  | sh -s -- https://YOUR_CLOUD

Windows PowerShell:

$env:AGENTRELAY_CLOUD_URL = "https://YOUR_CLOUD"
irm https://raw.githubusercontent.com/dijkstra402/AgentRelay-Runner/main/packaging/runner/install.ps1 | iex

安装器会从本仓库最新的 GitHub Release 下载对应平台的 Runner。详细说明见 Runner 安装指南

从源码构建

需要 Go 1.26 或更高版本:

go test ./...
go build -trimpath -o agentrelay ./cmd/agentrelay
./agentrelay --version

支持的发布目标:

  • macOS Apple Silicon(darwin/arm64)
  • macOS Intel(darwin/amd64)
  • Linux x86-64(linux/amd64)
  • Windows x86-64(windows/amd64)

仓库结构

cmd/agentrelay/       Runner CLI 与浏览器配对
internal/runner/      Codex、Git、本机状态、工作区与执行逻辑
protocol/             Control Plane 与 Runner 的公开 Go 协议包
api/runner-protocol/  协议 JSON Schema
packaging/runner/     Unix 与 Windows 安装器

Runner v1.2.2 使用协议版本 1.0。Runner 版本与协议版本分别演进;Control Plane 应通过 protocolVersioncapabilities 判断兼容性。

安全问题

请不要在公开 Issue 中披露未修复漏洞。报告方式和响应范围见 SECURITY.md

许可证

Apache License 2.0,见 LICENSE

Directories

Path Synopsis
cmd
agentrelay command
internal
runner/codex
Package codex implements the Runner-side adapter for `codex app-server`.
Package codex implements the Runner-side adapter for `codex app-server`.
testkit/fakecodex command
Command fakecodex is a deterministic Codex App Server used by AgentRelay's protocol and end-to-end tests.
Command fakecodex is a deterministic Codex App Server used by AgentRelay's protocol and end-to-end tests.
packaging

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL