@adhdev/daemon-standalone 1.0.58-rc.1 → 1.0.58-rc.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-standalone",
3
- "version": "1.0.58-rc.1",
3
+ "version": "1.0.58-rc.3",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -37,7 +37,7 @@
37
37
  "license": "AGPL-3.0-or-later",
38
38
  "dependencies": {
39
39
  "@adhdev/ghostty-vt-node": "*",
40
- "@adhdev/session-host-core": "1.0.58-rc.1",
40
+ "@adhdev/session-host-core": "1.0.58-rc.3",
41
41
  "@xterm/addon-serialize": "^0.14.0",
42
42
  "@xterm/xterm": "^6.0.0",
43
43
  "chalk": "^5.3.0",
@@ -2854,6 +2854,13 @@ function findNode(mesh, nodeId) {
2854
2854
  return node;
2855
2855
  }
2856
2856
  var DUPLICATE_DISPATCH_WINDOW_MS = 6e4;
2857
+ function hasDefinitivelyRemoteIdentity(ctx, node) {
2858
+ const nodeDaemonId = readNodeDaemonId(node);
2859
+ const nodeMachineId = readNodeMachineId(node);
2860
+ return Boolean(
2861
+ nodeDaemonId && ctx.localDaemonId && !(0, import_daemon_core5.daemonIdsEquivalent)(nodeDaemonId, ctx.localDaemonId) || nodeMachineId && ctx.localMachineId && !(0, import_daemon_core5.daemonIdsEquivalent)(nodeMachineId, ctx.localMachineId)
2862
+ );
2863
+ }
2857
2864
  async function refreshMeshFromDaemon(ctx) {
2858
2865
  const settledNodeIds = /* @__PURE__ */ new Set();
2859
2866
  try {
@@ -2865,6 +2872,10 @@ async function refreshMeshFromDaemon(ctx) {
2865
2872
  const existingId = existing?.id;
2866
2873
  if (!existingId) continue;
2867
2874
  if (merged.some((n) => (0, import_daemon_core5.meshNodeIdMatches)(n, existingId))) continue;
2875
+ if (hasDefinitivelyRemoteIdentity(ctx, existing)) {
2876
+ merged.push(existing);
2877
+ continue;
2878
+ }
2868
2879
  if (isLocalControlPlaneNode(ctx, existing)) {
2869
2880
  settledNodeIds.add(existingId);
2870
2881
  continue;
@@ -5455,6 +5466,7 @@ function eagerPushTaskToRemoteNodes(ctx, task, message, targetNodeId, requiredTa
5455
5466
  return dispatchPromises;
5456
5467
  }
5457
5468
  async function meshEnqueueTask(ctx, args) {
5469
+ await refreshMeshFromDaemon(ctx);
5458
5470
  const normalized = normalizeEnqueueTaskArgs(ctx, args, "mesh_enqueue_task");
5459
5471
  if (!normalized.ok) {
5460
5472
  return JSON.stringify({ success: false, code: normalized.code, error: normalized.error, ...normalized.extra ?? {} });
@@ -5650,6 +5662,7 @@ async function meshEnqueueBatch(ctx, args) {
5650
5662
  }
5651
5663
  const allowDuplicate = args.allowDuplicate === true || args.allow_duplicate === true;
5652
5664
  const blockDuplicate = args.blockDuplicate === true || args.block_duplicate === true;
5665
+ await refreshMeshFromDaemon(ctx);
5653
5666
  const specs = [];
5654
5667
  const rawGraphEntries = [];
5655
5668
  const normalizedEntries = [];
@@ -7318,6 +7331,8 @@ async function meshMagiKindPanelSet(ctx, args) {
7318
7331
  const scope = magiPanelScope(meshId, ctx.mesh.name);
7319
7332
  try {
7320
7333
  const current = (0, import_daemon_core6.getMagiKindPanel)(kind, meshId) ?? [];
7334
+ const ignoredFields = (0, import_daemon_core6.collectIgnoredMagiSlotFields)(args.slots);
7335
+ const ignoredNote = ignoredFields.length ? { ignoredFields, ignoredFieldsNote: "These keys are not part of the MAGI slot schema and were DROPPED (the panel was still saved without them). A MAGI panel decides WHO answers independently; per-slot routing axes like thinkingLevel/difficulty/maxParallel belong on the node capability slots (mesh_node_slots_set)." } : {};
7321
7336
  if (!write) {
7322
7337
  const preview = (0, import_daemon_core6.normalizeMagiSlots)(args.slots, ctx.mesh.nodes.map((n) => n.id));
7323
7338
  return JSON.stringify({
@@ -7328,6 +7343,7 @@ async function meshMagiKindPanelSet(ctx, args) {
7328
7343
  replacement: true,
7329
7344
  currentSlots: current,
7330
7345
  slots: preview,
7346
+ ...ignoredNote,
7331
7347
  note: `Dry-run only \u2014 no file written. This is a WHOLESALE replacement of the kind's slot list for mesh '${meshId}' (machine-local ~/.adhdev/meshes.json); the currentSlots would be fully replaced. Other meshes on this machine are unaffected. Re-run with write=true after explicit user approval.`
7332
7348
  }, null, 2);
7333
7349
  }
@@ -7340,6 +7356,7 @@ async function meshMagiKindPanelSet(ctx, args) {
7340
7356
  replacement: true,
7341
7357
  previousSlots: current,
7342
7358
  slots,
7359
+ ...ignoredNote,
7343
7360
  nextAction: "Verify with mesh_magi_kind_panel_list, then mesh_magi_review({ task_kind }) resolves this binding."
7344
7361
  }, null, 2);
7345
7362
  } catch (e) {