@adhdev/daemon-standalone 0.9.77-rc.33 → 0.9.77-rc.34
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 +73 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +146 -3
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/index.js
CHANGED
|
@@ -32178,10 +32178,12 @@ Follow these recovery rules:
|
|
|
32178
32178
|
});
|
|
32179
32179
|
var mesh_work_queue_exports = {};
|
|
32180
32180
|
__export2(mesh_work_queue_exports, {
|
|
32181
|
+
cancelTask: () => cancelTask,
|
|
32181
32182
|
claimNextTask: () => claimNextTask,
|
|
32182
32183
|
enqueueTask: () => enqueueTask,
|
|
32183
32184
|
getMeshQueueStats: () => getMeshQueueStats,
|
|
32184
32185
|
getQueue: () => getQueue,
|
|
32186
|
+
requeueTask: () => requeueTask,
|
|
32185
32187
|
updateSessionTaskStatus: () => updateSessionTaskStatus,
|
|
32186
32188
|
updateTaskStatus: () => updateTaskStatus
|
|
32187
32189
|
});
|
|
@@ -32256,6 +32258,40 @@ Follow these recovery rules:
|
|
|
32256
32258
|
writeQueue(meshId, queue);
|
|
32257
32259
|
return queue[idx];
|
|
32258
32260
|
}
|
|
32261
|
+
function cancelTask(meshId, taskId, opts) {
|
|
32262
|
+
const queue = readQueue(meshId);
|
|
32263
|
+
const idx = queue.findIndex((q2) => q2.id === taskId);
|
|
32264
|
+
if (idx === -1) return null;
|
|
32265
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
32266
|
+
queue[idx].status = "cancelled";
|
|
32267
|
+
queue[idx].updatedAt = now;
|
|
32268
|
+
queue[idx].cancelledAt = now;
|
|
32269
|
+
if (opts?.reason) queue[idx].cancelReason = opts.reason;
|
|
32270
|
+
writeQueue(meshId, queue);
|
|
32271
|
+
return queue[idx];
|
|
32272
|
+
}
|
|
32273
|
+
function requeueTask(meshId, taskId, opts) {
|
|
32274
|
+
const queue = readQueue(meshId);
|
|
32275
|
+
const idx = queue.findIndex((q2) => q2.id === taskId);
|
|
32276
|
+
if (idx === -1) return null;
|
|
32277
|
+
const entry = queue[idx];
|
|
32278
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
32279
|
+
entry.status = "pending";
|
|
32280
|
+
delete entry.assignedNodeId;
|
|
32281
|
+
delete entry.assignedSessionId;
|
|
32282
|
+
delete entry.cancelledAt;
|
|
32283
|
+
delete entry.cancelReason;
|
|
32284
|
+
if (opts?.clearTargetNode) delete entry.targetNodeId;
|
|
32285
|
+
if (typeof opts?.targetNodeId === "string") entry.targetNodeId = opts.targetNodeId;
|
|
32286
|
+
if (opts?.clearTargetSession !== false) delete entry.targetSessionId;
|
|
32287
|
+
if (typeof opts?.targetSessionId === "string") entry.targetSessionId = opts.targetSessionId;
|
|
32288
|
+
entry.updatedAt = now;
|
|
32289
|
+
entry.requeuedAt = now;
|
|
32290
|
+
entry.requeueCount = (entry.requeueCount || 0) + 1;
|
|
32291
|
+
if (opts?.reason) entry.requeueReason = opts.reason;
|
|
32292
|
+
writeQueue(meshId, queue);
|
|
32293
|
+
return entry;
|
|
32294
|
+
}
|
|
32259
32295
|
function updateSessionTaskStatus(meshId, sessionId, status) {
|
|
32260
32296
|
const queue = readQueue(meshId);
|
|
32261
32297
|
for (let i = queue.length - 1; i >= 0; i--) {
|
|
@@ -32274,7 +32310,8 @@ Follow these recovery rules:
|
|
|
32274
32310
|
pending: queue.filter((q2) => q2.status === "pending").length,
|
|
32275
32311
|
assigned: queue.filter((q2) => q2.status === "assigned").length,
|
|
32276
32312
|
completed: queue.filter((q2) => q2.status === "completed").length,
|
|
32277
|
-
failed: queue.filter((q2) => q2.status === "failed").length
|
|
32313
|
+
failed: queue.filter((q2) => q2.status === "failed").length,
|
|
32314
|
+
cancelled: queue.filter((q2) => q2.status === "cancelled").length
|
|
32278
32315
|
};
|
|
32279
32316
|
}
|
|
32280
32317
|
var import_fs4;
|
|
@@ -36043,6 +36080,7 @@ ${lastSnapshot}`;
|
|
|
36043
36080
|
buildThoughtChatMessage: () => buildThoughtChatMessage,
|
|
36044
36081
|
buildToolChatMessage: () => buildToolChatMessage,
|
|
36045
36082
|
buildUserChatMessage: () => buildUserChatMessage,
|
|
36083
|
+
cancelTask: () => cancelTask,
|
|
36046
36084
|
claimNextTask: () => claimNextTask,
|
|
36047
36085
|
classifyChatMessageVisibility: () => classifyChatMessageVisibility,
|
|
36048
36086
|
classifyHotChatSessionsForSubscriptionFlush: () => classifyHotChatSessionsForSubscriptionFlush2,
|
|
@@ -36154,6 +36192,7 @@ ${lastSnapshot}`;
|
|
|
36154
36192
|
registerExtensionProviders: () => registerExtensionProviders,
|
|
36155
36193
|
removeNode: () => removeNode,
|
|
36156
36194
|
removeWorktree: () => removeWorktree,
|
|
36195
|
+
requeueTask: () => requeueTask,
|
|
36157
36196
|
resetConfig: () => resetConfig,
|
|
36158
36197
|
resetDebugRuntimeConfig: () => resetDebugRuntimeConfig,
|
|
36159
36198
|
resetState: () => resetState,
|
|
@@ -54960,6 +54999,39 @@ ${(0, import_node_path.resolve)(workspace || os17.tmpdir())}`;
|
|
|
54960
54999
|
return { success: false, error: e.message };
|
|
54961
55000
|
}
|
|
54962
55001
|
}
|
|
55002
|
+
case "cancel_mesh_queue_task": {
|
|
55003
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
55004
|
+
const taskId = typeof args?.taskId === "string" ? args.taskId.trim() : "";
|
|
55005
|
+
if (!meshId || !taskId) return { success: false, error: "meshId and taskId required" };
|
|
55006
|
+
try {
|
|
55007
|
+
const { cancelTask: cancelTask2 } = await Promise.resolve().then(() => (init_mesh_work_queue(), mesh_work_queue_exports));
|
|
55008
|
+
const reason = typeof args?.reason === "string" ? args.reason : void 0;
|
|
55009
|
+
const task = cancelTask2(meshId, taskId, { reason });
|
|
55010
|
+
if (!task) return { success: false, error: `Queue task '${taskId}' not found` };
|
|
55011
|
+
return { success: true, task };
|
|
55012
|
+
} catch (e) {
|
|
55013
|
+
return { success: false, error: e.message };
|
|
55014
|
+
}
|
|
55015
|
+
}
|
|
55016
|
+
case "requeue_mesh_queue_task": {
|
|
55017
|
+
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
55018
|
+
const taskId = typeof args?.taskId === "string" ? args.taskId.trim() : "";
|
|
55019
|
+
if (!meshId || !taskId) return { success: false, error: "meshId and taskId required" };
|
|
55020
|
+
try {
|
|
55021
|
+
const { requeueTask: requeueTask2 } = await Promise.resolve().then(() => (init_mesh_work_queue(), mesh_work_queue_exports));
|
|
55022
|
+
const task = requeueTask2(meshId, taskId, {
|
|
55023
|
+
reason: typeof args?.reason === "string" ? args.reason : void 0,
|
|
55024
|
+
targetNodeId: typeof args?.targetNodeId === "string" ? args.targetNodeId.trim() : void 0,
|
|
55025
|
+
targetSessionId: typeof args?.targetSessionId === "string" ? args.targetSessionId.trim() : void 0,
|
|
55026
|
+
clearTargetNode: args?.clearTargetNode === true,
|
|
55027
|
+
clearTargetSession: args?.clearTargetSession !== false
|
|
55028
|
+
});
|
|
55029
|
+
if (!task) return { success: false, error: `Queue task '${taskId}' not found` };
|
|
55030
|
+
return { success: true, task };
|
|
55031
|
+
} catch (e) {
|
|
55032
|
+
return { success: false, error: e.message };
|
|
55033
|
+
}
|
|
55034
|
+
}
|
|
54963
55035
|
case "add_mesh_node": {
|
|
54964
55036
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
54965
55037
|
const workspace = typeof args?.workspace === "string" ? args.workspace.trim() : "";
|