@adhdev/daemon-core 0.9.82-rc.515 → 0.9.82-rc.516
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/config/mesh-config.d.ts +6 -4
- package/dist/git/git-commands.d.ts +0 -9
- package/dist/index.js +23 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -50
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-node-slots.d.ts +11 -27
- package/dist/repo-mesh-types.d.ts +20 -31
- package/package.json +3 -3
- package/src/boot/daemon-lifecycle.ts +15 -14
- package/src/config/mesh-config.ts +6 -4
- package/src/git/git-commands.ts +12 -21
- package/src/mesh/mesh-node-identity.ts +26 -25
- package/src/mesh/mesh-node-slots.ts +12 -54
- package/src/repo-mesh-types.ts +20 -31
package/dist/index.mjs
CHANGED
|
@@ -412,10 +412,10 @@ function readInjected(value) {
|
|
|
412
412
|
}
|
|
413
413
|
function getDaemonBuildInfo() {
|
|
414
414
|
if (cached) return cached;
|
|
415
|
-
const commit = readInjected(true ? "
|
|
416
|
-
const commitShort = readInjected(true ? "
|
|
417
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
418
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
415
|
+
const commit = readInjected(true ? "44f968ef212752dc22351f84bb98ffd6c4b04718" : void 0) ?? "unknown";
|
|
416
|
+
const commitShort = readInjected(true ? "44f968ef" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
417
|
+
const version = readInjected(true ? "0.9.82-rc.516" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
418
|
+
const builtAt = readInjected(true ? "2026-07-13T10:57:56.058Z" : void 0);
|
|
419
419
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
420
420
|
return cached;
|
|
421
421
|
}
|
|
@@ -3669,8 +3669,6 @@ function normalizeProviderPriority(policy) {
|
|
|
3669
3669
|
function resolveNodeCapabilitySlots(node) {
|
|
3670
3670
|
const explicit = normalizeNodeCapabilitySlots(node?.policy?.slots);
|
|
3671
3671
|
if (explicit.length) return explicit;
|
|
3672
|
-
const mirrored = normalizeNodeCapabilitySlots(node?.reportedMemberState?.slots);
|
|
3673
|
-
if (mirrored.length) return mirrored;
|
|
3674
3672
|
let difficultyBrains;
|
|
3675
3673
|
try {
|
|
3676
3674
|
difficultyBrains = getDifficultyBrains();
|
|
@@ -3682,26 +3680,6 @@ function resolveNodeCapabilitySlots(node) {
|
|
|
3682
3680
|
difficultyBrains
|
|
3683
3681
|
});
|
|
3684
3682
|
}
|
|
3685
|
-
function resolveLocalNodeSlotsForWorkspace(workspace) {
|
|
3686
|
-
const ws = typeof workspace === "string" ? workspace.trim() : "";
|
|
3687
|
-
if (!ws) return [];
|
|
3688
|
-
let meshes;
|
|
3689
|
-
try {
|
|
3690
|
-
meshes = listMeshes();
|
|
3691
|
-
} catch {
|
|
3692
|
-
return [];
|
|
3693
|
-
}
|
|
3694
|
-
for (const mesh of Array.isArray(meshes) ? meshes : []) {
|
|
3695
|
-
for (const node of Array.isArray(mesh?.nodes) ? mesh.nodes : []) {
|
|
3696
|
-
const nodeWs = typeof node?.workspace === "string" ? node.workspace : "";
|
|
3697
|
-
if (nodeWs && meshWorkspacesEquivalent(nodeWs, ws)) {
|
|
3698
|
-
const slots = resolveNodeCapabilitySlots({ policy: node?.policy });
|
|
3699
|
-
if (slots.length) return slots;
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
}
|
|
3703
|
-
return [];
|
|
3704
|
-
}
|
|
3705
3683
|
var init_mesh_node_slots = __esm({
|
|
3706
3684
|
"src/mesh/mesh-node-slots.ts"() {
|
|
3707
3685
|
"use strict";
|
|
@@ -14652,14 +14630,12 @@ function recordInlineMeshDirectGitTruth(node, git, source) {
|
|
|
14652
14630
|
const reporterDaemonBuildVersion = readStringValue(unified?.daemonBuildVersion) ?? readStringValue(git.reporterDaemonBuildVersion) ?? (isLocalSource ? readLocalReporterDaemonBuildVersion() : null) ?? null;
|
|
14653
14631
|
if (reporterDaemonBuildVersion) node.reportedDaemonBuildVersion = reporterDaemonBuildVersion;
|
|
14654
14632
|
if (!isLocalSource) {
|
|
14655
|
-
const reportedSlots = normalizeNodeCapabilitySlots(unified?.slots);
|
|
14656
14633
|
const mirrored = {
|
|
14657
14634
|
...reporterProviderVersions ? { providerVersions: reporterProviderVersions } : {},
|
|
14658
14635
|
...reporterDaemonBuildVersion ? { daemonBuildVersion: reporterDaemonBuildVersion } : {},
|
|
14659
|
-
...reportedSlots.length ? { slots: reportedSlots } : {},
|
|
14660
14636
|
lastReportedAt: readNumberValue(unified?.lastReportedAt) ?? checkedAt
|
|
14661
14637
|
};
|
|
14662
|
-
if (mirrored.providerVersions || mirrored.daemonBuildVersion
|
|
14638
|
+
if (mirrored.providerVersions || mirrored.daemonBuildVersion) {
|
|
14663
14639
|
node.reportedMemberState = mirrored;
|
|
14664
14640
|
}
|
|
14665
14641
|
}
|
|
@@ -14677,15 +14653,13 @@ function normalizeReportedMemberState(value) {
|
|
|
14677
14653
|
const raw = value;
|
|
14678
14654
|
const providerVersions = readProviderVersionsRecord(raw.providerVersions);
|
|
14679
14655
|
const daemonBuildVersion = readStringValue(raw.daemonBuildVersion);
|
|
14680
|
-
const slots = normalizeNodeCapabilitySlots(raw.slots);
|
|
14681
14656
|
const lastReportedAt = readNumberValue(raw.lastReportedAt);
|
|
14682
|
-
if (!providerVersions && !daemonBuildVersion &&
|
|
14657
|
+
if (!providerVersions && !daemonBuildVersion && lastReportedAt === void 0) {
|
|
14683
14658
|
return null;
|
|
14684
14659
|
}
|
|
14685
14660
|
return {
|
|
14686
14661
|
...providerVersions ? { providerVersions } : {},
|
|
14687
14662
|
...daemonBuildVersion ? { daemonBuildVersion } : {},
|
|
14688
|
-
...slots.length ? { slots } : {},
|
|
14689
14663
|
...lastReportedAt !== void 0 ? { lastReportedAt } : {}
|
|
14690
14664
|
};
|
|
14691
14665
|
}
|
|
@@ -29158,11 +29132,9 @@ async function handleGitCommand(command, args, services = defaultGitCommandServi
|
|
|
29158
29132
|
})();
|
|
29159
29133
|
const reporterProviderVersions = reporterVersions.providerVersions && Object.keys(reporterVersions.providerVersions).length > 0 ? reporterVersions.providerVersions : void 0;
|
|
29160
29134
|
const reporterDaemonBuildVersion = typeof reporterVersions.daemonBuildVersion === "string" && reporterVersions.daemonBuildVersion.trim() ? reporterVersions.daemonBuildVersion.trim() : void 0;
|
|
29161
|
-
const
|
|
29162
|
-
const reporterMemberState = reporterProviderVersions || reporterDaemonBuildVersion || reporterSlots ? {
|
|
29135
|
+
const reporterMemberState = reporterProviderVersions || reporterDaemonBuildVersion ? {
|
|
29163
29136
|
...reporterProviderVersions ? { providerVersions: reporterProviderVersions } : {},
|
|
29164
29137
|
...reporterDaemonBuildVersion ? { daemonBuildVersion: reporterDaemonBuildVersion } : {},
|
|
29165
|
-
...reporterSlots ? { slots: reporterSlots } : {},
|
|
29166
29138
|
lastReportedAt: Date.now()
|
|
29167
29139
|
} : void 0;
|
|
29168
29140
|
return {
|
|
@@ -70511,7 +70483,6 @@ var SessionRegistry = class {
|
|
|
70511
70483
|
init_logger();
|
|
70512
70484
|
init_runtime_defaults();
|
|
70513
70485
|
init_config();
|
|
70514
|
-
init_mesh_node_slots();
|
|
70515
70486
|
init_mesh_events();
|
|
70516
70487
|
init_mesh_reconcile_loop();
|
|
70517
70488
|
init_coordinator_registry();
|
|
@@ -70653,24 +70624,26 @@ async function initDaemonComponents(config) {
|
|
|
70653
70624
|
instanceManager,
|
|
70654
70625
|
sessionRegistry,
|
|
70655
70626
|
gitCommandServices: createDefaultGitCommandServices({
|
|
70656
|
-
// T7
|
|
70657
|
-
//
|
|
70658
|
-
//
|
|
70659
|
-
//
|
|
70660
|
-
//
|
|
70661
|
-
//
|
|
70662
|
-
//
|
|
70663
|
-
//
|
|
70664
|
-
//
|
|
70665
|
-
//
|
|
70666
|
-
|
|
70627
|
+
// T7: fold this daemon's cached provider versions + build version onto the
|
|
70628
|
+
// git_status envelope so the mesh coordinator self-heals each node's
|
|
70629
|
+
// providerVersions/build (the blue version chips) — these are per-machine
|
|
70630
|
+
// RUNTIME facts (e.g. this node has claude-cli@2.1.168 while the
|
|
70631
|
+
// coordinator has @2.1.170), so they stay reported. Non-blocking: reads a
|
|
70632
|
+
// TTL cache, lazily refreshed. (setDefaultProviderLoader is registered
|
|
70633
|
+
// above so getCachedProviderVersions is not empty — see the 380556d3
|
|
70634
|
+
// version-chip lesson.)
|
|
70635
|
+
//
|
|
70636
|
+
// Slots are NOT reported: they are coordinator-owned config
|
|
70637
|
+
// (node.policy.slots for every node, resolved via
|
|
70638
|
+
// resolveNodeCapabilitySlots), not a per-machine runtime fact — the
|
|
70639
|
+
// reporter round-trip for slots was removed (REMOTE-NODE-SLOTS-
|
|
70640
|
+
// COORDINATOR-LOCAL fix).
|
|
70641
|
+
getReporterProviderVersions: () => {
|
|
70667
70642
|
const providerVersions = getCachedProviderVersions(providerLoader);
|
|
70668
70643
|
const daemonBuildVersion = getDaemonBuildInfo().version;
|
|
70669
|
-
const slots = resolveLocalNodeSlotsForWorkspace(workspace);
|
|
70670
70644
|
return {
|
|
70671
70645
|
...Object.keys(providerVersions).length > 0 ? { providerVersions } : {},
|
|
70672
|
-
...daemonBuildVersion && daemonBuildVersion !== "unknown" ? { daemonBuildVersion } : {}
|
|
70673
|
-
...slots.length > 0 ? { slots } : {}
|
|
70646
|
+
...daemonBuildVersion && daemonBuildVersion !== "unknown" ? { daemonBuildVersion } : {}
|
|
70674
70647
|
};
|
|
70675
70648
|
}
|
|
70676
70649
|
}),
|