@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.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/mesh/mesh-events.ts +11 -0
- package/src/providers/cli-provider-instance.ts +2 -0
package/package.json
CHANGED
package/src/mesh/mesh-events.ts
CHANGED
|
@@ -37,6 +37,7 @@ const MESH_COORDINATOR_EVENTS = new Set([
|
|
|
37
37
|
'agent:generating_completed',
|
|
38
38
|
'agent:waiting_approval',
|
|
39
39
|
'agent:stopped',
|
|
40
|
+
'agent:ready',
|
|
40
41
|
'monitor:long_generating',
|
|
41
42
|
]);
|
|
42
43
|
|
|
@@ -183,6 +184,16 @@ function injectMeshSystemMessage(components: DaemonComponents, args: {
|
|
|
183
184
|
}, 500);
|
|
184
185
|
}
|
|
185
186
|
}
|
|
187
|
+
} else if (args.event === 'agent:ready') {
|
|
188
|
+
const sessionId = readNonEmptyString(args.metadataEvent.targetSessionId);
|
|
189
|
+
const nodeId = readNonEmptyString(args.metadataEvent.nodeId) || readNonEmptyString(args.metadataEvent.meshNodeId);
|
|
190
|
+
const providerType = readNonEmptyString(args.metadataEvent.providerType);
|
|
191
|
+
|
|
192
|
+
if (sessionId && nodeId && providerType) {
|
|
193
|
+
setTimeout(() => {
|
|
194
|
+
tryAssignQueueTask(components, args.meshId, nodeId, sessionId, providerType);
|
|
195
|
+
}, 500);
|
|
196
|
+
}
|
|
186
197
|
} else if (args.event === 'agent:stopped') {
|
|
187
198
|
const sessionId = readNonEmptyString(args.metadataEvent.targetSessionId);
|
|
188
199
|
if (sessionId) {
|
|
@@ -833,6 +833,8 @@ export class CliProviderInstance implements ProviderInstance {
|
|
|
833
833
|
this.completedDebounceTimer = null;
|
|
834
834
|
}, 3000);
|
|
835
835
|
}
|
|
836
|
+
} else if (newStatus === 'idle' && this.lastStatus === 'starting') {
|
|
837
|
+
this.pushEvent({ event: 'agent:ready', chatTitle, timestamp: now });
|
|
836
838
|
} else if (newStatus === 'stopped') {
|
|
837
839
|
// Cancel any pending debounce
|
|
838
840
|
if (this.generatingDebounceTimer) { clearTimeout(this.generatingDebounceTimer); this.generatingDebounceTimer = null; }
|