@adhdev/daemon-standalone 0.9.77-rc.45 → 0.9.77-rc.47
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 +44 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +262 -20
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/index.js
CHANGED
|
@@ -22416,7 +22416,8 @@ ${error48.message || ""}`;
|
|
|
22416
22416
|
};
|
|
22417
22417
|
}
|
|
22418
22418
|
function getConfigDir() {
|
|
22419
|
-
const
|
|
22419
|
+
const override = process.env.ADHDEV_CONFIG_DIR;
|
|
22420
|
+
const dir = override && override.trim() ? override.trim() : (0, import_path2.join)((0, import_os2.homedir)(), ".adhdev");
|
|
22420
22421
|
if (!(0, import_fs.existsSync)(dir)) {
|
|
22421
22422
|
(0, import_fs.mkdirSync)(dir, { recursive: true });
|
|
22422
22423
|
}
|
|
@@ -23135,6 +23136,8 @@ Follow these recovery rules:
|
|
|
23135
23136
|
});
|
|
23136
23137
|
var mesh_work_queue_exports = {};
|
|
23137
23138
|
__export2(mesh_work_queue_exports, {
|
|
23139
|
+
ACTIVE_MESH_QUEUE_STATUSES: () => ACTIVE_MESH_QUEUE_STATUSES,
|
|
23140
|
+
HISTORICAL_MESH_QUEUE_STATUSES: () => HISTORICAL_MESH_QUEUE_STATUSES,
|
|
23138
23141
|
cancelTask: () => cancelTask,
|
|
23139
23142
|
claimNextTask: () => claimNextTask,
|
|
23140
23143
|
enqueueTask: () => enqueueTask,
|
|
@@ -23277,12 +23280,29 @@ Follow these recovery rules:
|
|
|
23277
23280
|
}
|
|
23278
23281
|
function getMeshQueueStats(meshId) {
|
|
23279
23282
|
const queue = readQueue(meshId);
|
|
23283
|
+
const pending = queue.filter((q) => q.status === "pending").length;
|
|
23284
|
+
const assigned = queue.filter((q) => q.status === "assigned").length;
|
|
23285
|
+
const completed = queue.filter((q) => q.status === "completed").length;
|
|
23286
|
+
const failed = queue.filter((q) => q.status === "failed").length;
|
|
23287
|
+
const cancelled = queue.filter((q) => q.status === "cancelled").length;
|
|
23280
23288
|
return {
|
|
23281
|
-
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23289
|
+
total: queue.length,
|
|
23290
|
+
active: pending + assigned,
|
|
23291
|
+
historical: completed + failed + cancelled,
|
|
23292
|
+
pending,
|
|
23293
|
+
assigned,
|
|
23294
|
+
completed,
|
|
23295
|
+
failed,
|
|
23296
|
+
cancelled,
|
|
23297
|
+
activeCounts: {
|
|
23298
|
+
pending,
|
|
23299
|
+
assigned
|
|
23300
|
+
},
|
|
23301
|
+
historicalCounts: {
|
|
23302
|
+
completed,
|
|
23303
|
+
failed,
|
|
23304
|
+
cancelled
|
|
23305
|
+
},
|
|
23286
23306
|
activeAssignments: queue.filter((q) => q.status === "assigned").map((q) => ({
|
|
23287
23307
|
id: q.id,
|
|
23288
23308
|
nodeId: q.assignedNodeId,
|
|
@@ -23294,6 +23314,8 @@ Follow these recovery rules:
|
|
|
23294
23314
|
var import_fs4;
|
|
23295
23315
|
var import_path4;
|
|
23296
23316
|
var import_crypto5;
|
|
23317
|
+
var ACTIVE_MESH_QUEUE_STATUSES;
|
|
23318
|
+
var HISTORICAL_MESH_QUEUE_STATUSES;
|
|
23297
23319
|
var init_mesh_work_queue = __esm2({
|
|
23298
23320
|
"src/mesh/mesh-work-queue.ts"() {
|
|
23299
23321
|
"use strict";
|
|
@@ -23301,6 +23323,8 @@ Follow these recovery rules:
|
|
|
23301
23323
|
import_path4 = require("path");
|
|
23302
23324
|
import_crypto5 = require("crypto");
|
|
23303
23325
|
init_mesh_ledger();
|
|
23326
|
+
ACTIVE_MESH_QUEUE_STATUSES = ["pending", "assigned"];
|
|
23327
|
+
HISTORICAL_MESH_QUEUE_STATUSES = ["completed", "failed", "cancelled"];
|
|
23304
23328
|
}
|
|
23305
23329
|
});
|
|
23306
23330
|
function parseVersion(raw) {
|
|
@@ -29059,7 +29083,7 @@ ${lastSnapshot}`;
|
|
|
29059
29083
|
}
|
|
29060
29084
|
}
|
|
29061
29085
|
const v = validateWorkspacePath(abs);
|
|
29062
|
-
if (
|
|
29086
|
+
if (v.ok !== true) return { error: v.error };
|
|
29063
29087
|
const list = [...config2.workspaces || []];
|
|
29064
29088
|
if (list.some((w) => path52.resolve(w.path) === abs)) {
|
|
29065
29089
|
return { error: "Workspace already in list" };
|
|
@@ -46852,10 +46876,21 @@ ${(0, import_node_path.resolve)(workspace || os17.tmpdir())}`;
|
|
|
46852
46876
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
46853
46877
|
if (!meshId) return { success: false, error: "meshId required" };
|
|
46854
46878
|
try {
|
|
46855
|
-
const { getQueue: getQueue2 } = await Promise.resolve().then(() => (init_mesh_work_queue(), mesh_work_queue_exports));
|
|
46879
|
+
const { getMeshQueueStats: getMeshQueueStats2, getQueue: getQueue2 } = await Promise.resolve().then(() => (init_mesh_work_queue(), mesh_work_queue_exports));
|
|
46856
46880
|
const status = Array.isArray(args?.status) ? args.status.map((s) => typeof s === "string" ? s.trim() : "").filter(Boolean) : void 0;
|
|
46857
46881
|
const queue = getQueue2(meshId, { status });
|
|
46858
|
-
|
|
46882
|
+
const summary = getMeshQueueStats2(meshId);
|
|
46883
|
+
return {
|
|
46884
|
+
success: true,
|
|
46885
|
+
queue,
|
|
46886
|
+
summary,
|
|
46887
|
+
sourceOfTruth: {
|
|
46888
|
+
kind: "mesh_work_queue_file",
|
|
46889
|
+
activeStatuses: ["pending", "assigned"],
|
|
46890
|
+
historicalStatuses: ["completed", "failed", "cancelled"],
|
|
46891
|
+
notes: "pending/assigned are active work; completed/failed/cancelled are historical records."
|
|
46892
|
+
}
|
|
46893
|
+
};
|
|
46859
46894
|
} catch (e) {
|
|
46860
46895
|
return { success: false, error: e.message };
|
|
46861
46896
|
}
|