@napuketto/adapter 0.12.4 → 0.13.1
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/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/{core-BNOfqnV-.mjs → core-CMqpb5-m.mjs} +94 -8
- package/dist/core-CMqpb5-m.mjs.map +1 -0
- package/dist/{essence-BRbsj_Vv.mjs → essence-DzYnP60o.mjs} +2 -2
- package/dist/{essence-BRbsj_Vv.mjs.map → essence-DzYnP60o.mjs.map} +1 -1
- package/dist/{index-DNvM3A-1.d.mts → index-DDPMbC_c.d.mts} +41 -3
- package/dist/index-DDPMbC_c.d.mts.map +1 -0
- package/dist/kurobot/index.d.mts +1 -1
- package/dist/kurobot/index.mjs +1 -1
- package/dist/milky/index.d.mts +1 -1
- package/dist/milky/index.mjs +3 -3
- package/dist/onebot11/index.d.mts +1 -1
- package/dist/onebot11/index.mjs +35 -26
- package/dist/onebot11/index.mjs.map +1 -1
- package/dist/satori/index.d.mts +1 -1
- package/dist/satori/index.mjs +4 -4
- package/dist/satori/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/core-BNOfqnV-.mjs.map +0 -1
- package/dist/index-DNvM3A-1.d.mts.map +0 -1
package/dist/satori/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Satori 协议适配器(P5,2026-08-08)
|
|
3
3
|
* 公共面:类型 + 动作注册表 + 配置 schema + 传输装配 + 适配器。
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { D as ActionRegistry, S as BaseProtocolAdapter, w as ProtocolConfig } from "../index-DDPMbC_c.mjs";
|
|
6
6
|
import "../gray-tip-CcpfI1Og.mjs";
|
|
7
7
|
import { CanonicalElement, FriendApi, GroupApi, GroupCache, GroupNotifyApi, KernelErrorCode, MsgApi, MsgEventChannel, Peer, ProfileApi } from "@napuketto/kernel";
|
|
8
8
|
import { ZodType, z } from "zod";
|
package/dist/satori/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as ActionRegistry, g as ensureSilk, y as BaseProtocolAdapter } from "../core-CMqpb5-m.mjs";
|
|
2
2
|
import { t as forEachRawMessage } from "../raw-message-C1E7jbjl.mjs";
|
|
3
3
|
import { t as collectGrayTipUids } from "../gray-tip-ByF-MKeV.mjs";
|
|
4
4
|
import { n as createWsServerSchema, t as createHttpServerSchema } from "../transport-schema-BEzr06W3.mjs";
|
|
5
5
|
import { ChatType, GrayTipSubType, NTGroupRequestOperateTypes, TipGroupElementType, isKernelError, kernelError, toCanonicalElements } from "@napuketto/kernel";
|
|
6
6
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
7
|
+
import { join } from "node:path";
|
|
7
8
|
import { transcodeVideo } from "@napuketto/media";
|
|
8
9
|
import { z } from "zod";
|
|
9
|
-
import { join } from "node:path";
|
|
10
10
|
import { HttpServer, WsServer } from "@napuketto/network";
|
|
11
11
|
// src/satori/helper/config.ts
|
|
12
12
|
/**
|
|
@@ -1553,7 +1553,7 @@ async function toSatoriMessageEvent(raw, deps) {
|
|
|
1553
1553
|
function hasSatoriGrayTip(raw) {
|
|
1554
1554
|
for (const el of raw.elements) {
|
|
1555
1555
|
const g = el.grayTipElement;
|
|
1556
|
-
if (g
|
|
1556
|
+
if (g == null) continue;
|
|
1557
1557
|
if (g.subElementType === GrayTipSubType.REVOKE || g.subElementType === GrayTipSubType.GROUP) return true;
|
|
1558
1558
|
}
|
|
1559
1559
|
return false;
|
|
@@ -1568,7 +1568,7 @@ function isGroupMessage(raw) {
|
|
|
1568
1568
|
async function toSatoriGrayTipEvent(raw, uidToUinMap) {
|
|
1569
1569
|
for (const el of raw.elements) {
|
|
1570
1570
|
const g = el.grayTipElement;
|
|
1571
|
-
if (g
|
|
1571
|
+
if (g == null) continue;
|
|
1572
1572
|
if (g.subElementType === GrayTipSubType.REVOKE) {
|
|
1573
1573
|
const revoked = toRevokeEvent(raw, uidToUinMap);
|
|
1574
1574
|
if (revoked !== null) return revoked;
|