docs: deprecate inbox and document remote dashboard

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 14:37:40 +08:00
parent df433a9179
commit 9000eeeaa7
4 changed files with 38 additions and 26 deletions
+21 -26
View File
@@ -50,12 +50,13 @@ title_template = "{agent} — {context}" # context = 工作目录名
body_stop = "等待输入"
[inbox]
enabled = false
[remote]
enabled = true
socket = "/run/user/1000/agent-notify.sock"
remote_socket = "/tmp/agent-notify-longbin.sock"
addr = "127.0.0.1:17777"
fallback_local = true
timeout_ms = 500
url = "http://your-server:8080"
token = "shared-secret"
timeout_ms = 2000
```
## 命令
@@ -64,44 +65,38 @@ timeout_ms = 500
agent-notify send --event stop
agent-notify hook cursor stop # Cursor CLI stop hook
agent-notify hook claude stop # Claude Stop hook(输出 terminalSequence JSON
agent-notify inbox serve # 本地接收远程通知记录
agent-notify inbox list # 列出未处理通知
agent-notify inbox show <id>
agent-notify inbox done <id>
agent-notify inbox tui # Bubble Tea TUI
agent-notify inbox ssh-config install # 自动写 ~/.ssh/config RemoteForward
agent-notify server --listen :8080 # 远程汇总服务(见下方 Remote Dashboard
agent-notify inbox serve # 已弃用:见下方 Inboxdeprecated
agent-notify test cursor [-v]
agent-notify test claude [--apply]
agent-notify doctor
agent-notify install --all [--force]
```
## 本地汇总 Inbox
## Remote Dashboard
本地 Ghostty 所在机器启动接收服务
可访问的机器启动汇总服务(需设置与客户端相同的 token)
```bash
agent-notify inbox serve
AGENT_NOTIFY_TOKEN=secret agent-notify server --listen :8080
```
让命令自动写 SSH `RemoteForward` 配置:
`~/.config/agent-notify/config.toml` 中启用远程上报(`agent-notify install` 会生成带 `[remote]` 的默认配置
```bash
agent-notify inbox ssh-config install
```toml
[remote]
enabled = true
url = "http://your-server:8080"
token = "shared-secret"
```
命令会在 `~/.ssh/config` 写入一个托管块,并把写入内容打印出来。已有 SSH 连接需要重连后才会生效
远程 Agent hook 在 `stop` 等事件时会向该服务 POST 状态;浏览器打开服务根路径即可查看 Web UI(输入 token 后加载会话列表)
默认写入的转发形式是:远程创建 `/tmp/agent-notify-$USER.sock`,转发到本地 `$XDG_RUNTIME_DIR/agent-notify.sock`。远程 hook 会尝试通过这个 SSH 反向转发把记录写回本地 inbox;如果本地接收服务不可用,会 fallback 写到远程机器自己的 `~/.local/state/agent-notify/inbox.jsonl`,避免丢记录。
## 本地汇总 Inbox(已弃用)
查看和处理:
> **Deprecated** 请改用上方的 Remote Dashboard`agent-notify server` + `[remote]`)。`agent-notify inbox` 子命令仍会打印弃用警告并继续工作,便于过渡。
```bash
agent-notify inbox list
agent-notify inbox show <id>
agent-notify inbox done <id>
agent-notify inbox tui
```
旧流程:在本地 Ghostty 机器运行 `agent-notify inbox serve`,用 `agent-notify inbox ssh-config install` 配置 SSH `RemoteForward`,通过 Unix socket 把远程通知写回本地 `inbox.jsonl`,并用 `inbox list` / `tui` 等处理。
## Hook 配置位置