@adhdev/daemon-core 0.9.82-rc.304 → 0.9.82-rc.305
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 +28 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/commands/router.ts +54 -3
package/dist/index.mjs
CHANGED
|
@@ -290,10 +290,10 @@ function readInjected(value) {
|
|
|
290
290
|
}
|
|
291
291
|
function getDaemonBuildInfo() {
|
|
292
292
|
if (cached) return cached;
|
|
293
|
-
const commit = readInjected(true ? "
|
|
294
|
-
const commitShort = readInjected(true ? "
|
|
295
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
296
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
293
|
+
const commit = readInjected(true ? "6103da081f92baaf891d3410e3d7ebc36d9e300d" : void 0) ?? "unknown";
|
|
294
|
+
const commitShort = readInjected(true ? "6103da08" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
295
|
+
const version = readInjected(true ? "0.9.82-rc.305" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
296
|
+
const builtAt = readInjected(true ? "2026-06-17T06:08:13.151Z" : void 0);
|
|
297
297
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
298
298
|
return cached;
|
|
299
299
|
}
|
|
@@ -42012,6 +42012,7 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42012
42012
|
localConfirmedCount: 0,
|
|
42013
42013
|
peerAttemptedCount: 0,
|
|
42014
42014
|
peerConfirmedCount: 0,
|
|
42015
|
+
standingEvidenceCount: 0,
|
|
42015
42016
|
unavailableNodeIds: []
|
|
42016
42017
|
};
|
|
42017
42018
|
}
|
|
@@ -42023,6 +42024,7 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42023
42024
|
let localConfirmedCount = 0;
|
|
42024
42025
|
let peerAttemptedCount = 0;
|
|
42025
42026
|
let peerConfirmedCount = 0;
|
|
42027
|
+
let standingEvidenceCount = 0;
|
|
42026
42028
|
const unavailableNodeIds = [];
|
|
42027
42029
|
for (const [nodeIndex, node] of nodes.entries()) {
|
|
42028
42030
|
const nodeId = normalizeMeshNodeId(node) || `node_${nodeIndex}`;
|
|
@@ -42048,6 +42050,14 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42048
42050
|
} catch {
|
|
42049
42051
|
}
|
|
42050
42052
|
}
|
|
42053
|
+
const standingGit = buildInlineMeshTransitGitStatus(node);
|
|
42054
|
+
if (standingGit) {
|
|
42055
|
+
standingEvidenceCount += 1;
|
|
42056
|
+
continue;
|
|
42057
|
+
}
|
|
42058
|
+
if (!args.probeRemotePeers) {
|
|
42059
|
+
continue;
|
|
42060
|
+
}
|
|
42051
42061
|
if (!daemonId || !args.dispatchMeshCommand) {
|
|
42052
42062
|
if (!isSelfNode) unavailableNodeIds.push(nodeId);
|
|
42053
42063
|
continue;
|
|
@@ -42070,10 +42080,11 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42070
42080
|
unavailableNodeIds.push(nodeId);
|
|
42071
42081
|
}
|
|
42072
42082
|
return {
|
|
42073
|
-
directEvidenceCount: localConfirmedCount + peerConfirmedCount,
|
|
42083
|
+
directEvidenceCount: localConfirmedCount + peerConfirmedCount + standingEvidenceCount,
|
|
42074
42084
|
localConfirmedCount,
|
|
42075
42085
|
peerAttemptedCount,
|
|
42076
42086
|
peerConfirmedCount,
|
|
42087
|
+
standingEvidenceCount,
|
|
42077
42088
|
unavailableNodeIds
|
|
42078
42089
|
};
|
|
42079
42090
|
}
|
|
@@ -46277,12 +46288,14 @@ ${hintLines.join("\n")}` : "",
|
|
|
46277
46288
|
const meshRecord = await this.getMeshForCommand(meshId, args?.inlineMesh, { preferInline: true });
|
|
46278
46289
|
if (!meshRecord?.mesh) return { success: false, error: "Mesh not found" };
|
|
46279
46290
|
const requireDirectPeerTruth = args?.requireDirectPeerTruth === true;
|
|
46291
|
+
const probeRemotePeers = args?.refresh === true || args?.forceRefresh === true;
|
|
46280
46292
|
const directTruth = await hydrateInlineMeshDirectTruth({
|
|
46281
46293
|
mesh: meshRecord.mesh,
|
|
46282
46294
|
meshSource: meshRecord.source,
|
|
46283
46295
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|
|
46284
46296
|
statusInstanceId: this.deps.statusInstanceId,
|
|
46285
|
-
localMachineId: loadConfig().machineId || ""
|
|
46297
|
+
localMachineId: loadConfig().machineId || "",
|
|
46298
|
+
probeRemotePeers
|
|
46286
46299
|
});
|
|
46287
46300
|
const directTruthSatisfied = meshRecord.source !== "inline_bootstrap" || directTruth.directEvidenceCount > 0;
|
|
46288
46301
|
const sourceOfTruth = {
|
|
@@ -47863,20 +47876,25 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
47863
47876
|
meshSource: meshRecord.source,
|
|
47864
47877
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|
|
47865
47878
|
statusInstanceId: this.deps.statusInstanceId,
|
|
47866
|
-
localMachineId
|
|
47879
|
+
localMachineId,
|
|
47880
|
+
// Standing-state model: only an explicit refresh fans
|
|
47881
|
+
// out a blocking peer git probe. Default loads return
|
|
47882
|
+
// held truth so one slow peer can't block the graph.
|
|
47883
|
+
probeRemotePeers: refreshRequested
|
|
47867
47884
|
}) : {
|
|
47868
47885
|
directEvidenceCount: 0,
|
|
47869
47886
|
localConfirmedCount: 0,
|
|
47870
47887
|
peerAttemptedCount: 0,
|
|
47871
47888
|
peerConfirmedCount: 0,
|
|
47889
|
+
standingEvidenceCount: 0,
|
|
47872
47890
|
unavailableNodeIds: []
|
|
47873
47891
|
};
|
|
47874
47892
|
const passivePeerTruthNotAttempted = requireDirectPeerTruth && !refreshRequested && directTruth.directEvidenceCount > 0 && directTruth.peerAttemptedCount === 0;
|
|
47875
47893
|
const effectiveDirectTruth = passivePeerTruthNotAttempted ? { ...directTruth, unavailableNodeIds: [] } : directTruth;
|
|
47876
47894
|
const unavailableDirectTruthNodeIds = new Set(effectiveDirectTruth.unavailableNodeIds);
|
|
47877
47895
|
const unavailableNodesAreOnlyRemovedWorktrees = unavailableDirectTruthNodeIds.size > 0 && Array.isArray(mesh.nodes) && mesh.nodes.filter((node) => unavailableDirectTruthNodeIds.has(normalizeMeshNodeId(node) ?? "")).every((node) => node?.isLocalWorktree === true);
|
|
47878
|
-
const directTruthSatisfied = !requireDirectPeerTruth || effectiveDirectTruth.directEvidenceCount > 0 && (effectiveDirectTruth.unavailableNodeIds.length === 0 || unavailableNodesAreOnlyRemovedWorktrees);
|
|
47879
|
-
if (requireDirectPeerTruth && !directTruthSatisfied) {
|
|
47896
|
+
const directTruthSatisfied = !requireDirectPeerTruth || !refreshRequested || effectiveDirectTruth.directEvidenceCount > 0 && (effectiveDirectTruth.unavailableNodeIds.length === 0 || unavailableNodesAreOnlyRemovedWorktrees);
|
|
47897
|
+
if (requireDirectPeerTruth && refreshRequested && !directTruthSatisfied) {
|
|
47880
47898
|
const failureResult = {
|
|
47881
47899
|
success: false,
|
|
47882
47900
|
code: "mesh_direct_peer_truth_unavailable",
|
|
@@ -48022,7 +48040,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48022
48040
|
status.connection = buildLivePeerGitConnection(connection, refreshedAt);
|
|
48023
48041
|
}
|
|
48024
48042
|
remoteProbeApplied = true;
|
|
48025
|
-
} else if (!isSelfNode && daemonId && this.deps.dispatchMeshCommand && !directTruthUnavailableNodeIds.has(nodeId)) {
|
|
48043
|
+
} else if (refreshRequested && !isSelfNode && daemonId && this.deps.dispatchMeshCommand && !directTruthUnavailableNodeIds.has(nodeId)) {
|
|
48026
48044
|
try {
|
|
48027
48045
|
const remoteGit = await probeRemoteMeshGitStatus({
|
|
48028
48046
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|