@adhdev/daemon-core 0.9.77-rc.36 → 0.9.77-rc.37
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/commands/mesh-coordinator.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +35 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -5
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-work-queue.d.ts +6 -0
- package/dist/shared-types.d.ts +14 -0
- package/package.json +1 -1
- package/src/commands/mesh-coordinator.ts +27 -1
- package/src/commands/router.ts +3 -1
- package/src/index.ts +2 -2
- package/src/mesh/mesh-work-queue.ts +14 -0
- package/src/shared-types.ts +14 -0
package/dist/index.mjs
CHANGED
|
@@ -1111,7 +1111,13 @@ function getMeshQueueStats(meshId) {
|
|
|
1111
1111
|
assigned: queue.filter((q) => q.status === "assigned").length,
|
|
1112
1112
|
completed: queue.filter((q) => q.status === "completed").length,
|
|
1113
1113
|
failed: queue.filter((q) => q.status === "failed").length,
|
|
1114
|
-
cancelled: queue.filter((q) => q.status === "cancelled").length
|
|
1114
|
+
cancelled: queue.filter((q) => q.status === "cancelled").length,
|
|
1115
|
+
activeAssignments: queue.filter((q) => q.status === "assigned").map((q) => ({
|
|
1116
|
+
id: q.id,
|
|
1117
|
+
nodeId: q.assignedNodeId,
|
|
1118
|
+
sessionId: q.assignedSessionId,
|
|
1119
|
+
message: q.message
|
|
1120
|
+
}))
|
|
1115
1121
|
};
|
|
1116
1122
|
}
|
|
1117
1123
|
var init_mesh_work_queue = __esm({
|
|
@@ -21774,7 +21780,9 @@ function resolveHermesMeshCoordinatorSetup(options) {
|
|
|
21774
21780
|
const mcpServer = resolveAdhdevMcpServerLaunch({
|
|
21775
21781
|
meshId: options.meshId,
|
|
21776
21782
|
nodeExecutable: options.nodeExecutable,
|
|
21777
|
-
adhdevMcpEntryPath: options.adhdevMcpEntryPath
|
|
21783
|
+
adhdevMcpEntryPath: options.adhdevMcpEntryPath,
|
|
21784
|
+
adhdevMcpTransport: options.adhdevMcpTransport,
|
|
21785
|
+
adhdevMcpPort: options.adhdevMcpPort
|
|
21778
21786
|
});
|
|
21779
21787
|
if (!mcpServer) {
|
|
21780
21788
|
return {
|
|
@@ -21841,7 +21849,9 @@ function resolveMeshCoordinatorSetup(options) {
|
|
|
21841
21849
|
const mcpServer = resolveAdhdevMcpServerLaunch({
|
|
21842
21850
|
meshId,
|
|
21843
21851
|
nodeExecutable: options.nodeExecutable,
|
|
21844
|
-
adhdevMcpEntryPath: options.adhdevMcpEntryPath
|
|
21852
|
+
adhdevMcpEntryPath: options.adhdevMcpEntryPath,
|
|
21853
|
+
adhdevMcpTransport: options.adhdevMcpTransport,
|
|
21854
|
+
adhdevMcpPort: options.adhdevMcpPort
|
|
21845
21855
|
});
|
|
21846
21856
|
if (!mcpServer) {
|
|
21847
21857
|
return {
|
|
@@ -21915,11 +21925,27 @@ function resolveAdhdevMcpServerLaunch(options) {
|
|
|
21915
21925
|
if (!entryPath) return null;
|
|
21916
21926
|
const nodeExecutable = resolveMcpNodeExecutable(options.nodeExecutable);
|
|
21917
21927
|
if (!nodeExecutable) return null;
|
|
21928
|
+
const transport = resolveMcpTransport(options.adhdevMcpTransport);
|
|
21929
|
+
const args = [entryPath, "--mode", transport, "--repo-mesh", options.meshId];
|
|
21930
|
+
const port = resolveMcpPort(options.adhdevMcpPort);
|
|
21931
|
+
if (port !== void 0) args.push("--port", String(port));
|
|
21918
21932
|
return {
|
|
21919
21933
|
command: nodeExecutable,
|
|
21920
|
-
args
|
|
21934
|
+
args
|
|
21921
21935
|
};
|
|
21922
21936
|
}
|
|
21937
|
+
function resolveMcpTransport(explicitTransport) {
|
|
21938
|
+
if (explicitTransport === "local" || explicitTransport === "ipc") return explicitTransport;
|
|
21939
|
+
const envTransport = process.env.ADHDEV_COORDINATOR_MCP_TRANSPORT?.trim();
|
|
21940
|
+
return envTransport === "local" ? "local" : "ipc";
|
|
21941
|
+
}
|
|
21942
|
+
function resolveMcpPort(explicitPort) {
|
|
21943
|
+
if (typeof explicitPort === "number" && Number.isInteger(explicitPort) && explicitPort > 0) return explicitPort;
|
|
21944
|
+
const raw = process.env.ADHDEV_COORDINATOR_MCP_PORT?.trim();
|
|
21945
|
+
if (!raw) return void 0;
|
|
21946
|
+
const parsed = Number(raw);
|
|
21947
|
+
return Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
21948
|
+
}
|
|
21923
21949
|
function resolveMcpNodeExecutable(explicitExecutable) {
|
|
21924
21950
|
const explicit = explicitExecutable?.trim();
|
|
21925
21951
|
if (explicit) return explicit;
|
|
@@ -24260,9 +24286,11 @@ ${block}`);
|
|
|
24260
24286
|
args: coordinatorSetup.mcpServer.args
|
|
24261
24287
|
};
|
|
24262
24288
|
if (args?.inlineMesh) {
|
|
24289
|
+
const modeArgIndex = coordinatorSetup.mcpServer.args.findIndex((value) => value === "--mode");
|
|
24290
|
+
const mcpTransport = modeArgIndex >= 0 ? coordinatorSetup.mcpServer.args[modeArgIndex + 1] : "ipc";
|
|
24263
24291
|
mcpServerEntry.env = {
|
|
24264
24292
|
ADHDEV_INLINE_MESH: JSON.stringify(mesh),
|
|
24265
|
-
ADHDEV_MCP_TRANSPORT: "ipc"
|
|
24293
|
+
ADHDEV_MCP_TRANSPORT: mcpTransport === "local" ? "local" : "ipc"
|
|
24266
24294
|
};
|
|
24267
24295
|
}
|
|
24268
24296
|
try {
|
|
@@ -32485,6 +32513,7 @@ export {
|
|
|
32485
32513
|
getLogLevel,
|
|
32486
32514
|
getMesh,
|
|
32487
32515
|
getMeshByRepo,
|
|
32516
|
+
getMeshQueueStats,
|
|
32488
32517
|
getNpmExecOptions,
|
|
32489
32518
|
getQueue,
|
|
32490
32519
|
getRecentActivity,
|