@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 CHANGED
@@ -419,10 +419,10 @@ function readInjected(value) {
419
419
  }
420
420
  function getDaemonBuildInfo() {
421
421
  if (cached) return cached;
422
- const commit = readInjected(true ? "ace946b224e61964aaaa43aed717eaaaeabb3a48" : void 0) ?? "unknown";
423
- const commitShort = readInjected(true ? "ace946b2" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
424
- const version = readInjected(true ? "0.9.82-rc.544" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
425
- const builtAt = readInjected(true ? "2026-07-16T08:54:12.905Z" : void 0);
422
+ const commit = readInjected(true ? "cd7beb689ebd9b05c1a0d4a78b48aec469a85df4" : void 0) ?? "unknown";
423
+ const commitShort = readInjected(true ? "cd7beb68" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
424
+ const version = readInjected(true ? "0.9.82-rc.546" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
425
+ const builtAt = readInjected(true ? "2026-07-16T12:29:14.663Z" : void 0);
426
426
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
427
427
  return cached;
428
428
  }
@@ -6121,6 +6121,10 @@ function assertNoDependencyCycle(meshId, newTaskId, dependsOn) {
6121
6121
  }
6122
6122
  function enqueueTask(meshId, message, opts) {
6123
6123
  requireMeshHostQueueOwner(opts);
6124
+ message = String(message ?? "").trim();
6125
+ if (!message) {
6126
+ throw new Error("mesh task message must be a non-empty string");
6127
+ }
6124
6128
  const readonly = opts?.readonly === true;
6125
6129
  const modeValidation = validateMeshTaskModeRequest(opts?.taskMode, message, readonly);
6126
6130
  if (!modeValidation.valid) {
@@ -6193,6 +6197,10 @@ function recordDirectDispatchTask(meshId, message, opts) {
6193
6197
  if (!missionId) return null;
6194
6198
  const taskId = typeof opts.id === "string" ? opts.id.trim() : "";
6195
6199
  if (!taskId) return null;
6200
+ message = String(message ?? "").trim();
6201
+ if (!message) {
6202
+ throw new Error("mesh task message must be a non-empty string");
6203
+ }
6196
6204
  const readonly = opts.readonly === true;
6197
6205
  const modeValidation = validateMeshTaskModeRequest(opts.taskMode, message, readonly);
6198
6206
  if (!modeValidation.valid) {
@@ -7699,7 +7707,18 @@ var init_mesh_runtime_store = __esm({
7699
7707
  taskId: entry.taskId ?? null,
7700
7708
  kind: entry.kind,
7701
7709
  priority: entry.priority ?? 0,
7702
- message: entry.message,
7710
+ // MESH-DELIVERY-MESSAGE-NOTNULL: the `message` column is NOT NULL, but a
7711
+ // re-dispatch / reclaim / idle-assign path can reach here with an undefined
7712
+ // message (a claimed task whose payload predates the message field, or a
7713
+ // slimmed re-drive entry). better-sqlite3 binds undefined as NULL, so the
7714
+ // bare `entry.message` threw 'NOT NULL constraint failed' and — because this
7715
+ // insert runs inside triggerMeshQueue — took down the ENTIRE queue drain
7716
+ // (fresh enqueue, pending-claim recovery, idle-assign, MAGI replica launch),
7717
+ // stranding all delegation. A delivery record's message is informational
7718
+ // ack-tracking, so coercing an absent message to '' preserves the row and the
7719
+ // drain instead of crashing. Matches the `?? null` defensive coercion every
7720
+ // other optional column here already uses.
7721
+ message: entry.message ?? "",
7703
7722
  status: entry.status,
7704
7723
  deliverAfter: entry.deliverAfter ?? null,
7705
7724
  expiresAt: entry.expiresAt ?? null,
@@ -63962,6 +63981,15 @@ var MESH_FORWARDABLE_SESSION_COMMANDS = /* @__PURE__ */ new Set([
63962
63981
  "set_mode",
63963
63982
  "change_model",
63964
63983
  "set_thought_level",
63984
+ // set_conversation_prefs (per-session user Hide/Mute) is session-scoped: the daemon-owned
63985
+ // userHidden/userMuted lives on the OWNING session's live instance (med-family handler
63986
+ // getInstance → updateSettings). When the target is a REMOTE worker session the coordinator
63987
+ // has no local instance, so without forwarding the handler returns 'Session not found', the
63988
+ // dashboard's useConversationPrefs silently rolls back, and the stale worker surfaceHidden is
63989
+ // re-stamped every snapshot tick (the "restore does nothing + flicker" defect, mission
63990
+ // 6938892f). Forwarding to the owning worker lets it actually clear userHidden/userMuted and
63991
+ // report a fresh surfaceHidden=false — which also resolves the re-stamp flicker at the source.
63992
+ "set_conversation_prefs",
63965
63993
  // agent_command (send_chat / clear_history / stop) is session-scoped too: a command
63966
63994
  // explicitly naming a targetSessionId MUST reach that session wherever it lives, never a
63967
63995
  // different local session. Without forwarding, a misrouted/relayed send_chat for a REMOTE