@chen_hu_hu/pi-qq 1.3.1 → 1.3.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/CHANGELOG.md +68 -0
- package/README-zh.md +8 -7
- package/README.md +8 -7
- package/doc/archive/README.md +18 -0
- package/doc/{delivery-v1-zh.md → archive/delivery-v1-zh.md} +2 -1
- package/doc/{delivery-v1.md → archive/delivery-v1.md} +2 -1
- package/doc/{delivery-v2-zh.md → archive/delivery-v2-zh.md} +2 -1
- package/doc/{delivery-v2.md → archive/delivery-v2.md} +2 -1
- package/doc/{delivery-v3-zh.md → archive/delivery-v3-zh.md} +2 -1
- package/doc/{delivery-v3.md → archive/delivery-v3.md} +3 -2
- package/doc/bugfix-v4.md +698 -0
- package/index.ts +36 -25
- package/package.json +2 -1
- package/src/infra/file-logger.ts +21 -6
- package/src/qq/inbound-attachments.ts +101 -0
- package/src/qq/inbound-command.ts +99 -0
- package/src/qq/qq-message-handler.ts +48 -117
- package/src/qq/reply-sender.ts +23 -0
- package/src/relay/bubble-writer.ts +369 -0
- package/src/relay/run-stream-relay.ts +88 -339
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.3.3] - 2026-11-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- QQ `/last` command: push the last completed assistant message as a new stream bubble, or restart the current output while a run is active.
|
|
15
|
+
|
|
16
|
+
## [1.3.2] - 2026-11-04
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- GitHub Releases now attach the npm tarball and a `SHA256SUMS` file.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Log records are written asynchronously, and debug payload previews are only built when debug logging is enabled.
|
|
25
|
+
- Historical delivery records moved to `doc/archive/` and are marked unmaintained.
|
|
26
|
+
- Relay composition and inbound command/attachment handling were split into smaller modules for maintainability.
|
|
27
|
+
|
|
28
|
+
## [1.3.1] - 2026-11-04
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- CI workflow for pushes and pull requests.
|
|
33
|
+
- Regression coverage for session lifecycle, mixed voice attachments, and image handling.
|
|
34
|
+
- Automated release notes sourced from this changelog.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Images now use the same save/pending pipeline as files. The next instruction reads them through pi's `read` tool.
|
|
39
|
+
- Attachment prompts use workspace-relative paths and the concise `# Attachments:` / `# User message:` format.
|
|
40
|
+
- Settings are validated and resolved once per session. `fileMaxSize` now applies to all attachments; `imageMaxSize` was removed.
|
|
41
|
+
- README rewritten for users and developers.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- Invalid config shapes such as `null` or arrays no longer crash startup.
|
|
46
|
+
- Cancelling QR login no longer reports a failure.
|
|
47
|
+
- `/stop` clears model-error recovery even when idle.
|
|
48
|
+
- Login/logout and session shutdown dispose the active relay.
|
|
49
|
+
- Voice messages preserve other attachments in the same message.
|
|
50
|
+
- `chunkText` no longer loops forever on an invalid limit.
|
|
51
|
+
|
|
52
|
+
### Security
|
|
53
|
+
|
|
54
|
+
- The bot now requires a bound openid and always installs an allowlist.
|
|
55
|
+
|
|
56
|
+
## [1.3.0] - 2026-11-03
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- Reworked relay output into per-content-block streamed bubbles.
|
|
61
|
+
- Added thinking labels, per-tool icons, model-error recovery, and idle-safe session handling.
|
|
62
|
+
- Reorganized modules by bounded context and updated settings and delivery documentation.
|
|
63
|
+
|
|
64
|
+
[Unreleased]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.3...HEAD
|
|
65
|
+
[1.3.3]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.2...v1.3.3
|
|
66
|
+
[1.3.2]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.1...v1.3.2
|
|
67
|
+
[1.3.1]: https://github.com/CQ-Developer/pi-qq/compare/v1.3.0...v1.3.1
|
|
68
|
+
[1.3.0]: https://github.com/CQ-Developer/pi-qq/compare/v1.2.3...v1.3.0
|
package/README-zh.md
CHANGED
|
@@ -94,13 +94,14 @@ Summarize this file.
|
|
|
94
94
|
|
|
95
95
|
QQ 侧命令:
|
|
96
96
|
|
|
97
|
-
| 命令 | 说明
|
|
98
|
-
| ---------- |
|
|
99
|
-
| `/new` | 开始新的 pi 会话
|
|
100
|
-
| `/stop` | 中止当前运行
|
|
101
|
-
| `/compact` | 压缩当前上下文
|
|
102
|
-
| `/status` | 显示会话和上下文状态
|
|
103
|
-
| `/
|
|
97
|
+
| 命令 | 说明 |
|
|
98
|
+
| ---------- | -------------------------------------------- |
|
|
99
|
+
| `/new` | 开始新的 pi 会话 |
|
|
100
|
+
| `/stop` | 中止当前运行 |
|
|
101
|
+
| `/compact` | 压缩当前上下文 |
|
|
102
|
+
| `/status` | 显示会话和上下文状态 |
|
|
103
|
+
| `/last` | 以流式推送最近完成的回复,或重新推送当前输出 |
|
|
104
|
+
| `/help` | 显示命令帮助 |
|
|
104
105
|
|
|
105
106
|
### 诊断
|
|
106
107
|
|
package/README.md
CHANGED
|
@@ -94,13 +94,14 @@ Run these in the pi terminal:
|
|
|
94
94
|
|
|
95
95
|
QQ-side commands:
|
|
96
96
|
|
|
97
|
-
| Command | Description
|
|
98
|
-
| ---------- |
|
|
99
|
-
| `/new` | Start a new pi session
|
|
100
|
-
| `/stop` | Abort the current run
|
|
101
|
-
| `/compact` | Compact the current context
|
|
102
|
-
| `/status` | Show session and context status
|
|
103
|
-
| `/
|
|
97
|
+
| Command | Description |
|
|
98
|
+
| ---------- | ------------------------------------------------------------------------ |
|
|
99
|
+
| `/new` | Start a new pi session |
|
|
100
|
+
| `/stop` | Abort the current run |
|
|
101
|
+
| `/compact` | Compact the current context |
|
|
102
|
+
| `/status` | Show session and context status |
|
|
103
|
+
| `/last` | Push the last completed reply as a stream, or restart the current output |
|
|
104
|
+
| `/help` | Show command help |
|
|
104
105
|
|
|
105
106
|
### Diagnostics
|
|
106
107
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Archived delivery records
|
|
2
|
+
|
|
3
|
+
These documents record how pi-qq was delivered at each milestone. They are
|
|
4
|
+
historical snapshots, not current documentation.
|
|
5
|
+
|
|
6
|
+
- They may reference modules, settings, or behaviors that have since been
|
|
7
|
+
removed (for example the image-specific pipeline and `imageMaxSize`).
|
|
8
|
+
- Do not update them to match current behavior; write current documentation in
|
|
9
|
+
`README.md`, `README-zh.md`, and `CHANGELOG.md` instead.
|
|
10
|
+
- File and line details in these records are intentionally frozen.
|
|
11
|
+
|
|
12
|
+
# 归档交付记录
|
|
13
|
+
|
|
14
|
+
本目录保存 pi-qq 各里程碑的交付记录,仅作历史快照,不是当前文档。
|
|
15
|
+
|
|
16
|
+
- 文中可能引用已删除的模块、配置或行为(例如图片专用链路和 `imageMaxSize`)。
|
|
17
|
+
- 不要把这些文档更新为当前行为;现行说明请写入 `README.md`、`README-zh.md` 和 `CHANGELOG.md`。
|
|
18
|
+
- 文件与行号等细节按当时状态保留。
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# pi-qq delivery-v1
|
|
2
2
|
|
|
3
|
+
> **归档记录。** 内容反映当时的交付状态,可能引用已删除的模块或配置;当前行为见 [README-zh.md](../../README-zh.md)。
|
|
3
4
|
> 状态:v1 已交付,作为后续版本的历史基线。
|
|
4
|
-
>
|
|
5
|
+
> 后续版本见 [delivery-v2-zh.md](./delivery-v2-zh.md)、[delivery-v3-zh.md](./delivery-v3-zh.md)。
|
|
5
6
|
|
|
6
7
|
## 1. 交付范围
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# pi-qq delivery-v1
|
|
2
2
|
|
|
3
|
+
> **Archived record.** Content reflects the delivery at that time and may reference removed modules or settings. See [README](../../README.md) for current behavior.
|
|
3
4
|
> Status: v1 delivered; this is a historical baseline for later versions.
|
|
4
|
-
>
|
|
5
|
+
> Later versions: [delivery-v2.md](./delivery-v2.md), [delivery-v3.md](./delivery-v3.md).
|
|
5
6
|
|
|
6
7
|
## 1. Scope
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# pi-qq delivery-v2
|
|
2
2
|
|
|
3
|
+
> **归档记录。** 内容反映当时的交付状态,可能引用已删除的模块或配置;当前行为见 [README-zh.md](../../README-zh.md)。
|
|
3
4
|
> 状态:v2 已交付,本文为历史记录。
|
|
4
|
-
>
|
|
5
|
+
> 前序版本:[delivery-v1-zh.md](./delivery-v1-zh.md);后续版本:[delivery-v3-zh.md](./delivery-v3-zh.md)。
|
|
5
6
|
|
|
6
7
|
## 1. 交付范围
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# pi-qq delivery-v2
|
|
2
2
|
|
|
3
|
+
> **Archived record.** Content reflects the delivery at that time and may reference removed modules or settings. See [README](../../README.md) for current behavior.
|
|
3
4
|
> Status: v2 delivered; this is a historical record.
|
|
4
|
-
>
|
|
5
|
+
> Previous: [delivery-v1.md](./delivery-v1.md); next: [delivery-v3.md](./delivery-v3.md).
|
|
5
6
|
|
|
6
7
|
## 1. Scope
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# pi-qq delivery-v3
|
|
2
2
|
|
|
3
|
+
> **归档记录。** 内容反映当时的交付状态,可能引用已删除的模块或配置;当前行为见 [README-zh.md](../../README-zh.md)。
|
|
3
4
|
> 状态:v3 已实现并完成主链路真机验证;按块切泡、错误恢复、列表切分等最终细节仍需在目标 QQ 客户端做一次完整复验。
|
|
4
|
-
> 说明:后续变更删除了图片专用链路,图片与文件共用保存/pending
|
|
5
|
+
> 说明:后续变更删除了图片专用链路,图片与文件共用保存/pending 流程。
|
|
5
6
|
> 前序版本:[delivery-v1-zh.md](./delivery-v1-zh.md)、[delivery-v2-zh.md](./delivery-v2-zh.md)。
|
|
6
7
|
|
|
7
8
|
## 1. 交付范围
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# pi-qq delivery-v3
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
>
|
|
3
|
+
> **Archived record.** Content reflects the delivery at that time and may reference removed modules or settings. See [README](../../README.md) for current behavior.
|
|
4
|
+
> Status: v3 implemented and the main path has been verified on real QQ.
|
|
5
|
+
> Note: later changes removed the image-specific pipeline; images now use the same save/pending path as files.
|
|
5
6
|
> Previous: [delivery-v1.md](./delivery-v1.md), [delivery-v2.md](./delivery-v2.md).
|
|
6
7
|
|
|
7
8
|
## 1. Scope
|