@adhdev/daemon-core 0.9.82-rc.248 → 0.9.82-rc.249
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 +3 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -17
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-events-coordinator.d.ts +0 -21
- package/package.json +1 -1
- package/src/mesh/mesh-events-coordinator.ts +7 -23
|
@@ -39,7 +39,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
39
39
|
duplicateCompletion?: undefined;
|
|
40
40
|
duplicateStopped?: undefined;
|
|
41
41
|
error?: undefined;
|
|
42
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
43
42
|
} | {
|
|
44
43
|
success: boolean;
|
|
45
44
|
forwarded: number;
|
|
@@ -52,7 +51,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
52
51
|
duplicateCompletion?: undefined;
|
|
53
52
|
duplicateStopped?: undefined;
|
|
54
53
|
error?: undefined;
|
|
55
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
56
54
|
} | {
|
|
57
55
|
success: boolean;
|
|
58
56
|
forwarded: number;
|
|
@@ -65,7 +63,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
65
63
|
duplicateCompletion?: undefined;
|
|
66
64
|
duplicateStopped?: undefined;
|
|
67
65
|
error?: undefined;
|
|
68
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
69
66
|
} | {
|
|
70
67
|
success: boolean;
|
|
71
68
|
forwarded: number;
|
|
@@ -78,7 +75,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
78
75
|
duplicateCompletion?: undefined;
|
|
79
76
|
duplicateStopped?: undefined;
|
|
80
77
|
error?: undefined;
|
|
81
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
82
78
|
} | {
|
|
83
79
|
success: boolean;
|
|
84
80
|
forwarded: number;
|
|
@@ -91,7 +87,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
91
87
|
duplicateApproval?: undefined;
|
|
92
88
|
duplicateStopped?: undefined;
|
|
93
89
|
error?: undefined;
|
|
94
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
95
90
|
} | {
|
|
96
91
|
success: boolean;
|
|
97
92
|
forwarded: number;
|
|
@@ -104,7 +99,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
104
99
|
duplicateApproval?: undefined;
|
|
105
100
|
duplicateStopped?: undefined;
|
|
106
101
|
error?: undefined;
|
|
107
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
108
102
|
} | {
|
|
109
103
|
success: boolean;
|
|
110
104
|
forwarded: number;
|
|
@@ -117,7 +111,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
117
111
|
duplicateApproval?: undefined;
|
|
118
112
|
duplicateCompletion?: undefined;
|
|
119
113
|
error?: undefined;
|
|
120
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
121
114
|
} | {
|
|
122
115
|
success: boolean;
|
|
123
116
|
forwarded: number;
|
|
@@ -130,20 +123,6 @@ export declare function handleMeshForwardEvent(components: DaemonComponents, pay
|
|
|
130
123
|
duplicateCompletion?: undefined;
|
|
131
124
|
duplicateStopped?: undefined;
|
|
132
125
|
error?: undefined;
|
|
133
|
-
bufferedForGeneratingCoordinator?: undefined;
|
|
134
|
-
} | {
|
|
135
|
-
success: boolean;
|
|
136
|
-
forwarded: number;
|
|
137
|
-
bufferedForGeneratingCoordinator: boolean;
|
|
138
|
-
suppressed?: undefined;
|
|
139
|
-
intentionalCleanupStop?: undefined;
|
|
140
|
-
terminalLedgerEvidence?: undefined;
|
|
141
|
-
terminalLedgerKind?: undefined;
|
|
142
|
-
duplicateRefineTerminalEvent?: undefined;
|
|
143
|
-
duplicateApproval?: undefined;
|
|
144
|
-
duplicateCompletion?: undefined;
|
|
145
|
-
duplicateStopped?: undefined;
|
|
146
|
-
error?: undefined;
|
|
147
126
|
} | {
|
|
148
127
|
success: boolean;
|
|
149
128
|
error: string;
|
package/package.json
CHANGED
|
@@ -1318,8 +1318,6 @@ function injectMeshSystemMessage(components: DaemonComponents, args: {
|
|
|
1318
1318
|
return true;
|
|
1319
1319
|
});
|
|
1320
1320
|
|
|
1321
|
-
const isTerminalEvent = new Set(['refine:completed', 'refine:failed', 'agent:generating_completed', 'agent:stopped']).has(args.event);
|
|
1322
|
-
|
|
1323
1321
|
if (coordinatorInstances.length === 0) {
|
|
1324
1322
|
if (queuePendingMeshCoordinatorEvent({
|
|
1325
1323
|
event: args.event,
|
|
@@ -1340,18 +1338,12 @@ function injectMeshSystemMessage(components: DaemonComponents, args: {
|
|
|
1340
1338
|
return { success: true, forwarded: 0 };
|
|
1341
1339
|
}
|
|
1342
1340
|
|
|
1343
|
-
//
|
|
1344
|
-
//
|
|
1345
|
-
//
|
|
1346
|
-
|
|
1347
|
-
const
|
|
1348
|
-
|
|
1349
|
-
const status = readNonEmptyString(s.status).toLowerCase();
|
|
1350
|
-
const activeChatStatus = readNonEmptyString(s.activeChat?.status).toLowerCase();
|
|
1351
|
-
return activeStatuses.has(status) || activeStatuses.has(activeChatStatus);
|
|
1352
|
-
});
|
|
1353
|
-
|
|
1354
|
-
if (!isTerminalEvent || allCoordinatorsGenerating) {
|
|
1341
|
+
// Non-terminal events are also queued for MCP coordinator dual delivery.
|
|
1342
|
+
// Terminal events are forwarded directly without buffering — previously
|
|
1343
|
+
// they were buffered when coordinators were generating and auto-flushed on
|
|
1344
|
+
// idle, but auto-flush was unreliable and events were silently lost.
|
|
1345
|
+
const isTerminalEvent = new Set(['refine:completed', 'refine:failed', 'agent:generating_completed', 'agent:stopped']).has(args.event);
|
|
1346
|
+
if (!isTerminalEvent) {
|
|
1355
1347
|
if (queuePendingMeshCoordinatorEvent({
|
|
1356
1348
|
event: args.event,
|
|
1357
1349
|
meshId: args.meshId,
|
|
@@ -1366,18 +1358,10 @@ function injectMeshSystemMessage(components: DaemonComponents, args: {
|
|
|
1366
1358
|
queuedAt: Date.now(),
|
|
1367
1359
|
...(workerCoordinatorDaemonId ? { targetCoordinatorDaemonId: workerCoordinatorDaemonId } : {}),
|
|
1368
1360
|
})) {
|
|
1369
|
-
|
|
1370
|
-
LOG.info('MeshEvents', `Queued ${args.event} for generating CLI coordinator (mesh ${args.meshId}) — will be delivered via auto-flush when coordinator returns to idle`);
|
|
1371
|
-
} else {
|
|
1372
|
-
LOG.info('MeshEvents', `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
|
|
1373
|
-
}
|
|
1361
|
+
LOG.info('MeshEvents', `Queued ${args.event} for MCP coordinator (mesh ${args.meshId})`);
|
|
1374
1362
|
}
|
|
1375
1363
|
}
|
|
1376
1364
|
|
|
1377
|
-
if (allCoordinatorsGenerating) {
|
|
1378
|
-
return { success: true, forwarded: 0, bufferedForGeneratingCoordinator: true };
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
1365
|
for (const coord of coordinatorInstances) {
|
|
1382
1366
|
const coordState = coord.getState();
|
|
1383
1367
|
LOG.info('MeshEvents', `Forwarding mesh event to coordinator ${coordState.instanceId}`);
|