@adhdev/daemon-core 0.9.82-rc.95 → 0.9.82-rc.96

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
@@ -16124,7 +16124,7 @@ var RECENT_SEND_WINDOW_MS = 1200;
16124
16124
  var READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS = 25e3;
16125
16125
  var HERMES_CLI_STARTING_SEND_SETTLE_MS = 2e3;
16126
16126
  var CLI_NATIVE_HISTORY_FRESH_MS = 5 * 6e4;
16127
- var CLI_NATIVE_TRANSCRIPT_PROVIDERS = /* @__PURE__ */ new Set(["codex-cli", "claude-cli", "hermes-cli"]);
16127
+ var CLI_NATIVE_TRANSCRIPT_PROVIDERS = /* @__PURE__ */ new Set(["codex-cli", "claude-cli", "hermes-cli", "antigravity-cli"]);
16128
16128
  var recentSendByTarget = /* @__PURE__ */ new Map();
16129
16129
  function getCurrentProviderType(h, fallback = "") {
16130
16130
  return h.currentSession?.providerType || h.currentProviderType || fallback;
@@ -26499,12 +26499,114 @@ function buildMeshNodeDisplayLabel(node, nodeId, providerPriority) {
26499
26499
  if (explicit) return explicit;
26500
26500
  const workspace = readStringValue(node.workspace, node.repoRoot, node.repo_root);
26501
26501
  const workspaceName = workspace ? (0, import_path8.basename)(workspace) : void 0;
26502
- const host = readStringValue(node.hostname, node.host, node.daemonId, node.daemon_id, node.machineId, node.machine_id);
26502
+ const host = readStringValue(node.machineName, node.machine_name, node.hostname, node.host, node.daemonId, node.daemon_id, node.machineId, node.machine_id);
26503
26503
  const provider = providerPriority[0] || (Array.isArray(node.providers) ? readStringValue(...node.providers) : void 0);
26504
26504
  const parts = [workspaceName, host, provider].filter(Boolean);
26505
26505
  if (parts.length > 0) return parts.join(" \xB7 ");
26506
26506
  return nodeId || "unidentified mesh node";
26507
26507
  }
26508
+ function normalizeMeshHostname(value) {
26509
+ const hostname2 = readStringValue(value);
26510
+ if (!hostname2) return void 0;
26511
+ return hostname2.toLowerCase().replace(/\.$/, "");
26512
+ }
26513
+ function readMeshNodeMachineId(node) {
26514
+ return readStringValue(
26515
+ node.machineId,
26516
+ node.machine_id,
26517
+ readObjectRecord(node.machine)?.id,
26518
+ readObjectRecord(node.machine)?.machineId,
26519
+ readObjectRecord(node.lastProbe)?.machineId,
26520
+ readObjectRecord(node.last_probe)?.machine_id,
26521
+ readObjectRecord(readObjectRecord(node.lastProbe)?.machine)?.id,
26522
+ readObjectRecord(readObjectRecord(node.lastProbe)?.machine)?.machineId,
26523
+ readObjectRecord(readObjectRecord(node.last_probe)?.machine)?.id,
26524
+ readObjectRecord(readObjectRecord(node.last_probe)?.machine)?.machine_id
26525
+ );
26526
+ }
26527
+ function readMeshNodeDaemonId(node) {
26528
+ return readStringValue(
26529
+ node.daemonId,
26530
+ node.daemon_id,
26531
+ readObjectRecord(node.machine)?.daemonId,
26532
+ readObjectRecord(node.machine)?.daemon_id,
26533
+ readObjectRecord(node.lastProbe)?.daemonId,
26534
+ readObjectRecord(node.last_probe)?.daemon_id,
26535
+ readObjectRecord(readObjectRecord(node.lastProbe)?.machine)?.daemonId,
26536
+ readObjectRecord(readObjectRecord(node.lastProbe)?.machine)?.daemon_id,
26537
+ readObjectRecord(readObjectRecord(node.last_probe)?.machine)?.daemonId,
26538
+ readObjectRecord(readObjectRecord(node.last_probe)?.machine)?.daemon_id
26539
+ );
26540
+ }
26541
+ function readMeshNodeHostname(node) {
26542
+ return readStringValue(
26543
+ node.hostname,
26544
+ node.host,
26545
+ node.machineHostname,
26546
+ node.machine_hostname,
26547
+ readObjectRecord(node.machine)?.hostname,
26548
+ readObjectRecord(node.machine)?.host,
26549
+ readObjectRecord(node.lastProbe)?.hostname,
26550
+ readObjectRecord(node.last_probe)?.hostname,
26551
+ readObjectRecord(readObjectRecord(node.lastProbe)?.machine)?.hostname,
26552
+ readObjectRecord(readObjectRecord(node.last_probe)?.machine)?.hostname
26553
+ );
26554
+ }
26555
+ function readMeshNodeDisplayMachineName(node) {
26556
+ return readStringValue(
26557
+ node.machineName,
26558
+ node.machine_name,
26559
+ node.machineLabel,
26560
+ node.machine_label,
26561
+ node.machineNickname,
26562
+ node.machine_nickname,
26563
+ node.alias,
26564
+ readObjectRecord(node.machine)?.name,
26565
+ readObjectRecord(node.machine)?.displayName,
26566
+ readObjectRecord(node.machine)?.display_name,
26567
+ readObjectRecord(node.lastProbe)?.machineName,
26568
+ readObjectRecord(node.last_probe)?.machine_name,
26569
+ readObjectRecord(readObjectRecord(node.lastProbe)?.machine)?.name,
26570
+ readObjectRecord(readObjectRecord(node.last_probe)?.machine)?.name,
26571
+ readMeshNodeHostname(node)
26572
+ );
26573
+ }
26574
+ function compactMeshIdentityEvidence(value) {
26575
+ if (!value) return void 0;
26576
+ return value.length > 24 ? `${value.slice(0, 12)}\u2026${value.slice(-8)}` : value;
26577
+ }
26578
+ function buildMeshNodeMachineIdentity(node, opts) {
26579
+ const machineId = readMeshNodeMachineId(node);
26580
+ const daemonId = readMeshNodeDaemonId(node);
26581
+ const hostname2 = readMeshNodeHostname(node);
26582
+ const machineName = readMeshNodeDisplayMachineName(node);
26583
+ const coordinatorHostname = readStringValue(opts.coordinatorHostname);
26584
+ const machineIdMatches = Boolean(opts.localMachineId && machineId && opts.localMachineId === machineId);
26585
+ const daemonIdMatches = Boolean(opts.localDaemonId && daemonId && opts.localDaemonId === daemonId);
26586
+ const hostnameMatches = Boolean(
26587
+ normalizeMeshHostname(hostname2) && normalizeMeshHostname(coordinatorHostname) && normalizeMeshHostname(hostname2) === normalizeMeshHostname(coordinatorHostname)
26588
+ );
26589
+ const sameMachine = opts.isSelfNode === true || machineIdMatches || daemonIdMatches || hostnameMatches;
26590
+ const evidence = [];
26591
+ for (const [label, value] of [["machineName", machineName], ["hostname", hostname2], ["machineId", machineId], ["daemonId", daemonId]]) {
26592
+ const compact = compactMeshIdentityEvidence(value);
26593
+ if (compact) evidence.push(`${label}:${compact}`);
26594
+ }
26595
+ const locality = sameMachine ? "same_machine" : evidence.length > 0 ? "remote_known" : "remote_or_unknown";
26596
+ const localityReason = sameMachine ? machineIdMatches ? "matched coordinator machine id" : daemonIdMatches ? "matched coordinator daemon id" : hostnameMatches ? "matched coordinator hostname" : "selected coordinator node" : evidence.length > 0 ? `known remote/other machine identity; no local coordinator match (${evidence.join(", ")})` : "no useful machine identity evidence available";
26597
+ return {
26598
+ daemonId,
26599
+ machineId,
26600
+ hostname: hostname2,
26601
+ machineName,
26602
+ displayName: machineName || hostname2 || daemonId || machineId,
26603
+ coordinatorHostname,
26604
+ sameMachine,
26605
+ locality,
26606
+ localityReason,
26607
+ identityEvidence: evidence
26608
+ };
26609
+ }
26508
26610
  function normalizeInlineMeshGitStatus(status, node, options) {
26509
26611
  const isGitRepo = readBooleanValue(status.isGitRepo);
26510
26612
  if (!Object.keys(status).length || isGitRepo === void 0) return void 0;
@@ -30563,6 +30665,7 @@ ${block2}`);
30563
30665
  return failureResult;
30564
30666
  }
30565
30667
  const directTruthUnavailableNodeIds = new Set(effectiveDirectTruth.unavailableNodeIds);
30668
+ const coordinatorHostname = (0, import_os3.hostname)();
30566
30669
  const selectedCoordinatorNodeId = readStringValue(
30567
30670
  mesh.coordinator?.preferredNodeId,
30568
30671
  mesh.nodes?.[0]?.id,
@@ -30580,6 +30683,12 @@ ${block2}`);
30580
30683
  ) || Boolean(
30581
30684
  daemonId && (daemonId === localMachineId || daemonId === this.deps.statusInstanceId)
30582
30685
  ) || Boolean(meshRecord?.inline && nodeIndex === 0);
30686
+ const machineIdentity = buildMeshNodeMachineIdentity(node, {
30687
+ localMachineId,
30688
+ localDaemonId: this.deps.statusInstanceId,
30689
+ coordinatorHostname,
30690
+ isSelfNode
30691
+ });
30583
30692
  const status = {
30584
30693
  nodeId,
30585
30694
  machineLabel: buildMeshNodeDisplayLabel(node, nodeId, providerPriority),
@@ -30590,7 +30699,8 @@ ${block2}`);
30590
30699
  worktreeBranch: node.worktreeBranch,
30591
30700
  role: normalizeMeshDaemonRole(node.role) || (meshHost.hostNodeId && nodeId === meshHost.hostNodeId ? "host" : void 0),
30592
30701
  daemonId,
30593
- machineId: node.machineId,
30702
+ machineId: readMeshNodeMachineId(node) || node.machineId,
30703
+ machine: machineIdentity,
30594
30704
  machineStatus: node.machineStatus,
30595
30705
  health: "unknown",
30596
30706
  providers: node.providers || [],