liangzimixin 0.3.63 → 0.3.64
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/index.cjs +57 -6
- package/dist/setup-entry.cjs +57 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -19192,24 +19192,56 @@ var InboundPipeline = class {
|
|
|
19192
19192
|
command: context.text.trim()
|
|
19193
19193
|
});
|
|
19194
19194
|
const cmdPayload = buildInboundPayload(msg, { text: context.text }, this.deps.pluginConfig);
|
|
19195
|
+
log15.info("\u{1F50D} [DEBUG] cmdPayload \u5173\u952E\u5B57\u6BB5", {
|
|
19196
|
+
messageId: msg.messageId,
|
|
19197
|
+
CommandAuthorized: cmdPayload.CommandAuthorized ?? "\u26A0\uFE0F \u672A\u8BBE\u7F6E",
|
|
19198
|
+
CommandBody: String(cmdPayload.CommandBody ?? "").slice(0, 100),
|
|
19199
|
+
RawBody: String(cmdPayload.RawBody ?? "").slice(0, 100),
|
|
19200
|
+
SessionKey: cmdPayload.SessionKey,
|
|
19201
|
+
AccountId: cmdPayload.AccountId,
|
|
19202
|
+
Surface: cmdPayload.Surface,
|
|
19203
|
+
Provider: cmdPayload.Provider,
|
|
19204
|
+
From: cmdPayload.From,
|
|
19205
|
+
To: cmdPayload.To,
|
|
19206
|
+
ChatType: cmdPayload.ChatType,
|
|
19207
|
+
payloadKeys: Object.keys(cmdPayload)
|
|
19208
|
+
});
|
|
19195
19209
|
const cmdCtx = core.channel.reply.finalizeInboundContext(cmdPayload);
|
|
19210
|
+
log15.info("\u{1F50D} [DEBUG] cmdCtx (finalizeInboundContext \u4E4B\u540E)", {
|
|
19211
|
+
messageId: msg.messageId,
|
|
19212
|
+
CommandAuthorized: cmdCtx.CommandAuthorized ?? "\u26A0\uFE0F \u672A\u8BBE\u7F6E",
|
|
19213
|
+
CommandBody: String(cmdCtx.CommandBody ?? "").slice(0, 100),
|
|
19214
|
+
SessionKey: cmdCtx.SessionKey,
|
|
19215
|
+
ctxKeys: Object.keys(cmdCtx)
|
|
19216
|
+
});
|
|
19196
19217
|
const cmdSkipEncrypt = this.deps.pluginConfig.credentials.encryptionMode === "quantum_only" ? false : true;
|
|
19197
19218
|
let deliverCalled = false;
|
|
19198
|
-
|
|
19219
|
+
let deliverCallCount = 0;
|
|
19220
|
+
log15.info("\u{1F680} [DEBUG] \u5F00\u59CB dispatchReplyWithBufferedBlockDispatcher", {
|
|
19221
|
+
messageId: msg.messageId,
|
|
19222
|
+
command: context.text.trim()
|
|
19223
|
+
});
|
|
19224
|
+
const dispatchResult = await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
19199
19225
|
ctx: cmdCtx,
|
|
19200
19226
|
cfg: this.deps.sdkConfig,
|
|
19201
19227
|
dispatcherOptions: {
|
|
19202
19228
|
deliver: async (payload2) => {
|
|
19229
|
+
deliverCallCount++;
|
|
19203
19230
|
deliverCalled = true;
|
|
19204
19231
|
log15.info("\u{1F527} \u547D\u4EE4 deliver \u56DE\u8C03\u6536\u5230", {
|
|
19205
19232
|
messageId: msg.messageId,
|
|
19233
|
+
callIndex: deliverCallCount,
|
|
19206
19234
|
hasText: Boolean(payload2.text),
|
|
19207
19235
|
textLength: payload2.text?.length ?? 0,
|
|
19208
|
-
textPreview: (payload2.text ?? "").slice(0,
|
|
19209
|
-
payloadKeys: Object.keys(payload2)
|
|
19236
|
+
textPreview: (payload2.text ?? "").slice(0, 500),
|
|
19237
|
+
payloadKeys: Object.keys(payload2),
|
|
19238
|
+
fullPayload: JSON.stringify(payload2).slice(0, 1e3)
|
|
19210
19239
|
});
|
|
19211
19240
|
const text = (payload2.text ?? "").trim();
|
|
19212
|
-
if (!text)
|
|
19241
|
+
if (!text) {
|
|
19242
|
+
log15.warn("\u26A0\uFE0F deliver \u6536\u5230\u7A7A\u6587\u672C\uFF0C\u8DF3\u8FC7\u53D1\u9001", { messageId: msg.messageId });
|
|
19243
|
+
return;
|
|
19244
|
+
}
|
|
19213
19245
|
await this.deps.messagePipe.sendMessage({
|
|
19214
19246
|
chatId: msg.chatId,
|
|
19215
19247
|
senderId: msg.senderId,
|
|
@@ -19218,12 +19250,31 @@ var InboundPipeline = class {
|
|
|
19218
19250
|
skipEncrypt: cmdSkipEncrypt
|
|
19219
19251
|
});
|
|
19220
19252
|
},
|
|
19221
|
-
|
|
19222
|
-
log15.
|
|
19253
|
+
onSkip: (payload2, info) => {
|
|
19254
|
+
log15.warn("\u23ED\uFE0F [DEBUG] dispatcher onSkip", {
|
|
19255
|
+
messageId: msg.messageId,
|
|
19256
|
+
reason: info?.reason,
|
|
19257
|
+
payload: JSON.stringify(payload2).slice(0, 300)
|
|
19258
|
+
});
|
|
19259
|
+
},
|
|
19260
|
+
onError: (err, info) => {
|
|
19261
|
+
log15.error("\u274C \u547D\u4EE4\u56DE\u590D\u9519\u8BEF", {
|
|
19262
|
+
messageId: msg.messageId,
|
|
19263
|
+
error: String(err),
|
|
19264
|
+
errorStack: err?.stack?.slice(0, 500),
|
|
19265
|
+
kind: info?.kind
|
|
19266
|
+
});
|
|
19223
19267
|
}
|
|
19224
19268
|
},
|
|
19225
19269
|
replyOptions: {}
|
|
19226
19270
|
});
|
|
19271
|
+
log15.info("\u{1F3C1} [DEBUG] dispatchReplyWithBufferedBlockDispatcher \u5B8C\u6210", {
|
|
19272
|
+
messageId: msg.messageId,
|
|
19273
|
+
command: context.text.trim(),
|
|
19274
|
+
deliverCalled,
|
|
19275
|
+
deliverCallCount,
|
|
19276
|
+
dispatchResult: JSON.stringify(dispatchResult ?? null).slice(0, 500)
|
|
19277
|
+
});
|
|
19227
19278
|
if (!deliverCalled) {
|
|
19228
19279
|
const command = context.text.trim();
|
|
19229
19280
|
const fallbackMessages = {
|
package/dist/setup-entry.cjs
CHANGED
|
@@ -21490,24 +21490,56 @@ var InboundPipeline = class {
|
|
|
21490
21490
|
command: context.text.trim()
|
|
21491
21491
|
});
|
|
21492
21492
|
const cmdPayload = buildInboundPayload(msg, { text: context.text }, this.deps.pluginConfig);
|
|
21493
|
+
log28.info("\u{1F50D} [DEBUG] cmdPayload \u5173\u952E\u5B57\u6BB5", {
|
|
21494
|
+
messageId: msg.messageId,
|
|
21495
|
+
CommandAuthorized: cmdPayload.CommandAuthorized ?? "\u26A0\uFE0F \u672A\u8BBE\u7F6E",
|
|
21496
|
+
CommandBody: String(cmdPayload.CommandBody ?? "").slice(0, 100),
|
|
21497
|
+
RawBody: String(cmdPayload.RawBody ?? "").slice(0, 100),
|
|
21498
|
+
SessionKey: cmdPayload.SessionKey,
|
|
21499
|
+
AccountId: cmdPayload.AccountId,
|
|
21500
|
+
Surface: cmdPayload.Surface,
|
|
21501
|
+
Provider: cmdPayload.Provider,
|
|
21502
|
+
From: cmdPayload.From,
|
|
21503
|
+
To: cmdPayload.To,
|
|
21504
|
+
ChatType: cmdPayload.ChatType,
|
|
21505
|
+
payloadKeys: Object.keys(cmdPayload)
|
|
21506
|
+
});
|
|
21493
21507
|
const cmdCtx = core.channel.reply.finalizeInboundContext(cmdPayload);
|
|
21508
|
+
log28.info("\u{1F50D} [DEBUG] cmdCtx (finalizeInboundContext \u4E4B\u540E)", {
|
|
21509
|
+
messageId: msg.messageId,
|
|
21510
|
+
CommandAuthorized: cmdCtx.CommandAuthorized ?? "\u26A0\uFE0F \u672A\u8BBE\u7F6E",
|
|
21511
|
+
CommandBody: String(cmdCtx.CommandBody ?? "").slice(0, 100),
|
|
21512
|
+
SessionKey: cmdCtx.SessionKey,
|
|
21513
|
+
ctxKeys: Object.keys(cmdCtx)
|
|
21514
|
+
});
|
|
21494
21515
|
const cmdSkipEncrypt = this.deps.pluginConfig.credentials.encryptionMode === "quantum_only" ? false : true;
|
|
21495
21516
|
let deliverCalled = false;
|
|
21496
|
-
|
|
21517
|
+
let deliverCallCount = 0;
|
|
21518
|
+
log28.info("\u{1F680} [DEBUG] \u5F00\u59CB dispatchReplyWithBufferedBlockDispatcher", {
|
|
21519
|
+
messageId: msg.messageId,
|
|
21520
|
+
command: context.text.trim()
|
|
21521
|
+
});
|
|
21522
|
+
const dispatchResult = await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
21497
21523
|
ctx: cmdCtx,
|
|
21498
21524
|
cfg: this.deps.sdkConfig,
|
|
21499
21525
|
dispatcherOptions: {
|
|
21500
21526
|
deliver: async (payload2) => {
|
|
21527
|
+
deliverCallCount++;
|
|
21501
21528
|
deliverCalled = true;
|
|
21502
21529
|
log28.info("\u{1F527} \u547D\u4EE4 deliver \u56DE\u8C03\u6536\u5230", {
|
|
21503
21530
|
messageId: msg.messageId,
|
|
21531
|
+
callIndex: deliverCallCount,
|
|
21504
21532
|
hasText: Boolean(payload2.text),
|
|
21505
21533
|
textLength: payload2.text?.length ?? 0,
|
|
21506
|
-
textPreview: (payload2.text ?? "").slice(0,
|
|
21507
|
-
payloadKeys: Object.keys(payload2)
|
|
21534
|
+
textPreview: (payload2.text ?? "").slice(0, 500),
|
|
21535
|
+
payloadKeys: Object.keys(payload2),
|
|
21536
|
+
fullPayload: JSON.stringify(payload2).slice(0, 1e3)
|
|
21508
21537
|
});
|
|
21509
21538
|
const text = (payload2.text ?? "").trim();
|
|
21510
|
-
if (!text)
|
|
21539
|
+
if (!text) {
|
|
21540
|
+
log28.warn("\u26A0\uFE0F deliver \u6536\u5230\u7A7A\u6587\u672C\uFF0C\u8DF3\u8FC7\u53D1\u9001", { messageId: msg.messageId });
|
|
21541
|
+
return;
|
|
21542
|
+
}
|
|
21511
21543
|
await this.deps.messagePipe.sendMessage({
|
|
21512
21544
|
chatId: msg.chatId,
|
|
21513
21545
|
senderId: msg.senderId,
|
|
@@ -21516,12 +21548,31 @@ var InboundPipeline = class {
|
|
|
21516
21548
|
skipEncrypt: cmdSkipEncrypt
|
|
21517
21549
|
});
|
|
21518
21550
|
},
|
|
21519
|
-
|
|
21520
|
-
log28.
|
|
21551
|
+
onSkip: (payload2, info) => {
|
|
21552
|
+
log28.warn("\u23ED\uFE0F [DEBUG] dispatcher onSkip", {
|
|
21553
|
+
messageId: msg.messageId,
|
|
21554
|
+
reason: info?.reason,
|
|
21555
|
+
payload: JSON.stringify(payload2).slice(0, 300)
|
|
21556
|
+
});
|
|
21557
|
+
},
|
|
21558
|
+
onError: (err, info) => {
|
|
21559
|
+
log28.error("\u274C \u547D\u4EE4\u56DE\u590D\u9519\u8BEF", {
|
|
21560
|
+
messageId: msg.messageId,
|
|
21561
|
+
error: String(err),
|
|
21562
|
+
errorStack: err?.stack?.slice(0, 500),
|
|
21563
|
+
kind: info?.kind
|
|
21564
|
+
});
|
|
21521
21565
|
}
|
|
21522
21566
|
},
|
|
21523
21567
|
replyOptions: {}
|
|
21524
21568
|
});
|
|
21569
|
+
log28.info("\u{1F3C1} [DEBUG] dispatchReplyWithBufferedBlockDispatcher \u5B8C\u6210", {
|
|
21570
|
+
messageId: msg.messageId,
|
|
21571
|
+
command: context.text.trim(),
|
|
21572
|
+
deliverCalled,
|
|
21573
|
+
deliverCallCount,
|
|
21574
|
+
dispatchResult: JSON.stringify(dispatchResult ?? null).slice(0, 500)
|
|
21575
|
+
});
|
|
21525
21576
|
if (!deliverCalled) {
|
|
21526
21577
|
const command = context.text.trim();
|
|
21527
21578
|
const fallbackMessages = {
|