@agent-hubs/runtime-client
v0.1.1
Published
Agent Hub local runtime client for connecting local Codex CLI to a shared Gateway.
Maintainers
Readme
@agent-hubs/runtime-client
Agent Hub 本机 Runtime Client,用于把本机 Codex CLI 接入共享 Gateway。
安装后会提供两个命令:
agent-runtime:推荐正式命令gateway:兼容旧脚本的别名
前置要求
- Node.js
>=20 - 本机已安装并登录 Codex CLI
先确认本机能执行:
codex --helpWindows:
where codex
codex --help安装
正式安装方式:
npm install -g @agent-hubs/runtime-client安装后验证:
agent-runtime --help如果使用本地 tarball 调试:
npm install -g agent-hubs-runtime-client-0.1.0.tgz启动本机 Runtime Client
Mac/Linux:
agent-runtime runtime serve --provider codex --gateway-url http://<gateway-host>:3010Windows CMD:
agent-runtime runtime serve --provider codex --gateway-url http://<gateway-host>:3010启动后会自动:
- 探测本机
codex可执行文件 - 执行
codex --help自检 - 注册到共享 Gateway
- 定时发送心跳
- 领取任务并在本机执行 Codex CLI
- 回传结果
绑定机器人
先在平台机器人编辑页重新签发 botKey,然后在同一台 runtime 机器上执行:
交互式引导:
agent-runtime onboard执行后会依次提示:
- 选择 Agent 类型:
codex / claude_code / custom - 输入
Gateway URL - 输入
Platform API URL - 输入
botKey
非交互式命令:
agent-runtime onboard \
--provider codex \
--gateway-url http://<gateway-host>:3010 \
--platform-url http://<api-host>:3001/api/v1 \
--bot-key botkey_xxxWindows CMD 单行:
agent-runtime onboard --provider codex --gateway-url http://<gateway-host>:3010 --platform-url http://<api-host>:3001/api/v1 --bot-key botkey_xxx发布与升级
维护者发布新版本前先升级版本号:
npm version patch --workspace @agent-hubs/runtime-client发布到 npm registry:
npm publish --workspace @agent-hubs/runtime-client --access public --otp <6位验证码>发布成功后验证:
npm view @agent-hubs/runtime-client version
npm install -g @agent-hubs/runtime-client
agent-runtime --help说明:
@agent-hubs/runtime-client是 npm 包名。agent-runtime是安装后提供的命令名。- 如果 npm 账号开启了发布 2FA,发布时需要传
--otp。
查看状态
agent-runtime sessions --provider codex --gateway-url http://<gateway-host>:3010解绑
agent-runtime unbind --provider codex --gateway-url http://<gateway-host>:3010 --session-id codex-session-xxx环境变量
AGENT_HUB_GATEWAY_URLAGENT_HUB_PLATFORM_URLGATEWAY_CODEX_TIMEOUT_MS
示例:
AGENT_HUB_GATEWAY_URL=http://127.0.0.1:3010 agent-runtime runtime serve --provider codex