@napuketto/loader 0.0.18 → 0.0.19

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.
@@ -232,13 +232,19 @@ function registerLoginRefreshAction(actions, refreshQr) {
232
232
  actions.set("login.refreshQr", async () => refreshQr());
233
233
  }
234
234
  /**
235
- * 从宽松 params 构造 Peer(缺省 chatType=1 群聊)。
235
+ * 从宽松 params 构造 Peer(缺省 chatType=1 私聊)。
236
236
  * 优先 peerUid(uid 直通);缺省时 peerUin 经 uinToUid 转换。
237
237
  *
238
- * ⚠️ 2026-08-09 修复:群聊(chatType=2)peerUid 直接用群号(kernel Peer 定义
239
- * 「群号 / 用户 uid」,OB11 resolve-peer 同构),**不走 uinToUid**——
240
- * getUidByUins 是「用户 uin → uid」转换,传群号属非法调用(QQ 原生内部
241
- * 抛 `Cannot read properties of undefined (reading 'service')`,实测)。
238
+ * ⚠️ 群聊(chatType=2)peerUid 直接用群号(kernel Peer 定义「群号 / 用户 uid」,
239
+ * OB11 resolve-peer 同构),**不走 uinToUid**——getUidByUins 是「用户 uin → uid」
240
+ * 转换,传群号属非法调用。
241
+ *
242
+ * ⚠️ 归因更正(2026-08-20):2026-08-09 把 `Cannot read properties of undefined
243
+ * (reading 'service')` 归因为「传群号给 getUidByUins」是**误判**。真因是
244
+ * ipc-bootstrap 把类方法 `GroupApi.uinToUid` 摘成裸函数注入丢了 this(读
245
+ * undefined 的 service)。当时群聊改直通恰好绕开了这条路径,于是「群聊修好了」,
246
+ * 而私聊仍然必炸——直到 2026-08-20 才在 ipc-bootstrap 处 bind 根治。
247
+ * 群聊直通的行为本身仍然正确(上面第一条),保留。
242
248
  */
243
249
  async function toPeer(params, uinToUid) {
244
250
  const chatType = typeof params["chatType"] === "number" ? params["chatType"] : 1;
@@ -727,7 +733,7 @@ function createIpcActionsForCore(core) {
727
733
  * 返回停止函数(清理事件转发订阅;stdin 服务端由 bootstrap-core 独立管理)。
728
734
  */
729
735
  function attachIpcServices(actions, services) {
730
- const groupApi = services.groupApi;
736
+ const uinToUid = services.groupApi.uinToUid?.bind(services.groupApi);
731
737
  const full = createIpcActions({
732
738
  msgApi: services.msgApi,
733
739
  groupApi: services.groupApi,
@@ -737,7 +743,7 @@ function attachIpcServices(actions, services) {
737
743
  session: services.session,
738
744
  engine: services.engine,
739
745
  util: services.util,
740
- ...groupApi.uinToUid !== void 0 ? { uinToUid: groupApi.uinToUid } : {}
746
+ ...uinToUid !== void 0 ? { uinToUid } : {}
741
747
  });
742
748
  for (const [name, handler] of full) actions.set(name, handler);
743
749
  const stops = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napuketto/loader",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "NapukettoQQ 引导组件:自建宿主(标准 Node + stub QQNT.dll)dlopen wrapper.node 并启动 kernel,不拉起 QQ / 不注入",
5
5
  "type": "module",
6
6
  "files": [