手瓜一十雪
e699351f90
feat: adopt async SQLite and improve messaging and runtime diagnostics
2026-10-12 15:44:55 +08:00
DrSmoothl
87527cb764
chore(release): v1.14.22
2026-10-07 11:04:07 +08:00
DrSmoothl
f95d247e73
feat(runtime): override deploy settings from the environment
...
SNOWLUMA_ variables can set the factory OneBot listen ports, WebUI TLS,
packet and hook timeouts, the stream directory, file download timeout,
and notification HTTP timeout. The values apply in memory and are not
written back to saved config.
2026-10-06 00:48:34 +08:00
DrSmoothl
9632b00638
chore(release): v1.14.21
2026-10-04 16:10:01 +08:00
DrSmoothl
1ef9a2c330
chore(release): v1.14.20
2026-09-26 16:34:14 +08:00
DrSmoothl
fe245d84bf
chore(release): v1.14.19
2026-09-21 16:39:11 +08:00
DrSmoothl
3e581780b3
chore(release): v1.14.18
2026-09-21 14:25:21 +08:00
DrSmoothl
b8680bbd69
chore(release): v1.14.17
2026-09-15 16:03:39 +08:00
DrSmoothl
463d62507a
chore(release): v1.14.16
2026-09-13 20:12:47 +08:00
DrSmoothl
1bd26a906b
chore(release): v1.14.15
2026-08-30 21:43:03 +08:00
DrSmoothl
4b9921b711
chore(release): v1.14.14
2026-08-28 14:33:45 +08:00
DrSmoothl
5ba7c21c4b
chore(release): v1.14.13
2026-08-22 20:15:29 +08:00
DrSmoothl
bc070eca1c
chore(release): v1.14.12
2026-08-20 14:12:53 +08:00
DrSmoothl
c86982610f
chore(release): v1.14.11
2026-08-17 21:11:05 +08:00
DrSmoothl
9772d4f0bf
chore(release): v1.14.10
2026-08-16 21:57:59 +08:00
DrSmoothl
fea1996e46
chore(release): v1.14.9
2026-08-16 15:18:30 +08:00
DrSmoothl
401f32d6b2
chore(release): v1.14.8
2026-08-14 14:55:28 +08:00
DrSmoothl
d46d8e4002
chore(release): v1.14.7
2026-08-13 19:47:25 +08:00
DrSmoothl
d26aef86d8
chore(release): v1.14.6
2026-08-13 12:52:21 +08:00
DrSmoothl
0357d136d8
chore(release): v1.14.5
2026-08-11 18:20:17 +08:00
DrSmoothl
dbf654ad57
chore(release): v1.14.4
2026-08-09 16:53:10 +08:00
DrSmoothl
7eea8059cc
chore(release): v1.14.3
2026-08-08 19:44:58 +08:00
DrSmoothl
f968687a25
chore(release): v1.14.2
2026-08-08 17:46:31 +08:00
DrSmoothl
4d958eb984
chore(release): v1.14.1
2026-08-07 20:29:00 +08:00
DrSmoothl
f572be2561
chore(release): v1.14.0
2026-08-03 19:35:07 +08:00
DrSmoothl
3c97e71650
fix(onebot): strengthen endpoint defaults
...
Use safer defaults for newly created service endpoints and guide operators toward suitable access credentials without disrupting existing deployments.
Apply the same policy at the save boundary, retain deliberate local-only setups and external client compatibility, and add regression coverage for editing, recovery, and trusted access paths.
2026-08-01 18:12:04 +08:00
DrSmoothl
4794f27972
chore(release): v1.13.0
2026-07-31 18:19:05 +08:00
DrSmoothl
9544aa7761
chore(repo): standardize cross-platform development
...
Make line endings deterministic across macOS, Windows, and Linux while preserving the native checkout format required by Windows launchers.
Pin the tested application runtime and Node type baseline, add a shared startup preflight, and keep independently published packages on their existing compatibility ranges.
Align local scripts, pull request validation, complete package builds, dependency metadata, and contributor documentation around the same Node and pnpm contract. The root test command now covers every tested workspace package while a focused Core command remains available for local iteration.
2026-07-31 13:09:02 +08:00
DrSmoothl
df3f8c5587
chore(release): v1.12.10
2026-07-26 19:29:28 +08:00
DrSmoothl
c64f9d3078
chore(release): v1.12.9
2026-07-24 14:15:51 +08:00
DrSmoothl
97ab8dc393
chore(release): v1.12.8
2026-07-22 20:03:54 +08:00
DrSmoothl
88216ce644
chore(release): v1.12.7
2026-07-20 15:52:49 +08:00
DrSmoothl
4e62fdc80b
chore(release): v1.12.6
2026-07-19 19:38:13 +08:00
DrSmoothl
4391b45c41
chore(release): v1.12.5
2026-07-17 18:47:51 +08:00
DrSmoothl
6a1042e33f
chore(release): v1.12.4
2026-07-16 20:29:00 +08:00
DrSmoothl
0503af2fcc
fix(webui): export logs without terminal control codes
...
Keep terminal styling confined to interactive console output while storing plain structured log lines for subscribers and file persistence.
Sanitize downloads again at the WebUI boundary so cached legacy entries and fallback-formatted records cannot leak CSI, OSC, DCS, or C1 control sequences. Add regression coverage for colored output, hyperlinks, control strings, malformed sequences, and preserved multiline text.
2026-07-16 19:20:48 +08:00
DrSmoothl
ebd02c3f3d
chore(release): v1.12.3
2026-07-15 21:31:59 +08:00
DrSmoothl
a3467a8d89
chore(release): v1.12.2
2026-07-14 07:57:08 +08:00
DrSmoothl
c04864dd21
chore(release): v1.12.1
2026-07-10 14:00:40 +08:00
DrSmoothl
b6fb5bd530
chore(release): v1.12.0
2026-07-07 22:38:02 +08:00
DrSmoothl
d35e276730
chore(release): v1.11.4
2026-07-06 15:04:55 +08:00
DrSmoothl
0e6e2ec51d
chore(release): v1.11.3
2026-07-05 14:26:10 +08:00
DrSmoothl
6cb7f2c6d0
chore(release): v1.11.2
2026-07-04 13:39:00 +08:00
DrSmoothl
72aedbc612
chore(release): v1.11.1
2026-07-01 22:15:01 +08:00
DrSmoothl
3932958c39
fix(bridge,common,onebot): reject phantom hook UINs + never crash logging ( #162 )
...
注入的竞态窗口里,native hook 偶发上报 13 位垃圾 UIN(时间戳型,读到 QQ 尚未落定
的内存)。TS 层防御缺失,导致两个连锁问题:
1) 幽灵账号:isRealUin 只查「纯数字且 ≥5 位」、无上限,垃圾值通过后建会话并把
config/onebot_<垃圾>.json 落盘 → OneBot 节点配置里出现随机幽灵账号(跨重启残留)。
2) 进程崩溃:logger 彩色路径 ' '.repeat(SLOT - tagLen),UIN tag(含方括号)超宽 →
负数 → RangeError: Invalid count value → uncaughtException。
跨平台(Win DLL / Linux .so 同逻辑)+「更新 QQ 后消失」都印证是 native 读到那块内存
的偶发垃圾;根修在 SnowLumaNative,此处补齐 TS 防御:
- 抽出唯一的 @snowluma/common/uin::isRealUin = /^\d{5,10}$/(真实 QQ ≤ uint32 →
10 位)。删除 bridge/core 两处重复副本(重复正是这次漏加上限的温床)。等价旧逻辑,
仅新增拒 11+ 位。
- logger.ts 加 Math.max(0, …),日志永不崩进程(独立健壮化)。
- 收紧 WebUI UIN_REGEX /^\d{5,12}$/ → /^\d{5,10}$/ 保持一致。
- 启动时 cleanupInvalidPerUinConfigs() 清掉已落盘的幽灵 onebot_<uin>.json(只删
UIN 不合法的,绝不碰合法账号/全局配置)。
测试:common +8(uin 6 / logger 2)、onebot +3(cleanup)。typecheck 12 包干净;
common 58 / onebot 519 / core 471 / bridge 73 全绿。对抗性 Agent 逐输入核验等价性、
三层 gate 堵死幽灵入口、cleanup 安全时序,无回归。
2026-07-01 20:37:02 +08:00
DrSmoothl
b6cde5101d
refactor(common,core): extract mapWithConcurrency util; use in forward enrich
...
阶段 2:把「限量+并发分批」的手写循环收进一个 common util。此形状已被复制进
私有 SLE(friend.ts),是已发生的复制漂移;抽出后堵住它、并给未来的富化点一个
现成原语(cap + 并发批 + best-effort 是防 Tencent 风控封号的标准配方)。
- 新增 common/concurrency.ts:mapWithConcurrency(items, concurrency, fn),批处理
语义(每批 Promise.all 等齐再下一批,非 rolling pool,保持 forward 现有行为),
结果按输入顺序返回。7 个单测覆盖顺序/绝对index/峰值≤limit+跨批serialize/
不整除/单批/空/concurrency<1。
- 迁移 forward.ts residue 昵称富化的并发批循环;cap(slice MAX)/dedup(Set)/
best-effort(fn 内 try/catch) 保留在 callsite。行为严格不变。
对抗性 Agent 逐条对比 HEAD 确认等价。common 50 / core 467 全绿、typecheck 干净。
2026-07-01 17:29:25 +08:00
DrSmoothl
9d67630396
refactor(common,core): extract single-flight+TTL cache primitive
...
阶段 1:把手写多份的「单飞+TTL 记忆化」收进一个 common 原语,消除各处
各自实现「TTL 判定 / inflight 去重 / finally 清理」的漂移风险(底层都是 Tencent
风控:忙碌客户端会为每条消息发一次未缓存 OIDB 拉取,持续爆发触发封号)。
- 新增 common/single-flight-cache.ts:createSingleFlightCache<K,V>({ ttlMs, load,
shouldCache?, now? }).get(key, {force});shouldCache 容纳「错误结果不缓存以便
重试」,now 可注入便于测 TTL。7 个单测覆盖新鲜命中/单飞去重/force/TTL 过期/
shouldCache/错误传播/invalidate。
- 迁移 contacts.fetchGroupMemberList(key=groupId, ttl 60s, 默认 shouldCache)与
update-check.getUpdateInfo(全局 key, ttl 6h, shouldCache=!error)。行为严格不变。
对抗性 Agent 逐条对比 HEAD 确认两处等价(含 update-check 时间戳来源毫秒级微差、
对 6h TTL 可忽略)。common 43 / core 467 全绿、typecheck 干净。
2026-07-01 17:25:04 +08:00
DrSmoothl
48e2777bc3
chore(release): v1.11.0
2026-06-30 20:38:37 +08:00
DrSmoothl
7ec74f2928
chore(release): v1.10.4
2026-06-28 22:48:00 +08:00
DrSmoothl
351db573d8
chore(release): v1.10.3
2026-06-26 19:49:41 +08:00