@@ -108,7 +108,7 @@ Gateway 和 Adapter 通过**同一个 listen 地址**通信。根据你的系统
108108| 系统 | 推荐值 | 说明 |
109109|------|--------|------|
110110| Windows | `\\.\pipe\neocode-gateway` | 命名管道 |
111- | macOS / Linux | `127.0.0.1:8080 ` | TCP 回环地址 |
111+ | macOS / Linux | `$HOME/.neocode/run/gateway.sock ` | Unix 域套接字(IPC) |
112112
113113` token_file` 留空时,Gateway 和 Adapter 默认使用 `~/.neocode/auth.json`。
114114
@@ -134,10 +134,10 @@ Gateway 是 NeoCode 的后端服务进程。Adapter 通过它接入 Runtime 和
134134
135135` ` ` bash
136136# 开发模式 (go run)
137- go run ./cmd/neocode-gateway --listen "127.0.0.1:8080 " --http-listen "127.0.0.1:18181" --workdir "/home/you/project"
137+ go run ./cmd/neocode-gateway --listen "$HOME/.neocode/run/gateway.sock " --http-listen "127.0.0.1:18181" --workdir "/home/you/project"
138138
139139# 安装模式 (neocode)
140- neocode gateway --listen "127.0.0.1:8080 " --http-listen "127.0.0.1:18181" --workdir "/home/you/project"
140+ neocode gateway --listen "$HOME/.neocode/run/gateway.sock " --http-listen "127.0.0.1:18181" --workdir "/home/you/project"
141141` ` `
142142
143143# ### Windows
@@ -154,7 +154,7 @@ neocode gateway --listen "\\.\pipe\neocode-gateway" --http-listen "127.0.0.1:181
154154
155155| 参数 | 必填 | 默认值 | 说明 |
156156|------|:---:|--------|------|
157- | `--listen` | 是* | — | IPC 监听地址。Windows 用命名管道 `\\.\pipe\<name>`;Unix 用 TCP `127.0.0.1:8080` |
157+ | `--listen` | 是* | — | IPC 监听地址。Windows 用命名管道 `\\.\pipe\<name>`;macOS/Linux 用 Unix socket(如 `$HOME/.neocode/run/gateway.sock`) |
158158| `--workdir` | 是* | — | 工作区路径。没指定时会报 `workspace hash is empty` |
159159| `--http-listen` | 否 | `127.0.0.1:8400` | HTTP 网络通道监听地址 |
160160| `--token-file` | 否 | `~/.neocode/auth.json` | 认证 token 文件 |
@@ -170,10 +170,10 @@ Adapter 负责桥接飞书长连接与本地 Gateway,把飞书消息翻译为
170170
171171` ` ` bash
172172# 开发模式 (go run)
173- go run ./cmd/neocode adapter feishu --ingress sdk --gateway-listen "127.0.0.1:8080 "
173+ go run ./cmd/neocode adapter feishu --ingress sdk --gateway-listen "$HOME/.neocode/run/gateway.sock "
174174
175175# 安装模式 (neocode)
176- neocode adapter feishu --ingress sdk --gateway-listen "127.0.0.1:8080 "
176+ neocode adapter feishu --ingress sdk --gateway-listen "$HOME/.neocode/run/gateway.sock "
177177` ` `
178178
179179# ### Windows
@@ -313,20 +313,20 @@ source ~/.zshrc
313313
314314``` bash
315315# 开发模式 (go run)
316- go run ./cmd/neocode-gateway --listen " 127.0.0.1:8080 " --http-listen " 127.0.0.1:18181" --workdir " /path/to/project"
316+ go run ./cmd/neocode-gateway --listen " $HOME /.neocode/run/gateway.sock " --http-listen " 127.0.0.1:18181" --workdir " /path/to/project"
317317
318318# 安装模式 (neocode)
319- neocode gateway --listen " 127.0.0.1:8080 " --http-listen " 127.0.0.1:18181" --workdir " /path/to/project"
319+ neocode gateway --listen " $HOME /.neocode/run/gateway.sock " --http-listen " 127.0.0.1:18181" --workdir " /path/to/project"
320320```
321321
322322启动 Adapter:
323323
324324``` bash
325325# 开发模式 (go run)
326- go run ./cmd/neocode adapter feishu --ingress webhook --gateway-listen " 127.0.0.1:8080 " --listen " 127.0.0.1:18080"
326+ go run ./cmd/neocode adapter feishu --ingress webhook --gateway-listen " $HOME /.neocode/run/gateway.sock " --listen " 127.0.0.1:18080"
327327
328328# 安装模式 (neocode)
329- neocode adapter feishu --ingress webhook --gateway-listen " 127.0.0.1:8080 " --listen " 127.0.0.1:18080"
329+ neocode adapter feishu --ingress webhook --gateway-listen " $HOME /.neocode/run/gateway.sock " --listen " 127.0.0.1:18080"
330330```
331331
332332然后用 ngrok / cloudflared 把 ` 18080 ` 暴露公网,在飞书后台配置:
@@ -500,7 +500,7 @@ Adapter 启动前强制检查 `FEISHU_APP_SECRET` 环境变量。解决:先写
500500
501501Adapter 能收消息但调用 Gateway 失败。检查:
5025021 . Gateway 是否在运行
503- 2 . Adapter 的 ` --gateway-listen ` 是否与 Gateway 的 ` --listen ` ** 完全一致** (包括管道名前缀 ` \\.\pipe\ ` )
503+ 2 . Adapter 的 ` --gateway-listen ` 是否与 Gateway 的 ` --listen ` ** 完全一致** (Windows 检查 ` \\.\pipe\ ` 前缀;macOS/Linux 检查 Unix socket 路径 )
5045043 . Gateway 日志中是否有 ` authenticate ` / ` bindStream ` / ` run ` 记录
505505
506506### 飞书只看到一张 thinking 卡片,之后没更新
0 commit comments