@chen_hu_hu/pi-qq 1.7.0 → 1.7.2
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/CHANGELOG.md +34 -1
- package/README-zh.md +9 -7
- package/README.md +9 -7
- package/doc/archive/delivery.1.7.1.md +215 -0
- package/doc/archive/delivery.1.7.2.md +163 -0
- package/doc/todo.md +23 -196
- package/index.ts +28 -20
- package/package.json +1 -1
- package/src/infra/file-logger.ts +80 -29
- package/src/infra/i18n.ts +4 -4
- package/src/infra/log-message-keys.ts +1 -0
- package/src/infra/power-status.ts +51 -28
- package/src/infra/short-id.ts +15 -0
- package/src/qq/inbound-command.ts +17 -7
- package/src/qq/qq-bot.ts +3 -9
- package/src/qq/qq-message-handler.ts +6 -18
- package/src/qq/qr-login.ts +1 -1
- package/src/qq/reply-sender.ts +2 -2
- package/src/quota/reply-quota-report.ts +2 -1
- package/src/relay/bubble-writer.ts +67 -19
- package/src/relay/run-stream-relay.ts +80 -41
- package/src/relay/run-timeline.ts +1 -1
- package/src/relay/stream-session.ts +81 -28
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.7.2] - 2026-11-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `/status` now shows the battery charge on Windows. The probe runs asynchronously with a 3 s timeout and a 30 s cache; the previous 500 ms synchronous call was killed during PowerShell startup.
|
|
15
|
+
- Short IDs in debug logs are now derived from the SHA-256 of the full ID. QQ message IDs share a constant head and tail, so distinct messages previously collapsed to the same `UMkNSaLL` value.
|
|
16
|
+
- `run ended` is logged after the final flush/DONE, reports `delivered`, and includes the last finalized/sent text lengths instead of reset zeros.
|
|
17
|
+
- `bubble split` records the bubble size and rotation reason before resetting writer state.
|
|
18
|
+
- Event-loop diagnostics use a 1 ms histogram and include event-loop utilization; the previous 100 ms resolution produced a constant ~100 ms baseline.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Debug logs are much smaller: run diagnostics keep at most five recent tools without arguments or results, no-text takeover decisions are skipped, per-frame `append` / `flush: start` / `timer` logs are replaced by slow-frame and partial-frame summaries, and duplicate tool and run lines are merged. The 2026-11-19 verification log is 188 lines / 43.6 KiB for an 11-minute run, versus 7.64 MiB for 43 active minutes before.
|
|
23
|
+
- `/status` labels the passive remaining count as text replies only; streamed bubbles are counted separately and the conservative estimate line remains.
|
|
24
|
+
- README documents that `replyType: "full"` emits one message per block and that `simple` reduces volume.
|
|
25
|
+
|
|
26
|
+
## [1.7.1] - 2026-11-18
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Stream frames are now split at line boundaries below the QQ markdown shard limit, preventing `40034017` on large tool commands or text.
|
|
31
|
+
- An expired stream (`40034020`) now opens a fresh stream instead of resuming a dead `stream_msg_id`; if it still cannot continue, the run automatically rebinds to a recent inbound message when available.
|
|
32
|
+
- `/stop` now replies immediately after aborting the run instead of waiting for the tool/run to finish; `waitForEnd()` is only a background diagnostic.
|
|
33
|
+
- Debug logs now record extension runtime metadata instead of message text, tool arguments/results, assistant text, or SDK bodies; credentials in error text remain redacted.
|
|
34
|
+
- The message that starts a QQ run is now logged before the run becomes active, so trigger metadata is available for debugging.
|
|
35
|
+
- `append: while flushing` diagnostics are aggregated to the first and every 50th append per flush.
|
|
36
|
+
- Typing notifications are skipped while a stream is active to avoid competing with stream requests on slow networks.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Consolidated the 1.7.1 stream investigation, real-QQ test report, and task records into `doc/archive/delivery.1.7.1.md`; removed `doc/investigate.md`, `doc/task.md`, and `doc/test-report.md`.
|
|
41
|
+
|
|
10
42
|
## [1.7.0] - 2026-11-11
|
|
11
43
|
|
|
12
44
|
### Fixed
|
|
@@ -185,7 +217,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
185
217
|
- Added thinking labels, per-tool icons, model-error recovery, and idle-safe session handling.
|
|
186
218
|
- Reorganized modules by bounded context and updated settings and delivery documentation.
|
|
187
219
|
|
|
188
|
-
[Unreleased]: https://github.com/CQ-Developer/pi-qq/compare/v1.7.
|
|
220
|
+
[Unreleased]: https://github.com/CQ-Developer/pi-qq/compare/v1.7.1...HEAD
|
|
221
|
+
[1.7.1]: https://github.com/CQ-Developer/pi-qq/compare/v1.7.0...v1.7.1
|
|
189
222
|
[1.7.0]: https://github.com/CQ-Developer/pi-qq/compare/v1.6.2...v1.7.0
|
|
190
223
|
[1.6.2]: https://github.com/CQ-Developer/pi-qq/compare/v1.6.1...v1.6.2
|
|
191
224
|
[1.6.1]: https://github.com/CQ-Developer/pi-qq/compare/v1.6.0...v1.6.1
|
package/README-zh.md
CHANGED
|
@@ -84,18 +84,20 @@ Summarize this file.
|
|
|
84
84
|
- **普通消息**:原文,不加标题。
|
|
85
85
|
- **工具图标**:💻 bash、📖 read、📝 write、✏️ edit、🔎 grep、🔍 search、🗂️ find、📁 ls、📋 list、🌐 web、📡 fetch、🗑️ delete、❌ remove、✅ todo、🧪 test;未配置工具使用 🔧。
|
|
86
86
|
|
|
87
|
+
每个块都是一条独立的 QQ 消息,长 run 可能推送几十个气泡;需要更少的消息时使用 `replyType: "simple"`。
|
|
88
|
+
|
|
87
89
|
模型错误后 60 秒内自动恢复的 run 会继续推送到原 QQ 会话;`/stop` 会等待当前工具和流收尾后再回复。
|
|
88
90
|
|
|
89
91
|
## 命令
|
|
90
92
|
|
|
91
93
|
在 pi 终端执行:
|
|
92
94
|
|
|
93
|
-
| 命令 | 说明
|
|
94
|
-
| ------------ |
|
|
95
|
-
| `/qq-login` | 扫码登录并绑定扫码的 QQ 用户
|
|
96
|
-
| `/qq-status` |
|
|
97
|
-
| `/qq-logout` | 退出登录并清除凭据
|
|
98
|
-
| `/qq-new` | 重置当前会话(由 QQ 侧 `/new` 调用)
|
|
95
|
+
| 命令 | 说明 |
|
|
96
|
+
| ------------ | -------------------------------------------- |
|
|
97
|
+
| `/qq-login` | 扫码登录并绑定扫码的 QQ 用户 |
|
|
98
|
+
| `/qq-status` | 显示登录、连接、模型、上下文、电量和绑定用户 |
|
|
99
|
+
| `/qq-logout` | 退出登录并清除凭据 |
|
|
100
|
+
| `/qq-new` | 重置当前会话(由 QQ 侧 `/new` 调用) |
|
|
99
101
|
|
|
100
102
|
QQ 侧命令:
|
|
101
103
|
|
|
@@ -209,7 +211,7 @@ npm run format:check
|
|
|
209
211
|
|
|
210
212
|
- 仅支持 C2C(QQ 私聊)。
|
|
211
213
|
- QQ 入站消息触发的任务会回传 QQ;直接在 pi 中启动的无关任务不会推送。
|
|
212
|
-
- QQ
|
|
214
|
+
- QQ 对每条入站消息的被动回复次数有限制。`/qq-test-budget` 会显示文本回复的剩余额度和保守估计;流式气泡单独计数,本地不设上限。
|
|
213
215
|
- 读取 `SKILL.md` 时,QQ 显示 `## 🧩 技能` 和 skill 名称,不转发文件内容。
|
|
214
216
|
|
|
215
217
|
## 许可证
|
package/README.md
CHANGED
|
@@ -84,18 +84,20 @@ In `replyType: "full"` mode, QQ receives these block types:
|
|
|
84
84
|
- **Regular messages**: raw text with no header.
|
|
85
85
|
- **Tool icons**: 💻 bash, 📖 read, 📝 write, ✏️ edit, 🔎 grep, 🔍 search, 🗂️ find, 📁 ls, 📋 list, 🌐 web, 📡 fetch, 🗑️ delete, ❌ remove, ✅ todo, 🧪 test; unconfigured tools use 🔧.
|
|
86
86
|
|
|
87
|
+
Each block is a separate QQ message, so a long run can push dozens of bubbles; use `replyType: "simple"` to reduce the volume.
|
|
88
|
+
|
|
87
89
|
After a model error, automatic retries within 60 seconds keep pushing to the original QQ chat. `/stop` waits for active tools and streams to finish before replying.
|
|
88
90
|
|
|
89
91
|
## Commands
|
|
90
92
|
|
|
91
93
|
Run these in the pi terminal:
|
|
92
94
|
|
|
93
|
-
| Command | Description
|
|
94
|
-
| ------------ |
|
|
95
|
-
| `/qq-login` | Log in with a QR code and bind the scanning QQ user
|
|
96
|
-
| `/qq-status` | Show login, connection, model, context, and bound user |
|
|
97
|
-
| `/qq-logout` | Log out and clear credentials
|
|
98
|
-
| `/qq-new` | Reset the current session (used by QQ `/new`)
|
|
95
|
+
| Command | Description |
|
|
96
|
+
| ------------ | --------------------------------------------------------------- |
|
|
97
|
+
| `/qq-login` | Log in with a QR code and bind the scanning QQ user |
|
|
98
|
+
| `/qq-status` | Show login, connection, model, context, battery, and bound user |
|
|
99
|
+
| `/qq-logout` | Log out and clear credentials |
|
|
100
|
+
| `/qq-new` | Reset the current session (used by QQ `/new`) |
|
|
99
101
|
|
|
100
102
|
QQ-side commands:
|
|
101
103
|
|
|
@@ -209,7 +211,7 @@ The extension entrypoint is `index.ts`. Source modules are grouped by responsibi
|
|
|
209
211
|
|
|
210
212
|
- Only C2C (QQ private chat) is supported.
|
|
211
213
|
- Runs triggered by inbound QQ messages are relayed to QQ. Unrelated tasks started directly in pi stay local.
|
|
212
|
-
- QQ limits passive replies per inbound message.
|
|
214
|
+
- QQ limits passive replies per inbound message. `/qq-test-budget` shows the remaining text replies and a conservative estimate; streamed bubbles are counted separately and are not capped locally.
|
|
213
215
|
- Reading a `SKILL.md` is shown as a `## 🧩 Skill` block with the skill name; the file content is not forwarded to QQ.
|
|
214
216
|
|
|
215
217
|
## License
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# pi-qq delivery 1.7.1
|
|
2
|
+
|
|
3
|
+
> **Delivery record.** 1.7.1 hardens the QQ stream relay against oversized and expired streams, makes `/stop` non-blocking, and reduces debug logs to runtime metadata. See [README](../../README.md) for current user-facing behavior.
|
|
4
|
+
> Version: 1.7.1
|
|
5
|
+
> Date: 2026-11-18
|
|
6
|
+
> Previous: [delivery.1.7.0.md](./delivery.1.7.0.md).
|
|
7
|
+
> Open work: [doc/todo.md](../todo.md).
|
|
8
|
+
|
|
9
|
+
## 1. Scope
|
|
10
|
+
|
|
11
|
+
1.7.0 introduced a monotonic `msg_seq` allocator. 1.7.1 addresses three production failures found in long QQ runs:
|
|
12
|
+
|
|
13
|
+
- `40034017`: a markdown frame exceeded the platform shard limit.
|
|
14
|
+
- `40034020`: a stream exceeded its total lifetime during a long tool; the relay kept resuming a dead `stream_msg_id` and lost tool output.
|
|
15
|
+
- `/stop`: a tool that ignores abort kept `/stop` waiting for the tool/run to end.
|
|
16
|
+
|
|
17
|
+
The release also:
|
|
18
|
+
|
|
19
|
+
- records extension runtime metadata instead of message text, tool arguments/results, assistant text, and SDK bodies;
|
|
20
|
+
- logs the inbound trigger before a run becomes active;
|
|
21
|
+
- aggregates `append: while flushing` diagnostics;
|
|
22
|
+
- skips typing while a stream is active.
|
|
23
|
+
|
|
24
|
+
Out of scope:
|
|
25
|
+
|
|
26
|
+
- a default watchdog or stream rotation;
|
|
27
|
+
- changing QQ protocol limits or the SDK;
|
|
28
|
+
- full ID masking (debug logs retain IDs for correlation; see section 7);
|
|
29
|
+
- protocol reductions for trailing newline frames and the first text frame (see sections 7 and 8).
|
|
30
|
+
|
|
31
|
+
## 2. Observed failures
|
|
32
|
+
|
|
33
|
+
The original 18 MB log (18,406 lines) is no longer retained; the key frames are summarized here.
|
|
34
|
+
|
|
35
|
+
### 2.1 Expired stream during a long tool
|
|
36
|
+
|
|
37
|
+
- 12:25:13: `seq=237`, first frame 442 chars, tool header `docker compose ... up -d --build`; the build ran for 23m28s.
|
|
38
|
+
- 12:48:40: the next frame returned `40034020` (`同一流式消息发送超过时间限制`).
|
|
39
|
+
- Two resumes with the same `stream_msg_id` failed; the writer went dead.
|
|
40
|
+
- 36 tools completed while the stream was dead; `/last` replayed only the most recent 3 finished tools, so 33 results never appeared.
|
|
41
|
+
|
|
42
|
+
### 2.2 Oversized frame
|
|
43
|
+
|
|
44
|
+
- 13:21:36: successful frame 3,706 chars / 3,743 B.
|
|
45
|
+
- 13:23:37: `seq=30` first frame 4,672 chars / 4,719 B returned `40034017` (`流式消息md分片需要\n结束`).
|
|
46
|
+
- Resumes grew the buffer to 5,044 / 5,145 B and 5,062 / 5,170 B, still `40034017`; the stream went dead.
|
|
47
|
+
- 9 read tools completed in the dead window; 3 were replayed by `/last`, 6 were not.
|
|
48
|
+
|
|
49
|
+
### 2.3 `/stop` blocking
|
|
50
|
+
|
|
51
|
+
- A 300 s tool that ignored abort kept `/stop` waiting for about 2m57s.
|
|
52
|
+
- An abortable 300 s tool returned `aborted` after about 61 s.
|
|
53
|
+
- The blocking path was the cause; the fixed behavior is described in section 5.
|
|
54
|
+
|
|
55
|
+
### 2.4 Integrity and event loop
|
|
56
|
+
|
|
57
|
+
- Run-end `currentTextLen` was 2,202 / 1,831, matching the stream-reconstructed text; no final answer was lost.
|
|
58
|
+
- Event-loop max delay was 618 ms; no seconds-level stall was involved.
|
|
59
|
+
- The log had no `40054005`; per-message `msg_seq` allocation was already effective.
|
|
60
|
+
|
|
61
|
+
## 3. Investigation conclusions
|
|
62
|
+
|
|
63
|
+
Hypotheses tested against the official pages and the real QQ experiments:
|
|
64
|
+
|
|
65
|
+
| # | Hypothesis | Evidence | Verdict |
|
|
66
|
+
| --- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
67
|
+
| H1 | The platform uses an idle timeout for one stream. | `idle 2` and `idle 5` pass, but `heartbeat 10/1` still fails at about 600 s. | Refuted as the primary limit; the 600 s total lifetime explains `idle 10`. |
|
|
68
|
+
| H2 | The platform uses a total lifetime limit. | `heartbeat 10/1` succeeds 9 times but still fails at about 600 s; `idle 10` fails at the same boundary. | Confirmed; about 600 s total. |
|
|
69
|
+
| H3 | Long silence lets the server clean up the `stream_msg_id`. | Resuming the same `stream_msg_id` fails after the limit; a fresh stream succeeds. | Consistent; recovery must open a new stream. |
|
|
70
|
+
| H4 | The inbound `msg_id` expires independently. | A new stream with the same `msg_id` works at 20 min; the original log created one after about 22 min. | Not a blocker within the tested window; 1 h not verified. |
|
|
71
|
+
| H5 | `40034017` is a single-frame shard limit. | Successful frames stayed below 3,743 B; failures started at 4,719 B; a 3,500 B split passes on real QQ. | Confirmed; 3,500 B is the chosen safe limit. |
|
|
72
|
+
|
|
73
|
+
Official documentation:
|
|
74
|
+
|
|
75
|
+
- The stream endpoint lists 50 QPS and only public error codes; it does not document `40034020`, `40034017`, `40034128`, heartbeats, or a 30-minute limit.
|
|
76
|
+
- `is_wakeup=true` skips `msg_id` / `event_id` validation, but it is a recall-message semantic, not a general long-task continuation mechanism.
|
|
77
|
+
- External material claiming a 30-minute limit was not used; it was unsupported or referred to another platform.
|
|
78
|
+
|
|
79
|
+
## 4. Final decisions
|
|
80
|
+
|
|
81
|
+
| # | Question | Decision |
|
|
82
|
+
| --- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
83
|
+
| D1 | How are oversized frames handled? | Limit a frame to 3,500 B; split at the last `\n`; hard-cut a single long line and append `\n`. |
|
|
84
|
+
| D2 | What is the stream lifetime? | About 600 s total; heartbeats do not extend it; the boundary fluctuates by about 1 s. |
|
|
85
|
+
| D3 | What happens on `40034020`? | Open a fresh stream: new `msg_seq`, `index=0`, no old `stream_msg_id`; keep the unacknowledged buffer. |
|
|
86
|
+
| D4 | What is the recovery order? | Same `msg_id` fresh stream first; auto-rebind to the current target or a recent inbound target (within 5 minutes) as fallback (at most once per run); `/last` remains the manual fallback. |
|
|
87
|
+
| D5 | Should a watchdog be added? | Not by default. Five- and eight-minute rotations work; use eight minutes if a rotation option is added later. |
|
|
88
|
+
| D6 | How does `/stop` behave? | Abort, reply immediately, and keep `waitForEnd()` as background logging only. |
|
|
89
|
+
| D7 | What do debug logs contain? | Runtime metadata only: event, time, IDs, lengths, counts, durations, status, error codes, and stream indexes. No message text, tool arguments/results, assistant text, or SDK bodies. |
|
|
90
|
+
| D8 | Are IDs masked? | No. `messageId`, `senderId`, `openid`, and `appId` remain in debug logs for correlation; logs are local and must be treated as sensitive. Masking remains an open decision. |
|
|
91
|
+
| D9 | Should typing run during a stream? | No. Typing is skipped while a stream is active. |
|
|
92
|
+
| D10 | How are `while flushing` logs limited? | Log the first append and every 50th append per flush. |
|
|
93
|
+
| D11 | How long is `msg_id` valid? | A fresh stream with the same `msg_id` works 20 minutes after inbound; one hour is not verified. |
|
|
94
|
+
|
|
95
|
+
## 5. Implementation
|
|
96
|
+
|
|
97
|
+
| Area | Files | Change |
|
|
98
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
99
|
+
| Frame sizing | `src/relay/stream-session.ts` | `MAX_FRAME_BYTES = 3500`; UTF-8 byte-aware `takeFrame()`; newline-preferred split; hard cut with trailing `\n`; flush/done loops with 300 ms minimum spacing. |
|
|
100
|
+
| Expired stream | `src/relay/bubble-writer.ts` | Treat `40034020` and `40054005` as non-resumable; open a fresh stream with a new `msg_seq` and `index=0`; replay the unacknowledged buffer; expose `hasActiveStream`. |
|
|
101
|
+
| Auto-rebind | `src/relay/run-stream-relay.ts` | After a `40034020`, rebind to the current target or a recent inbound target (within 5 minutes), replay thinking, the last three finished tools plus any active tool (five tools at most), and the current text; at most one automatic rebind per run. |
|
|
102
|
+
| `/stop` | `src/qq/inbound-command.ts` | Call `ctx.abort()` and reply immediately; `waitForEnd()` only writes background diagnostics. |
|
|
103
|
+
| Debug logging | `src/infra/file-logger.ts`, `index.ts`, `src/qq/qq-bot.ts`, `src/qq/qq-message-handler.ts`, `src/qq/reply-sender.ts` | Scope-aware log gate; inbound allowed after login; SDK bodies reduced to `<N chars>`; `logValueLength()` for arguments/results; metadata fields on inbound, tool, and assistant events. |
|
|
104
|
+
| Typing | `src/relay/run-stream-relay.ts` | Skip typing while `BubbleWriter.hasActiveStream` is true. |
|
|
105
|
+
| `msg_seq` | `src/relay/msg-seq.ts` | Monotonic per-`msgId` allocator introduced in 1.7.0; still used for streams, passive text, media, and diagnostics. |
|
|
106
|
+
|
|
107
|
+
Behavioral notes:
|
|
108
|
+
|
|
109
|
+
- A new stream keeps the old `msg_id` and `event_id`; only `stream_msg_id`, `msg_seq`, and `index` restart.
|
|
110
|
+
- `40034020` after a long idle is recovered by the same path; `is_wakeup=true` and a fresh inbound target also work.
|
|
111
|
+
- Credential redaction remains a fallback for error text and a small set of fields; the primary guarantee is that message content is not logged.
|
|
112
|
+
- The relay still rotates bubbles at tool and thinking boundaries; this is unchanged from 1.7.0.
|
|
113
|
+
|
|
114
|
+
## 6. Verification
|
|
115
|
+
|
|
116
|
+
### 6.1 Automated
|
|
117
|
+
|
|
118
|
+
- 24 test files, **251 tests passed**.
|
|
119
|
+
- `npm run lint`, `npm run typecheck`, `npm run format:check`, and `npm pack --dry-run` pass.
|
|
120
|
+
- Coverage includes oversized and no-newline frames, `40034020` fresh-stream replay, auto-rebind, `/stop` with a run that never ends, log gating, SDK body summarization, and tool logs without arguments/results.
|
|
121
|
+
|
|
122
|
+
### 6.2 Real QQ stream experiments
|
|
123
|
+
|
|
124
|
+
Environment: Linux; pi 1.5.2; Node.js 24.22.0; single C2C user; local pi-qq 1.7.0 plus these fixes. The temporary experiment extension, scripts, and logs were removed after testing.
|
|
125
|
+
|
|
126
|
+
All times below are UTC+8. The experiment hook is not part of the release.
|
|
127
|
+
|
|
128
|
+
| Case | Key duration | Result |
|
|
129
|
+
| --------------------- | ------------------- | -------------------------------------------------------------------------------------- |
|
|
130
|
+
| `idle 2` | 120.0 s idle | Probe and DONE succeed |
|
|
131
|
+
| `idle 5` | 300.0 s idle | Probe and DONE succeed |
|
|
132
|
+
| `idle 10` | 600.0 s idle | Probe returns `40034020` |
|
|
133
|
+
| `heartbeat 10/1` | 10th at about 600 s | First 9 succeed; 10th returns `40034020`; heartbeats do not extend the lifetime |
|
|
134
|
+
| `rotate 5` | 300 s | Old stream DONE succeeds; same `msg_id` new stream succeeds (`msg_seq=2`) |
|
|
135
|
+
| `rotate 8` | 480 s | Same as `rotate 5`; about 2 minutes below the limit |
|
|
136
|
+
| `expire 10` | 600 s | Old stream `40034020`; same `msg_id` new stream succeeds; 604.5 s total |
|
|
137
|
+
| `expire 20` | 1,200 s | Old stream `40034020`; same `msg_id` new stream succeeds; 1,203.5 s total |
|
|
138
|
+
| `expire-full 10` | 600 / 601 s | Same `msg_id`, `is_wakeup=true`, and fresh inbound target all succeed; 605.6 s total |
|
|
139
|
+
| `large 5` | 5,568 chars | Split 3,371 + 2,197 chars; both 200; 2.8 s; no `40034017` |
|
|
140
|
+
| `large-line 5` | 5,121 B, no breaks | Hard split 3,500 + 1,622 B; both 200; 2.6 s; no `40034017` |
|
|
141
|
+
| `relay 10.5` | 10.5 min | Old stream `40034020`; new stream and DONE succeed; `streamTookOver=true` |
|
|
142
|
+
| `budget 6` / `10` | 6.7 / 10.6 s | 6 / 10 plain texts all succeed; no `40034128` |
|
|
143
|
+
| `LONG_TOOL_LONG_TEST` | 720 s | Old stream `40034020`; fresh stream delivers tool result and final text; 725.5 s total |
|
|
144
|
+
|
|
145
|
+
Key conclusions:
|
|
146
|
+
|
|
147
|
+
- The stream lifetime is about 600 s from creation, not an idle window; the boundary jitters by about 1 s.
|
|
148
|
+
- A fresh stream with the same `msg_id` works after 10 and 20 minutes; `is_wakeup=true` and a fresh inbound target also work.
|
|
149
|
+
- The fresh-stream `40034020` path was verified through the real `RunFeedback` / `BubbleWriter` path and a 12-minute agent tool.
|
|
150
|
+
- Frame splitting works for both newline-containing and single-line oversized content.
|
|
151
|
+
|
|
152
|
+
### 6.3 `/stop` and steering
|
|
153
|
+
|
|
154
|
+
- A 300 s tool that ignores abort: `/stop` waited about 2m57s before the fix; after the fix the reply was sent in about 1 ms while the tool kept running.
|
|
155
|
+
- An abortable 300 s tool: returned `aborted` after about 61 s.
|
|
156
|
+
- Steering is delivered after the tool batch ends, not during execution.
|
|
157
|
+
- `ctx.abort()` causes pi to restore queued steering messages to the editor; this is TUI behavior, not lost input.
|
|
158
|
+
|
|
159
|
+
### 6.4 Logging verification
|
|
160
|
+
|
|
161
|
+
Before the fix (v1.7.0, 2026-11-17 real usage log): 906 KiB in 15 minutes, 4 runs, 24 tools, 175 stream frames. The log contained 37,309 chars of streamed content (thinking 27,154, tool markdown 9,294, final answers 861), full tool arguments (6.6K chars) and results (30K chars, capped at 2,000 per entry), assistant `textPreview`, and full SDK bodies. It had 1,478 `append: while flushing` lines / 190 KiB and no inbound/outbound records.
|
|
162
|
+
|
|
163
|
+
After the fix (main build, 2026-11-18): 1 run, 4.3 s, 1 `bash` call, 22-char inbound, 62-char final answer. The log is 80 lines / 21.5 KiB; all 7 requests returned 200.
|
|
164
|
+
|
|
165
|
+
Checks that passed:
|
|
166
|
+
|
|
167
|
+
- SDK bodies are only `Body: <N chars>`; no `content_raw`, `content`, `text`, or request-body JSON.
|
|
168
|
+
- `tool start` has only `argsLength` (20); `tool end` has only `resultLength` (417); `tool update` has `partialLength` (14); no arguments or results.
|
|
169
|
+
- Assistant events have `textLength` (0 / 62); no `textPreview`.
|
|
170
|
+
- `inbound` has `contentLength`, `attachmentCount`, and `msgType`; `sent to pi` has `textLength`; neither contains the message body.
|
|
171
|
+
- No `>>> Body: {`, `"args"`, `"result"`, `"firstPartial"`, `"partial"`, or `"textPreview"` appears in the log.
|
|
172
|
+
|
|
173
|
+
Limits of this verification:
|
|
174
|
+
|
|
175
|
+
- `append: while flushing` was not exercised by the short run; `test/relay/stream-session.test.ts` covers the aggregation.
|
|
176
|
+
- Full message and user IDs are still logged (see section 7).
|
|
177
|
+
|
|
178
|
+
## 7. Risks and limitations
|
|
179
|
+
|
|
180
|
+
| Risk | Impact | Handling |
|
|
181
|
+
| ----------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
182
|
+
| 600 s boundary jitter | A frame sent at the boundary can still fail once before recovery | Do not schedule rotation at the limit; leave margin; the fresh-stream path recovers the next frame |
|
|
183
|
+
| `msg_id` validity beyond 20 minutes | One-hour-old inbound messages are unverified | Long-term observation |
|
|
184
|
+
| Platform variability | Lifetime, error mapping, and rendering may differ by account, region, or client | Keep recovery defensive; collect real logs |
|
|
185
|
+
| Typing timeout | A 10 s typing timeout was seen in earlier logs but not reproduced | Typing is skipped while a stream is active; the timeout path remains unverified |
|
|
186
|
+
| Full IDs in debug logs | `messageId`, `senderId`, `openid`, and `appId` remain in local logs | Logs are debug-only and local; treat as sensitive; masking is an open decision |
|
|
187
|
+
| Log volume | `run` diagnostics repeat the tool list on every event; stream timing records are verbose | Metadata only; no content. Compaction is an open optimization |
|
|
188
|
+
| Trailing newline frames | A lone `\n` can be sent before a bubble's DONE, adding a request and latency | Known; needs a protocol test before merging the newline into DONE |
|
|
189
|
+
| First text frame | A new text bubble can show 1–4 characters before the rest arrives | Known; needs a flush policy for text deltas while keeping tool headers immediate |
|
|
190
|
+
| `run ended` ordering | The run-end log precedes the final `flush` / `done` | Known; does not affect delivery, but the log cannot prove the last frame succeeded |
|
|
191
|
+
| `lastFlushAt = 0` | The first `append: immediate` in a new stream logs an epoch-sized `elapsed` value | Log-only noise |
|
|
192
|
+
| Passive reply budget | The platform accepted 10 probes, but the local limit remains 4; each media send consumes one reply | Keep the conservative local limit; stream bubbles are not counted the same way |
|
|
193
|
+
| Auto-rebind limit | At most one automatic rebind per run | `/last` remains the manual fallback |
|
|
194
|
+
| Watchdog not implemented | A long stream can still hit `40034020` once before recovery | The recovery path is verified; an optional eight-minute rotation can be added later |
|
|
195
|
+
| Real QQ coverage | One account, one region, one network, single-user C2C | Results are strong for this setup, not a platform guarantee |
|
|
196
|
+
|
|
197
|
+
## 8. Open items
|
|
198
|
+
|
|
199
|
+
Active work is tracked in [doc/todo.md](../todo.md):
|
|
200
|
+
|
|
201
|
+
- confirm how the QQ client renders long `bash` tool start lines;
|
|
202
|
+
- observe stream lifetime and `msg_id` validity beyond 20 minutes and one hour;
|
|
203
|
+
- reproduce the typing timeout and decide whether client isolation is needed;
|
|
204
|
+
- decide whether to mask IDs in debug logs;
|
|
205
|
+
- compact `run` diagnostics and stream timing logs;
|
|
206
|
+
- evaluate merging the trailing `\n` into the DONE frame and throttling the first text delta.
|
|
207
|
+
|
|
208
|
+
## 9. References
|
|
209
|
+
|
|
210
|
+
- Stream endpoint: `https://bot.q.qq.com/wiki/develop/api-v2/autogen/api/v2_users_user_openid_stream_messages.post.html`
|
|
211
|
+
- Error codes: `https://bot.q.qq.com/wiki/develop/api-v2/openapi/error/error.html`
|
|
212
|
+
- Code: `src/relay/stream-session.ts`, `src/relay/bubble-writer.ts`, `src/relay/run-stream-relay.ts`, `src/relay/msg-seq.ts`, `src/qq/inbound-command.ts`, `src/infra/file-logger.ts`.
|
|
213
|
+
- Tests: `test/relay/stream-session.test.ts`, `test/relay/bubble-writer.test.ts`, `test/relay/run-stream-relay.test.ts`, `test/qq/qq-message-handler.test.ts`, `test/infra/file-logger.test.ts`, `test/index.test.ts`.
|
|
214
|
+
- Previous delivery: [delivery.1.7.0.md](./delivery.1.7.0.md).
|
|
215
|
+
- User-facing behavior: [README.md](../../README.md), [README-zh.md](../../README-zh.md).
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# pi-qq delivery 1.7.2
|
|
2
|
+
|
|
3
|
+
> **Delivery record.** 1.7.2 shrinks debug logs, makes short IDs unique, and fixes `/status` battery reporting on Windows. See [README](../../README.md) for current user-facing behavior.
|
|
4
|
+
> Version: 1.7.2
|
|
5
|
+
> Date: 2026-11-19
|
|
6
|
+
> Previous: [delivery.1.7.1.md](./delivery.1.7.1.md).
|
|
7
|
+
> Open work: [doc/todo.md](../todo.md).
|
|
8
|
+
|
|
9
|
+
## 1. Scope
|
|
10
|
+
|
|
11
|
+
1.7.2 is a maintenance release driven by the 2026-11-19 real-QQ debug log (7 h 01 min, 17 runs, 246 tool calls, 18 inbound messages):
|
|
12
|
+
|
|
13
|
+
- run diagnostics repeated the full tool list on every event; one field accounted for 46% of the file;
|
|
14
|
+
- "short" message IDs collapsed to a constant value, so logs could not be correlated with inbound messages;
|
|
15
|
+
- per-frame stream logs dominated the remaining volume;
|
|
16
|
+
- `/status` omitted the battery line on Windows because a 500 ms synchronous probe killed PowerShell;
|
|
17
|
+
- several diagnostic fields were misleading: `bubble split` logged zeroed stats, `run ended` reported zero lengths before the final DONE, the first `append` logged an epoch-sized `elapsed`, and the event-loop metric had a fixed ~100 ms floor.
|
|
18
|
+
|
|
19
|
+
The release also documents passive-reply quota semantics and `full`-mode message density.
|
|
20
|
+
|
|
21
|
+
Out of scope:
|
|
22
|
+
|
|
23
|
+
- changes to stream framing, rotation, or lifetime behavior;
|
|
24
|
+
- new quota enforcement, typing changes, or stream-frame protocol changes;
|
|
25
|
+
- masking stable account identifiers (`senderId`, `openid`, `appId`);
|
|
26
|
+
- confirming how the QQ client renders very long commands.
|
|
27
|
+
|
|
28
|
+
## 2. Findings
|
|
29
|
+
|
|
30
|
+
### 2.1 Log volume
|
|
31
|
+
|
|
32
|
+
Baseline: 18,452 lines / 7.64 MiB for 43.0 active minutes (about 10.6 MiB per active hour).
|
|
33
|
+
|
|
34
|
+
| Scope | Lines | Size | Share |
|
|
35
|
+
| -------- | ----: | ------: | ----: |
|
|
36
|
+
| `run` | 1,288 | 4.5 MiB | 59% |
|
|
37
|
+
| `stream` | 7,520 | 1.7 MiB | 22% |
|
|
38
|
+
| `qqbot` | 7,770 | 1.1 MiB | 14% |
|
|
39
|
+
|
|
40
|
+
The `tools` field alone was 3.51 MiB (46.0%) across 1,254 lines; the largest line was 11.1 KiB with 86 tools. `run: tool start` and `run: tool end` were each logged twice per tool.
|
|
41
|
+
|
|
42
|
+
### 2.2 Short IDs
|
|
43
|
+
|
|
44
|
+
- `logMsgId()` used `messageId.slice(0, 8)`: 7,571 lines logged `ROBOT1.0`, while 79 lines elsewhere kept the full 117-character ID.
|
|
45
|
+
- The first fix used the first 8 characters after the last underscore. The 2026-11-19 log then showed two different inbound messages with the same short ID (`UMkNSaLL`).
|
|
46
|
+
- Full IDs from the baseline explain why: QQ message IDs are `ROBOT1.0_` + a 21-character constant head + a variable middle + a ~35-character constant tail (16 of 18 IDs ended with `3ngGb.Wl-sLP-ZQpRmBmM!`). Slicing either edge collides.
|
|
47
|
+
- Final rule: `sha256(id)` truncated to 8 hexadecimal characters. The same ID maps to the same value in every scope, and the raw ID is not logged.
|
|
48
|
+
|
|
49
|
+
### 2.3 Battery status
|
|
50
|
+
|
|
51
|
+
- `/status` at 01:39:29.707 was answered at 01:39:30.220 (513 ms), with no battery line.
|
|
52
|
+
- Reproducing the code path returned `ETIMEDOUT SIGTERM` after 520 ms; PowerShell plus `Get-CimInstance Win32_Battery` took 556–669 ms.
|
|
53
|
+
- The timeout, not a missing battery, caused the omission.
|
|
54
|
+
- On Linux the same call reads `/sys/class/power_supply` and was unaffected.
|
|
55
|
+
|
|
56
|
+
### 2.4 Diagnostics
|
|
57
|
+
|
|
58
|
+
- `run ended` reported `finalizedTextLen=0 / resultSentLen=0` while the same instant showed 980 / 980, because the assistant handler reset both before the run-end log; the log also preceded the final DONE.
|
|
59
|
+
- 438 of 1,375 `append` lines logged `elapsed=1795049015062` (`Date.now() - 0`).
|
|
60
|
+
- 421 `bubble split` lines logged zeroed stats and no rotation reason.
|
|
61
|
+
- 516 event-loop samples had p50/p90/p99 of 112/114/120 ms and were uncorrelated with log volume (r = 0.007); only two spikes (363 and 617 ms) stood out. Node's histogram `mean` has a floor roughly equal to `resolution`, so `resolution: 100` produced the constant ~100 ms baseline.
|
|
62
|
+
- Every inbound message produced two `message received` lines (debug + info), and each tool event produced two debug lines 1–2 ms apart.
|
|
63
|
+
|
|
64
|
+
## 3. Decisions
|
|
65
|
+
|
|
66
|
+
| # | Question | Decision |
|
|
67
|
+
| --- | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| D1 | How are short IDs derived? | SHA-256 of the full ID, first 8 hex characters. Only fields at least 16 characters long are hashed, so already-short values are not hashed twice. `senderId`, `openid`, and `appId` stay complete. |
|
|
69
|
+
| D2 | What does run diagnostics include? | At most five tools (latest three finished plus the active one), mapped to `id`, `name`, and state; no arguments or results. |
|
|
70
|
+
| D3 | When is a takeover decision logged? | Only when `textLength > 0` or `streamTookOver=false`. |
|
|
71
|
+
| D4 | Which stream frame logs remain? | Keep aggregate `stream timing`, slow frames (≥1 s), partial frames (`remaining > 0`), retries, and warnings. Remove routine `append`, `timer`, `flush: start`, and non-partial `flush: done`. |
|
|
72
|
+
| D5 | What about the first `append` elapsed value? | Removed with D4; no remaining `elapsed` path. |
|
|
73
|
+
| D6 | What does `bubble split` record? | Size, last block kind, trailing-newline state, and the rotation reason (`thinking`, `text`, `tool`, `skill`, `split`, `restart`), captured before reset. |
|
|
74
|
+
| D7 | When is `run ended` logged? | After the final `flush` / `done`, with `delivered`, `lastFinalizedTextLen`, and `lastResultSentLen`; the separate `finished` line is merged. |
|
|
75
|
+
| D8 | How is the event loop measured? | `resolution: 1` plus `performance.eventLoopUtilization()`. |
|
|
76
|
+
| D9 | Which duplicate lines are merged? | One tool start/end line per transition (with `queueWaitMs`), one full inbound `message received` at info level, one `run ended`. `agent` info lines remain because they serve the info log level. |
|
|
77
|
+
| D10 | Do stream bubbles consume the local passive budget? | No. The limiter records text replies only; `/status` labels `passiveRemaining` as text replies only and keeps `estimated = remaining - streamBubbles` as the conservative value. |
|
|
78
|
+
| D11 | Should `full` mode emit fewer bubbles? | No. Document that each block is a separate message and that `simple` reduces volume. |
|
|
79
|
+
| D12 | How is the 600 s boundary verified? | One controlled 11-minute silent bash tool on real QQ, expecting `40034020`, a fresh stream, buffer replay, and delivery. |
|
|
80
|
+
| D13 | How is battery read? | Async `execFile` with a 3 s timeout and a 30 s cache; `getStatusLines()` is async; failures log platform, code, and signal at debug under the always-allowed `power` scope. |
|
|
81
|
+
|
|
82
|
+
## 4. Implementation
|
|
83
|
+
|
|
84
|
+
| Area | Files | Change |
|
|
85
|
+
| ------------ | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
|
+
| Short IDs | `src/infra/short-id.ts`, `src/infra/file-logger.ts` | SHA-256 prefix helper; log writer hashes `messageId`, `msgId`, and `streamMsgId` values of at least 16 characters. |
|
|
87
|
+
| Diagnostics | `src/relay/run-timeline.ts`, `src/relay/run-stream-relay.ts` | Snapshot-capped tool list without args/results; takeover filter; one tool line per transition; `run ended` after DONE with delivered/last counters. |
|
|
88
|
+
| Stream logs | `src/relay/stream-session.ts`, `src/relay/bubble-writer.ts` | Remove per-frame logs; add slow/partial summaries; record split reason and pre-reset size; keep aggregate timing. |
|
|
89
|
+
| Event loop | `index.ts` | 1 ms histogram and `eventLoopUtilization`. |
|
|
90
|
+
| Inbound logs | `src/qq/qq-message-handler.ts` | One info-level `message received` after the allowlist check, with the previous debug fields. |
|
|
91
|
+
| Battery | `src/infra/power-status.ts`, `index.ts`, `src/qq/inbound-command.ts` | Async probe, 3 s timeout, 30 s cache, async `getStatusLines()`, failure debug log. |
|
|
92
|
+
| User docs | `README.md`, `README-zh.md`, `src/infra/i18n.ts` | Quota wording, `full`-mode density, battery in `/qq-status` description. |
|
|
93
|
+
|
|
94
|
+
## 5. Verification
|
|
95
|
+
|
|
96
|
+
### 5.1 Automated
|
|
97
|
+
|
|
98
|
+
- 25 test files, **259 tests passed**.
|
|
99
|
+
- `npm run lint`, `npm run typecheck`, `npm run format:check`, and `npm pack --dry-run` pass.
|
|
100
|
+
- New coverage: SHA-256 short IDs (including two real IDs with the same head and tail), ID hashing in the log writer, capped diagnostics without args/results, absence of per-frame append logs, partial-frame summary, battery cache and failure fallback, and the updated `/status` wording.
|
|
101
|
+
|
|
102
|
+
### 5.2 Real QQ: 600 s expiry
|
|
103
|
+
|
|
104
|
+
Environment: WSL Linux; pi 1.5.2; Node.js 24.22.0; local `main`; one C2C user. Test tool: `sleep 660; echo done`.
|
|
105
|
+
|
|
106
|
+
| Time (UTC) | Event |
|
|
107
|
+
| ------------ | ------------------------------------------------------------------------------------ |
|
|
108
|
+
| 10:03:31.949 | `bash` tool starts; stream opens; first frame 200 (46 chars) |
|
|
109
|
+
| 10:03:32.445 | append done, 495 ms |
|
|
110
|
+
| 10:14:32.018 | tool ends after 660,055 ms; result frame POST |
|
|
111
|
+
| 10:14:32.734 | `400 Bad Request`, `40034020`, `expired: true`, `lastFrameAgeMs=660291` |
|
|
112
|
+
| 10:14:33.442 | fresh stream `resumed: true`, `index=0`, no `stream_msg_id`, 17-char buffer replayed |
|
|
113
|
+
| 10:14:34.222 | fresh stream 200; result delivered |
|
|
114
|
+
| 10:14:34.992 | final `OK` 200; `run ended` `delivered: true` after 664,392 ms |
|
|
115
|
+
|
|
116
|
+
A QQ screenshot confirmed the `bash` bubble, the `done` result, the final `OK`, and the battery line (`99% (discharging)`). The recovered result arrives as a new bubble without the original `bash` header.
|
|
117
|
+
|
|
118
|
+
### 5.3 Battery on Windows
|
|
119
|
+
|
|
120
|
+
The actual `power-status.ts` was run under Windows Node 24.21 against a real battery:
|
|
121
|
+
|
|
122
|
+
- success: `{"percent":100,"state":"ac"}`, 556 ms;
|
|
123
|
+
- timeout forced to 1 ms: `power status read failed { platform: 'win32', killed: true, signal: 'SIGTERM' }`, returns `undefined` without throwing.
|
|
124
|
+
|
|
125
|
+
### 5.4 Log after the change
|
|
126
|
+
|
|
127
|
+
- 188 lines / 43.6 KiB for the 11.1-minute run; the baseline was 7.64 MiB for 43 active minutes.
|
|
128
|
+
- `event-loop` is now the largest scope (133 lines / 26.2 KiB); `run` 5.1 KiB, `stream` 5.0 KiB, `qqbot` 2.8 KiB.
|
|
129
|
+
- No `append:`, `timer:`, `flush: start`, `flush: done`, `content_raw`, `textPreview`, `"args"`, or `"result"`.
|
|
130
|
+
- Event loop: mean 1.11 ms, worst `max` 86 ms, mean utilization 2.26% (max 6.20%).
|
|
131
|
+
- The test log predates the SHA-256 change and still shows `UMkNSaLL`; the hash rule is covered by unit tests with the real colliding IDs.
|
|
132
|
+
|
|
133
|
+
## 6. Risks and limitations
|
|
134
|
+
|
|
135
|
+
| Risk | Impact | Handling |
|
|
136
|
+
| -------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
137
|
+
| Hashed IDs | Short IDs cannot be compared to raw platform IDs without hashing them | Recompute `sha256(id)[:8]` when correlating with an external error |
|
|
138
|
+
| Expiry test coverage | One account, one network, one client; QQ rendering and lifetime may vary | Recovery path is defensive; keep the long-term observation in TODO |
|
|
139
|
+
| Long command rendering | Commands over ~500 characters may still be collapsed by the QQ client | Pending A/B in TODO 1 |
|
|
140
|
+
| `msg_id` beyond 20 minutes | One-hour-old inbound messages are unverified | Long-term observation |
|
|
141
|
+
| Typing timeout | A 10 s timeout was seen earlier but not reproduced | Typing is skipped while a stream is active |
|
|
142
|
+
| Event-loop log share | 60% of the new log is the 5 s event-loop sample | Candidate for threshold logging or a 30 s cadence |
|
|
143
|
+
| `/status` logging | Command replies outside a run are gated off (`outbound` / `qqbot`) | Verified by screenshot; allowing `outbound` is an open option |
|
|
144
|
+
| Recovery bubble | The recovered tool result appears in a new bubble without its tool header | Accepted; the original bubble cannot accept frames after expiry |
|
|
145
|
+
|
|
146
|
+
## 7. Open items
|
|
147
|
+
|
|
148
|
+
Active work is tracked in [doc/todo.md](../todo.md):
|
|
149
|
+
|
|
150
|
+
- confirm QQ rendering for a 500+ character bash command;
|
|
151
|
+
- observe stream lifetime and `msg_id` validity beyond 20 minutes and one hour;
|
|
152
|
+
- reproduce the typing timeout;
|
|
153
|
+
- reduce event-loop log volume;
|
|
154
|
+
- decide whether `/status` replies should be logged outside runs.
|
|
155
|
+
|
|
156
|
+
## 8. References
|
|
157
|
+
|
|
158
|
+
- Stream endpoint: `https://bot.q.qq.com/wiki/develop/api-v2/autogen/api/v2_users_user_openid_stream_messages.post.html`
|
|
159
|
+
- Error codes: `https://bot.q.qq.com/wiki/develop/api-v2/openapi/error/error.html`
|
|
160
|
+
- Code: `src/infra/short-id.ts`, `src/infra/file-logger.ts`, `src/infra/power-status.ts`, `src/relay/run-timeline.ts`, `src/relay/run-stream-relay.ts`, `src/relay/bubble-writer.ts`, `src/relay/stream-session.ts`, `index.ts`.
|
|
161
|
+
- Tests: `test/infra/short-id.test.ts`, `test/infra/file-logger.test.ts`, `test/infra/power-status.test.ts`, `test/relay/run-timeline.test.ts`, `test/relay/stream-session.test.ts`, `test/quota/reply-quota-report.test.ts`, `test/index.test.ts`.
|
|
162
|
+
- Previous delivery: [delivery.1.7.1.md](./delivery.1.7.1.md).
|
|
163
|
+
- User-facing behavior: [README.md](../../README.md), [README-zh.md](../../README-zh.md).
|