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

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 CHANGED
@@ -5378,6 +5378,22 @@ function injectMeshSystemMessage(components, args) {
5378
5378
  return { success: true, forwarded: 0, suppressed: true, duplicateCompletion: true };
5379
5379
  }
5380
5380
  }
5381
+ if (args.event === "agent:stopped" && eventSessionId) {
5382
+ const duplicateStopped = isDuplicateMeshCompletionEvent({
5383
+ meshId: args.meshId,
5384
+ event: args.event,
5385
+ sessionId: eventSessionId,
5386
+ providerType: readNonEmptyString2(args.metadataEvent.providerType) || void 0,
5387
+ providerSessionId: readNonEmptyString2(args.metadataEvent.providerSessionId) || void 0,
5388
+ timestamp: eventTimestamp,
5389
+ finalSummary: readNonEmptyString2(args.metadataEvent.finalSummary) || void 0,
5390
+ coordinatorDaemonId: workerCoordinatorDaemonId || void 0
5391
+ });
5392
+ if (duplicateStopped) {
5393
+ LOG.info("MeshEvents", `Suppressed duplicate stopped event for mesh ${args.meshId} session ${eventSessionId}`);
5394
+ return { success: true, forwarded: 0, suppressed: true, duplicateStopped: true };
5395
+ }
5396
+ }
5381
5397
  function markSessionTerminal(sessionId, outcome, occurredAtMs) {
5382
5398
  const task = updateSessionTaskStatus(args.meshId, sessionId, outcome, {
5383
5399
  occurredAt: occurredAtMs != null ? new Date(occurredAtMs).toISOString() : void 0
@@ -11730,7 +11746,10 @@ function buildClaudeInteractiveTuiAnswerSteps(prompt, response) {
11730
11746
  if (answer.selectedLabels.length !== 1) throw new Error(`Expected one selected label for ${question.questionId}`);
11731
11747
  const selectedIndex = question.options.findIndex((option) => option.label === answer.selectedLabels[0]);
11732
11748
  if (selectedIndex < 0) throw new Error(`Unknown option for ${question.questionId}: ${answer.selectedLabels[0]}`);
11733
- steps.push(`${"\x1B[B".repeat(selectedIndex)}\r`);
11749
+ for (let i = 0; i < selectedIndex; i += 1) {
11750
+ steps.push("\x1B[B");
11751
+ }
11752
+ steps.push("\r");
11734
11753
  }
11735
11754
  steps.push("\r");
11736
11755
  return steps;
@@ -29079,6 +29098,11 @@ var CliProviderInstance = class {
29079
29098
  }
29080
29099
  });
29081
29100
  this.generatingStartedAt = 0;
29101
+ if (this.completedDebounceTimer) {
29102
+ clearTimeout(this.completedDebounceTimer);
29103
+ this.completedDebounceTimer = null;
29104
+ }
29105
+ this.completedDebouncePending = null;
29082
29106
  continue;
29083
29107
  }
29084
29108
  this.pushEvent({ event: me.type, agentKey: me.agentKey, message: me.message, elapsedSec: me.elapsedSec, timestamp: me.timestamp });