adp-openclaw 0.0.18 → 0.0.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/monitor.ts +5 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adp-openclaw",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "ADP-OpenClaw demo channel plugin (Go WebSocket backend)",
5
5
  "type": "module",
6
6
  "dependencies": {
package/src/monitor.ts CHANGED
@@ -379,28 +379,11 @@ async function connectAndHandle(params: ConnectParams): Promise<void> {
379
379
  // Debug log for all deliver calls - log the actual info object
380
380
  log?.info(`[adp-openclaw] deliver called: kind=${kind}, text.length=${text.length}, info=${JSON.stringify(info)}`);
381
381
 
382
- // Handle streaming block - send chunk via WebSocket
383
- if (kind === "block" && text) {
384
- log?.debug?.(`[adp-openclaw] Streaming block[${chunkIndex}] to ${displayName}: ${text.slice(0, 30)}...`);
385
-
386
- const chunkMsg: WSMessage = {
387
- type: MsgType.OutboundChunk,
388
- requestId: generateRequestId(),
389
- payload: {
390
- to: inMsg.from,
391
- chunk: text,
392
- conversationId: inMsg.conversationId,
393
- recordId: inMsg.recordId, // Pass recordId back to server
394
- streamId: streamId,
395
- index: chunkIndex,
396
- isPartial: true, // Mark as partial chunk, final data will be in outbound_end
397
- user: inMsg.user,
398
- },
399
- timestamp: Date.now(),
400
- };
401
-
402
- ws.send(JSON.stringify(chunkMsg));
403
- chunkIndex++;
382
+ // Handle streaming block - IGNORE because handlePartial already sent deltas
383
+ // The "block" callback contains cumulative text (same as final), not incremental delta
384
+ // Sending it would cause duplicate data on the server side
385
+ if (kind === "block") {
386
+ log?.debug?.(`[adp-openclaw] Ignoring block callback (handlePartial already sent deltas), text.length=${text.length}`);
404
387
  return;
405
388
  }
406
389