@zaofan/dsh-qqbot 1.10.25 → 1.10.26

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.
@@ -1,3 +1,4 @@
1
+ import { fileURLToPath } from 'node:url';
1
2
  /**
2
3
  * no-wake-on-child-quote.mjs — 示例入站中间件:引用「子会话转发」的消息时不按 @ 处理
3
4
  * (2026-10-12 升级:**同时演示早/晚两个挂点**;晚挂点那段逻辑一个字没改)
@@ -156,7 +157,9 @@ async function loadLib() {
156
157
  * ⇒ 真机上完全静默、无法定位。" 本扩展此前一直用 `ctx.logger.debug` ⇒ 等于瞎的,
157
158
  * 导致"引用回流没投递"排查了三轮全靠猜。此后所有关键判定一律 `appendDiag` 落盘。
158
159
  */
159
- const DIAG_FILE = 'D:/newwenjianjia/aiwork/鲸鱼娘/dshqqbot/.qqbot-extensions/data/no-wake-diag.log';
160
+ // ★ 2026-10-24 修复(issue #17): 原来写死 Windows 路径(D:/…) —— Linux/容器/手机上会被当成
161
+ // 相对路径,在家目录里生成一个叫 "D:" 的畸形目录,日志全丢。改成跟着本文件走。
162
+ const DIAG_FILE = fileURLToPath(new URL('../data/no-wake-diag.log', import.meta.url));
160
163
 
161
164
  async function appendDiag(line) {
162
165
  try {
@@ -1,3 +1,4 @@
1
+ import { fileURLToPath } from 'node:url';
1
2
  /**
2
3
  * route-isolate.mjs — 入站中间件:**二档绑定的路由消息,不进父会话上下文(彻底隔绝)**
3
4
  *
@@ -42,7 +43,9 @@
42
43
  export const name = 'route-isolate';
43
44
 
44
45
  /** ★ 诊断必须**落盘**:logger 没人注入过,只往 logger 写等于瞎的 */
45
- const DIAG_FILE = 'D:/newwenjianjia/aiwork/鲸鱼娘/dshqqbot/.qqbot-extensions/data/route-isolate-diag.log';
46
+ // ★ 2026-10-24 修复(issue #17): 原来写死 Windows 路径(D:/…) —— Linux/容器/手机上会被当成
47
+ // 相对路径,在家目录里生成一个叫 "D:" 的畸形目录,日志全丢。改成跟着本文件走。
48
+ const DIAG_FILE = fileURLToPath(new URL('../data/route-isolate-diag.log', import.meta.url));
46
49
  let LOG = null;
47
50
 
48
51
  async function note(msg) {
@@ -777,7 +777,9 @@ async function forwardToQq(entry, text) {
777
777
  * "一开始只往 logger 写,而**从来没人注入过 logger** ⇒ 真机上完全静默、无法定位。"
778
778
  * 本库涉及"转发到 QQ",静默一次就是一条内容永久丢失,必须能事后追。
779
779
  */
780
- const SW_DIAG_FILE = 'D:/newwenjianjia/aiwork/鲸鱼娘/dshqqbot/.qqbot-extensions/data/session-watch-diag.log';
780
+ // ★ 2026-10-24 修复(issue #17): 原来写死 Windows 路径(D:/…) —— Linux/容器/手机上会被当成
781
+ // 相对路径,在家目录里生成一个叫 "D:" 的畸形目录,日志全丢。改成跟着本文件走。
782
+ const SW_DIAG_FILE = fileURLToPath(new URL('../../data/session-watch-diag.log', import.meta.url));
781
783
 
782
784
  async function swDiag(line) {
783
785
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaofan/dsh-qqbot",
3
- "version": "1.10.25",
3
+ "version": "1.10.26",
4
4
  "description": "QQ Bot IM channel plugin for deepseek-harness (dsh)",
5
5
  "type": "module",
6
6
  "main": "./entry.js",