@adhdev/daemon-core 0.9.77-rc.19 → 0.9.77-rc.20

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
@@ -1399,6 +1399,15 @@ function injectMeshSystemMessage(components, args) {
1399
1399
  }, 500);
1400
1400
  }
1401
1401
  }
1402
+ } else if (args.event === "agent:ready") {
1403
+ const sessionId = readNonEmptyString(args.metadataEvent.targetSessionId);
1404
+ const nodeId = readNonEmptyString(args.metadataEvent.nodeId) || readNonEmptyString(args.metadataEvent.meshNodeId);
1405
+ const providerType = readNonEmptyString(args.metadataEvent.providerType);
1406
+ if (sessionId && nodeId && providerType) {
1407
+ setTimeout(() => {
1408
+ tryAssignQueueTask(components, args.meshId, nodeId, sessionId, providerType);
1409
+ }, 500);
1410
+ }
1402
1411
  } else if (args.event === "agent:stopped") {
1403
1412
  const sessionId = readNonEmptyString(args.metadataEvent.targetSessionId);
1404
1413
  if (sessionId) {
@@ -1578,6 +1587,7 @@ var init_mesh_events = __esm({
1578
1587
  "agent:generating_completed",
1579
1588
  "agent:waiting_approval",
1580
1589
  "agent:stopped",
1590
+ "agent:ready",
1581
1591
  "monitor:long_generating"
1582
1592
  ]);
1583
1593
  EVENT_TO_LEDGER_KIND = {
@@ -16623,6 +16633,8 @@ var CliProviderInstance = class {
16623
16633
  this.completedDebounceTimer = null;
16624
16634
  }, 3e3);
16625
16635
  }
16636
+ } else if (newStatus === "idle" && this.lastStatus === "starting") {
16637
+ this.pushEvent({ event: "agent:ready", chatTitle, timestamp: now });
16626
16638
  } else if (newStatus === "stopped") {
16627
16639
  if (this.generatingDebounceTimer) {
16628
16640
  clearTimeout(this.generatingDebounceTimer);