@adhdev/daemon-core 0.9.82-rc.193 → 0.9.82-rc.195

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.mjs CHANGED
@@ -5373,6 +5373,22 @@ function injectMeshSystemMessage(components, args) {
5373
5373
  return { success: true, forwarded: 0, suppressed: true, duplicateCompletion: true };
5374
5374
  }
5375
5375
  }
5376
+ if (args.event === "agent:stopped" && eventSessionId) {
5377
+ const duplicateStopped = isDuplicateMeshCompletionEvent({
5378
+ meshId: args.meshId,
5379
+ event: args.event,
5380
+ sessionId: eventSessionId,
5381
+ providerType: readNonEmptyString2(args.metadataEvent.providerType) || void 0,
5382
+ providerSessionId: readNonEmptyString2(args.metadataEvent.providerSessionId) || void 0,
5383
+ timestamp: eventTimestamp,
5384
+ finalSummary: readNonEmptyString2(args.metadataEvent.finalSummary) || void 0,
5385
+ coordinatorDaemonId: workerCoordinatorDaemonId || void 0
5386
+ });
5387
+ if (duplicateStopped) {
5388
+ LOG.info("MeshEvents", `Suppressed duplicate stopped event for mesh ${args.meshId} session ${eventSessionId}`);
5389
+ return { success: true, forwarded: 0, suppressed: true, duplicateStopped: true };
5390
+ }
5391
+ }
5376
5392
  function markSessionTerminal(sessionId, outcome, occurredAtMs) {
5377
5393
  const task = updateSessionTaskStatus(args.meshId, sessionId, outcome, {
5378
5394
  occurredAt: occurredAtMs != null ? new Date(occurredAtMs).toISOString() : void 0
@@ -11420,7 +11436,10 @@ function buildClaudeInteractiveTuiAnswerSteps(prompt, response) {
11420
11436
  if (answer.selectedLabels.length !== 1) throw new Error(`Expected one selected label for ${question.questionId}`);
11421
11437
  const selectedIndex = question.options.findIndex((option) => option.label === answer.selectedLabels[0]);
11422
11438
  if (selectedIndex < 0) throw new Error(`Unknown option for ${question.questionId}: ${answer.selectedLabels[0]}`);
11423
- steps.push(`${"\x1B[B".repeat(selectedIndex)}\r`);
11439
+ for (let i = 0; i < selectedIndex; i += 1) {
11440
+ steps.push("\x1B[B");
11441
+ }
11442
+ steps.push("\r");
11424
11443
  }
11425
11444
  steps.push("\r");
11426
11445
  return steps;
@@ -28769,6 +28788,11 @@ var CliProviderInstance = class {
28769
28788
  }
28770
28789
  });
28771
28790
  this.generatingStartedAt = 0;
28791
+ if (this.completedDebounceTimer) {
28792
+ clearTimeout(this.completedDebounceTimer);
28793
+ this.completedDebounceTimer = null;
28794
+ }
28795
+ this.completedDebouncePending = null;
28772
28796
  continue;
28773
28797
  }
28774
28798
  this.pushEvent({ event: me.type, agentKey: me.agentKey, message: me.message, elapsedSec: me.elapsedSec, timestamp: me.timestamp });