@adhdev/daemon-core 0.9.82-rc.289 → 0.9.82-rc.290
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 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/mesh/mesh-events-coordinator.ts +15 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-core",
|
|
3
|
-
"version": "0.9.82-rc.
|
|
3
|
+
"version": "0.9.82-rc.290",
|
|
4
4
|
"description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"author": "vilmire",
|
|
47
47
|
"license": "AGPL-3.0-or-later",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@adhdev/mesh-shared": "0.9.82-rc.
|
|
49
|
+
"@adhdev/mesh-shared": "0.9.82-rc.290",
|
|
50
50
|
"@adhdev/session-host-core": "*",
|
|
51
51
|
"@agentclientprotocol/sdk": "^0.16.1",
|
|
52
52
|
"ajv": "^8.20.0",
|
|
@@ -255,7 +255,7 @@ export function tryAssignQueueTask(
|
|
|
255
255
|
providerType: string
|
|
256
256
|
): boolean {
|
|
257
257
|
const mesh = getMeshWithCache(components, meshId);
|
|
258
|
-
const node = mesh?.nodes.find((n: any) => n
|
|
258
|
+
const node = mesh?.nodes.find((n: any) => readMeshNodeId(n) === nodeId);
|
|
259
259
|
const capabilityTags = buildMeshNodeCapabilityTags(node, providerType);
|
|
260
260
|
const task = claimNextTask(meshId, nodeId, sessionId, capabilityTags);
|
|
261
261
|
if (!task) {
|
|
@@ -603,6 +603,18 @@ async function resolveUsableProvider(
|
|
|
603
603
|
return { reason: `provider_priority_unusable: ${failed.join('; ') || nodeId}` };
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
+
// Canonical mesh node-id normalization. A node may arrive from the local config
|
|
607
|
+
// form (`id`) or the inline-cache form (`nodeId`/`node_id`) — see
|
|
608
|
+
// readInlineMeshNodeId in commands/router.ts. Comparing only `node.id` against a
|
|
609
|
+
// task.targetNodeId silently drops inline-cached worktree nodes, leaving a
|
|
610
|
+
// target-routed task permanently pending with a misleading
|
|
611
|
+
// `no_node_satisfies_required_tags` skip.
|
|
612
|
+
function readMeshNodeId(node: any): string {
|
|
613
|
+
return readNonEmptyString(node?.id)
|
|
614
|
+
|| readNonEmptyString(node?.nodeId)
|
|
615
|
+
|| readNonEmptyString(node?.node_id);
|
|
616
|
+
}
|
|
617
|
+
|
|
606
618
|
async function maybeAutoLaunchOneQueueSession(components: DaemonComponents, meshId: string, mesh: any): Promise<boolean> {
|
|
607
619
|
const queue = getQueue(meshId);
|
|
608
620
|
const pending = queue.filter(task => task.status === 'pending');
|
|
@@ -621,7 +633,7 @@ async function maybeAutoLaunchOneQueueSession(components: DaemonComponents, mesh
|
|
|
621
633
|
|
|
622
634
|
const candidateNodes = Array.isArray(mesh?.nodes)
|
|
623
635
|
? mesh.nodes.filter((node: any) => {
|
|
624
|
-
if (task.targetNodeId && node
|
|
636
|
+
if (task.targetNodeId && readMeshNodeId(node) !== task.targetNodeId) return false;
|
|
625
637
|
// Skip nodes that can never satisfy requiredTags regardless of which provider
|
|
626
638
|
// from providerPriority is selected. A node satisfies tags if at least one
|
|
627
639
|
// provider in its priority list would produce matching capability tags.
|
|
@@ -641,7 +653,7 @@ async function maybeAutoLaunchOneQueueSession(components: DaemonComponents, mesh
|
|
|
641
653
|
}
|
|
642
654
|
|
|
643
655
|
for (const node of candidateNodes) {
|
|
644
|
-
const nodeId =
|
|
656
|
+
const nodeId = readMeshNodeId(node);
|
|
645
657
|
if (!nodeId) continue;
|
|
646
658
|
const launchKey = `${meshId}:${nodeId}`;
|
|
647
659
|
const now = Date.now();
|