@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.js
CHANGED
|
@@ -295,10 +295,10 @@ function readInjected(value) {
|
|
|
295
295
|
}
|
|
296
296
|
function getDaemonBuildInfo() {
|
|
297
297
|
if (cached) return cached;
|
|
298
|
-
const commit = readInjected(true ? "
|
|
299
|
-
const commitShort = readInjected(true ? "
|
|
300
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
301
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
298
|
+
const commit = readInjected(true ? "6103da081f92baaf891d3410e3d7ebc36d9e300d" : void 0) ?? "unknown";
|
|
299
|
+
const commitShort = readInjected(true ? "6103da08" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
300
|
+
const version = readInjected(true ? "0.9.82-rc.305" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
301
|
+
const builtAt = readInjected(true ? "2026-06-17T06:08:13.151Z" : void 0);
|
|
302
302
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
303
303
|
return cached;
|
|
304
304
|
}
|
|
@@ -42351,6 +42351,7 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42351
42351
|
localConfirmedCount: 0,
|
|
42352
42352
|
peerAttemptedCount: 0,
|
|
42353
42353
|
peerConfirmedCount: 0,
|
|
42354
|
+
standingEvidenceCount: 0,
|
|
42354
42355
|
unavailableNodeIds: []
|
|
42355
42356
|
};
|
|
42356
42357
|
}
|
|
@@ -42362,6 +42363,7 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42362
42363
|
let localConfirmedCount = 0;
|
|
42363
42364
|
let peerAttemptedCount = 0;
|
|
42364
42365
|
let peerConfirmedCount = 0;
|
|
42366
|
+
let standingEvidenceCount = 0;
|
|
42365
42367
|
const unavailableNodeIds = [];
|
|
42366
42368
|
for (const [nodeIndex, node] of nodes.entries()) {
|
|
42367
42369
|
const nodeId = normalizeMeshNodeId(node) || `node_${nodeIndex}`;
|
|
@@ -42387,6 +42389,14 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42387
42389
|
} catch {
|
|
42388
42390
|
}
|
|
42389
42391
|
}
|
|
42392
|
+
const standingGit = buildInlineMeshTransitGitStatus(node);
|
|
42393
|
+
if (standingGit) {
|
|
42394
|
+
standingEvidenceCount += 1;
|
|
42395
|
+
continue;
|
|
42396
|
+
}
|
|
42397
|
+
if (!args.probeRemotePeers) {
|
|
42398
|
+
continue;
|
|
42399
|
+
}
|
|
42390
42400
|
if (!daemonId || !args.dispatchMeshCommand) {
|
|
42391
42401
|
if (!isSelfNode) unavailableNodeIds.push(nodeId);
|
|
42392
42402
|
continue;
|
|
@@ -42409,10 +42419,11 @@ async function hydrateInlineMeshDirectTruth(args) {
|
|
|
42409
42419
|
unavailableNodeIds.push(nodeId);
|
|
42410
42420
|
}
|
|
42411
42421
|
return {
|
|
42412
|
-
directEvidenceCount: localConfirmedCount + peerConfirmedCount,
|
|
42422
|
+
directEvidenceCount: localConfirmedCount + peerConfirmedCount + standingEvidenceCount,
|
|
42413
42423
|
localConfirmedCount,
|
|
42414
42424
|
peerAttemptedCount,
|
|
42415
42425
|
peerConfirmedCount,
|
|
42426
|
+
standingEvidenceCount,
|
|
42416
42427
|
unavailableNodeIds
|
|
42417
42428
|
};
|
|
42418
42429
|
}
|
|
@@ -46616,12 +46627,14 @@ ${hintLines.join("\n")}` : "",
|
|
|
46616
46627
|
const meshRecord = await this.getMeshForCommand(meshId, args?.inlineMesh, { preferInline: true });
|
|
46617
46628
|
if (!meshRecord?.mesh) return { success: false, error: "Mesh not found" };
|
|
46618
46629
|
const requireDirectPeerTruth = args?.requireDirectPeerTruth === true;
|
|
46630
|
+
const probeRemotePeers = args?.refresh === true || args?.forceRefresh === true;
|
|
46619
46631
|
const directTruth = await hydrateInlineMeshDirectTruth({
|
|
46620
46632
|
mesh: meshRecord.mesh,
|
|
46621
46633
|
meshSource: meshRecord.source,
|
|
46622
46634
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|
|
46623
46635
|
statusInstanceId: this.deps.statusInstanceId,
|
|
46624
|
-
localMachineId: loadConfig().machineId || ""
|
|
46636
|
+
localMachineId: loadConfig().machineId || "",
|
|
46637
|
+
probeRemotePeers
|
|
46625
46638
|
});
|
|
46626
46639
|
const directTruthSatisfied = meshRecord.source !== "inline_bootstrap" || directTruth.directEvidenceCount > 0;
|
|
46627
46640
|
const sourceOfTruth = {
|
|
@@ -48202,20 +48215,25 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48202
48215
|
meshSource: meshRecord.source,
|
|
48203
48216
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|
|
48204
48217
|
statusInstanceId: this.deps.statusInstanceId,
|
|
48205
|
-
localMachineId
|
|
48218
|
+
localMachineId,
|
|
48219
|
+
// Standing-state model: only an explicit refresh fans
|
|
48220
|
+
// out a blocking peer git probe. Default loads return
|
|
48221
|
+
// held truth so one slow peer can't block the graph.
|
|
48222
|
+
probeRemotePeers: refreshRequested
|
|
48206
48223
|
}) : {
|
|
48207
48224
|
directEvidenceCount: 0,
|
|
48208
48225
|
localConfirmedCount: 0,
|
|
48209
48226
|
peerAttemptedCount: 0,
|
|
48210
48227
|
peerConfirmedCount: 0,
|
|
48228
|
+
standingEvidenceCount: 0,
|
|
48211
48229
|
unavailableNodeIds: []
|
|
48212
48230
|
};
|
|
48213
48231
|
const passivePeerTruthNotAttempted = requireDirectPeerTruth && !refreshRequested && directTruth.directEvidenceCount > 0 && directTruth.peerAttemptedCount === 0;
|
|
48214
48232
|
const effectiveDirectTruth = passivePeerTruthNotAttempted ? { ...directTruth, unavailableNodeIds: [] } : directTruth;
|
|
48215
48233
|
const unavailableDirectTruthNodeIds = new Set(effectiveDirectTruth.unavailableNodeIds);
|
|
48216
48234
|
const unavailableNodesAreOnlyRemovedWorktrees = unavailableDirectTruthNodeIds.size > 0 && Array.isArray(mesh.nodes) && mesh.nodes.filter((node) => unavailableDirectTruthNodeIds.has(normalizeMeshNodeId(node) ?? "")).every((node) => node?.isLocalWorktree === true);
|
|
48217
|
-
const directTruthSatisfied = !requireDirectPeerTruth || effectiveDirectTruth.directEvidenceCount > 0 && (effectiveDirectTruth.unavailableNodeIds.length === 0 || unavailableNodesAreOnlyRemovedWorktrees);
|
|
48218
|
-
if (requireDirectPeerTruth && !directTruthSatisfied) {
|
|
48235
|
+
const directTruthSatisfied = !requireDirectPeerTruth || !refreshRequested || effectiveDirectTruth.directEvidenceCount > 0 && (effectiveDirectTruth.unavailableNodeIds.length === 0 || unavailableNodesAreOnlyRemovedWorktrees);
|
|
48236
|
+
if (requireDirectPeerTruth && refreshRequested && !directTruthSatisfied) {
|
|
48219
48237
|
const failureResult = {
|
|
48220
48238
|
success: false,
|
|
48221
48239
|
code: "mesh_direct_peer_truth_unavailable",
|
|
@@ -48361,7 +48379,7 @@ ${ptyResult.output.slice(-2e3)}`);
|
|
|
48361
48379
|
status.connection = buildLivePeerGitConnection(connection, refreshedAt);
|
|
48362
48380
|
}
|
|
48363
48381
|
remoteProbeApplied = true;
|
|
48364
|
-
} else if (!isSelfNode && daemonId && this.deps.dispatchMeshCommand && !directTruthUnavailableNodeIds.has(nodeId)) {
|
|
48382
|
+
} else if (refreshRequested && !isSelfNode && daemonId && this.deps.dispatchMeshCommand && !directTruthUnavailableNodeIds.has(nodeId)) {
|
|
48365
48383
|
try {
|
|
48366
48384
|
const remoteGit = await probeRemoteMeshGitStatus({
|
|
48367
48385
|
dispatchMeshCommand: this.deps.dispatchMeshCommand,
|