@adhdev/daemon-standalone 0.9.77-rc.20 → 0.9.77-rc.21
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 +10 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +10 -5
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -26258,7 +26258,9 @@ function formatCompletionMetadata(event) {
|
|
|
26258
26258
|
}
|
|
26259
26259
|
function tryAssignQueueTask(components, meshId, nodeId, sessionId, providerType) {
|
|
26260
26260
|
const task = claimNextTask(meshId, nodeId, sessionId);
|
|
26261
|
-
if (!task)
|
|
26261
|
+
if (!task) {
|
|
26262
|
+
return false;
|
|
26263
|
+
}
|
|
26262
26264
|
LOG.info("MeshQueue", `Node ${nodeId} (${sessionId}) pulled task ${task.id}`);
|
|
26263
26265
|
components.cliManager.handleCliCommand("agent_command", {
|
|
26264
26266
|
targetSessionId: sessionId,
|
|
@@ -26336,7 +26338,7 @@ Do NOT retry on this node. Consider reassigning to a different node or asking th
|
|
|
26336
26338
|
function injectMeshSystemMessage(components, args) {
|
|
26337
26339
|
if (args.event === "agent:generating_completed") {
|
|
26338
26340
|
const sessionId = readNonEmptyString(args.metadataEvent.targetSessionId);
|
|
26339
|
-
const nodeId = readNonEmptyString(args.
|
|
26341
|
+
const nodeId = readNonEmptyString(args.nodeId) || readNonEmptyString(args.metadataEvent.meshNodeId);
|
|
26340
26342
|
const providerType = readNonEmptyString(args.metadataEvent.providerType);
|
|
26341
26343
|
if (sessionId) {
|
|
26342
26344
|
updateSessionTaskStatus(args.meshId, sessionId, "completed");
|
|
@@ -26348,7 +26350,7 @@ function injectMeshSystemMessage(components, args) {
|
|
|
26348
26350
|
}
|
|
26349
26351
|
} else if (args.event === "agent:ready") {
|
|
26350
26352
|
const sessionId = readNonEmptyString(args.metadataEvent.targetSessionId);
|
|
26351
|
-
const nodeId = readNonEmptyString(args.
|
|
26353
|
+
const nodeId = readNonEmptyString(args.nodeId) || readNonEmptyString(args.metadataEvent.meshNodeId);
|
|
26352
26354
|
const providerType = readNonEmptyString(args.metadataEvent.providerType);
|
|
26353
26355
|
if (sessionId && nodeId && providerType) {
|
|
26354
26356
|
setTimeout(() => {
|
|
@@ -26366,7 +26368,7 @@ function injectMeshSystemMessage(components, args) {
|
|
|
26366
26368
|
try {
|
|
26367
26369
|
appendLedgerEntry(args.meshId, {
|
|
26368
26370
|
kind: ledgerKind,
|
|
26369
|
-
nodeId: readNonEmptyString(args.
|
|
26371
|
+
nodeId: readNonEmptyString(args.nodeId) || readNonEmptyString(args.metadataEvent.meshNodeId) || void 0,
|
|
26370
26372
|
sessionId: readNonEmptyString(args.metadataEvent.targetSessionId) || void 0,
|
|
26371
26373
|
providerType: readNonEmptyString(args.metadataEvent.providerType) || void 0,
|
|
26372
26374
|
payload: {
|
|
@@ -26386,7 +26388,7 @@ function injectMeshSystemMessage(components, args) {
|
|
|
26386
26388
|
const maxRetries = mesh?.policy?.maxTaskRetries ?? 1;
|
|
26387
26389
|
recoveryContext = getSessionRecoveryContext(args.meshId, {
|
|
26388
26390
|
sessionId: readNonEmptyString(args.metadataEvent.targetSessionId) || void 0,
|
|
26389
|
-
nodeId: readNonEmptyString(args.
|
|
26391
|
+
nodeId: readNonEmptyString(args.nodeId) || readNonEmptyString(args.metadataEvent.meshNodeId) || void 0,
|
|
26390
26392
|
maxRetries
|
|
26391
26393
|
});
|
|
26392
26394
|
recoveryContext.failedProviderType = readNonEmptyString(args.metadataEvent.providerType) || null;
|
|
@@ -26481,6 +26483,7 @@ function handleMeshForwardEvent(components, payload) {
|
|
|
26481
26483
|
const nodeLabel = nodeId ? `Node '${nodeId}'` : workspace ? `Agent at ${workspace}` : "Remote agent";
|
|
26482
26484
|
return injectMeshSystemMessage(components, {
|
|
26483
26485
|
meshId,
|
|
26486
|
+
nodeId,
|
|
26484
26487
|
nodeLabel,
|
|
26485
26488
|
event: eventName,
|
|
26486
26489
|
metadataEvent: {
|
|
@@ -26510,10 +26513,12 @@ function setupMeshEventForwarding(components) {
|
|
|
26510
26513
|
if (!meshId) return;
|
|
26511
26514
|
const targetNode = mesh?.nodes?.find((n) => n.workspace === workspace);
|
|
26512
26515
|
const runtimeNodeId = readNonEmptyString(settings.meshNodeId);
|
|
26516
|
+
const resolvedNodeId = targetNode?.id || runtimeNodeId;
|
|
26513
26517
|
const nodeLabel = targetNode ? `Node '${targetNode.id}'` : runtimeNodeId ? `Node '${runtimeNodeId}'` : `Agent at ${workspace}`;
|
|
26514
26518
|
injectMeshSystemMessage(components, {
|
|
26515
26519
|
meshId,
|
|
26516
26520
|
sourceInstanceId: instanceId,
|
|
26521
|
+
nodeId: resolvedNodeId,
|
|
26517
26522
|
nodeLabel,
|
|
26518
26523
|
event: event.event,
|
|
26519
26524
|
metadataEvent: event
|