@efengx/openclaw-channel-dragon 0.3.3 → 0.3.5
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 +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -177,11 +177,17 @@ async function startPolling(ctx) {
|
|
|
177
177
|
const dataStr = dataLines.join('\n');
|
|
178
178
|
try {
|
|
179
179
|
const evt = JSON.parse(dataStr);
|
|
180
|
-
if (!evt
|
|
180
|
+
if (!evt)
|
|
181
181
|
continue;
|
|
182
182
|
if (evt.type === 'WORKBENCH_MESSAGE') {
|
|
183
183
|
const sendTs = evt.payload?.ts || 0;
|
|
184
184
|
const latency = sendTs ? (Date.now() - sendTs) : 'unknown';
|
|
185
|
+
// Critical Log: Confirm receipt of SSE message
|
|
186
|
+
logger?.info?.(`dragon channel: [SSE] RECEIVED WORKBENCH_MESSAGE. agentId=${evt.agentId} (Current Config: ${agentId}), sessionId=${evt.payload?.sessionId}, latency=${latency}ms`);
|
|
187
|
+
if (evt.agentId !== agentId) {
|
|
188
|
+
logger?.warn?.(`dragon channel: [SSE] ID Mismatch! Event ID "${evt.agentId}" !== Config ID "${agentId}". Ignoring message.`);
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
185
191
|
logger?.info?.(`dragon channel: [DEBUG] Received WORKBENCH_MESSAGE via SSE. AgentID=${evt.agentId}, ContentLen=${evt.payload?.content?.length}, Latency=${latency}ms`);
|
|
186
192
|
logger?.info?.(`dragon channel: [DEBUG] Payload Content: "${evt.payload?.content?.substring(0, 500)}"`);
|
|
187
193
|
logger?.info?.(`dragon channel: [DEBUG] Current Account Config: ${JSON.stringify(account)}`);
|