adhdev 0.9.82-rc.37 → 0.9.82-rc.38
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/cli/index.js +52 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +52 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cli/index.js
CHANGED
|
@@ -49608,6 +49608,43 @@ ${block}`);
|
|
|
49608
49608
|
const sessionHostRecords = this.deps.sessionHostControl?.listSessions ? await this.deps.sessionHostControl.listSessions().catch(() => []) : [];
|
|
49609
49609
|
const liveMeshSessions = partitionSessionHostRecords(Array.isArray(sessionHostRecords) ? sessionHostRecords : []).liveRuntimes;
|
|
49610
49610
|
const localMachineId = loadConfig().machineId || "";
|
|
49611
|
+
const requireDirectPeerTruth = args?.requireDirectPeerTruth === true;
|
|
49612
|
+
const directTruth = requireDirectPeerTruth ? await hydrateInlineMeshDirectTruth({
|
|
49613
|
+
mesh,
|
|
49614
|
+
meshSource: meshRecord.source,
|
|
49615
|
+
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|
|
49616
|
+
statusInstanceId: this.deps.statusInstanceId,
|
|
49617
|
+
localMachineId
|
|
49618
|
+
}) : {
|
|
49619
|
+
directEvidenceCount: 0,
|
|
49620
|
+
localConfirmedCount: 0,
|
|
49621
|
+
peerAttemptedCount: 0,
|
|
49622
|
+
peerConfirmedCount: 0,
|
|
49623
|
+
unavailableNodeIds: []
|
|
49624
|
+
};
|
|
49625
|
+
const directTruthSatisfied = meshRecord.source !== "inline_bootstrap" || directTruth.directEvidenceCount > 0;
|
|
49626
|
+
if (requireDirectPeerTruth && !directTruthSatisfied) {
|
|
49627
|
+
return {
|
|
49628
|
+
success: false,
|
|
49629
|
+
code: "mesh_direct_peer_truth_unavailable",
|
|
49630
|
+
error: "Selected coordinator could not confirm direct mesh truth yet. Bootstrap inventory stays unavailable until direct mesh_status probes succeed.",
|
|
49631
|
+
sourceOfTruth: {
|
|
49632
|
+
membership: meshRecord.source === "inline_cache" ? "coordinator_inline_mesh_cache" : meshRecord.source === "local_config" ? "local_mesh_config" : "inline_bootstrap_snapshot",
|
|
49633
|
+
coordinatorOwnsLiveTruth: false,
|
|
49634
|
+
currentStatus: "direct_peer_truth_unavailable",
|
|
49635
|
+
directPeerTruth: {
|
|
49636
|
+
required: true,
|
|
49637
|
+
satisfied: false,
|
|
49638
|
+
directEvidenceCount: directTruth.directEvidenceCount,
|
|
49639
|
+
localConfirmedCount: directTruth.localConfirmedCount,
|
|
49640
|
+
peerAttemptedCount: directTruth.peerAttemptedCount,
|
|
49641
|
+
peerConfirmedCount: directTruth.peerConfirmedCount,
|
|
49642
|
+
unavailableNodeIds: directTruth.unavailableNodeIds
|
|
49643
|
+
}
|
|
49644
|
+
}
|
|
49645
|
+
};
|
|
49646
|
+
}
|
|
49647
|
+
const directTruthUnavailableNodeIds = new Set(directTruth.unavailableNodeIds);
|
|
49611
49648
|
const selectedCoordinatorNodeId = readStringValue(
|
|
49612
49649
|
mesh.coordinator?.preferredNodeId,
|
|
49613
49650
|
mesh.nodes?.[0]?.id,
|
|
@@ -49703,7 +49740,7 @@ ${block}`);
|
|
|
49703
49740
|
status.git = inlineTransitGit;
|
|
49704
49741
|
status.health = inlineTransitGit.isGitRepo ? deriveMeshNodeHealthFromGit(inlineTransitGit) : "degraded";
|
|
49705
49742
|
remoteProbeApplied = true;
|
|
49706
|
-
} else if (!isSelfNode && daemonId && this.deps.dispatchMeshCommand) {
|
|
49743
|
+
} else if (!isSelfNode && daemonId && this.deps.dispatchMeshCommand && !directTruthUnavailableNodeIds.has(nodeId)) {
|
|
49707
49744
|
try {
|
|
49708
49745
|
const remoteGit = await probeRemoteMeshGitStatus({
|
|
49709
49746
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|
|
@@ -49794,7 +49831,19 @@ ${block}`);
|
|
|
49794
49831
|
refreshedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
49795
49832
|
sourceOfTruth: {
|
|
49796
49833
|
membership: meshRecord?.source === "inline_cache" ? "coordinator_inline_mesh_cache" : meshRecord?.source === "local_config" ? "local_mesh_config" : "inline_bootstrap_snapshot",
|
|
49797
|
-
coordinatorOwnsLiveTruth:
|
|
49834
|
+
coordinatorOwnsLiveTruth: directTruthSatisfied,
|
|
49835
|
+
...requireDirectPeerTruth ? {
|
|
49836
|
+
currentStatus: directTruthSatisfied ? "live_git_and_session_probes" : "direct_peer_truth_unavailable",
|
|
49837
|
+
directPeerTruth: {
|
|
49838
|
+
required: true,
|
|
49839
|
+
satisfied: directTruthSatisfied,
|
|
49840
|
+
directEvidenceCount: directTruth.directEvidenceCount,
|
|
49841
|
+
localConfirmedCount: directTruth.localConfirmedCount,
|
|
49842
|
+
peerAttemptedCount: directTruth.peerAttemptedCount,
|
|
49843
|
+
peerConfirmedCount: directTruth.peerConfirmedCount,
|
|
49844
|
+
unavailableNodeIds: directTruth.unavailableNodeIds
|
|
49845
|
+
}
|
|
49846
|
+
} : {},
|
|
49798
49847
|
historicalEvidenceOnly: ["recoveryHints", "ledger.summary", "queue.summary"]
|
|
49799
49848
|
},
|
|
49800
49849
|
nodes: nodeStatuses,
|
|
@@ -98952,7 +99001,7 @@ var init_adhdev_daemon = __esm({
|
|
|
98952
99001
|
init_version();
|
|
98953
99002
|
init_src();
|
|
98954
99003
|
init_runtime_defaults();
|
|
98955
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.
|
|
99004
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.38" });
|
|
98956
99005
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
98957
99006
|
localHttpServer = null;
|
|
98958
99007
|
localWss = null;
|