openclaw-quiubo 2.6.4 → 2.6.7
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.js +16 -6
- package/dist/index.js.map +2 -2
- package/dist/src/realtime-gateway.d.ts.map +1 -1
- package/openclaw.plugin.json +26 -8
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -12638,6 +12638,7 @@ var RealtimeGateway = class {
|
|
|
12638
12638
|
// ── Pusher ──────────────────────────────────────────────────────
|
|
12639
12639
|
async startPusher() {
|
|
12640
12640
|
if (!this.pusherConfig) return;
|
|
12641
|
+
this.log.info?.(`[gateway] startPusher called for botIdentityId=${this.botIdentityId}`);
|
|
12641
12642
|
const { key, cluster } = this.pusherConfig;
|
|
12642
12643
|
const apiClient = this.client;
|
|
12643
12644
|
const botIdentityId = this.botIdentityId;
|
|
@@ -12763,7 +12764,7 @@ var RealtimeGateway = class {
|
|
|
12763
12764
|
log.info?.(`[pusher:raw] event=${eventName} data=${JSON.stringify(data).slice(0, 300)}`);
|
|
12764
12765
|
});
|
|
12765
12766
|
channel.bind("new-group-message", (data) => {
|
|
12766
|
-
log.info?.(`Pusher event: messageId=${data.messageId} groupId=${data.groupId} sender=${data.senderUsername} plaintext=${!!data.plaintext}`);
|
|
12767
|
+
log.info?.(`Pusher event: messageId=${data.messageId} groupId=${data.groupId} sender=${data.senderUsername} plaintext=${!!data.plaintext} ciphertext=${!!data.ciphertext} botId=${this.botIdentityId}`);
|
|
12767
12768
|
if (data.senderId === this.botIdentityId) return;
|
|
12768
12769
|
this.shouldProcessMessage(data.groupId, data.senderId, {
|
|
12769
12770
|
fromPusher: true,
|
|
@@ -12790,15 +12791,19 @@ var RealtimeGateway = class {
|
|
|
12790
12791
|
return;
|
|
12791
12792
|
}
|
|
12792
12793
|
if (data.ciphertext && this.keyManager) {
|
|
12794
|
+
log.info?.(`[e2ee:pusher] group=${data.groupId} msg=${data.messageId} ciphertext=${data.ciphertext.length} chars, attempting decrypt`);
|
|
12793
12795
|
const epoch = parseGroupEnvelopeEpoch(data.ciphertext);
|
|
12796
|
+
log.info?.(`[e2ee:pusher] group=${data.groupId} parsed epoch=${epoch}`);
|
|
12794
12797
|
if (epoch !== null) {
|
|
12795
12798
|
this.keyManager.getEpochKey(data.groupId, epoch).then((cached) => {
|
|
12796
12799
|
if (!cached) {
|
|
12797
|
-
log.warn?.(`No epoch key for group=${data.groupId} epoch=${epoch}, skipping`);
|
|
12800
|
+
log.warn?.(`[e2ee:pusher] No epoch key for group=${data.groupId} epoch=${epoch}, skipping`);
|
|
12798
12801
|
return;
|
|
12799
12802
|
}
|
|
12803
|
+
log.info?.(`[e2ee:pusher] group=${data.groupId} got epoch key, decrypting...`);
|
|
12800
12804
|
try {
|
|
12801
12805
|
const plaintext = decryptGroupMessage(data.ciphertext, cached.key);
|
|
12806
|
+
log.info?.(`[e2ee:pusher] group=${data.groupId} decrypted OK: ${plaintext?.length} chars \u2014 routing to onMessage`);
|
|
12802
12807
|
this.cursors.set(data.groupId, data.messageId);
|
|
12803
12808
|
return Promise.resolve(this.onMessage({
|
|
12804
12809
|
messageId: data.messageId,
|
|
@@ -12809,13 +12814,17 @@ var RealtimeGateway = class {
|
|
|
12809
12814
|
createdAt: data.createdAt
|
|
12810
12815
|
}));
|
|
12811
12816
|
} catch (decErr) {
|
|
12812
|
-
log.error?.(`Decryption failed for message ${data.messageId}: ${decErr}`);
|
|
12817
|
+
log.error?.(`[e2ee:pusher] Decryption failed for message ${data.messageId} in group ${data.groupId}: ${decErr}`);
|
|
12813
12818
|
}
|
|
12814
12819
|
}).catch((err) => {
|
|
12815
|
-
log.error?.(`Key fetch failed for message ${data.messageId}: ${err}`);
|
|
12820
|
+
log.error?.(`[e2ee:pusher] Key fetch failed for message ${data.messageId} in group ${data.groupId}: ${err}`);
|
|
12816
12821
|
});
|
|
12817
12822
|
return;
|
|
12823
|
+
} else {
|
|
12824
|
+
log.warn?.(`[e2ee:pusher] group=${data.groupId} parseGroupEnvelopeEpoch returned null \u2014 falling through to fetchAndRoute`);
|
|
12818
12825
|
}
|
|
12826
|
+
} else {
|
|
12827
|
+
log.info?.(`[e2ee:pusher] group=${data.groupId} no ciphertext or no keyManager \u2014 falling through (ciphertext=${!!data.ciphertext}, keyManager=${!!this.keyManager})`);
|
|
12819
12828
|
}
|
|
12820
12829
|
this.fetchAndRouteMessage(data.groupId, data.messageId);
|
|
12821
12830
|
}).catch((err) => {
|
|
@@ -12868,7 +12877,7 @@ var RealtimeGateway = class {
|
|
|
12868
12877
|
// ── Polling (fallback) ──────────────────────────────────────────
|
|
12869
12878
|
startPolling() {
|
|
12870
12879
|
if (this.pollTimer) return;
|
|
12871
|
-
this.log.info?.(`
|
|
12880
|
+
this.log.info?.(`[gateway] startPolling called for botIdentityId=${this.botIdentityId}`);
|
|
12872
12881
|
this.poll();
|
|
12873
12882
|
this.pollTimer = setInterval(() => this.poll(), this.pollIntervalMs);
|
|
12874
12883
|
}
|
|
@@ -12914,6 +12923,7 @@ var RealtimeGateway = class {
|
|
|
12914
12923
|
async pollGroup(groupId) {
|
|
12915
12924
|
try {
|
|
12916
12925
|
const cursor = this.cursors.get(groupId);
|
|
12926
|
+
this.log.info?.(`[poll] polling group=${groupId} cursor=${cursor ?? "none"}`);
|
|
12917
12927
|
const { messages } = await this.client.listMessages(groupId, cursor);
|
|
12918
12928
|
if (messages.length === 0) return;
|
|
12919
12929
|
const lastMessage = messages[messages.length - 1];
|
|
@@ -13496,7 +13506,7 @@ var quiuboPlugin = {
|
|
|
13496
13506
|
pusherConfig = auth.pusher;
|
|
13497
13507
|
log?.info?.(`[${accountId}] Quiubo: authenticated as ${auth.appName} (${auth.appId})`);
|
|
13498
13508
|
if (pusherConfig) {
|
|
13499
|
-
log?.info?.(`[${accountId}] Quiubo: Pusher available (cluster: ${pusherConfig.cluster})`);
|
|
13509
|
+
log?.info?.(`[${accountId}] Quiubo: Pusher available (cluster: ${pusherConfig.cluster}), will subscribe to private-user-${botIdentityId}`);
|
|
13500
13510
|
} else {
|
|
13501
13511
|
log?.info?.(`[${accountId}] Quiubo: Pusher not configured \u2014 using polling`);
|
|
13502
13512
|
}
|