@napuketto/adapter 0.5.0 → 0.6.0
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/buddy-req-Q7Q4bVuz.mjs +43 -0
- package/dist/buddy-req-Q7Q4bVuz.mjs.map +1 -0
- package/dist/gray-tip-LwBee5mo.mjs +33 -0
- package/dist/gray-tip-LwBee5mo.mjs.map +1 -0
- package/dist/milky/index.d.mts +61 -12
- package/dist/milky/index.d.mts.map +1 -1
- package/dist/milky/index.mjs +1477 -204
- package/dist/milky/index.mjs.map +1 -1
- package/dist/onebot11/index.d.mts +2 -0
- package/dist/onebot11/index.d.mts.map +1 -1
- package/dist/onebot11/index.mjs +57 -74
- package/dist/onebot11/index.mjs.map +1 -1
- package/dist/satori/index.mjs +2 -1
- package/dist/satori/index.mjs.map +1 -1
- package/dist/{gray-tip-B80z9KR4.mjs → transport-schema-CpPxyRK0.mjs} +2 -21
- package/dist/transport-schema-CpPxyRK0.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/gray-tip-B80z9KR4.mjs.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region src/core/uid-uin.ts
|
|
2
|
+
/**
|
|
3
|
+
* uid → uin 解析(OB11 / Milky 请求与通知翻译共用,P1 2026-10-30 收敛)
|
|
4
|
+
*
|
|
5
|
+
* uidToUin 批量映射由调用方取得后传入;映射缺省退化为 uid 数值(wrapper 部分回调
|
|
6
|
+
* 直接给 uin),非数字返回 0(调用方按 0 兜底展示)。
|
|
7
|
+
*
|
|
8
|
+
* request 事件翻译上下文与毫秒换算常量随本模块共享(OB11 / Milky request 同构)。
|
|
9
|
+
*/
|
|
10
|
+
/** 毫秒 → 秒(Unix 时间戳换算)。 */
|
|
11
|
+
const MS_TO_SEC = 1e3;
|
|
12
|
+
/** uid → uin(映射命中取 uin,未命中退化 uid 数值,非数字返回 0)。 */
|
|
13
|
+
function resolveUin(uid, uidToUin) {
|
|
14
|
+
if (uid === void 0 || uid === "") return 0;
|
|
15
|
+
const uin = uidToUin.get(uid);
|
|
16
|
+
if (uin !== void 0) return Number(uin);
|
|
17
|
+
const n = Number(uid);
|
|
18
|
+
return Number.isFinite(n) ? n : 0;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/core/buddy-req.ts
|
|
22
|
+
/** BuddyReq 防御性收窄:仅接受字段形状可用的对象。 */
|
|
23
|
+
function isBuddyReqLike(value) {
|
|
24
|
+
if (typeof value !== "object" || value === null) return false;
|
|
25
|
+
const v = value;
|
|
26
|
+
return typeof v["reqTime"] === "string" && typeof v["friendUid"] === "string";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* onBuddyReqChange 回调参数 → BuddyReq 列表(防御性收窄)。
|
|
30
|
+
* 已知候选形状:BuddyReq[] / { buddyReqs: BuddyReq[] };其余返回 null。
|
|
31
|
+
*/
|
|
32
|
+
function narrowBuddyReqs(arg) {
|
|
33
|
+
if (Array.isArray(arg)) return arg.every(isBuddyReqLike) ? arg : null;
|
|
34
|
+
if (typeof arg === "object" && arg !== null) {
|
|
35
|
+
const reqs = arg["buddyReqs"];
|
|
36
|
+
if (Array.isArray(reqs) && reqs.every(isBuddyReqLike)) return reqs;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { MS_TO_SEC as n, resolveUin as r, narrowBuddyReqs as t };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=buddy-req-Q7Q4bVuz.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buddy-req-Q7Q4bVuz.mjs","names":[],"sources":["../src/core/uid-uin.ts","../src/core/buddy-req.ts"],"sourcesContent":["/**\n * uid → uin 解析(OB11 / Milky 请求与通知翻译共用,P1 2026-10-30 收敛)\n *\n * uidToUin 批量映射由调用方取得后传入;映射缺省退化为 uid 数值(wrapper 部分回调\n * 直接给 uin),非数字返回 0(调用方按 0 兜底展示)。\n *\n * request 事件翻译上下文与毫秒换算常量随本模块共享(OB11 / Milky request 同构)。\n */\n\n/** 毫秒 → 秒(Unix 时间戳换算)。 */\nexport const MS_TO_SEC = 1000;\n\n/** request 事件翻译上下文(uid→uin 映射,调用方批量转换)。 */\nexport interface RequestTranslateContext {\n selfUin: string;\n uidToUin: Map<string, string>;\n}\n\n/** uid → uin(映射命中取 uin,未命中退化 uid 数值,非数字返回 0)。 */\nexport function resolveUin(uid: string | undefined, uidToUin: Map<string, string>): number {\n if (uid === undefined || uid === \"\") {\n return 0;\n }\n const uin = uidToUin.get(uid);\n if (uin !== undefined) {\n return Number(uin);\n }\n const n = Number(uid);\n return Number.isFinite(n) ? n : 0;\n}\n","/**\n * BuddyReq 防御收窄(OB11 / Milky 共用,P1 2026-10-30 从 onebot11 收敛)\n *\n * onBuddyReqChange 回调参数形状未经真实事件校准(wrapper 字符串证据仅有方法名),\n * 仅接受字段形状可用的对象;未知形状返回 null 由调用方打 raw 日志积累校准数据。\n */\nimport type { BuddyReq } from \"@napuketto/kernel\";\n\n/** BuddyReq 防御性收窄:仅接受字段形状可用的对象。 */\nexport function isBuddyReqLike(value: unknown): value is BuddyReq {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n const v = value as Record<string, unknown>;\n return typeof v[\"reqTime\"] === \"string\" && typeof v[\"friendUid\"] === \"string\";\n}\n\n/**\n * onBuddyReqChange 回调参数 → BuddyReq 列表(防御性收窄)。\n * 已知候选形状:BuddyReq[] / { buddyReqs: BuddyReq[] };其余返回 null。\n */\nexport function narrowBuddyReqs(arg: unknown): BuddyReq[] | null {\n if (Array.isArray(arg)) {\n return arg.every(isBuddyReqLike) ? (arg as BuddyReq[]) : null;\n }\n if (typeof arg === \"object\" && arg !== null) {\n const reqs = (arg as Record<string, unknown>)[\"buddyReqs\"];\n if (Array.isArray(reqs) && reqs.every(isBuddyReqLike)) {\n return reqs as BuddyReq[];\n }\n }\n return null;\n}\n"],"mappings":";;;;;;;;;;AAUA,MAAa,YAAY;;AASzB,SAAgB,WAAW,KAAyB,UAAuC;CACvF,IAAI,QAAQ,KAAA,KAAa,QAAQ,IAC7B,OAAO;CAEX,MAAM,MAAM,SAAS,IAAI,GAAG;CAC5B,IAAI,QAAQ,KAAA,GACR,OAAO,OAAO,GAAG;CAErB,MAAM,IAAI,OAAO,GAAG;CACpB,OAAO,OAAO,SAAS,CAAC,IAAI,IAAI;AACpC;;;;ACpBA,SAAgB,eAAe,OAAmC;CAC9D,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,OAAO;CAEX,MAAM,IAAI;CACV,OAAO,OAAO,EAAE,eAAe,YAAY,OAAO,EAAE,iBAAiB;AACzE;;;;;AAMA,SAAgB,gBAAgB,KAAiC;CAC7D,IAAI,MAAM,QAAQ,GAAG,GACjB,OAAO,IAAI,MAAM,cAAc,IAAK,MAAqB;CAE7D,IAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM;EACzC,MAAM,OAAQ,IAAgC;EAC9C,IAAI,MAAM,QAAQ,IAAI,KAAK,KAAK,MAAM,cAAc,GAChD,OAAO;CAEf;CACA,OAAO;AACX"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/core/gray-tip.ts
|
|
2
|
+
/** 非空 uid 才加入集合。 */
|
|
3
|
+
function collectUids(uids, ...candidates) {
|
|
4
|
+
for (const uid of candidates) if (uid !== void 0 && uid !== "") uids.add(uid);
|
|
5
|
+
}
|
|
6
|
+
/** 收集 grayTip 涉及的 uid(批量 uidToUin 用)。 */
|
|
7
|
+
function collectGrayTipUids(msg) {
|
|
8
|
+
const uids = /* @__PURE__ */ new Set();
|
|
9
|
+
for (const el of msg.elements) {
|
|
10
|
+
const g = el.grayTipElement;
|
|
11
|
+
if (g === void 0) continue;
|
|
12
|
+
collectUids(uids, g.revokeElement?.operatorUid, g.aioOpGrayTipElement?.peerUid);
|
|
13
|
+
const grp = g.groupElement;
|
|
14
|
+
if (grp === void 0) continue;
|
|
15
|
+
collectUids(uids, grp.memberUid, grp.adminUid, grp.shutUp?.admin?.uid, grp.shutUp?.member?.uid);
|
|
16
|
+
}
|
|
17
|
+
return [...uids];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 第一条「已挂载但不可翻译」的 grayTip 元素(校准日志入口)。
|
|
21
|
+
* 与 OB11 / Milky notice 翻译共用:翻译函数返回 null 时用本函数定位元素打 raw
|
|
22
|
+
* 日志,两协议的日志口径一致(跳过 REVOKE——撤回翻译独立成事件)。
|
|
23
|
+
*/
|
|
24
|
+
function firstUntranslatedGrayTip(msg) {
|
|
25
|
+
for (const el of msg.elements) {
|
|
26
|
+
const g = el.grayTipElement;
|
|
27
|
+
if (g !== void 0 && g.revokeElement === void 0) return g;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { firstUntranslatedGrayTip as n, collectGrayTipUids as t };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=gray-tip-LwBee5mo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gray-tip-LwBee5mo.mjs","names":[],"sources":["../src/core/gray-tip.ts"],"sourcesContent":["/**\n * grayTip 元素工具(OB11 / Satori 共用,2026-08-08 克隆合并)\n *\n * grayTip(系统提示消息)涉及的操作者/成员 uid 需要批量 uid→uin 转换,\n * 两协议翻译层共用同一套收集逻辑。\n */\nimport type { GrayTipElement, RawMessage } from \"@napuketto/kernel\";\n\n/** 非空 uid 才加入集合。 */\nfunction collectUids(uids: Set<string>, ...candidates: Array<string | undefined>): void {\n for (const uid of candidates) {\n if (uid !== undefined && uid !== \"\") {\n uids.add(uid);\n }\n }\n}\n\n/** 收集 grayTip 涉及的 uid(批量 uidToUin 用)。 */\nexport function collectGrayTipUids(msg: RawMessage): string[] {\n const uids = new Set<string>();\n for (const el of msg.elements) {\n const g = el.grayTipElement;\n if (g === undefined) {\n continue;\n }\n collectUids(uids, g.revokeElement?.operatorUid, g.aioOpGrayTipElement?.peerUid);\n const grp = g.groupElement;\n if (grp === undefined) {\n continue;\n }\n collectUids(\n uids,\n grp.memberUid,\n grp.adminUid,\n grp.shutUp?.admin?.uid,\n grp.shutUp?.member?.uid,\n );\n }\n return [...uids];\n}\n\n/**\n * 第一条「已挂载但不可翻译」的 grayTip 元素(校准日志入口)。\n * 与 OB11 / Milky notice 翻译共用:翻译函数返回 null 时用本函数定位元素打 raw\n * 日志,两协议的日志口径一致(跳过 REVOKE——撤回翻译独立成事件)。\n */\nexport function firstUntranslatedGrayTip(msg: RawMessage): GrayTipElement | undefined {\n for (const el of msg.elements) {\n const g = el.grayTipElement;\n if (g !== undefined && g.revokeElement === undefined) {\n return g;\n }\n }\n return undefined;\n}\n"],"mappings":";;AASA,SAAS,YAAY,MAAmB,GAAG,YAA6C;CACpF,KAAK,MAAM,OAAO,YACd,IAAI,QAAQ,KAAA,KAAa,QAAQ,IAC7B,KAAK,IAAI,GAAG;AAGxB;;AAGA,SAAgB,mBAAmB,KAA2B;CAC1D,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,MAAM,IAAI,UAAU;EAC3B,MAAM,IAAI,GAAG;EACb,IAAI,MAAM,KAAA,GACN;EAEJ,YAAY,MAAM,EAAE,eAAe,aAAa,EAAE,qBAAqB,OAAO;EAC9E,MAAM,MAAM,EAAE;EACd,IAAI,QAAQ,KAAA,GACR;EAEJ,YACI,MACA,IAAI,WACJ,IAAI,UACJ,IAAI,QAAQ,OAAO,KACnB,IAAI,QAAQ,QAAQ,GACxB;CACJ;CACA,OAAO,CAAC,GAAG,IAAI;AACnB;;;;;;AAOA,SAAgB,yBAAyB,KAA6C;CAClF,KAAK,MAAM,MAAM,IAAI,UAAU;EAC3B,MAAM,IAAI,GAAG;EACb,IAAI,MAAM,KAAA,KAAa,EAAE,kBAAkB,KAAA,GACvC,OAAO;CAEf;AAEJ"}
|
package/dist/milky/index.d.mts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { i as ProtocolConfig, n as BaseProtocolAdapter, s as ActionRegistry } from "../index-CDKj-jus.mjs";
|
|
2
|
-
import { ChatType, FriendApi, GroupApi, GroupCache, KernelErrorCode, MsgApi, MsgEventChannel, Peer, ProfileApi, RawMessage } from "@napuketto/kernel";
|
|
2
|
+
import { BuddyEventChannel, ChatType, FriendApi, GroupApi, GroupCache, GroupEventChannel, GroupNotifyApi, KernelErrorCode, MsgApi, MsgEventChannel, Peer, ProfileApi, ProfileLikeApi, RawMessage, RichMediaApi, TicketApi, WebApi } from "@napuketto/kernel";
|
|
3
3
|
import { ZodType, z } from "zod";
|
|
4
4
|
import { EventBroadcaster, TransportAdapter } from "@napuketto/network";
|
|
5
5
|
//#region src/milky/helper/seq-index.d.ts
|
|
6
|
+
/** 合并转发 resId → 定位信息(get_forwarded_messages 取 peer 用)。 */
|
|
7
|
+
interface ForwardEntry {
|
|
8
|
+
chatType: ChatType;
|
|
9
|
+
peerUid: string;
|
|
10
|
+
msgId: string;
|
|
11
|
+
}
|
|
6
12
|
declare class MessageSeqIndex {
|
|
7
13
|
/** `${chatType}:${peerUid}:${seq}` → msgId。 */
|
|
8
14
|
private readonly seqToMsg;
|
|
9
15
|
/** msgId → seq 元信息。 */
|
|
10
16
|
private readonly msgToMeta;
|
|
17
|
+
/** 合并转发 resId → 定位信息(P1:get_forwarded_messages)。 */
|
|
18
|
+
private readonly forwards;
|
|
11
19
|
/** 接收链路登记(一条消息双向写入;重复 msgId 覆盖)。 */
|
|
12
20
|
record(msg: RawMessage): void;
|
|
13
21
|
/** seq → msgId(反查;未登记返回 undefined)。 */
|
|
@@ -23,6 +31,13 @@ declare class MessageSeqIndex {
|
|
|
23
31
|
}>;
|
|
24
32
|
/** key 规则(chatType 数值 + peerUid + seq;peerUid 群聊=群号,C2C=uid)。 */
|
|
25
33
|
private key;
|
|
34
|
+
/**
|
|
35
|
+
* 登记合并转发(接收链路:消息含 multiForwardMsgElement 时调用)。
|
|
36
|
+
* resId 是 Milky forward_id 的来源;同一 resId 重复覆盖。
|
|
37
|
+
*/
|
|
38
|
+
recordForward(resId: string, entry: ForwardEntry): void;
|
|
39
|
+
/** resId → 转发定位(get_forwarded_messages;未登记返回 undefined)。 */
|
|
40
|
+
resolveForward(resId: string): ForwardEntry | undefined;
|
|
26
41
|
/** FIFO 淘汰到容量上限内。 */
|
|
27
42
|
private evict;
|
|
28
43
|
}
|
|
@@ -34,10 +49,17 @@ interface MilkyApiOptions {
|
|
|
34
49
|
groupApi: GroupApi;
|
|
35
50
|
friendApi: FriendApi;
|
|
36
51
|
profileApi: ProfileApi;
|
|
37
|
-
/**
|
|
52
|
+
/** P1 扩面依赖(表态度 / 票据 / 精华列表 / 群通知 / 群文件)。 */
|
|
53
|
+
profileLikeApi: ProfileLikeApi;
|
|
54
|
+
ticketApi: TicketApi;
|
|
55
|
+
webApi: WebApi;
|
|
56
|
+
groupNotifyApi: GroupNotifyApi;
|
|
57
|
+
richMediaApi: RichMediaApi;
|
|
58
|
+
/** 登录身份(get_login_info / self_id / target_user_uid 用)。 */
|
|
38
59
|
self: {
|
|
39
60
|
uin: string;
|
|
40
61
|
nickname: string;
|
|
62
|
+
uid?: string;
|
|
41
63
|
};
|
|
42
64
|
/** 群/成员缓存(群实体回填 / get_group_list;未装配时动作直查 api)。 */
|
|
43
65
|
groupCache?: GroupCache;
|
|
@@ -53,9 +75,15 @@ declare class MilkyApi {
|
|
|
53
75
|
readonly groupApi: GroupApi;
|
|
54
76
|
readonly friendApi: FriendApi;
|
|
55
77
|
readonly profileApi: ProfileApi;
|
|
78
|
+
readonly profileLikeApi: ProfileLikeApi;
|
|
79
|
+
readonly ticketApi: TicketApi;
|
|
80
|
+
readonly webApi: WebApi;
|
|
81
|
+
readonly groupNotifyApi: GroupNotifyApi;
|
|
82
|
+
readonly richMediaApi: RichMediaApi;
|
|
56
83
|
readonly self: {
|
|
57
84
|
uin: string;
|
|
58
85
|
nickname: string;
|
|
86
|
+
uid?: string;
|
|
59
87
|
};
|
|
60
88
|
readonly groupCache: GroupCache | undefined;
|
|
61
89
|
readonly qqVersion: string;
|
|
@@ -64,10 +92,15 @@ declare class MilkyApi {
|
|
|
64
92
|
/** message_seq ↔ msgId 双向映射(接收链路 record,动作侧反查)。 */
|
|
65
93
|
readonly seqIndex: MessageSeqIndex;
|
|
66
94
|
constructor(opts: MilkyApiOptions, seqIndex: MessageSeqIndex);
|
|
67
|
-
/** uin → uid(私聊目标 / at
|
|
95
|
+
/** uin → uid(私聊目标 / at 段发送转换 / 群管动作的 uid 入参)。 */
|
|
68
96
|
uinToUid(uins: string[]): Promise<Map<string, string>>;
|
|
69
97
|
/** uid → uin(事件路径 mention 转换)。 */
|
|
70
98
|
uidToUin(uids: string[]): Promise<Map<string, string>>;
|
|
99
|
+
/**
|
|
100
|
+
* uin(数字)→ uid(群管动作入参转换);转换失败抛 INVALID_PARAM
|
|
101
|
+
* (Milky 入参 user_id 都是 uin,kernel 群管 API 要 uid)。
|
|
102
|
+
*/
|
|
103
|
+
resolveUidFromUin(uin: number | string): Promise<string>;
|
|
71
104
|
/**
|
|
72
105
|
* message_scene + 数字 ID → NT Peer。
|
|
73
106
|
* group = 群号直作 peerUid;friend/temp = uin → uid(失败退 uin 原样,交 QQ 端判断)。
|
|
@@ -107,7 +140,7 @@ declare abstract class MilkyAction<TPayload, TReturn> {
|
|
|
107
140
|
}
|
|
108
141
|
//#endregion
|
|
109
142
|
//#region src/milky/action/index.d.ts
|
|
110
|
-
/** Milky 动作注册表(P0
|
|
143
|
+
/** Milky 动作注册表(P0+P1 49 动作)。 */
|
|
111
144
|
declare function createMilkyActionRegistry(opts: {
|
|
112
145
|
api: MilkyApi;
|
|
113
146
|
}): ActionRegistry<MilkyAction<unknown, unknown>>;
|
|
@@ -143,12 +176,18 @@ interface MilkyAdapterOptions extends MilkyApiOptions {
|
|
|
143
176
|
broadcaster: EventBroadcaster;
|
|
144
177
|
/** kernel 消息事件通道(收链路入口)。 */
|
|
145
178
|
msgChannel: MsgEventChannel;
|
|
146
|
-
/**
|
|
179
|
+
/** kernel 群事件通道(P1:群请求/邀请推送;缺省不订阅)。 */
|
|
180
|
+
groupChannel?: GroupEventChannel;
|
|
181
|
+
/** kernel 好友事件通道(P1:好友申请推送;缺省不订阅)。 */
|
|
182
|
+
buddyChannel?: BuddyEventChannel;
|
|
183
|
+
/** 校准日志(webhook 失败 / 启停提示 / 未知事件形状;IPC 模式传 loader pino 实例)。 */
|
|
147
184
|
logger?: MilkyLoggerLike;
|
|
148
185
|
}
|
|
149
186
|
declare class NapukettoMilkyAdapter extends BaseProtocolAdapter<MilkyConfig> {
|
|
150
187
|
readonly protocol = "milky";
|
|
151
188
|
private readonly msgChannel;
|
|
189
|
+
private readonly groupChannel;
|
|
190
|
+
private readonly buddyChannel;
|
|
152
191
|
private readonly calibLogger;
|
|
153
192
|
private readonly api;
|
|
154
193
|
private readonly seqIndex;
|
|
@@ -163,13 +202,23 @@ declare class NapukettoMilkyAdapter extends BaseProtocolAdapter<MilkyConfig> {
|
|
|
163
202
|
private reloadTransports;
|
|
164
203
|
/** 停止:退订 + 关传输。 */
|
|
165
204
|
private stopAll;
|
|
166
|
-
/** 订阅 kernel
|
|
205
|
+
/** 订阅 kernel 事件(消息 + 群通知 + 好友请求,幂等)。 */
|
|
167
206
|
private subscribe;
|
|
168
207
|
/** 退订(幂等)。 */
|
|
169
208
|
private unsubscribeAll;
|
|
170
|
-
/** 单条消息:seq 登记 → grayTip→
|
|
209
|
+
/** 单条消息:seq 登记 → grayTip→notice / 群文件上传 / message_receive(自消息不上报)。 */
|
|
171
210
|
private handleIncoming;
|
|
172
|
-
/**
|
|
211
|
+
/** grayTip → notice 事件广播(REVOKE 走 message_recall,其余走 notice 翻译)。 */
|
|
212
|
+
private broadcastNotice;
|
|
213
|
+
/** notice 翻译上下文(uidToUin 缺省空 Map;logger 透传校准日志)。 */
|
|
214
|
+
private noticeCtx;
|
|
215
|
+
/** 群通知通道:入群请求 / 成员邀请 / 邀请自身(uid→uin 批量后翻译)。 */
|
|
216
|
+
private handleGroupNotifies;
|
|
217
|
+
/** 好友请求通道:Buddy/onBuddyReqChange(防御收窄,未知形状 raw 日志)。 */
|
|
218
|
+
private handleBuddyReqs;
|
|
219
|
+
/** request 翻译上下文(uid→uin 批量转换)。 */
|
|
220
|
+
private requestCtx;
|
|
221
|
+
/** message_receive 组装:at uid→uin + reply 回填 + 群实体回填 + 转发段(全部 fail-soft)。 */
|
|
173
222
|
private buildMessageReceiveEvent;
|
|
174
223
|
/** at uid → uin 批量转换(mention.user_id 用;失败 mention 段跳过)。 */
|
|
175
224
|
private fillMentionUids;
|
|
@@ -177,10 +226,10 @@ declare class NapukettoMilkyAdapter extends BaseProtocolAdapter<MilkyConfig> {
|
|
|
177
226
|
private fillReplyMeta;
|
|
178
227
|
/** 群场景实体回填(GroupCache 缓存优先,失败最小实体兜底)。 */
|
|
179
228
|
private fillGroupEntities;
|
|
180
|
-
/**
|
|
181
|
-
private
|
|
182
|
-
/**
|
|
183
|
-
private
|
|
229
|
+
/** 转发 resId → 定位登记(get_forwarded_messages 反查用)。 */
|
|
230
|
+
private recordForward;
|
|
231
|
+
/** uid 批量 → uin(空集/失败返回 undefined 语义:调用方用空 Map)。 */
|
|
232
|
+
private resolveUidToUin;
|
|
184
233
|
}
|
|
185
234
|
//#endregion
|
|
186
235
|
export { type MilkyAdapterOptions, type MilkyConfig, NapukettoMilkyAdapter, milkyConfigSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/milky/helper/seq-index.ts","../../src/milky/api.ts","../../src/milky/action/error-map.ts","../../src/milky/action/base-action.ts","../../src/milky/action/index.ts","../../src/milky/config.ts","../../src/milky/transport.ts","../../src/milky/adapter.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/milky/helper/seq-index.ts","../../src/milky/api.ts","../../src/milky/action/error-map.ts","../../src/milky/action/base-action.ts","../../src/milky/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