@adhdev/daemon-core 0.9.82-rc.544 → 0.9.82-rc.546
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 +33 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/commands/router.ts +9 -0
- package/src/mesh/mesh-runtime-store.ts +12 -1
- package/src/mesh/mesh-work-queue.ts +19 -0
package/dist/index.mjs
CHANGED
|
@@ -414,10 +414,10 @@ function readInjected(value) {
|
|
|
414
414
|
}
|
|
415
415
|
function getDaemonBuildInfo() {
|
|
416
416
|
if (cached) return cached;
|
|
417
|
-
const commit = readInjected(true ? "
|
|
418
|
-
const commitShort = readInjected(true ? "
|
|
419
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
420
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
417
|
+
const commit = readInjected(true ? "cd7beb689ebd9b05c1a0d4a78b48aec469a85df4" : void 0) ?? "unknown";
|
|
418
|
+
const commitShort = readInjected(true ? "cd7beb68" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
419
|
+
const version = readInjected(true ? "0.9.82-rc.546" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
420
|
+
const builtAt = readInjected(true ? "2026-07-16T12:29:14.663Z" : void 0);
|
|
421
421
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
422
422
|
return cached;
|
|
423
423
|
}
|
|
@@ -6115,6 +6115,10 @@ function assertNoDependencyCycle(meshId, newTaskId, dependsOn) {
|
|
|
6115
6115
|
}
|
|
6116
6116
|
function enqueueTask(meshId, message, opts) {
|
|
6117
6117
|
requireMeshHostQueueOwner(opts);
|
|
6118
|
+
message = String(message ?? "").trim();
|
|
6119
|
+
if (!message) {
|
|
6120
|
+
throw new Error("mesh task message must be a non-empty string");
|
|
6121
|
+
}
|
|
6118
6122
|
const readonly = opts?.readonly === true;
|
|
6119
6123
|
const modeValidation = validateMeshTaskModeRequest(opts?.taskMode, message, readonly);
|
|
6120
6124
|
if (!modeValidation.valid) {
|
|
@@ -6187,6 +6191,10 @@ function recordDirectDispatchTask(meshId, message, opts) {
|
|
|
6187
6191
|
if (!missionId) return null;
|
|
6188
6192
|
const taskId = typeof opts.id === "string" ? opts.id.trim() : "";
|
|
6189
6193
|
if (!taskId) return null;
|
|
6194
|
+
message = String(message ?? "").trim();
|
|
6195
|
+
if (!message) {
|
|
6196
|
+
throw new Error("mesh task message must be a non-empty string");
|
|
6197
|
+
}
|
|
6190
6198
|
const readonly = opts.readonly === true;
|
|
6191
6199
|
const modeValidation = validateMeshTaskModeRequest(opts.taskMode, message, readonly);
|
|
6192
6200
|
if (!modeValidation.valid) {
|
|
@@ -7692,7 +7700,18 @@ var init_mesh_runtime_store = __esm({
|
|
|
7692
7700
|
taskId: entry.taskId ?? null,
|
|
7693
7701
|
kind: entry.kind,
|
|
7694
7702
|
priority: entry.priority ?? 0,
|
|
7695
|
-
|
|
7703
|
+
// MESH-DELIVERY-MESSAGE-NOTNULL: the `message` column is NOT NULL, but a
|
|
7704
|
+
// re-dispatch / reclaim / idle-assign path can reach here with an undefined
|
|
7705
|
+
// message (a claimed task whose payload predates the message field, or a
|
|
7706
|
+
// slimmed re-drive entry). better-sqlite3 binds undefined as NULL, so the
|
|
7707
|
+
// bare `entry.message` threw 'NOT NULL constraint failed' and — because this
|
|
7708
|
+
// insert runs inside triggerMeshQueue — took down the ENTIRE queue drain
|
|
7709
|
+
// (fresh enqueue, pending-claim recovery, idle-assign, MAGI replica launch),
|
|
7710
|
+
// stranding all delegation. A delivery record's message is informational
|
|
7711
|
+
// ack-tracking, so coercing an absent message to '' preserves the row and the
|
|
7712
|
+
// drain instead of crashing. Matches the `?? null` defensive coercion every
|
|
7713
|
+
// other optional column here already uses.
|
|
7714
|
+
message: entry.message ?? "",
|
|
7696
7715
|
status: entry.status,
|
|
7697
7716
|
deliverAfter: entry.deliverAfter ?? null,
|
|
7698
7717
|
expiresAt: entry.expiresAt ?? null,
|
|
@@ -63535,6 +63554,15 @@ var MESH_FORWARDABLE_SESSION_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
63535
63554
|
"set_mode",
|
|
63536
63555
|
"change_model",
|
|
63537
63556
|
"set_thought_level",
|
|
63557
|
+
// set_conversation_prefs (per-session user Hide/Mute) is session-scoped: the daemon-owned
|
|
63558
|
+
// userHidden/userMuted lives on the OWNING session's live instance (med-family handler
|
|
63559
|
+
// getInstance → updateSettings). When the target is a REMOTE worker session the coordinator
|
|
63560
|
+
// has no local instance, so without forwarding the handler returns 'Session not found', the
|
|
63561
|
+
// dashboard's useConversationPrefs silently rolls back, and the stale worker surfaceHidden is
|
|
63562
|
+
// re-stamped every snapshot tick (the "restore does nothing + flicker" defect, mission
|
|
63563
|
+
// 6938892f). Forwarding to the owning worker lets it actually clear userHidden/userMuted and
|
|
63564
|
+
// report a fresh surfaceHidden=false — which also resolves the re-stamp flicker at the source.
|
|
63565
|
+
"set_conversation_prefs",
|
|
63538
63566
|
// agent_command (send_chat / clear_history / stop) is session-scoped too: a command
|
|
63539
63567
|
// explicitly naming a targetSessionId MUST reach that session wherever it lives, never a
|
|
63540
63568
|
// different local session. Without forwarding, a misrouted/relayed send_chat for a REMOTE
|