@adhdev/daemon-standalone 0.9.82-rc.196 → 0.9.82-rc.197
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 +387 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/index-CDdoEZIp.js +105 -0
- package/public/index.html +1 -1
- package/vendor/mcp-server/index.js +47 -0
- package/vendor/mcp-server/index.js.map +1 -1
- package/public/assets/index-0rc1KNB7.js +0 -105
package/public/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<meta name="description" content="ADHDev self-hosted dashboard for controlling AI agents" />
|
|
8
8
|
<link rel="icon" href="/otter-logo.png" />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-CDdoEZIp.js"></script>
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/vendor-BwuWgaJI.js">
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-DNAiYM9S.css">
|
|
13
13
|
</head>
|
|
@@ -2976,6 +2976,35 @@ async function meshSendTask(ctx, args) {
|
|
|
2976
2976
|
nextAction: `Relaunch the target session on node '${args.node_id}' or retry without session_id so Repo Mesh can pick a session with provider metadata.`
|
|
2977
2977
|
});
|
|
2978
2978
|
}
|
|
2979
|
+
if (explicitTargetSession && !isIdleSessionRecord(explicitTargetSession) && !isTerminalSessionRecord(explicitTargetSession)) {
|
|
2980
|
+
const sessionStatus = typeof explicitTargetSession?.status === "string" ? explicitTargetSession.status : "unknown";
|
|
2981
|
+
const { createSessionDelivery: createDelivery, resolveDeliveryDecision } = await import("@adhdev/daemon-core");
|
|
2982
|
+
const policyResult = resolveDeliveryDecision(sessionStatus, { kind: "task" });
|
|
2983
|
+
if (policyResult.decision === "queued") {
|
|
2984
|
+
const delivery = createDelivery({
|
|
2985
|
+
meshId: ctx.mesh.id,
|
|
2986
|
+
nodeId: args.node_id,
|
|
2987
|
+
sessionId: args.session_id,
|
|
2988
|
+
providerType: resolvedProviderType,
|
|
2989
|
+
kind: "task",
|
|
2990
|
+
message: args.message,
|
|
2991
|
+
status: "queued"
|
|
2992
|
+
});
|
|
2993
|
+
return JSON.stringify({
|
|
2994
|
+
success: true,
|
|
2995
|
+
dispatched: false,
|
|
2996
|
+
decision: "queued_delivery",
|
|
2997
|
+
deliveryId: delivery.id,
|
|
2998
|
+
reason: policyResult.reason,
|
|
2999
|
+
nodeId: args.node_id,
|
|
3000
|
+
sessionId: args.session_id,
|
|
3001
|
+
sessionStatus,
|
|
3002
|
+
taskMode: taskMode || void 0,
|
|
3003
|
+
message: policyResult.message,
|
|
3004
|
+
nextAction: `Use mesh_status to watch for session idle transition, or use mesh_enqueue_task for queue-based assignment. Check deliveryId '${delivery.id}' to track queued delivery.`
|
|
3005
|
+
});
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
2979
3008
|
const sessionWasIdle = explicitTargetSession ? isIdleSessionRecord(explicitTargetSession) : false;
|
|
2980
3009
|
const taskId = (0, import_node_crypto.randomUUID)();
|
|
2981
3010
|
const dispatchedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -3030,11 +3059,29 @@ async function meshSendTask(ctx, args) {
|
|
|
3030
3059
|
dispatchedToIdleSession: sessionWasIdle,
|
|
3031
3060
|
dispatchedAt
|
|
3032
3061
|
});
|
|
3062
|
+
let deliveryId;
|
|
3063
|
+
try {
|
|
3064
|
+
const { createSessionDelivery: createDelivery } = await import("@adhdev/daemon-core");
|
|
3065
|
+
const delivery = createDelivery({
|
|
3066
|
+
meshId: ctx.mesh.id,
|
|
3067
|
+
nodeId: args.node_id,
|
|
3068
|
+
sessionId: args.session_id,
|
|
3069
|
+
providerType: resolvedProviderType || void 0,
|
|
3070
|
+
taskId,
|
|
3071
|
+
kind: "task",
|
|
3072
|
+
message: args.message,
|
|
3073
|
+
status: sessionWasIdle ? "delivered" : "delivering"
|
|
3074
|
+
});
|
|
3075
|
+
deliveryId = delivery.id;
|
|
3076
|
+
} catch {
|
|
3077
|
+
}
|
|
3033
3078
|
return JSON.stringify({
|
|
3034
3079
|
success: true,
|
|
3035
3080
|
dispatched: true,
|
|
3081
|
+
decision: "immediate",
|
|
3036
3082
|
source: "direct",
|
|
3037
3083
|
taskId,
|
|
3084
|
+
deliveryId,
|
|
3038
3085
|
taskMode,
|
|
3039
3086
|
providerType: resolvedProviderType,
|
|
3040
3087
|
nodeId: args.node_id,
|