pi-courier 0.1.2 → 0.1.3
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 +19 -4
- package/README.zh-CN.md +19 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ Matrix homeserver URL (如 https://matrix.example.com): ← 输入,如 https:/
|
|
|
90
90
|
bot 密码: ← 密码(不回显)
|
|
91
91
|
[方式 2] 粘贴 access token (syt_...): ← 已有 token
|
|
92
92
|
✅ 登录成功,账号: @test3:matrix.example.com
|
|
93
|
-
信任用户(管理员)MXID [默认 @test3:matrix.example.com]: ←
|
|
93
|
+
信任用户(管理员)MXID [默认 @test3:matrix.example.com]: ← 直接回车 = 只有 bot 自己可信;建议填你的账号,如 @barry:matrix.example.com
|
|
94
94
|
启用 E2EE 加密? [y/N]: ← y/n(非加密房间也选 y 无妨)
|
|
95
95
|
pi 工作目录 [默认 /home/you/Projects]: ← Enter 或输入其他目录
|
|
96
96
|
|
|
@@ -121,9 +121,24 @@ Startup success looks like:
|
|
|
121
121
|
|
|
122
122
|
### Step 3 — Use it from Matrix
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
**First contact (one-time pairing):**
|
|
125
|
+
|
|
126
|
+
1. **DM the bot** from your account and send any message
|
|
127
|
+
2. The bot is not yet a trusted user, so the bridge prints a challenge code in its log (`pi-courier logs` or `journalctl --user -u pi-msg-bridge -f`):
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
🔐 Challenge code for @barry: 138949
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
3. **Reply with that code** in the chat (just the digits) — the log confirms the pairing:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
[auth:info] ✅ barry authenticated
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
You are now a trusted user (the first trusted user also becomes admin). Any user not in `auth.trustedUsers` goes through this flow once; pre-listed users skip it entirely.
|
|
140
|
+
|
|
141
|
+
**Then** chat normally, or send commands:
|
|
127
142
|
|
|
128
143
|
| Command | Action |
|
|
129
144
|
|---|---|
|
package/README.zh-CN.md
CHANGED
|
@@ -90,7 +90,7 @@ Matrix homeserver URL (如 https://matrix.example.com): ← 输入,如 https:/
|
|
|
90
90
|
bot 密码: ← 密码(不回显)
|
|
91
91
|
[方式 2] 粘贴 access token (syt_...): ← 已有 token
|
|
92
92
|
✅ 登录成功,账号: @test3:matrix.example.com
|
|
93
|
-
信任用户(管理员)MXID [默认 @test3:matrix.example.com]: ←
|
|
93
|
+
信任用户(管理员)MXID [默认 @test3:matrix.example.com]: ← 直接回车 = 只有 bot 自己可信;建议填你的账号,如 @barry:matrix.example.com
|
|
94
94
|
启用 E2EE 加密? [y/N]: ← y/n(非加密房间选 y 也没问题)
|
|
95
95
|
pi 工作目录 [默认 /home/你/Projects]: ← 回车或输入其他目录
|
|
96
96
|
|
|
@@ -121,9 +121,24 @@ pi-courier enable # 安装 systemd 服务:开机自启 + 立即启动
|
|
|
121
121
|
|
|
122
122
|
### 第 3 步 —— 在 Matrix 里使用
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
**首次接触(一次性配对):**
|
|
125
|
+
|
|
126
|
+
1. 用你的账号**给 bot 发私聊消息**(随便发什么都行)
|
|
127
|
+
2. 此时你还不是 trusted user,bridge 会在日志里打印验证码(`pi-courier logs` 或 `journalctl --user -u pi-msg-bridge -f`):
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
🔐 Challenge code for @barry: 138949
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
3. **在聊天里回复这串数字**(只发数字),日志确认配对成功:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
[auth:info] ✅ barry authenticated
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
你就成为 trusted user(第一个 trusted 用户自动成为管理员)。不在 `auth.trustedUsers` 里的用户都会走一次这个流程;预信任用户完全跳过。
|
|
140
|
+
|
|
141
|
+
**之后**正常对话,或发命令:
|
|
127
142
|
|
|
128
143
|
| 命令 | 作用 |
|
|
129
144
|
|---|---|
|
package/package.json
CHANGED