@adhdev/daemon-core 0.9.76-rc.67 → 0.9.76-rc.69

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
@@ -1608,8 +1608,10 @@ var init_provider_cli_shared = __esm({
1608
1608
  return;
1609
1609
  }
1610
1610
  while (line.length < this.col) line.push(" ");
1611
+ const wide = isWideCodePoint(ch);
1611
1612
  line[this.col] = ch;
1612
- this.col += isWideCodePoint(ch) ? 2 : 1;
1613
+ if (wide) line[this.col + 1] = "";
1614
+ this.col += wide ? 2 : 1;
1613
1615
  }
1614
1616
  consumeEscape(seq) {
1615
1617
  if (seq.length < 2) return 0;
@@ -21159,6 +21161,11 @@ function normalizeExistingPath(filePath) {
21159
21161
  // src/mesh/mesh-events.ts
21160
21162
  init_mesh_config();
21161
21163
  init_logger();
21164
+ var MAX_PENDING_EVENTS = 50;
21165
+ var pendingMeshCoordinatorEvents = [];
21166
+ function drainPendingMeshCoordinatorEvents() {
21167
+ return pendingMeshCoordinatorEvents.splice(0);
21168
+ }
21162
21169
  function readNonEmptyString(value) {
21163
21170
  return typeof value === "string" && value.trim() ? value.trim() : "";
21164
21171
  }
@@ -21202,7 +21209,19 @@ function injectMeshSystemMessage(components, args) {
21202
21209
  if (args.sourceInstanceId && instState.instanceId === args.sourceInstanceId) return false;
21203
21210
  return true;
21204
21211
  });
21205
- if (coordinatorInstances.length === 0) return { success: true, forwarded: 0 };
21212
+ if (coordinatorInstances.length === 0) {
21213
+ if (pendingMeshCoordinatorEvents.length < MAX_PENDING_EVENTS) {
21214
+ pendingMeshCoordinatorEvents.push({
21215
+ event: args.event,
21216
+ meshId: args.meshId,
21217
+ nodeLabel: args.nodeLabel,
21218
+ metadataEvent: args.metadataEvent,
21219
+ queuedAt: Date.now()
21220
+ });
21221
+ LOG.info("MeshEvents", `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
21222
+ }
21223
+ return { success: true, forwarded: 0 };
21224
+ }
21206
21225
  const messageText = buildMeshSystemMessage({
21207
21226
  event: args.event,
21208
21227
  nodeLabel: args.nodeLabel,
@@ -22382,6 +22401,10 @@ var DaemonCommandRouter = class {
22382
22401
  case "mesh_forward_event": {
22383
22402
  return handleMeshForwardEvent({ instanceManager: this.deps.instanceManager }, args);
22384
22403
  }
22404
+ case "get_pending_mesh_events": {
22405
+ const events = drainPendingMeshCoordinatorEvents();
22406
+ return { success: true, events };
22407
+ }
22385
22408
  case "launch_cli":
22386
22409
  case "stop_cli":
22387
22410
  case "set_cli_view_mode":