@debbl/relay 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/README.zh.md +10 -3
- package/dist/index.mjs +317 -175
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
A Feishu bot that forwards chat messages to Codex and returns results in chat.
|
|
6
6
|
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i @debbl/relay@latest -g
|
|
11
|
+
```
|
|
12
|
+
|
|
7
13
|
## Prerequisites
|
|
8
14
|
|
|
9
15
|
1. Node.js 20+ and `pnpm`.
|
|
@@ -62,7 +68,7 @@ pnpm dev
|
|
|
62
68
|
2. Bot replies immediately with a processing echo:
|
|
63
69
|
- `已收到,正在处理任务: <task preview>`
|
|
64
70
|
3. Bot sends final Codex result when done.
|
|
65
|
-
4. After `/new`, the first normal prompt
|
|
71
|
+
4. After `/new`, the first normal prompt is used directly as the session title (with normalization and truncation).
|
|
66
72
|
|
|
67
73
|
### P2P chat
|
|
68
74
|
|
|
@@ -84,10 +90,11 @@ pnpm dev
|
|
|
84
90
|
|
|
85
91
|
## Notes
|
|
86
92
|
|
|
87
|
-
-
|
|
88
|
-
-
|
|
93
|
+
- Relay stores session index at `~/.relay/sessions.json` and restores active sessions after restart.
|
|
94
|
+
- The index stores thread ids and basic metadata only; full session transcripts are in `~/.codex/sessions`.
|
|
89
95
|
- Relay fixes workspace root to the process startup directory (`process.cwd()`).
|
|
90
96
|
- Ensure process user can read/write `~/.codex/sessions`.
|
|
97
|
+
- Ensure process user can read/write `~/.relay/sessions.json`.
|
|
91
98
|
- `.env.local` is no longer used for runtime config.
|
|
92
99
|
|
|
93
100
|
## Quality checks
|
package/README.zh.md
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
一个将飞书聊天消息转发给 Codex,并将结果回传到聊天中的机器人。
|
|
6
6
|
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i @debbl/relay@latest -g
|
|
11
|
+
```
|
|
12
|
+
|
|
7
13
|
## 前置条件
|
|
8
14
|
|
|
9
15
|
1. Node.js 20+ 和 `pnpm`。
|
|
@@ -62,7 +68,7 @@ pnpm dev
|
|
|
62
68
|
2. 机器人会先立即回复处理中回显:
|
|
63
69
|
- `已收到,正在处理任务: <task preview>`
|
|
64
70
|
3. Codex 处理完成后,机器人发送最终结果。
|
|
65
|
-
4. 执行 `/new`
|
|
71
|
+
4. 执行 `/new` 后,首条普通提示词会直接作为会话标题(会做空白归一化和截断)。
|
|
66
72
|
|
|
67
73
|
### 单聊(P2P)
|
|
68
74
|
|
|
@@ -84,10 +90,11 @@ pnpm dev
|
|
|
84
90
|
|
|
85
91
|
## 说明
|
|
86
92
|
|
|
87
|
-
-
|
|
88
|
-
-
|
|
93
|
+
- Relay 会把会话索引保存到 `~/.relay/sessions.json`,重启后可恢复活跃会话。
|
|
94
|
+
- 索引仅保存 thread id 和基础元数据;完整会话内容仍在 `~/.codex/sessions`。
|
|
89
95
|
- Relay 将工作区根目录固定为进程启动目录(`process.cwd()`)。
|
|
90
96
|
- 请确保进程用户对 `~/.codex/sessions` 有读写权限。
|
|
97
|
+
- 请确保进程用户对 `~/.relay/sessions.json` 有读写权限。
|
|
91
98
|
- 运行时不再使用 `.env.local`。
|
|
92
99
|
|
|
93
100
|
## 质量检查
|